@marcoappio/marco-config 4.0.3 → 4.0.4

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.
@@ -230,7 +230,12 @@ declare const rowSchemas: {
230
230
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
231
231
  }, undefined>;
232
232
  readonly messages: v.StrictObjectSchema<{
233
- readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
233
+ readonly account: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
234
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
235
+ }, undefined>, v.TransformAction<{
236
+ $id: string;
237
+ }, string>]>], undefined>;
238
+ readonly accountAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
234
239
  readonly attachmentMetadata: v.StringSchema<undefined>;
235
240
  readonly htmlFileId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
236
241
  readonly preview: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -240,13 +245,17 @@ declare const rowSchemas: {
240
245
  readonly recipients: v.NullableSchema<v.StringSchema<undefined>, undefined>;
241
246
  readonly revision: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
242
247
  readonly rfcMessageId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
243
- readonly sender: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
244
- readonly senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
248
+ readonly sender: v.NullableSchema<v.StringSchema<undefined>, undefined>;
249
+ readonly senderName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
245
250
  readonly sentAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
246
251
  readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
247
252
  readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
248
- readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
249
- readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
253
+ readonly thread: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
254
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
255
+ }, undefined>, v.TransformAction<{
256
+ $id: string;
257
+ }, string>]>], undefined>;
258
+ readonly threadAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
250
259
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
251
260
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
252
261
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
@@ -341,11 +350,19 @@ declare const rowSchemas: {
341
350
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
342
351
  }, undefined>;
343
352
  readonly threadAliases: v.StrictObjectSchema<{
344
- readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
345
- readonly aliasId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
353
+ readonly alias: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
354
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
355
+ }, undefined>, v.TransformAction<{
356
+ $id: string;
357
+ }, string>]>], undefined>;
358
+ readonly aliasAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
346
359
  readonly latestMessageAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
347
- readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
348
- readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
360
+ readonly thread: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
361
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
362
+ }, undefined>, v.TransformAction<{
363
+ $id: string;
364
+ }, string>]>], undefined>;
365
+ readonly threadAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
349
366
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
350
367
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
351
368
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
@@ -355,12 +372,20 @@ declare const rowSchemas: {
355
372
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
356
373
  }, undefined>;
357
374
  readonly threadLabels: v.StrictObjectSchema<{
358
- readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
359
- readonly labelId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
375
+ readonly label: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
376
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
377
+ }, undefined>, v.TransformAction<{
378
+ $id: string;
379
+ }, string>]>], undefined>;
380
+ readonly labelAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
360
381
  readonly latestMessageAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
361
382
  readonly locationCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
362
- readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
363
- readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
383
+ readonly thread: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
384
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
385
+ }, undefined>, v.TransformAction<{
386
+ $id: string;
387
+ }, string>]>], undefined>;
388
+ readonly threadAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
364
389
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
365
390
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
366
391
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
@@ -370,7 +395,12 @@ declare const rowSchemas: {
370
395
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
371
396
  }, undefined>;
372
397
  readonly threads: v.StrictObjectSchema<{
373
- readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
398
+ readonly account: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
399
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
400
+ }, undefined>, v.TransformAction<{
401
+ $id: string;
402
+ }, string>]>], undefined>;
403
+ readonly accountAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
374
404
  readonly archived: v.BooleanSchema<undefined>;
375
405
  readonly firstMessageAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
376
406
  readonly flagged: v.BooleanSchema<undefined>;
@@ -393,7 +423,6 @@ declare const rowSchemas: {
393
423
  readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
394
424
  readonly trashed: v.BooleanSchema<undefined>;
395
425
  readonly unseenLocationCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
396
- readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
397
426
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
398
427
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
399
428
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
@@ -677,7 +706,12 @@ export declare const appwrite: {
677
706
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
678
707
  }, undefined>;
679
708
  readonly messages: v.StrictObjectSchema<{
680
- readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
709
+ readonly account: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
710
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
711
+ }, undefined>, v.TransformAction<{
712
+ $id: string;
713
+ }, string>]>], undefined>;
714
+ readonly accountAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
681
715
  readonly attachmentMetadata: v.StringSchema<undefined>;
682
716
  readonly htmlFileId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
