@marcoappio/marco-config 4.0.12 → 4.0.14

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.
Files changed (56) hide show
  1. package/dist/appwrite/appwrite.d.ts +34 -47
  2. package/dist/appwrite/appwrite.d.ts.map +1 -1
  3. package/dist/appwrite/appwrite.js +4 -17
  4. package/dist/appwrite/appwrite.test.js +42 -0
  5. package/dist/appwrite/commands.d.ts +9 -9
  6. package/dist/appwrite/commands.d.ts.map +1 -1
  7. package/dist/appwrite/commands.js +8 -15
  8. package/dist/appwrite/commands.test.js +50 -0
  9. package/dist/appwrite/decodedSchemas.d.ts +35 -0
  10. package/dist/appwrite/decodedSchemas.d.ts.map +1 -0
  11. package/dist/appwrite/decodedSchemas.js +18 -0
  12. package/dist/appwrite/functions.d.ts +16 -16
  13. package/dist/appwrite/functions.d.ts.map +1 -1
  14. package/dist/appwrite/functions.js +3 -9
  15. package/dist/appwrite/tableContract/identity.d.ts +2 -2
  16. package/dist/appwrite/tableContract/identity.d.ts.map +1 -1
  17. package/dist/appwrite/tableContract/identity.js +12 -12
  18. package/dist/appwrite/tableContract/index.d.ts +36 -36
  19. package/dist/appwrite/tableContract/index.js +3 -3
  20. package/dist/appwrite/tableContract/mailbox.d.ts +10 -10
  21. package/dist/appwrite/tableContract/mailbox.d.ts.map +1 -1
  22. package/dist/appwrite/tableContract/mailbox.js +12 -12
  23. package/dist/appwrite/tableContract/operational.d.ts +12 -12
  24. package/dist/appwrite/tableContract/operational.d.ts.map +1 -1
  25. package/dist/appwrite/tableContract/operational.js +12 -12
  26. package/dist/appwrite/tableContract/shared.d.ts +1 -7
  27. package/dist/appwrite/tableContract/shared.d.ts.map +1 -1
  28. package/dist/appwrite/tableContract/shared.js +1 -7
  29. package/dist/schemas/emailAccount.d.ts +6 -6
  30. package/dist/schemas/emailAccount.d.ts.map +1 -1
  31. package/dist/schemas/emailAccount.js +4 -4
  32. package/dist/schemas/index.d.ts +35 -34
  33. package/dist/schemas/index.d.ts.map +1 -1
  34. package/dist/schemas/models/account.d.ts +2 -2
  35. package/dist/schemas/models/account.js +3 -3
  36. package/dist/schemas/models/contact.d.ts +1 -1
  37. package/dist/schemas/models/draft.d.ts +8 -8
  38. package/dist/schemas/models/draft.js +1 -1
  39. package/dist/schemas/models/numericSemantics.test.d.ts +2 -0
  40. package/dist/schemas/models/numericSemantics.test.d.ts.map +1 -0
  41. package/dist/schemas/models/numericSemantics.test.js +24 -0
  42. package/dist/schemas/models/thread.d.ts +16 -16
  43. package/dist/schemas/models/thread.js +2 -2
  44. package/dist/schemas/number.d.ts +2 -1
  45. package/dist/schemas/number.d.ts.map +1 -1
  46. package/dist/schemas/number.js +3 -1
  47. package/dist/schemas/scalars.d.ts +13 -0
  48. package/dist/schemas/scalars.d.ts.map +1 -0
  49. package/dist/schemas/scalars.js +15 -0
  50. package/dist/schemas/scalars.test.d.ts +2 -0
  51. package/dist/schemas/scalars.test.d.ts.map +1 -0
  52. package/dist/schemas/scalars.test.js +44 -0
  53. package/dist/schemas/string.d.ts +1 -1
  54. package/dist/schemas/string.d.ts.map +1 -1
  55. package/dist/schemas/string.js +3 -2
  56. package/package.json +1 -1
@@ -1,21 +1,10 @@
1
1
  import type { ReadonlyDeep } from 'type-fest';
2
2
  import * as v from 'valibot';
3
3
  export { appwriteRowIdSchema, appwriteTableIdSchema, appwriteTableIds, type AppwriteDataRow, type AppwriteRow, type AppwriteRowTable } from './tableContract';
4
+ export type { AppwriteDraftAttachment, AppwriteDraftEnvelope } from './decodedSchemas';
4
5
  export type { AppwriteMailboxSyncLane, AppwriteMailboxSyncLaneState, AppwriteMailboxSyncState, AppwritePollShardState, AppwriteTableId } from './tableContract';
