@marcoappio/marco-config 4.0.9 → 4.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,442 @@
1
+ import * as v from 'valibot';
2
+ export declare const profilesTable: {
3
+ readonly fields: {
4
+ readonly email: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
5
+ readonly avatarFileId: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>, undefined>>;
6
+ readonly deletionRequestedAt: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
7
+ readonly name: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
8
+ readonly onboardingState: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
9
+ readonly timezone: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
10
+ };
11
+ readonly id: "profiles";
12
+ readonly indexes: readonly [{
13
+ readonly attributes: readonly ["email"];
14
+ readonly name: "email_unique";
15
+ readonly type: "unique";
16
+ }];
17
+ readonly key: "profiles";
18
+ readonly name: "Profiles";
19
+ };
20
+ export declare const profileAvatarCleanupsTable: {
21
+ readonly fields: {
22
+ readonly fileId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
23
+ readonly claimId: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
24
+ readonly claimedAt: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
25
+ readonly profile: import("./shared").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
26
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
27
+ }, undefined>, v.TransformAction<{
28
+ $id: string;
29
+ }, string>]>], undefined>>;
30
+ };
31
+ readonly id: "profile_avatar_cleanups";
32
+ readonly indexes: readonly [];
33
+ readonly key: "profileAvatarCleanups";
34
+ readonly name: "Profile avatar cleanups";
35
+ readonly wirePermissions: "empty";
36
+ };
37
+ export declare const savedViewsTable: {
38
+ readonly fields: {
39
+ readonly name: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
40
+ readonly icon: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
41
+ readonly aliasIds: import("./shared").AppwriteColumnSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
42
+ readonly profile: import("./shared").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
43
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
44
+ }, undefined>, v.TransformAction<{
45
+ $id: string;
46
+ }, string>]>], undefined>>;
47
+ };
48
+ readonly id: "saved_views";
49
+ readonly indexes: readonly [];
50
+ readonly key: "savedViews";
51
+ readonly name: "Saved views";
52
+ };
53
+ export declare const accountsTable: {
54
+ readonly fields: {
55
+ readonly profileAssignmentKey: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
56
+ readonly provider: import("./shared").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>>;
57
+ readonly state: import("./shared").AppwriteColumnSchema<v.PicklistSchema<readonly ["AWAITING_CONNECTION", "CONNECTED", "ERROR", "DISCONNECTED"], undefined>>;
58
+ readonly primaryEmail: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
59
+ readonly displayName: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
60
+ readonly colour: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 64, undefined>]>>;
61
+ readonly pollShardAssignmentId: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
62
+ readonly pollShardId: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
63
+ readonly lastSuccessfulSyncAt: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
64
+ readonly lastErrorCode: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
65
+ readonly mailProcessedCount: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
66
+ readonly mailTotalCount: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
67
+ readonly initialSyncCompletedAt: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
68
+ readonly credential: import("./shared").AppwriteRelationshipSchema<v.NullableSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
69
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
70
+ }, undefined>, v.TransformAction<{
71
+ $id: string;
72
+ }, string>]>], undefined>, undefined>>;
73
+ readonly mailboxSyncState: import("./shared").AppwriteRelationshipSchema<v.NullableSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
74
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
75
+ }, undefined>, v.TransformAction<{
76
+ $id: string;
77
+ }, string>]>], undefined>, undefined>>;
78
+ readonly primaryAlias: import("./shared").AppwriteRelationshipSchema<v.NullableSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
79
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
80
+ }, undefined>, v.TransformAction<{
81
+ $id: string;
82
+ }, string>]>], undefined>, undefined>>;
83
+ readonly profile: import("./shared").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
84
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
85
+ }, undefined>, v.TransformAction<{
86
+ $id: string;
87
+ }, string>]>], undefined>>;
88
+ };
89
+ readonly id: "accounts";
90
+ readonly indexes: readonly [{
91
+ readonly attributes: readonly ["profileAssignmentKey"];
92
+ readonly name: "assignment_profile";
93
+ readonly type: "key";
94
+ }, {
95
+ readonly attributes: readonly ["profileAssignmentKey", "state"];
96
+ readonly name: "assignment_profile_state";
97
+ readonly type: "key";
98
+ }, {
99
+ readonly attributes: readonly ["state"];
100
+ readonly name: "state";
101
+ readonly type: "key";
102
+ }, {
103
+ readonly attributes: readonly ["state", "pollShardAssignmentId"];
104
+ readonly name: "state_poll_shard_assignment";
105
+ readonly type: "key";
106
+ }, {
107
+ readonly attributes: readonly ["pollShardAssignmentId"];
108
+ readonly name: "poll_shard_assignment";
109
+ readonly type: "key";
110
+ }, {
111
+ readonly attributes: readonly ["pollShardId"];
112
+ readonly name: "poll_shard";
113
+ readonly type: "key";
114
+ }];
115
+ readonly key: "accounts";
116
+ readonly name: "Accounts";
117
+ };
118
+ export declare const oauthStatesTable: {
119
+ readonly fields: {
120
+ readonly userId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
121
+ readonly accountId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
122
+ readonly email: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
123
+ readonly expiresAt: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>>;
124
+ readonly nonceHash: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
125
+ readonly operation: import("./shared").AppwriteColumnSchema<v.PicklistSchema<readonly ["CONNECT", "REPLACE"], undefined>>;
126
+ readonly provider: import("./shared").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK"], undefined>>;
127
+ readonly returnUri: import("./shared").AppwriteColumnSchema<v.PicklistSchema<readonly ["https://app.marcoapp.io/onboarding/loading"], undefined>>;
128
+ readonly profile: import("./shared").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
129
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
130
+ }, undefined>, v.TransformAction<{
131
+ $id: string;
132
+ }, string>]>], undefined>>;
133
+ };
134
+ readonly id: "oauth_states";
135
+ readonly indexes: readonly [];
136
+ readonly key: "oauthStates";
137
+ readonly name: "OAuth states";
138
+ };
139
+ export declare const credentialsTable: {
140
+ readonly fields: {
141
+ readonly userId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
142
+ readonly accountId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
143
+ readonly provider: import("./shared").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>>;
144
+ readonly encryptedPayload: import("./shared").AppwriteColumnSchema<v.StringSchema<undefined>>;
145
+ readonly expiresAt: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
146
+ readonly refreshLeaseExpiresAt: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
147
+ readonly refreshLeaseId: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
148
+ };
149
+ readonly id: "credentials";
150
+ readonly indexes: readonly [{
151
+ readonly attributes: readonly ["userId"];
152
+ readonly name: "user";
153
+ readonly type: "key";
154
+ }, {
155
+ readonly attributes: readonly ["accountId"];
156
+ readonly name: "account_unique";
157
+ readonly type: "unique";
158
+ }];
159
+ readonly key: "credentials";
160
+ readonly name: "Credentials";
161
+ };
162
+ export declare const aliasesTable: {
163
+ readonly fields: {
164
+ readonly accountAssignmentKey: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
165
+ readonly providerId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
166
+ readonly email: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
167
+ readonly name: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
168
+ readonly signature: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
169
+ readonly isPrimary: import("./shared").AppwriteColumnSchema<v.BooleanSchema<undefined>>;
170
+ readonly account: import("./shared").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
171
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
172
+ }, undefined>, v.TransformAction<{
173
+ $id: string;
174
+ }, string>]>], undefined>>;
175
+ };
176
+ readonly id: "aliases";
177
+ readonly indexes: readonly [{
178
+ readonly attributes: readonly ["accountAssignmentKey"];
179
+ readonly name: "assignment_account";
180
+ readonly type: "key";
181
+ }, {
182
+ readonly attributes: readonly ["accountAssignmentKey", "providerId"];
183
+ readonly name: "assignment_account_provider_unique";
184
+ readonly type: "unique";
185
+ }];
186
+ readonly key: "aliases";
187
+ readonly name: "Aliases";
188
+ };
189
+ export declare const labelsTable: {
190
+ readonly fields: {
191
+ readonly accountAssignmentKey: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
192
+ readonly providerId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
193
+ readonly name: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
194
+ readonly path: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
195
+ readonly specialUse: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.PicklistSchema<readonly ["ALL", "ARCHIVE", "DRAFTS", "INBOX", "JUNK", "SENT", "STARRED", "TRASH"], undefined>, undefined>>;
196
+ readonly totalCount: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
197
+ readonly unreadCount: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
198
+ readonly account: import("./shared").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
199
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
200
+ }, undefined>, v.TransformAction<{
201
+ $id: string;
202
+ }, string>]>], undefined>>;
203
+ };
204
+ readonly id: "labels";
205
+ readonly indexes: readonly [{
206
+ readonly attributes: readonly ["accountAssignmentKey", "specialUse"];
207
+ readonly name: "assignment_account_special_use";
208
+ readonly type: "key";
209
+ }, {
210
+ readonly attributes: readonly ["accountAssignmentKey", "path"];
211
+ readonly name: "assignment_account_path_unique";
212
+ readonly type: "unique";
213
+ }, {
214
+ readonly attributes: readonly ["accountAssignmentKey", "providerId"];
215
+ readonly name: "assignment_account_provider_unique";
216
+ readonly type: "unique";
217
+ }];
218
+ readonly key: "labels";
219
+ readonly name: "Labels";
220
+ };
221
+ export declare const identityTableInputs: {
222
+ readonly accounts: {
223
+ readonly fields: {
224
+ readonly profileAssignmentKey: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
225
+ readonly provider: import("./shared").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>>;
226
+ readonly state: import("./shared").AppwriteColumnSchema<v.PicklistSchema<readonly ["AWAITING_CONNECTION", "CONNECTED", "ERROR", "DISCONNECTED"], undefined>>;
227
+ readonly primaryEmail: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
228
+ readonly displayName: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
229
+ readonly colour: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 64, undefined>]>>;
230
+ readonly pollShardAssignmentId: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
231
+ readonly pollShardId: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
232
+ readonly lastSuccessfulSyncAt: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
233
+ readonly lastErrorCode: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
234
+ readonly mailProcessedCount: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
235
+ readonly mailTotalCount: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
236
+ readonly initialSyncCompletedAt: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
237
+ readonly credential: import("./shared").AppwriteRelationshipSchema<v.NullableSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
238
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
239
+ }, undefined>, v.TransformAction<{
240
+ $id: string;
241
+ }, string>]>], undefined>, undefined>>;
242
+ readonly mailboxSyncState: import("./shared").AppwriteRelationshipSchema<v.NullableSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
243
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
244
+ }, undefined>, v.TransformAction<{
245
+ $id: string;
246
+ }, string>]>], undefined>, undefined>>;
247
+ readonly primaryAlias: import("./shared").AppwriteRelationshipSchema<v.NullableSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
248
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
249
+ }, undefined>, v.TransformAction<{
250
+ $id: string;
251
+ }, string>]>], undefined>, undefined>>;
252
+ readonly profile: import("./shared").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
253
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
254
+ }, undefined>, v.TransformAction<{
255
+ $id: string;
256
+ }, string>]>], undefined>>;
257
+ };
258
+ readonly id: "accounts";
259
+ readonly indexes: readonly [{
260
+ readonly attributes: readonly ["profileAssignmentKey"];
261
+ readonly name: "assignment_profile";
262
+ readonly type: "key";
263
+ }, {
264
+ readonly attributes: readonly ["profileAssignmentKey", "state"];
265
+ readonly name: "assignment_profile_state";
266
+ readonly type: "key";
267
+ }, {
268
+ readonly attributes: readonly ["state"];
269
+ readonly name: "state";
270
+ readonly type: "key";
271
+ }, {
272
+ readonly attributes: readonly ["state", "pollShardAssignmentId"];
273
+ readonly name: "state_poll_shard_assignment";
274
+ readonly type: "key";
275
+ }, {
276
+ readonly attributes: readonly ["pollShardAssignmentId"];
277
+ readonly name: "poll_shard_assignment";
278
+ readonly type: "key";
279
+ }, {
280
+ readonly attributes: readonly ["pollShardId"];
281
+ readonly name: "poll_shard";
282
+ readonly type: "key";
283
+ }];
284
+ readonly key: "accounts";
285
+ readonly name: "Accounts";
286
+ };
287
+ readonly aliases: {
288
+ readonly fields: {
289
+ readonly accountAssignmentKey: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
290
+ readonly providerId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
291
+ readonly email: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
292
+ readonly name: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
293
+ readonly signature: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
294
+ readonly isPrimary: import("./shared").AppwriteColumnSchema<v.BooleanSchema<undefined>>;
295
+ readonly account: import("./shared").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
296
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
297
+ }, undefined>, v.TransformAction<{
298
+ $id: string;
299
+ }, string>]>], undefined>>;
300
+ };
301
+ readonly id: "aliases";
302
+ readonly indexes: readonly [{
303
+ readonly attributes: readonly ["accountAssignmentKey"];
304
+ readonly name: "assignment_account";
305
+ readonly type: "key";
306
+ }, {
307
+ readonly attributes: readonly ["accountAssignmentKey", "providerId"];
308
+ readonly name: "assignment_account_provider_unique";
309
+ readonly type: "unique";
310
+ }];
311
+ readonly key: "aliases";
312
+ readonly name: "Aliases";
313
+ };
314
+ readonly credentials: {
315
+ readonly fields: {
316
+ readonly userId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
317
+ readonly accountId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
318
+ readonly provider: import("./shared").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>>;
319
+ readonly encryptedPayload: import("./shared").AppwriteColumnSchema<v.StringSchema<undefined>>;
320
+ readonly expiresAt: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
321
+ readonly refreshLeaseExpiresAt: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
322
+ readonly refreshLeaseId: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
323
+ };
324
+ readonly id: "credentials";
325
+ readonly indexes: readonly [{
326
+ readonly attributes: readonly ["userId"];
327
+ readonly name: "user";
328
+ readonly type: "key";
329
+ }, {
330
+ readonly attributes: readonly ["accountId"];
331
+ readonly name: "account_unique";
332
+ readonly type: "unique";
333
+ }];
334
+ readonly key: "credentials";
335
+ readonly name: "Credentials";
336
+ };
337
+ readonly labels: {
338
+ readonly fields: {
339
+ readonly accountAssignmentKey: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
340
+ readonly providerId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
341
+ readonly name: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
342
+ readonly path: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
343
+ readonly specialUse: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.PicklistSchema<readonly ["ALL", "ARCHIVE", "DRAFTS", "INBOX", "JUNK", "SENT", "STARRED", "TRASH"], undefined>, undefined>>;
344
+ readonly totalCount: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
345
+ readonly unreadCount: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
346
+ readonly account: import("./shared").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
347
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
348
+ }, undefined>, v.TransformAction<{
349
+ $id: string;
350
+ }, string>]>], undefined>>;
351
+ };
352
+ readonly id: "labels";
353
+ readonly indexes: readonly [{
354
+ readonly attributes: readonly ["accountAssignmentKey", "specialUse"];
355
+ readonly name: "assignment_account_special_use";
356
+ readonly type: "key";
357
+ }, {
358
+ readonly attributes: readonly ["accountAssignmentKey", "path"];
359
+ readonly name: "assignment_account_path_unique";
360
+ readonly type: "unique";
361
+ }, {
362
+ readonly attributes: readonly ["accountAssignmentKey", "providerId"];
363
+ readonly name: "assignment_account_provider_unique";
364
+ readonly type: "unique";
365
+ }];
366
+ readonly key: "labels";
367
+ readonly name: "Labels";
368
+ };
369
+ readonly oauthStates: {
370
+ readonly fields: {
371
+ readonly userId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
372
+ readonly accountId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
373
+ readonly email: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
374
+ readonly expiresAt: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>>;
375
+ readonly nonceHash: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
376
+ readonly operation: import("./shared").AppwriteColumnSchema<v.PicklistSchema<readonly ["CONNECT", "REPLACE"], undefined>>;
377
+ readonly provider: import("./shared").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK"], undefined>>;
378
+ readonly returnUri: import("./shared").AppwriteColumnSchema<v.PicklistSchema<readonly ["https://app.marcoapp.io/onboarding/loading"], undefined>>;
379
+ readonly profile: import("./shared").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
380
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
381
+ }, undefined>, v.TransformAction<{
382
+ $id: string;
383
+ }, string>]>], undefined>>;
384
+ };
385
+ readonly id: "oauth_states";
386
+ readonly indexes: readonly [];
387
+ readonly key: "oauthStates";
388
+ readonly name: "OAuth states";
389
+ };
390
+ readonly profileAvatarCleanups: {
391
+ readonly fields: {
392
+ readonly fileId: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
393
+ readonly claimId: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
394
+ readonly claimedAt: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
395
+ readonly profile: import("./shared").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
396
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
397
+ }, undefined>, v.TransformAction<{
398
+ $id: string;
399
+ }, string>]>], undefined>>;
400
+ };
401
+ readonly id: "profile_avatar_cleanups";
402
+ readonly indexes: readonly [];
403
+ readonly key: "profileAvatarCleanups";
404
+ readonly name: "Profile avatar cleanups";
405
+ readonly wirePermissions: "empty";
406
+ };
407
+ readonly profiles: {
408
+ readonly fields: {
409
+ readonly email: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>>;
410
+ readonly avatarFileId: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>, undefined>>;
411
+ readonly deletionRequestedAt: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
412
+ readonly name: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
413
+ readonly onboardingState: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
414
+ readonly timezone: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
415
+ };
416
+ readonly id: "profiles";
417
+ readonly indexes: readonly [{
418
+ readonly attributes: readonly ["email"];
419
+ readonly name: "email_unique";
420
+ readonly type: "unique";
421
+ }];
422
+ readonly key: "profiles";
423
+ readonly name: "Profiles";
424
+ };
425
+ readonly savedViews: {
426
+ readonly fields: {
427
+ readonly name: import("./shared").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
428
+ readonly icon: import("./shared").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
429
+ readonly aliasIds: import("./shared").AppwriteColumnSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
430
+ readonly profile: import("./shared").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
431
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
432
+ }, undefined>, v.TransformAction<{
433
+ $id: string;
434
+ }, string>]>], undefined>>;
435
+ };
436
+ readonly id: "saved_views";
437
+ readonly indexes: readonly [];
438
+ readonly key: "savedViews";
439
+ readonly name: "Saved views";
440
+ };
441
+ };
442
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/appwrite/tableContract/identity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA0B5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;CAaxB,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;CAYrC,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;CAW1B,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BxB,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;CAgB3B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;CAiB3B,CAAA;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBvB,CAAA;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBtB,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAStB,CAAA"}
@@ -0,0 +1,158 @@
1
+ import * as v from 'valibot';
2
+ /* oxlint-disable eslint/sort-keys */
3
+ import { accountProviders, accountStates, appwriteColumnDefinitions, appwriteIds, appwriteRelationship, appwriteRelationshipIdSchema, colourSchema, defineAppwriteTable, emailSchema, identifierSchema, labelSpecialUses, oauthOperations, oauthProviders, oauthReturnUriSchema, appwriteRowIdSchema, timestampSchema, nonNegativeIntegerSchema, } from './shared';
4
+ const { boolean, dateTime, enumValue, identifier, integer, longText, string: stringColumn, stringArray, text } = appwriteColumnDefinitions;
5
+ export const profilesTable = defineAppwriteTable({
6
+ fields: {
7
+ email: stringColumn(emailSchema, true, 320),
8
+ avatarFileId: stringColumn(v.nullable(appwriteRowIdSchema), false, 36),
9
+ deletionRequestedAt: dateTime(v.nullable(timestampSchema), false),
10
+ name: stringColumn(v.nullable(identifierSchema), false),
11
+ onboardingState: stringColumn(v.nullable(identifierSchema), false),
12
+ timezone: stringColumn(v.nullable(identifierSchema), false),
13
+ },
14
+ id: appwriteIds.tables.profiles,
15
+ indexes: [{ attributes: ['email'], name: 'email_unique', type: 'unique' }],
16
+ key: 'profiles',
17
+ name: 'Profiles',
18
+ });
19
+ export const profileAvatarCleanupsTable = defineAppwriteTable({
20
+ fields: {
21
+ fileId: stringColumn(identifierSchema, true, 36),
22
+ claimId: stringColumn(v.nullable(identifierSchema), false),
23
+ claimedAt: dateTime(v.nullable(timestampSchema), false),
24
+ profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
25
+ },
26
+ id: appwriteIds.tables.profileAvatarCleanups,
27
+ indexes: [],
28
+ key: 'profileAvatarCleanups',
29
+ name: 'Profile avatar cleanups',
30
+ wirePermissions: 'empty',
31
+ });
32
+ export const savedViewsTable = defineAppwriteTable({
33
+ fields: {
34
+ name: stringColumn(identifierSchema),
35
+ icon: stringColumn(v.nullable(identifierSchema), false),
36
+ aliasIds: stringArray(v.array(identifierSchema)),
37
+ profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
38
+ },
39
+ id: appwriteIds.tables.savedViews,
40
+ indexes: [],
41
+ key: 'savedViews',
42
+ name: 'Saved views',
43
+ });
44
+ export const accountsTable = defineAppwriteTable({
45
+ fields: {
46
+ profileAssignmentKey: identifier(identifierSchema),
47
+ provider: enumValue(v.picklist(accountProviders), accountProviders),
48
+ state: enumValue(v.picklist(accountStates), accountStates),
49
+ primaryEmail: stringColumn(emailSchema, true, 320),
50
+ displayName: stringColumn(v.nullable(identifierSchema), false),
51
+ colour: stringColumn(colourSchema, true, 64),
52
+ pollShardAssignmentId: identifier(v.nullable(identifierSchema), false),
53
+ pollShardId: identifier(v.nullable(identifierSchema), false),
54
+ lastSuccessfulSyncAt: dateTime(v.nullable(timestampSchema), false),
55
+ lastErrorCode: stringColumn(v.nullable(identifierSchema), false),
56
+ mailProcessedCount: integer(nonNegativeIntegerSchema),
57
+ mailTotalCount: integer(nonNegativeIntegerSchema),
58
+ initialSyncCompletedAt: dateTime(v.nullable(timestampSchema), false),
59
+ credential: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'credentials', 'oneToOne'),
60
+ mailboxSyncState: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'mailboxSyncStates', 'oneToOne'),
61
+ primaryAlias: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'aliases', 'oneToOne', 'setNull'),
62
+ profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
63
+ },
64
+ id: appwriteIds.tables.accounts,
65
+ indexes: [
66
+ { attributes: ['profileAssignmentKey'], name: 'assignment_profile', type: 'key' },
67
+ { attributes: ['profileAssignmentKey', 'state'], name: 'assignment_profile_state', type: 'key' },
68
+ { attributes: ['state'], name: 'state', type: 'key' },
69
+ { attributes: ['state', 'pollShardAssignmentId'], name: 'state_poll_shard_assignment', type: 'key' },
70
+ { attributes: ['pollShardAssignmentId'], name: 'poll_shard_assignment', type: 'key' },
71
+ { attributes: ['pollShardId'], name: 'poll_shard', type: 'key' },
72
+ ],
73
+ key: 'accounts',
74
+ name: 'Accounts',
75
+ });
76
+ export const oauthStatesTable = defineAppwriteTable({
77
+ fields: {
78
+ userId: stringColumn(identifierSchema),
79
+ accountId: stringColumn(identifierSchema),
80
+ email: stringColumn(emailSchema, true, 320),
81
+ expiresAt: dateTime(timestampSchema),
82
+ nonceHash: stringColumn(identifierSchema),
83
+ operation: enumValue(v.picklist(oauthOperations), oauthOperations),
84
+ provider: enumValue(v.picklist(oauthProviders), oauthProviders),
85
+ returnUri: stringColumn(oauthReturnUriSchema),
86
+ profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
87
+ },
88
+ id: appwriteIds.tables.oauthStates,
89
+ indexes: [],
90
+ key: 'oauthStates',
91
+ name: 'OAuth states',
92
+ });
93
+ export const credentialsTable = defineAppwriteTable({
94
+ fields: {
95
+ userId: stringColumn(identifierSchema),
96
+ accountId: stringColumn(identifierSchema),
97
+ provider: enumValue(v.picklist(accountProviders), accountProviders),
98
+ encryptedPayload: longText(v.string()),
99
+ expiresAt: dateTime(v.nullable(timestampSchema), false),
100
+ refreshLeaseExpiresAt: dateTime(v.nullable(timestampSchema), false),
101
+ refreshLeaseId: stringColumn(v.nullable(identifierSchema), false, 36),
102
+ },
103
+ id: appwriteIds.tables.credentials,
104
+ indexes: [
105
+ { attributes: ['userId'], name: 'user', type: 'key' },
106
+ { attributes: ['accountId'], name: 'account_unique', type: 'unique' },
107
+ ],
108
+ key: 'credentials',
109
+ name: 'Credentials',
110
+ });
111
+ export const aliasesTable = defineAppwriteTable({
112
+ fields: {
113
+ accountAssignmentKey: identifier(identifierSchema),
114
+ providerId: stringColumn(identifierSchema),
115
+ email: stringColumn(emailSchema, true, 320),
116
+ name: stringColumn(v.nullable(identifierSchema), false),
117
+ signature: text(v.nullable(v.string()), false),
118
+ isPrimary: boolean(v.boolean()),
119
+ account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
120
+ },
121
+ id: appwriteIds.tables.aliases,
122
+ indexes: [
123
+ { attributes: ['accountAssignmentKey'], name: 'assignment_account', type: 'key' },
124
+ { attributes: ['accountAssignmentKey', 'providerId'], name: 'assignment_account_provider_unique', type: 'unique' },
125
+ ],
126
+ key: 'aliases',
127
+ name: 'Aliases',
128
+ });
129
+ export const labelsTable = defineAppwriteTable({
130
+ fields: {
131
+ accountAssignmentKey: identifier(identifierSchema),
132
+ providerId: stringColumn(identifierSchema),
133
+ name: stringColumn(v.nullable(identifierSchema), false),
134
+ path: stringColumn(identifierSchema),
135
+ specialUse: enumValue(v.nullable(v.picklist(labelSpecialUses)), labelSpecialUses, false),
136
+ totalCount: integer(nonNegativeIntegerSchema),
137
+ unreadCount: integer(nonNegativeIntegerSchema),
138
+ account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
139
+ },
140
+ id: appwriteIds.tables.labels,
141
+ indexes: [
142
+ { attributes: ['accountAssignmentKey', 'specialUse'], name: 'assignment_account_special_use', type: 'key' },
143
+ { attributes: ['accountAssignmentKey', 'path'], name: 'assignment_account_path_unique', type: 'unique' },
144
+ { attributes: ['accountAssignmentKey', 'providerId'], name: 'assignment_account_provider_unique', type: 'unique' },
145
+ ],
146
+ key: 'labels',
147
+ name: 'Labels',
148
+ });
149
+ export const identityTableInputs = {
150
+ accounts: accountsTable,
151
+ aliases: aliasesTable,
152
+ credentials: credentialsTable,
153
+ labels: labelsTable,
154
+ oauthStates: oauthStatesTable,
155
+ profileAvatarCleanups: profileAvatarCleanupsTable,
156
+ profiles: profilesTable,
157
+ savedViews: savedViewsTable,
158
+ };