683
717
  readonly preview: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -687,13 +721,17 @@ export declare const appwrite: {
687
721
  readonly recipients: v.NullableSchema<v.StringSchema<undefined>, undefined>;
688
722
  readonly revision: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
689
723
  readonly rfcMessageId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
690
- readonly sender: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
691
- readonly senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
724
+ readonly sender: v.NullableSchema<v.StringSchema<undefined>, undefined>;
725
+ readonly senderName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
692
726
  readonly sentAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
693
727
  readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
694
728
  readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
695
- readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
696
- readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
729
+ readonly thread: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
730
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
731
+ }, undefined>, v.TransformAction<{
732
+ $id: string;
733
+ }, string>]>], undefined>;
734
+ readonly threadAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
697
735
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
698
736
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
699
737
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
@@ -788,11 +826,19 @@ export declare const appwrite: {
788
826
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
789
827
  }, undefined>;
790
828
  readonly threadAliases: v.StrictObjectSchema<{
791
- readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
792
- readonly aliasId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
829
+ readonly alias: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
830
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
831
+ }, undefined>, v.TransformAction<{
832
+ $id: string;
833
+ }, string>]>], undefined>;
834
+ readonly aliasAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
793
835
  readonly latestMessageAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
794
- readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
795
- readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
836
+ readonly thread: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
837
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
838
+ }, undefined>, v.TransformAction<{
839
+ $id: string;
840
+ }, string>]>], undefined>;
841
+ readonly threadAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
796
842
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
797
843
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
798
844
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
@@ -802,12 +848,20 @@ export declare const appwrite: {
802
848
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
803
849
  }, undefined>;
804
850
  readonly threadLabels: v.StrictObjectSchema<{
805
- readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
806
- readonly labelId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
851
+ readonly label: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
852
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
853
+ }, undefined>, v.TransformAction<{
854
+ $id: string;
855
+ }, string>]>], undefined>;
856
+ readonly labelAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
807
857
  readonly latestMessageAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
808
858
  readonly locationCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
809
- readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
810
- readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
859
+ readonly thread: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
860
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
861
+ }, undefined>, v.TransformAction<{
862
+ $id: string;
863
+ }, string>]>], undefined>;
864
+ readonly threadAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
811
865
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
812
866
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
813
867
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
@@ -817,7 +871,12 @@ export declare const appwrite: {
817
871
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
818
872
  }, undefined>;
819
873
  readonly threads: v.StrictObjectSchema<{
820
- readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
874
+ readonly account: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
875
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
876
+ }, undefined>, v.TransformAction<{
877
+ $id: string;
878
+ }, string>]>], undefined>;
879
+ readonly accountAssignmentKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
821
880
  readonly archived: v.BooleanSchema<undefined>;
822
881
  readonly firstMessageAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
823
882
  readonly flagged: v.BooleanSchema<undefined>;