5
6
  export { type AppwriteColumnDefinition, type AppwriteColumnSchema, type AppwriteColumnType, type AppwriteIndexDefinition, type AppwriteIndexType, type AppwriteRelationshipDefinition, type AppwriteRelationshipOnDelete, type AppwriteRelationshipSchema, type AppwriteRelationshipType, type AppwriteTableDefinition, type AppwriteTableInput, type AppwriteTableKey, appwriteDataSchemas, appwriteRowSchemas, appwriteTableContract, appwriteTables, defineAppwriteTables, } from './tableContract';
6
7
  export { accountProviders, accountStates, appwriteRelationshipIdSchema, commandStates, draftStates, draftTypes, jobStates, labelSpecialUses, mailboxSyncLaneStates, mailboxSyncLanes, mailboxSyncProvisionedStates, mailboxSyncStates, oauthOperations, oauthProviders, oauthReturnUris, oauthReturnUriSchema, pollShardStates, } from './tableContract';
7
- declare const draftAttachmentSchema: v.StrictObjectSchema<{
8
- readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
9
- readonly fileName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
10
- readonly mimeType: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 3, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
11
- readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
12
- }, undefined>;
13
- declare const draftEnvelopeSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.StrictObjectSchema<{
14
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
15
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
16
- readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
17
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
18
- }, undefined>]>;
19
8
  declare const messageAttachmentSchema: v.LooseObjectSchema<{
20
9
  readonly fileId: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>;
21
10
  readonly isAttachment: v.BooleanSchema<undefined>;
@@ -25,12 +14,10 @@ declare const messageAttachmentSchema: v.LooseObjectSchema<{
25
14
  readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
26
15
  }, undefined>;
27
16
  declare const messageRecipientSchema: v.StrictObjectSchema<{
28
- readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
17
+ readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
29
18
  readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
30
19
  readonly type: v.PicklistSchema<readonly ["bcc", "cc", "to", "replyTo"], undefined>;
31
20
  }, undefined>;
32
- export type AppwriteDraftAttachment = ReadonlyDeep<v.InferOutput<typeof draftAttachmentSchema>>;
33
- export type AppwriteDraftEnvelope = ReadonlyDeep<v.InferOutput<typeof draftEnvelopeSchema>>;
34
21
  export type AppwriteMessageAttachment = ReadonlyDeep<v.InferOutput<typeof messageAttachmentSchema>>;
35
22
  export type AppwriteMessageRecipient = ReadonlyDeep<v.InferOutput<typeof messageRecipientSchema>>;
36
23
  declare const appwriteEnvironments: readonly ['development', 'production', 'staging'];
@@ -86,7 +73,7 @@ export declare const appwrite: {
86
73
  }, string>]>], undefined>>;
87
74
  }, undefined>;