@@ -840,7 +899,6 @@ export declare const appwrite: {
840
899
  readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
841
900
  readonly trashed: v.BooleanSchema<undefined>;
842
901
  readonly unseenLocationCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
843
- readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
844
902
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
845
903
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
846
904
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, 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;AAO5B,eAAO,MAAM,mBAAmB,6KAA+F,CAAA;AAW/H,QAAA,MAAM,qBAAqB;;;;;aAKzB,CAAA;AAEF,QAAA,MAAM,mBAAmB;;;;;eASxB,CAAA;AACD,QAAA,MAAM,uBAAuB;;;;;;;aAO3B,CAAA;AAEF,QAAA,MAAM,sBAAsB;;;;aAI1B,CAAA;AAGF,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAA;AAC/F,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAA;AAC3F,MAAM,MAAM,yBAAyB,GAAG,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAA;AACnG,MAAM,MAAM,wBAAwB,GAAG,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAA;AASjG,QAAA,MAAM,gBAAgB,+BAAgC,CAAA;AACtD,QAAA,MAAM,qBAAqB,wDAAyD,CAAA;AACpF,QAAA,MAAM,iBAAiB,qDAAsD,CAAA;AAK7E,QAAA,MAAM,eAAe,0CAA2C,CAAA;AAChE,QAAA,MAAM,oBAAoB,EAAE,SAAS,CAAC,aAAa,EAAE,YAAY,EAAE,SAAS,CAA4C,CAAA;AACxH,M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;;;;;;;;;;;;;;;;;;CAsPN,CAAA;AAEV,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA7UH,MAAM;kBACZ,MAAM;wBACA;YACd,MAAM,EAAE,MAAM,CAAA;YACd,SAAS,EAAE,MAAM,CAAA;SAClB;mBACU,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkWT,CAAA;AAEV,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,UAAU,CAAA;AACtD,MAAM,MAAM,WAAW,CAAC,MAAM,SAAS,gBAAgB,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA"}
@@ -8,6 +8,10 @@ const nonNegativeIntegerSchema = v.pipe(v.number(), v.integer(), v.minValue(0));
8
8
  const colourSchema = v.pipe(v.string(), v.maxLength(64));
9
9
  const emailSchema = v.pipe(v.string(), v.email());
10
10
  const jsonObjectTextSchema = v.pipe(v.string(), v.parseJson(), v.check(value => !Array.isArray(value)), v.looseObject({}));
11
+ const appwriteRelationshipIdSchema = v.union([
12
+ identifierSchema,
13
+ v.pipe(v.object({ $id: identifierSchema }), v.transform(relationship => relationship.$id)),
14
+ ]);
11
15
  const draftAttachmentSchema = v.strictObject({
12
16
  fileId: appwriteRowIdSchema,
13
17
  fileName: v.pipe(v.string(), v.minLength(1), v.maxLength(255)),
@@ -252,7 +256,8 @@ const rowSchemas = {
252
256
  }),
253
257
  messages: v.strictObject({
254
258
  ...wireMetadata(appwriteIds.tables.messages),
255
- accountId: identifierSchema,
259
+ account: appwriteRelationshipIdSchema,
260
+ accountAssignmentKey: identifierSchema,
256
261
  attachmentMetadata: v.string(),
257
262
  htmlFileId: v.nullable(identifierSchema),
258
263
  preview: v.nullable(v.string()),
@@ -262,13 +267,13 @@ const rowSchemas = {
262
267
  recipients: v.nullable(v.string()),
263
268
  revision: nonNegativeIntegerSchema,
264
269
  rfcMessageId: v.nullable(identifierSchema),
265
- sender: v.nullable(emailSchema),
266
- senderName: v.nullable(identifierSchema),
270
+ sender: v.nullable(v.string()),
271
+ senderName: v.nullable(v.string()),
267
272
  sentAt: timestampSchema,
268
273
  size: nonNegativeIntegerSchema,
269
274
  subject: v.nullable(v.string()),
270
- threadId: identifierSchema,
271
- userId: identifierSchema,
275
+ thread: appwriteRelationshipIdSchema,
276
+ threadAssignmentKey: identifierSchema,
272
277
  }),
273
278
  oauthStates: v.strictObject({
274
279
  ...wireMetadata(appwriteIds.tables.oauthStates),
@@ -321,27 +326,27 @@ const rowSchemas = {
321
326
  icon: v.nullable(identifierSchema),
322
327
  name: identifierSchema,
323
328
  }),
324
- // Scalar IDs keep this hot materialisation join eligible for TablesDB bulk writes.
325
329
  threadAliases: v.strictObject({
326
330
  ...wireMetadata(appwriteIds.tables.threadAliases),
327
- accountId: identifierSchema,
328
- aliasId: identifierSchema,
331
+ alias: appwriteRelationshipIdSchema,
332
+ aliasAssignmentKey: identifierSchema,
329
333
  latestMessageAt: timestampSchema,
330
- threadId: identifierSchema,
331
- userId: identifierSchema,
334
+ thread: appwriteRelationshipIdSchema,
335
+ threadAssignmentKey: identifierSchema,
332
336
  }),
333
337
  threadLabels: v.strictObject({
334
338
  ...wireMetadata(appwriteIds.tables.threadLabels),
335
- accountId: identifierSchema,
336
- labelId: identifierSchema,
339
+ label: appwriteRelationshipIdSchema,
340
+ labelAssignmentKey: identifierSchema,
337
341
  latestMessageAt: timestampSchema,
338
342
  locationCount: nonNegativeIntegerSchema,
339
- threadId: identifierSchema,
340
- userId: identifierSchema,
343
+ thread: appwriteRelationshipIdSchema,
344
+ threadAssignmentKey: identifierSchema,
341
345
  }),
342
346
  threads: v.strictObject({
343
347
  ...wireMetadata(appwriteIds.tables.threads),
344
- accountId: identifierSchema,
348
+ account: appwriteRelationshipIdSchema,
349
+ accountAssignmentKey: identifierSchema,
345
350
  archived: v.boolean(),
346
351
  firstMessageAt: v.nullable(timestampSchema),
347
352
  flagged: v.boolean(),
@@ -364,7 +369,6 @@ const rowSchemas = {
364
369
  subject: v.nullable(v.string()),
365
370
  trashed: v.boolean(),
366
371
  unseenLocationCount: nonNegativeIntegerSchema,
367
- userId: identifierSchema,
368
372
  }),
369
373
  };
370
374
  export const appwrite = {
@@ -152,7 +152,8 @@ const validRows = {
152
152
  messages: {
153
153
  ...metadata,
154
154
  $tableId: 'messages',
155
- accountId: 'account-1',
155
+ account: 'account-1',
156
+ accountAssignmentKey: 'account-1',
156
157
  attachmentMetadata: '[]',
157
158
  htmlFileId: null,
158
159
  preview: 'Preview',
@@ -167,8 +168,8 @@ const validRows = {
167
168
  sentAt: '2026-07-15T00:00:00.000Z',
168
169
  size: 1,
169
170
  subject: 'Test subject',
170
- threadId: 'thread-1',
171
- userId: 'user-1',
171
+ thread: 'thread-1',
172
+ threadAssignmentKey: 'thread-1',
172
173
  },
173
174
  oauthStates: {
174
175
  ...metadata,
@@ -224,26 +225,27 @@ const validRows = {
224
225
  threadAliases: {
225
226
  ...metadata,
226
227
  $tableId: 'thread_aliases',
227
- accountId: 'account-1',
228
- aliasId: 'alias-1',
228
+ alias: 'alias-1',
229
+ aliasAssignmentKey: 'alias-1',
229
230
  latestMessageAt: '2026-07-15T00:00:00.000Z',
230
- threadId: 'thread-1',
231
- userId: 'user-1',
231
+ thread: 'thread-1',
232
+ threadAssignmentKey: 'thread-1',
232
233
  },
233
234
  threadLabels: {
234
235
  ...metadata,
235
236
  $tableId: 'thread_labels',
236
- accountId: 'account-1',
237
- labelId: 'label-1',
237
+ label: 'label-1',
238
+ labelAssignmentKey: 'label-1',
238
239
  latestMessageAt: '2026-07-15T00:00:00.000Z',
239
240
  locationCount: 1,
240
- threadId: 'thread-1',
241
- userId: 'user-1',
241
+ thread: 'thread-1',
242
+ threadAssignmentKey: 'thread-1',
242
243
  },
243
244
  threads: {
244
245
  ...metadata,
245
246
  $tableId: 'threads',
246
- accountId: 'account-1',
247
+ account: 'account-1',
248
+ accountAssignmentKey: 'account-1',
247
249
  archived: false,
248
250
  firstMessageAt: '2026-07-14T00:00:00.000Z',
249
251
  flagged: false,
@@ -266,7 +268,6 @@ const validRows = {
266
268
  subject: null,
267
269
  trashed: false,
268
270
  unseenLocationCount: 0,
269
- userId: 'user-1',
270
271
  },
271
272
  };
272
273
  const validPollShardCoordinatorRow = {
@@ -409,6 +410,72 @@ describe('appwrite', () => {
409
410
  expect(v.safeParse(appwrite.rowSchemas[table], rowWithoutId).success).toBe(false);
410
411
  });
411
412
  }
413
+ it('normalises Appwrite mailbox thread relationship objects to row IDs', () => {
414
+ const thread = v.parse(appwrite.rowSchemas.threads, { ...validRows.threads, account: { $id: 'account-1' } });
415
+ const message = v.parse(appwrite.rowSchemas.messages, {
416
+ ...validRows.messages,
417
+ account: { $id: 'account-1' },
418
+ thread: { $id: 'thread-1' },
419
+ });
420
+ const threadAlias = v.parse(appwrite.rowSchemas.threadAliases, {
421
+ ...validRows.threadAliases,
422
+ alias: { $id: 'alias-1' },
423
+ thread: { $id: 'thread-1' },
424
+ });
425
+ const threadLabel = v.parse(appwrite.rowSchemas.threadLabels, {
426
+ ...validRows.threadLabels,
427
+ label: { $id: 'label-1' },
428
+ thread: { $id: 'thread-1' },
429
+ });
430
+ expect(thread.account).toBe('account-1');
431
+ expect(message.account).toBe('account-1');
432
+ expect(message.thread).toBe('thread-1');
433
+ expect(threadAlias.alias).toBe('alias-1');
434
+ expect(threadAlias.thread).toBe('thread-1');
435
+ expect(threadLabel.label).toBe('label-1');
436
+ expect(threadLabel.thread).toBe('thread-1');
437
+ });
438
+ it('accepts backend message sender fields as plain nullable text', () => {
439
+ expect(v.safeParse(appwrite.rowSchemas.messages, {
440
+ ...validRows.messages,
441
+ sender: 'not-an-email',
442
+ senderName: '',
443
+ }).success).toBe(true);
444
+ });
445
+ const requiredRelationshipFieldTestCases = [
446
+ { field: 'account', row: { ...validRows.messages, account: null }, schema: appwrite.rowSchemas.messages, table: 'messages' },
447
+ { field: 'thread', row: { ...validRows.messages, thread: null }, schema: appwrite.rowSchemas.messages, table: 'messages' },
448
+ { field: 'account', row: { ...validRows.threads, account: null }, schema: appwrite.rowSchemas.threads, table: 'threads' },
449
+ { field: 'alias', row: { ...validRows.threadAliases, alias: null }, schema: appwrite.rowSchemas.threadAliases, table: 'threadAliases' },
450
+ { field: 'thread', row: { ...validRows.threadAliases, thread: null }, schema: appwrite.rowSchemas.threadAliases, table: 'threadAliases' },
451
+ { field: 'label', row: { ...validRows.threadLabels, label: null }, schema: appwrite.rowSchemas.threadLabels, table: 'threadLabels' },
452
+ { field: 'thread', row: { ...validRows.threadLabels, thread: null }, schema: appwrite.rowSchemas.threadLabels, table: 'threadLabels' },
453
+ ];
454
+ for (const { field, row, schema, table } of requiredRelationshipFieldTestCases) {
455
+ it(`rejects nullable ${field} relationships on ${table}`, () => {
456
+ expect(v.safeParse(schema, row).success).toBe(false);
457
+ });
458
+ }
459
+ const obsoleteMailboxThreadFieldTestCases = [
460
+ { field: 'accountId', row: { ...validRows.messages, accountId: 'account-1' }, schema: appwrite.rowSchemas.messages, table: 'messages' },
461
+ { field: 'threadId', row: { ...validRows.messages, threadId: 'thread-1' }, schema: appwrite.rowSchemas.messages, table: 'messages' },
462
+ { field: 'userId', row: { ...validRows.messages, userId: 'user-1' }, schema: appwrite.rowSchemas.messages, table: 'messages' },
463
+ { field: 'accountId', row: { ...validRows.threads, accountId: 'account-1' }, schema: appwrite.rowSchemas.threads, table: 'threads' },
464
+ { field: 'userId', row: { ...validRows.threads, userId: 'user-1' }, schema: appwrite.rowSchemas.threads, table: 'threads' },
465
+ { field: 'accountId', row: { ...validRows.threadAliases, accountId: 'account-1' }, schema: appwrite.rowSchemas.threadAliases, table: 'threadAliases' },
466
+ { field: 'aliasId', row: { ...validRows.threadAliases, aliasId: 'alias-1' }, schema: appwrite.rowSchemas.threadAliases, table: 'threadAliases' },
467
+ { field: 'threadId', row: { ...validRows.threadAliases, threadId: 'thread-1' }, schema: appwrite.rowSchemas.threadAliases, table: 'threadAliases' },
468
+ { field: 'userId', row: { ...validRows.threadAliases, userId: 'user-1' }, schema: appwrite.rowSchemas.threadAliases, table: 'threadAliases' },
469
+ { field: 'accountId', row: { ...validRows.threadLabels, accountId: 'account-1' }, schema: appwrite.rowSchemas.threadLabels, table: 'threadLabels' },
470
+ { field: 'labelId', row: { ...validRows.threadLabels, labelId: 'label-1' }, schema: appwrite.rowSchemas.threadLabels, table: 'threadLabels' },
471
+ { field: 'threadId', row: { ...validRows.threadLabels, threadId: 'thread-1' }, schema: appwrite.rowSchemas.threadLabels, table: 'threadLabels' },
472
+ { field: 'userId', row: { ...validRows.threadLabels, userId: 'user-1' }, schema: appwrite.rowSchemas.threadLabels, table: 'threadLabels' },
473
+ ];
474
+ for (const { field, row, schema, table } of obsoleteMailboxThreadFieldTestCases) {
475
+ it(`rejects obsolete ${field} on ${table}`, () => {
476
+ expect(v.safeParse(schema, row).success).toBe(false);
477
+ });
478
+ }
412
479
  const nullableColumnTestCases = [
413
480
  {
414
481
  description: 'alias name',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",