88
75
  contacts: v.ObjectSchema<{
89
- readonly normalisedAddress: import("./tableContract").AppwriteColumnSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>>;
76
+ readonly normalisedAddress: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>>;
90
77
  readonly displayName: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
91
78
  readonly lastContactedAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
92
79
  readonly messageCount: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
@@ -104,7 +91,7 @@ export declare const appwrite: {
104
91
  readonly provider: import("./tableContract").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>>;
105
92
  readonly encryptedPayload: import("./tableContract").AppwriteColumnSchema<v.StringSchema<undefined>>;
106
93
  readonly expiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
107
- readonly refreshLeaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
94
+ readonly refreshLeaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
108
95
  readonly refreshLeaseId: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
109
96
  }, undefined>;
110
97
  drafts: v.ObjectSchema<{
@@ -114,12 +101,12 @@ export declare const appwrite: {
114
101
  readonly html: import("./tableContract").AppwriteColumnSchema<v.StringSchema<undefined>>;
115
102
  readonly attachmentMetadata: import("./tableContract").AppwriteColumnSchema<v.StringSchema<undefined>>;
116
103
  readonly contentHash: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
117
- readonly scheduledAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
104
+ readonly scheduledAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
118
105
  readonly status: import("./tableContract").AppwriteColumnSchema<v.PicklistSchema<readonly ["DRAFT", "SCHEDULED", "SENDING", "SENT", "FAILED", "CANCELLED"], undefined>>;
119
106
  readonly revision: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
120
107
  readonly sequence: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
121
108
  readonly executionLeaseId: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
122
- readonly executionLeaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
109
+ readonly executionLeaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
123
110
  readonly errorCode: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
124
111
  readonly account: import("./tableContract").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
125
112
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
@@ -192,7 +179,7 @@ export declare const appwrite: {
192
179
  readonly providerId: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
193
180
  readonly subject: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
194
181
  readonly firstMessageAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
195
- readonly senderEmail: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>>;
182
+ readonly senderEmail: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>>;
196
183
  readonly senderName: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
197
184
  readonly preview: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
198
185
  readonly participants: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
@@ -208,7 +195,7 @@ export declare const appwrite: {
208
195
  readonly archived: import("./tableContract").AppwriteColumnSchema<v.BooleanSchema<undefined>>;
209
196
  readonly spam: import("./tableContract").AppwriteColumnSchema<v.BooleanSchema<undefined>>;
210
197
  readonly trashed: import("./tableContract").AppwriteColumnSchema<v.BooleanSchema<undefined>>;
211
- readonly snoozedUntil: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
198
+ readonly snoozedUntil: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
212
199
  readonly revision: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
213
200
  readonly searchText: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
214
201
  readonly account: import("./tableContract").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
@@ -250,9 +237,9 @@ export declare const appwrite: {
250
237
  readonly state: import("./tableContract").AppwriteColumnSchema<v.PicklistSchema<readonly ["PENDING", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED"], undefined>>;
251
238
  readonly attempts: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
252
239
  readonly maxAttempts: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
253
- readonly nextRunAt: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>>;
240
+ readonly nextRunAt: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>>;
254
241
  readonly leaseId: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
255
- readonly leaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
242
+ readonly leaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
256
243
  readonly errorCode: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
257
244
  }, undefined>;
258
245
  mailboxSyncCandidates: v.ObjectSchema<{
@@ -302,11 +289,11 @@ export declare const appwrite: {
302
289
  readonly providerCursor: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
303
290
  readonly uidValidity: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
304
291
  readonly state: import("./tableContract").AppwriteColumnSchema<v.PicklistSchema<readonly ["INITIAL", "SYNCING", "CURRENT", "ERROR"], undefined>>;
305
- readonly nextPollAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
292
+ readonly nextPollAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
306
293
  readonly lastEventAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
307
294
  readonly lastSyncAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
308
295
  readonly materialisationLeaseId: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
309
- readonly materialisationLeaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
296
+ readonly materialisationLeaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
310
297
  readonly errorCode: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
311
298
  }, undefined>;
312
299
  messageLocations: Omit<v.ObjectSchema<{
@@ -338,7 +325,7 @@ export declare const appwrite: {
338
325
  }, undefined>, v.TransformAction<{
339
326
  $id: string;
340
327
  }, string>]>], undefined>>;
341
- }, undefined>, "pipe" | "~standard" | "~run" | "~types"> & {
328
+ }, undefined>, "~types" | "~run" | "~standard" | "pipe"> & {
342
329
  readonly pipe: readonly [v.ObjectSchema<{
343
330
  readonly accountAssignmentKey: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
344
331
  readonly flagged: import("./tableContract").AppwriteColumnSchema<v.BooleanSchema<undefined>>;
@@ -430,7 +417,7 @@ export declare const appwrite: {
430
417
  label: string;
431
418
  message: string;
432
419
  thread: string;
433
- }, v.StringIssue | v.MinLengthIssue<string, 1> | v.MaxLengthIssue<string, 255> | v.ObjectIssue | v.IsoTimestampIssue<string> | v.NumberIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.UnionIssue<v.StringIssue | v.MinLengthIssue<string, 1> | v.MaxLengthIssue<string, 255> | v.ObjectIssue> | v.BooleanIssue | v.CheckIssue<{
420
+ }, v.NumberIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.StringIssue | v.IsoTimestampIssue<string> | v.MinLengthIssue<string, 1> | v.MaxLengthIssue<string, 255> | v.ObjectIssue | v.UnionIssue<v.StringIssue | v.MinLengthIssue<string, 1> | v.MaxLengthIssue<string, 255> | v.ObjectIssue> | v.BooleanIssue | v.CheckIssue<{
434
421
  accountAssignmentKey: string;
435
422
  flagged: boolean;
436
423
  labelAssignmentKey: string;
@@ -481,7 +468,7 @@ export declare const appwrite: {
481
468
  message: string;
482
469
  thread: string;
483
470
  };
484
- readonly issue: v.StringIssue | v.MinLengthIssue<string, 1> | v.MaxLengthIssue<string, 255> | v.ObjectIssue | v.IsoTimestampIssue<string> | v.NumberIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.UnionIssue<v.StringIssue | v.MinLengthIssue<string, 1> | v.MaxLengthIssue<string, 255> | v.ObjectIssue> | v.BooleanIssue | v.CheckIssue<{
471
+ readonly issue: v.NumberIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.StringIssue | v.IsoTimestampIssue<string> | v.MinLengthIssue<string, 1> | v.MaxLengthIssue<string, 255> | v.ObjectIssue | v.UnionIssue<v.StringIssue | v.MinLengthIssue<string, 1> | v.MaxLengthIssue<string, 255> | v.ObjectIssue> | v.BooleanIssue | v.CheckIssue<{
485
472
  accountAssignmentKey: string;
486
473
  flagged: boolean;
487
474
  labelAssignmentKey: string;
@@ -520,9 +507,9 @@ export declare const appwrite: {
520
507
  readonly generation: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
521
508
  readonly state: import("./tableContract").AppwriteColumnSchema<v.PicklistSchema<readonly ["ACTIVE", "STOPPED", "FAILED"], undefined>>;
522
509
  readonly leaseId: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
523
- readonly leaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
510
+ readonly leaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
524
511
  readonly lastStartedAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
525
- readonly nextStartAt: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>>;
512
+ readonly nextStartAt: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>>;
526
513
  readonly pollingSnapshot: import("./tableContract").AppwriteColumnSchema<v.StringSchema<undefined>>;
527
514
  readonly scheduledExecutionId: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
528
515
  readonly errorCode: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
@@ -597,10 +584,10 @@ export declare const appwrite: {
597
584
  readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
598
585
  }, undefined>, undefined>]>;
599
586
  readonly draftEnvelope: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.StrictObjectSchema<{
600
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
601
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
602
- readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
603
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
587
+ readonly bcc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
588
+ readonly cc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
589
+ readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 998, undefined>]>, undefined>;
590
+ readonly to: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
604
591
  }, undefined>]>;
605
592
  readonly jobPayload: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.CheckAction<unknown, undefined>, v.LooseObjectSchema<{}, undefined>]>;
606
593
  readonly messageAttachments: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.ArraySchema<v.LooseObjectSchema<{
@@ -612,7 +599,7 @@ export declare const appwrite: {
612
599
  readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
613
600
  }, undefined>, undefined>]>;
614
601
  readonly messageRecipients: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.ArraySchema<v.StrictObjectSchema<{
615
- readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
602
+ readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
616
603
  readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
617
604
  readonly type: v.PicklistSchema<readonly ["bcc", "cc", "to", "replyTo"], undefined>;
618
605
  }, undefined>, undefined>]>;
@@ -748,7 +735,7 @@ export declare const appwrite: {
748
735
  $tableId: v.LiteralSchema<string, undefined>;
749
736
  $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
750
737
  } & {
751
- readonly normalisedAddress: import("./tableContract").AppwriteColumnSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>>;
738
+ readonly normalisedAddress: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>>;
752
739
  readonly displayName: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
753
740
  readonly lastContactedAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
754
741
  readonly messageCount: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
@@ -774,7 +761,7 @@ export declare const appwrite: {
774
761
  readonly provider: import("./tableContract").AppwriteColumnSchema<v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>>;
775
762
  readonly encryptedPayload: import("./tableContract").AppwriteColumnSchema<v.StringSchema<undefined>>;
776
763
  readonly expiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
777
- readonly refreshLeaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
764
+ readonly refreshLeaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
778
765
  readonly refreshLeaseId: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
779
766
  }, undefined>;
780
767
  drafts: v.StrictObjectSchema<{
@@ -792,12 +779,12 @@ export declare const appwrite: {
792
779
  readonly html: import("./tableContract").AppwriteColumnSchema<v.StringSchema<undefined>>;
793
780
  readonly attachmentMetadata: import("./tableContract").AppwriteColumnSchema<v.StringSchema<undefined>>;
794
781
  readonly contentHash: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
795
- readonly scheduledAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
782
+ readonly scheduledAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
796
783
  readonly status: import("./tableContract").AppwriteColumnSchema<v.PicklistSchema<readonly ["DRAFT", "SCHEDULED", "SENDING", "SENT", "FAILED", "CANCELLED"], undefined>>;
797
784
  readonly revision: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
798
785
  readonly sequence: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
799
786
  readonly executionLeaseId: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
800
- readonly executionLeaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
787
+ readonly executionLeaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
801
788
  readonly errorCode: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
802
789
  readonly account: import("./tableContract").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
803
790
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
@@ -902,7 +889,7 @@ export declare const appwrite: {
902
889
  readonly providerId: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>>;
903
890
  readonly subject: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
904
891
  readonly firstMessageAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
905
- readonly senderEmail: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>>;
892
+ readonly senderEmail: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>>;
906
893
  readonly senderName: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
907
894
  readonly preview: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
908
895
  readonly participants: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
@@ -918,7 +905,7 @@ export declare const appwrite: {
918
905
  readonly archived: import("./tableContract").AppwriteColumnSchema<v.BooleanSchema<undefined>>;
919
906
  readonly spam: import("./tableContract").AppwriteColumnSchema<v.BooleanSchema<undefined>>;
920
907
  readonly trashed: import("./tableContract").AppwriteColumnSchema<v.BooleanSchema<undefined>>;
921
- readonly snoozedUntil: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
908
+ readonly snoozedUntil: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
922
909
  readonly revision: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
923
910
  readonly searchText: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
924
911
  readonly account: import("./tableContract").AppwriteRelationshipSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
@@ -976,9 +963,9 @@ export declare const appwrite: {
976
963
  readonly state: import("./tableContract").AppwriteColumnSchema<v.PicklistSchema<readonly ["PENDING", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED"], undefined>>;
977
964
  readonly attempts: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
978
965
  readonly maxAttempts: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
979
- readonly nextRunAt: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>>;
966
+ readonly nextRunAt: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>>;
980
967
  readonly leaseId: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
981
- readonly leaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
968
+ readonly leaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
982
969
  readonly errorCode: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
983
970
  }, undefined>;
984
971
  mailboxSyncCandidates: v.StrictObjectSchema<{
@@ -1052,11 +1039,11 @@ export declare const appwrite: {
1052
1039
  readonly providerCursor: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
1053
1040
  readonly uidValidity: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>>;
1054
1041
  readonly state: import("./tableContract").AppwriteColumnSchema<v.PicklistSchema<readonly ["INITIAL", "SYNCING", "CURRENT", "ERROR"], undefined>>;
1055
- readonly nextPollAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
1042
+ readonly nextPollAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
1056
1043
  readonly lastEventAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
1057
1044
  readonly lastSyncAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
1058
1045
  readonly materialisationLeaseId: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
1059
- readonly materialisationLeaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
1046
+ readonly materialisationLeaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
1060
1047
  readonly errorCode: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
1061
1048
  }, undefined>;
1062
1049
  messageLocations: v.StrictObjectSchema<{
@@ -1144,9 +1131,9 @@ export declare const appwrite: {
1144
1131
  readonly generation: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>>;
1145
1132
  readonly state: import("./tableContract").AppwriteColumnSchema<v.PicklistSchema<readonly ["ACTIVE", "STOPPED", "FAILED"], undefined>>;
1146
1133
  readonly leaseId: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
1147
- readonly leaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
1134
+ readonly leaseExpiresAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>>;
1148
1135
  readonly lastStartedAt: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>>;
1149
- readonly nextStartAt: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>>;
1136
+ readonly nextStartAt: import("./tableContract").AppwriteColumnSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>>;
1150
1137
  readonly pollingSnapshot: import("./tableContract").AppwriteColumnSchema<v.StringSchema<undefined>>;
1151
1138
  readonly scheduledExecutionId: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
1152
1139
  readonly errorCode: import("./tableContract").AppwriteColumnSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>>;
@@ -1 +1 @@
1
- {"version":3,"file":"appwrite.d.ts","sourceRoot":"","sources":["../../src/appwrite/appwrite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAuB5B,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAE7J,YAAY,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC/J,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,oBAAoB,GACrB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,4BAA4B,EAC5B,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,gBAAgB,EACh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as v from 'valibot';
2
2
  import { string } from '../schemas/string';
3
3
  import { MESSAGE_RECIPIENT_TYPES } from '../types';
4
- import { appwriteDataSchemas, appwriteIds, appwriteRowSchemas as generatedRowSchemas, appwriteRowIdSchema, appwriteTables, mailboxSyncLaneStates, mailboxSyncLanes, mailboxSyncStates, oauthOperations, oauthProviders, oauthReturnUris, oauthReturnUriSchema, pollShardStates, nonNegativeIntegerSchema, identifierSchema, } from './tableContract';
4
+ import { persistedDraftAttachmentsSchema, persistedDraftEnvelopeSchema } from './decodedSchemas';
5
+ import { appwriteDataSchemas, appwriteIds, appwriteRowSchemas as generatedRowSchemas, appwriteRowIdSchema, appwriteTables, mailboxSyncLaneStates, mailboxSyncLanes, mailboxSyncStates, oauthOperations, oauthProviders, oauthReturnUris, oauthReturnUriSchema, pollShardStates, jsonObjectTextSchema, nonNegativeIntegerSchema, identifierSchema, } from './tableContract';
5
6
  export { appwriteRowIdSchema, appwriteTableIdSchema, appwriteTableIds } from './tableContract';
6
7
  export { appwriteDataSchemas, appwriteRowSchemas, appwriteTableContract, appwriteTables, defineAppwriteTables, } from './tableContract';
7
8
  export { accountProviders, accountStates, appwriteRelationshipIdSchema, commandStates, draftStates, draftTypes, jobStates, labelSpecialUses, mailboxSyncLaneStates, mailboxSyncLanes, mailboxSyncProvisionedStates, mailboxSyncStates, oauthOperations, oauthProviders, oauthReturnUris, oauthReturnUriSchema, pollShardStates, } from './tableContract';
8
- const jsonObjectTextSchema = v.pipe(v.string(), v.parseJson(), v.check(value => !Array.isArray(value)), v.looseObject({}));
9
- const draftAttachmentSchema = v.strictObject({
10
- fileId: appwriteRowIdSchema,
11
- fileName: v.pipe(v.string(), v.minLength(1), v.maxLength(255)),
12
- mimeType: v.pipe(v.string(), v.minLength(3), v.maxLength(255)),
13
- size: nonNegativeIntegerSchema,
14
- });
15
- const draftAttachmentsSchema = v.pipe(v.string(), v.parseJson(), v.array(draftAttachmentSchema));
16
- const draftEnvelopeSchema = v.pipe(v.string(), v.parseJson(), v.strictObject({
17
- bcc: v.array(string.mailboxAddress()),
18
- cc: v.array(string.mailboxAddress()),
19
- subject: v.nullable(v.string()),
20
- to: v.array(string.mailboxAddress()),
21
- }));
22
9
  const messageAttachmentSchema = v.looseObject({
23
10
  fileId: v.optional(v.nullable(appwriteRowIdSchema)),
24
11
  isAttachment: v.boolean(),
@@ -68,8 +55,8 @@ export const appwrite = {
68
55
  dataSchemas: appwriteDataSchemas,
69
56
  decodedSchemas: {
70
57
  commandPayload: jsonObjectTextSchema,
71
- draftAttachments: draftAttachmentsSchema,
72
- draftEnvelope: draftEnvelopeSchema,
58
+ draftAttachments: persistedDraftAttachmentsSchema,
59
+ draftEnvelope: persistedDraftEnvelopeSchema,
73
60
  jobPayload: jsonObjectTextSchema,
74
61
  messageAttachments: messageAttachmentsSchema,
75
62
  messageRecipients: messageRecipientsSchema,
@@ -446,6 +446,24 @@ describe('appwrite', () => {
446
446
  expect(v.safeParse(appwrite.dataSchemas.mailboxSyncCandidates.entries.uid, 0).success).toBe(false);
447
447
  expect(v.safeParse(appwrite.dataSchemas.mailboxSyncCandidates.entries.uidValidity, 0).success).toBe(false);
448
448
  });
449
+ it('rejects non-canonical persisted scheduling and lease fences', () => {
450
+ const fenceSchemas = [
451
+ appwrite.dataSchemas.credentials.entries.refreshLeaseExpiresAt,
452
+ appwrite.dataSchemas.drafts.entries.scheduledAt,
453
+ appwrite.dataSchemas.drafts.entries.executionLeaseExpiresAt,
454
+ appwrite.dataSchemas.mailboxSyncStates.entries.nextPollAt,
455
+ appwrite.dataSchemas.mailboxSyncStates.entries.materialisationLeaseExpiresAt,
456
+ appwrite.dataSchemas.jobs.entries.nextRunAt,
457
+ appwrite.dataSchemas.jobs.entries.leaseExpiresAt,
458
+ appwrite.dataSchemas.pollShards.entries.nextStartAt,
459
+ appwrite.dataSchemas.pollShards.entries.leaseExpiresAt,
460
+ appwrite.dataSchemas.threads.entries.snoozedUntil,
461
+ ];
462
+ for (const schema of fenceSchemas) {
463
+ expect(v.safeParse(schema, '2026-06-31T12:00:30.000Z').success).toBe(false);
464
+ expect(v.safeParse(schema, '2026-07-23T12:00:30.000+00:00').success).toBe(false);
465
+ }
466
+ });
449
467
  it('pins every generated wire row to its table ID', () => {
450
468
  const tableKeys = Object.keys(appwrite.ids.tables);
451
469
  for (const tableKey of tableKeys) {
@@ -1088,4 +1106,28 @@ describe('appwrite', () => {
1088
1106
  expect(v.safeParse(testCase.schema, '{').success).toBe(false);
1089
1107
  });
1090
1108
  }
1109
+ it('keeps persisted draft envelope constraints strict and bounded', () => {
1110
+ const envelope = { bcc: ['sender@example'], cc: [], subject: 'a'.repeat(998), to: ['recipient@example.com'] };
1111
+ expect(v.safeParse(appwrite.decodedSchemas.draftEnvelope, JSON.stringify(envelope)).success).toBe(true);
1112
+ for (const invalidEnvelope of [
1113
+ { ...envelope, subject: 'a'.repeat(999) },
1114
+ { ...envelope, to: ['not-an-address'] },
1115
+ { ...envelope, unexpected: true },
1116
+ ]) {
1117
+ expect(v.safeParse(appwrite.decodedSchemas.draftEnvelope, JSON.stringify(invalidEnvelope)).success).toBe(false);
1118
+ }
1119
+ });
1120
+ it('keeps persisted draft attachment constraints strict and bounded', () => {
1121
+ const attachment = { fileId: 'test-file-id-1', fileName: 'proposal.pdf', mimeType: 'application/pdf', size: 0 };
1122
+ expect(v.safeParse(appwrite.decodedSchemas.draftAttachments, JSON.stringify([attachment])).success).toBe(true);
1123
+ for (const invalidAttachment of [
1124
+ { ...attachment, fileId: '-invalid' },
1125
+ { ...attachment, fileName: 'a'.repeat(256) },
1126
+ { ...attachment, mimeType: 'x' },
1127
+ { ...attachment, size: -1 },
1128
+ { ...attachment, unexpected: true },
1129
+ ]) {
1130
+ expect(v.safeParse(appwrite.decodedSchemas.draftAttachments, JSON.stringify([invalidAttachment])).success).toBe(false);
1131
+ }
1132
+ });
1091
1133
  });
@@ -126,7 +126,7 @@ export declare const appwriteCommands: {
126
126
  readonly kind: v.LiteralSchema<"draft.attachment.delete", undefined>;
127
127
  readonly payload: v.StrictObjectSchema<{
128
128
  readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
129
- readonly fileId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
129
+ readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
130
130
  }, undefined>;
131
131
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
132
132
  readonly version: v.LiteralSchema<1, undefined>;
@@ -136,9 +136,9 @@ export declare const appwriteCommands: {
136
136
  readonly kind: v.LiteralSchema<"draft.attachment.link", undefined>;
137
137
  readonly payload: v.StrictObjectSchema<{
138
138
  readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
139
- readonly fileId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
140
- readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
141
- readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
139
+ readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
140
+ readonly fileName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
141
+ readonly mimeType: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 3, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
142
142
  readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
143
143
  }, undefined>;
144
144
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
@@ -179,11 +179,11 @@ export declare const appwriteCommands: {
179
179
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
180
180
  readonly kind: v.LiteralSchema<"draft.envelope.set", undefined>;
181
181
  readonly payload: v.StrictObjectSchema<{
182
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
183
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
184
182
  readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
183
+ readonly bcc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
184
+ readonly cc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
185
185
  readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 998, undefined>]>, undefined>;
186
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
186
+ readonly to: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
187
187
  }, undefined>;
188
188
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
189
189
  readonly version: v.LiteralSchema<1, undefined>;
@@ -222,7 +222,7 @@ export declare const appwriteCommands: {
222
222
  readonly kind: v.LiteralSchema<"draft.send.schedule", undefined>;
223
223
  readonly payload: v.StrictObjectSchema<{
224
224
  readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
225
- readonly scheduledAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
225
+ readonly scheduledAt: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
226
226
  }, undefined>;
227
227
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
228
228
  readonly version: v.LiteralSchema<1, undefined>;
@@ -338,7 +338,7 @@ export declare const appwriteCommands: {
338
338
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
339
339
  readonly kind: v.LiteralSchema<"thread.snooze.set", undefined>;
340
340
  readonly payload: v.StrictObjectSchema<{
341
- readonly snoozedUntil: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
341
+ readonly snoozedUntil: v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>;
342
342
  readonly threadIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>, undefined>, v.MinLengthAction<(string & v.Brand<"ThreadId">)[], 1, undefined>, v.MaxLengthAction<(string & v.Brand<"ThreadId">)[], 100, undefined>]>;
343
343
  }, undefined>;
344
344
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/appwrite/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAa5B,eAAO,MAAM,cAAc;8BACC,MAAM,KAAG,MAAM;CAC1C,CAAA;AAED,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCR,CAAA;AAEV,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAA;AAIlF,eAAO,MAAM,qBAAqB;;;;;;;;CAkC6D,CAAA;AAkL/F,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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F,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUnB,CAAA;AAEV,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,WAAW,CAAC,CAAA;AACrF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,aAAa,CAAC,CAAA;AACzF,MAAM,MAAM,sBAAsB,CAAC,KAAK,SAAS,mBAAmB,IAAI,OAAO,CAAC,sBAAsB,EAAE;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC,SAAS,CAAC,CAAA;AACnI,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,cAAc,CAAC,CAAA;AAC3F,MAAM,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAA"}
@@ -2,9 +2,9 @@ import * as v from 'valibot';
2
2
  import { id } from '../schemas/id';
3
3
  import { string } from '../schemas/string';
4
4
  import { DRAFT_TYPES } from '../types';
5
+ import { appwriteDraftAttachmentSchema, appwriteDraftEnvelopeSchema } from './decodedSchemas';
6
+ import { canonicalTimestampSchema, commandStates, isoTimestampSchema, nonNegativeIntegerSchema } from './tableContract';
5
7
  const commandIdSchema = v.pipe(v.string(), v.uuid(), v.brand('CommandId'));
6
- const nonNegativeIntegerSchema = v.pipe(v.number(), v.integer(), v.minValue(0));
7
- const timestampSchema = v.pipe(v.string(), v.isoTimestamp());
8
8
  const appwriteThreadCommandBatchSize = 100;
9
9
  const threadIdsSchema = v.pipe(v.array(id.threadId.required()), v.minLength(1), v.maxLength(appwriteThreadCommandBatchSize));
10
10
  const avatarSha256Schema = v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/));
@@ -79,7 +79,6 @@ export const appwriteCommandGroups = {
79
79
  commandKinds.threadTrashSet,
80
80
  ],
81
81
  };
82
- const commandStates = ['ACCEPTED', 'RUNNING', 'SUCCEEDED', 'FAILED'];
83
82
  const commandErrorCodes = [
84
83
  'AUTHENTICATION_FAILED',
85
84
  'AUTHORIZATION_FAILED',
@@ -96,7 +95,7 @@ const createCommandRequestSchema = (kind, payload, accountId) => v.strictObject(
96
95
  id: commandIdSchema,
97
96
  kind: v.literal(kind),
98
97
  payload,
99
- submittedAt: timestampSchema,
98
+ submittedAt: isoTimestampSchema,
100
99
  version: v.literal(1),
101
100
  });
102
101
  const createAccountCommandRequestSchema = (kind, payload) => createCommandRequestSchema(kind, payload, accountIdSchema);
@@ -135,7 +134,7 @@ const threadArchiveSetPayloadSchema = v.strictObject({ archived: v.boolean(), th
135
134
  const threadFlaggedSetPayloadSchema = v.strictObject({ flagged: v.boolean(), threadIds: threadIdsSchema });
136
135
  const threadSeenSetPayloadSchema = v.strictObject({ seen: v.boolean(), threadIds: threadIdsSchema });
137
136
  const threadSnoozeSetPayloadSchema = v.strictObject({
138
- snoozedUntil: v.nullable(timestampSchema),
137
+ snoozedUntil: v.nullable(canonicalTimestampSchema),
139
138
  threadIds: threadIdsSchema,
140
139
  });
141
140
  const threadSpamSetPayloadSchema = v.strictObject({ spam: v.boolean(), threadIds: threadIdsSchema });
@@ -152,11 +151,8 @@ const draftContentSetPayloadSchema = v.strictObject({
152
151
  html: v.pipe(v.string(), v.maxLength(384_000)),
153
152
  });
154
153
  const draftEnvelopeSetPayloadSchema = v.strictObject({
155
- bcc: v.array(string.mailboxAddress()),
156
- cc: v.array(string.mailboxAddress()),
154
+ ...appwriteDraftEnvelopeSchema.entries,
157
155
  draftId: id.draftId.required(),
158
- subject: v.nullable(v.pipe(v.string(), v.maxLength(998))),
159
- to: v.array(string.mailboxAddress()),
160
156
  });
161
157
  const draftFromSetPayloadSchema = v.strictObject({
162
158
  draftId: id.draftId.required(),
@@ -165,19 +161,16 @@ const draftFromSetPayloadSchema = v.strictObject({
165
161
  });
166
162
  const draftDeletePayloadSchema = v.strictObject({ draftId: id.draftId.required() });
167
163
  const draftAttachmentLinkPayloadSchema = v.strictObject({
164
+ ...appwriteDraftAttachmentSchema.entries,
168
165
  draftId: id.draftId.required(),
169
- fileId: string.required(36),
170
- fileName: string.required(),
171
- mimeType: string.required(),
172
- size: nonNegativeIntegerSchema,
173
166
  });
174
167
  const draftAttachmentDeletePayloadSchema = v.strictObject({
175
168
  draftId: id.draftId.required(),
176
- fileId: string.required(36),
169
+ fileId: appwriteDraftAttachmentSchema.entries.fileId,
177
170
  });
178
171
  const draftSendPayloadSchema = v.strictObject({ draftId: id.draftId.required() });
179
172
  const draftSendCancelPayloadSchema = v.strictObject({ draftId: id.draftId.required() });
180
- const draftSendSchedulePayloadSchema = v.strictObject({ draftId: id.draftId.required(), scheduledAt: timestampSchema });
173
+ const draftSendSchedulePayloadSchema = v.strictObject({ draftId: id.draftId.required(), scheduledAt: canonicalTimestampSchema });
181
174
  const commandRequestSchemas = {
182
175
  [commandKinds.accountDelete]: createAccountCommandRequestSchema(commandKinds.accountDelete, accountDeletePayloadSchema),
183
176
  [commandKinds.accountSettingsSet]: createAccountCommandRequestSchema(commandKinds.accountSettingsSet, accountSettingsSetPayloadSchema),