@marcoappio/marco-config 3.0.10 → 4.0.0

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.
@@ -32,7 +32,7 @@ export type AppwriteMessageAttachment = ReadonlyDeep<v.InferOutput<typeof messag
32
32
  export type AppwriteMessageRecipient = ReadonlyDeep<v.InferOutput<typeof messageRecipientSchema>>;
33
33
  declare const mailboxSyncLanes: readonly ["HEAD", "BACKFILL"];
34
34
  declare const mailboxSyncLaneStates: readonly ["PENDING", "RUNNING", "COMPLETED", "FAILED"];
35
- declare const mailboxSyncStates: readonly ["INITIAL", "SYNCING", "CURRENT", "IDLE", "ERROR"];
35
+ declare const mailboxSyncStates: readonly ["INITIAL", "SYNCING", "CURRENT", "ERROR"];
36
36
  declare const pollShardStates: readonly ["ACTIVE", "STOPPED", "FAILED"];
37
37
  declare const appwriteEnvironments: readonly ['development', 'production', 'staging'];
38
38
  export type AppwriteEnvironment = (typeof appwriteEnvironments)[number];
@@ -60,8 +60,6 @@ declare const rowSchemas: {
60
60
  readonly provider: v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>;
61
61
  readonly state: v.PicklistSchema<readonly ["AWAITING_CONNECTION", "CONNECTED", "ERROR", "DISCONNECTED"], undefined>;
62
62
  readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
63
- readonly watcherShard: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
64
- readonly watcherShardId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
65
63
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
66
64
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
67
65
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
@@ -220,7 +218,7 @@ declare const rowSchemas: {
220
218
  readonly nextPollAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
221
219
  readonly provider: v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>;
222
220
  readonly providerCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
223
- readonly state: v.PicklistSchema<readonly ["INITIAL", "SYNCING", "CURRENT", "IDLE", "ERROR"], undefined>;
221
+ readonly state: v.PicklistSchema<readonly ["INITIAL", "SYNCING", "CURRENT", "ERROR"], undefined>;
224
222
  readonly uidValidity: v.NullableSchema<v.StringSchema<undefined>, undefined>;
225
223
  readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
226
224
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
@@ -331,7 +329,7 @@ declare const rowSchemas: {
331
329
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
332
330
  }, undefined>;
333
331
  readonly savedViews: v.StrictObjectSchema<{
334
- readonly aliasEmails: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
332
+ readonly aliasIds: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
335
333
  readonly icon: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
336
334
  readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
337
335
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
@@ -342,6 +340,20 @@ declare const rowSchemas: {
342
340
  readonly $tableId: v.LiteralSchema<"saved_views", undefined>;
343
341
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
344
342
  }, undefined>;
343
+ 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>]>;
346
+ 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>]>;
349
+ readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
350
+ readonly $databaseId: v.LiteralSchema<"marco", undefined>;
351
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
352
+ readonly $permissions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
353
+ readonly $sequence: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
354
+ readonly $tableId: v.LiteralSchema<"thread_aliases", undefined>;
355
+ readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
356
+ }, undefined>;
345
357
  readonly threadLabels: v.StrictObjectSchema<{
346
358
  readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
347
359
  readonly labelId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
@@ -390,23 +402,6 @@ declare const rowSchemas: {
390
402
  readonly $tableId: v.LiteralSchema<"threads", undefined>;
391
403
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
392
404
  }, undefined>;
393
- readonly watcherShards: v.StrictObjectSchema<{
394
- readonly accountIds: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
395
- readonly errorCode: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
396
- readonly generation: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
397
- readonly heartbeatAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
398
- readonly lastHandoffAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
399
- readonly leaseExpiresAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
400
- readonly leaseId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
401
- readonly state: v.PicklistSchema<readonly ["ACTIVE", "IDLE", "STOPPED", "FAILED"], undefined>;
402
- readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
403
- readonly $databaseId: v.LiteralSchema<"marco", undefined>;
404
- readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
405
- readonly $permissions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
406
- readonly $sequence: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
407
- readonly $tableId: v.LiteralSchema<"watcher_shards", undefined>;
408
- readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
409
- }, undefined>;
410
405
  };
411
406
  export declare const appwrite: {
412
407
  readonly decodedSchemas: {
@@ -473,15 +468,15 @@ export declare const appwrite: {
473
468
  readonly profiles: "profiles";
474
469
  readonly pushNotificationTokens: "push_notification_tokens";
475
470
  readonly savedViews: "saved_views";
471
+ readonly threadAliases: "thread_aliases";
476
472
  readonly threadLabels: "thread_labels";
477
473
  readonly threads: "threads";
478
- readonly watcherShards: "watcher_shards";
479
474
  };
480
475
  };
481
476
  readonly mailboxSync: {
482
477
  readonly laneStates: readonly ["PENDING", "RUNNING", "COMPLETED", "FAILED"];
483
478
  readonly lanes: readonly ["HEAD", "BACKFILL"];
484
- readonly states: readonly ["INITIAL", "SYNCING", "CURRENT", "IDLE", "ERROR"];
479
+ readonly states: readonly ["INITIAL", "SYNCING", "CURRENT", "ERROR"];
485
480
  };
486
481
  readonly oauth: {
487
482
  readonly operations: readonly ["CONNECT", "REPLACE"];
@@ -512,8 +507,6 @@ export declare const appwrite: {
512
507
  readonly provider: v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>;
513
508
  readonly state: v.PicklistSchema<readonly ["AWAITING_CONNECTION", "CONNECTED", "ERROR", "DISCONNECTED"], undefined>;
514
509
  readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
515
- readonly watcherShard: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
516
- readonly watcherShardId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
517
510
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
518
511
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
519
512
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
@@ -672,7 +665,7 @@ export declare const appwrite: {
672
665
  readonly nextPollAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
673
666
  readonly provider: v.PicklistSchema<readonly ["GMAIL", "OUTLOOK", "IMAP"], undefined>;
674
667
  readonly providerCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
675
- readonly state: v.PicklistSchema<readonly ["INITIAL", "SYNCING", "CURRENT", "IDLE", "ERROR"], undefined>;
668
+ readonly state: v.PicklistSchema<readonly ["INITIAL", "SYNCING", "CURRENT", "ERROR"], undefined>;
676
669
  readonly uidValidity: v.NullableSchema<v.StringSchema<undefined>, undefined>;
677
670
  readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
678
671
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
@@ -783,7 +776,7 @@ export declare const appwrite: {
783
776
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
784
777
  }, undefined>;
785
778
  readonly savedViews: v.StrictObjectSchema<{
786
- readonly aliasEmails: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
779
+ readonly aliasIds: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
787
780
  readonly icon: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
788
781
  readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
789
782
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
@@ -794,6 +787,20 @@ export declare const appwrite: {
794
787
  readonly $tableId: v.LiteralSchema<"saved_views", undefined>;
795
788
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
796
789
  }, undefined>;
790
+ 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>]>;
793
+ 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>]>;
796
+ readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
797
+ readonly $databaseId: v.LiteralSchema<"marco", undefined>;
798
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
799
+ readonly $permissions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
800
+ readonly $sequence: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
801
+ readonly $tableId: v.LiteralSchema<"thread_aliases", undefined>;
802
+ readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
803
+ }, undefined>;
797
804
  readonly threadLabels: v.StrictObjectSchema<{
798
805
  readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
799
806
  readonly labelId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
@@ -842,23 +849,6 @@ export declare const appwrite: {
842
849
  readonly $tableId: v.LiteralSchema<"threads", undefined>;
843
850
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
844
851
  }, undefined>;
845
- readonly watcherShards: v.StrictObjectSchema<{
846
- readonly accountIds: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
847
- readonly errorCode: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
848
- readonly generation: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
849
- readonly heartbeatAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
850
- readonly lastHandoffAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
851
- readonly leaseExpiresAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
852
- readonly leaseId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
853
- readonly state: v.PicklistSchema<readonly ["ACTIVE", "IDLE", "STOPPED", "FAILED"], undefined>;
854
- readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
855
- readonly $databaseId: v.LiteralSchema<"marco", undefined>;
856
- readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
857
- readonly $permissions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
858
- readonly $sequence: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
859
- readonly $tableId: v.LiteralSchema<"watcher_shards", undefined>;
860
- readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
861
- }, undefined>;
862
852
  };
863
853
  };
864
854
  export type AppwriteRowTable = keyof typeof rowSchemas;
@@ -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,6DAA8D,CAAA;AAKrF,QAAA,MAAM,eAAe,0CAA2C,CAAA;AAEhE,QAAA,MAAM,oBAAoB,EAAE,SAAS,CAAC,aAAa,EAAE,YAAY,EAAE,SAAS,CAA4C,CAAA;AACxH,MAAM,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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"}
@@ -45,13 +45,12 @@ const jobStates = ['PENDING', 'RUNNING', 'SUCCEEDED', 'FAILED', 'CANCELLED'];
45
45
  const labelSpecialUses = ['ALL', 'ARCHIVE', 'DRAFTS', 'INBOX', 'JUNK', 'SENT', 'STARRED', 'TRASH'];
46
46
  const mailboxSyncLanes = ['HEAD', 'BACKFILL'];
47
47
  const mailboxSyncLaneStates = ['PENDING', 'RUNNING', 'COMPLETED', 'FAILED'];
48
- const mailboxSyncStates = ['INITIAL', 'SYNCING', 'CURRENT', 'IDLE', 'ERROR'];
48
+ const mailboxSyncStates = ['INITIAL', 'SYNCING', 'CURRENT', 'ERROR'];
49
49
  const oauthOperations = ['CONNECT', 'REPLACE'];
50
50
  const oauthProviders = ['GMAIL', 'OUTLOOK'];
51
51
  const oauthReturnUris = ['https://app.marcoapp.io/onboarding/provider-selection', 'https://app.staging.marcoapp.io/onboarding/provider-selection'];
52
52
  const oauthReturnUriSchema = v.picklist(oauthReturnUris);
53
53
  const pollShardStates = ['ACTIVE', 'STOPPED', 'FAILED'];
54
- const watcherShardStates = ['ACTIVE', 'IDLE', 'STOPPED', 'FAILED'];
55
54
  const appwriteEnvironments = ['development', 'production', 'staging'];
56
55
  const appwriteDeployments = {
57
56
  development: {
@@ -107,9 +106,9 @@ const appwriteIds = {
107
106
  profiles: 'profiles',
108
107
  pushNotificationTokens: 'push_notification_tokens',
109
108
  savedViews: 'saved_views',
109
+ threadAliases: 'thread_aliases',
110
110
  threadLabels: 'thread_labels',
111
111
  threads: 'threads',
112
- watcherShards: 'watcher_shards',
113
112
  },
114
113
  };
115
114
  const wireMetadata = (tableId) => ({
@@ -142,8 +141,6 @@ const rowSchemas = {
142
141
  provider: v.picklist(accountProviders),
143
142
  state: v.picklist(accountStates),
144
143
  userId: identifierSchema,
145
- watcherShard: v.nullable(identifierSchema),
146
- watcherShardId: v.nullable(identifierSchema),
147
144
  }),
148
145
  aliases: v.strictObject({
149
146
  ...wireMetadata(appwriteIds.tables.aliases),
@@ -320,10 +317,19 @@ const rowSchemas = {
320
317
  }),
321
318
  savedViews: v.strictObject({
322
319
  ...wireMetadata(appwriteIds.tables.savedViews),
323
- aliasEmails: v.array(emailSchema),
320
+ aliasIds: v.array(identifierSchema),
324
321
  icon: v.nullable(identifierSchema),
325
322
  name: identifierSchema,
326
323
  }),
324
+ // Scalar IDs keep this hot materialisation join eligible for TablesDB bulk writes.
325
+ threadAliases: v.strictObject({
326
+ ...wireMetadata(appwriteIds.tables.threadAliases),
327
+ accountId: identifierSchema,
328
+ aliasId: identifierSchema,
329
+ latestMessageAt: timestampSchema,
330
+ threadId: identifierSchema,
331
+ userId: identifierSchema,
332
+ }),
327
333
  threadLabels: v.strictObject({
328
334
  ...wireMetadata(appwriteIds.tables.threadLabels),
329
335
  accountId: identifierSchema,
@@ -360,17 +366,6 @@ const rowSchemas = {
360
366
  unseenLocationCount: nonNegativeIntegerSchema,
361
367
  userId: identifierSchema,
362
368
  }),
363
- watcherShards: v.strictObject({
364
- ...wireMetadata(appwriteIds.tables.watcherShards),
365
- accountIds: v.array(identifierSchema),
366
- errorCode: v.nullable(identifierSchema),
367
- generation: nonNegativeIntegerSchema,
368
- heartbeatAt: v.nullable(timestampSchema),
369
- lastHandoffAt: v.nullable(timestampSchema),
370
- leaseExpiresAt: v.nullable(timestampSchema),
371
- leaseId: v.nullable(identifierSchema),
372
- state: v.picklist(watcherShardStates),
373
- }),
374
369
  };
375
370
  export const appwrite = {
376
371
  decodedSchemas: {
@@ -31,8 +31,6 @@ const validRows = {
31
31
  provider: 'GMAIL',
32
32
  state: 'CONNECTED',
33
33
  userId: 'user-1',
34
- watcherShard: null,
35
- watcherShardId: 'watcher-shard-1',
36
34
  },
37
35
  aliases: {
38
36
  ...metadata,
@@ -147,7 +145,7 @@ const validRows = {
147
145
  nextPollAt: null,
148
146
  provider: 'GMAIL',
149
147
  providerCursor: null,
150
- state: 'IDLE',
148
+ state: 'CURRENT',
151
149
  uidValidity: null,
152
150
  userId: 'user-1',
153
151
  },
@@ -219,10 +217,19 @@ const validRows = {
219
217
  savedViews: {
220
218
  ...metadata,
221
219
  $tableId: 'saved_views',
222
- aliasEmails: ['marco@example.com'],
220
+ aliasIds: ['alias-1'],
223
221
  icon: 'mail',
224
222
  name: 'Unread',
225
223
  },
224
+ threadAliases: {
225
+ ...metadata,
226
+ $tableId: 'thread_aliases',
227
+ accountId: 'account-1',
228
+ aliasId: 'alias-1',
229
+ latestMessageAt: '2026-07-15T00:00:00.000Z',
230
+ threadId: 'thread-1',
231
+ userId: 'user-1',
232
+ },
226
233
  threadLabels: {
227
234
  ...metadata,
228
235
  $tableId: 'thread_labels',
@@ -261,18 +268,6 @@ const validRows = {
261
268
  unseenLocationCount: 0,
262
269
  userId: 'user-1',
263
270
  },
264
- watcherShards: {
265
- ...metadata,
266
- $tableId: 'watcher_shards',
267
- accountIds: ['account-1'],
268
- errorCode: null,
269
- generation: 1,
270
- heartbeatAt: null,
271
- lastHandoffAt: null,
272
- leaseExpiresAt: null,
273
- leaseId: null,
274
- state: 'ACTIVE',
275
- },
276
271
  };
277
272
  const validPollShardCoordinatorRow = {
278
273
  ...metadata,
@@ -321,9 +316,9 @@ describe('appwrite', () => {
321
316
  profiles: 'profiles',
322
317
  pushNotificationTokens: 'push_notification_tokens',
323
318
  savedViews: 'saved_views',
319
+ threadAliases: 'thread_aliases',
324
320
  threadLabels: 'thread_labels',
325
321
  threads: 'threads',
326
- watcherShards: 'watcher_shards',
327
322
  },
328
323
  });
329
324
  });
@@ -334,19 +329,22 @@ describe('appwrite', () => {
334
329
  returnUris: ['https://app.marcoapp.io/onboarding/provider-selection', 'https://app.staging.marcoapp.io/onboarding/provider-selection'],
335
330
  });
336
331
  });
337
- it('exports the additive mailbox polling contract', () => {
332
+ it('exports the final polling-only mailbox contract', () => {
338
333
  expect(appwrite.mailboxSync).toEqual({
339
334
  laneStates: ['PENDING', 'RUNNING', 'COMPLETED', 'FAILED'],
340
335
  lanes: ['HEAD', 'BACKFILL'],
341
- states: ['INITIAL', 'SYNCING', 'CURRENT', 'IDLE', 'ERROR'],
336
+ states: ['INITIAL', 'SYNCING', 'CURRENT', 'ERROR'],
342
337
  });
343
338
  expect(appwrite.polling).toEqual({ shardStates: ['ACTIVE', 'STOPPED', 'FAILED'] });
344
339
  });
345
- for (const state of ['CURRENT', 'IDLE']) {
346
- it(`accepts the transitional ${state} mailbox sync state`, () => {
347
- expect(v.safeParse(appwrite.rowSchemas.mailboxSyncStates, { ...validRows.mailboxSyncStates, state }).success).toBe(true);
348
- });
349
- }
340
+ it('accepts CURRENT and rejects the retired IDLE mailbox sync state', () => {
341
+ expect(v.safeParse(appwrite.rowSchemas.mailboxSyncStates, { ...validRows.mailboxSyncStates, state: 'CURRENT' }).success).toBe(true);
342
+ expect(v.safeParse(appwrite.rowSchemas.mailboxSyncStates, { ...validRows.mailboxSyncStates, state: 'IDLE' }).success).toBe(false);
343
+ });
344
+ it('keys saved views by stable alias IDs', () => {
345
+ expect(v.safeParse(appwrite.rowSchemas.savedViews, validRows.savedViews).success).toBe(true);
346
+ expect(v.safeParse(appwrite.rowSchemas.savedViews, { ...validRows.savedViews, aliasEmails: ['marco@example.com'] }).success).toBe(false);
347
+ });
350
348
  it('rejects a mailbox sync lane without a command UUID', () => {
351
349
  expect(v.safeParse(appwrite.rowSchemas.mailboxSyncLanes, {
352
350
  ...validRows.mailboxSyncLanes,
@@ -554,21 +554,6 @@ export declare const appwriteFunctions: {
554
554
  readonly state: v.LiteralSchema<"COMPLETED", undefined>;
555
555
  }, undefined>;
556
556
  };
557
- readonly watchersRun: {
558
- errorSchema: v.StrictObjectSchema<{
559
- readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
560
- readonly retryable: v.BooleanSchema<undefined>;
561
- }, undefined>;
562
- context: "internal";
563
- method: "POST";
564
- path: "/watchers/run";
565
- requestSchema: v.StrictObjectSchema<{
566
- readonly shardId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
567
- }, undefined>;
568
- responseSchema: v.StrictObjectSchema<{
569
- readonly state: v.LiteralSchema<"COMPLETED", undefined>;
570
- }, undefined>;
571
- };
572
557
  };
573
558
  };
574
559
  };
@@ -1 +1 @@
1
- {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/appwrite/functions.ts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,CAAC,SAAS,SAAS,oBAAoB,EAAE,MAAM,SAAS,yBAAyB,CAAC,SAAS,CAAC,IAAI,qBAAqB,CACtJ,SAAS,EACT,MAAM,CACP,SAAS;IAAE,aAAa,EAAE,MAAM,OAAO,SAAS,CAAC,CAAC,aAAa,CAAA;CAAE,GAC9D,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,GACtB,KAAK,CAAA;AACT,MAAM,MAAM,wBAAwB,CAAC,SAAS,SAAS,oBAAoB,EAAE,MAAM,SAAS,yBAAyB,CAAC,SAAS,CAAC,IAAI,qBAAqB,CACvJ,SAAS,EACT,MAAM,CACP,SAAS;IAAE,cAAc,EAAE,MAAM,OAAO,SAAS,CAAC,CAAC,aAAa,CAAA;CAAE,GAC/D,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,GACtB,KAAK,CAAA"}
@@ -154,13 +154,6 @@ const workerRoutes = {
154
154
  requestSchema: emptySchema,
155
155
  responseSchema: completedSchema,
156
156
  }),
157
- watchersRun: createRoute({
158
- context: 'internal',
159
- method: 'POST',
160
- path: '/watchers/run',
161
- requestSchema: v.strictObject({ shardId: appwriteRowIdSchema }),
162
- responseSchema: completedSchema,
163
- }),
164
157
  };
165
158
  export const appwriteFunctions = {
166
159
  api: {
@@ -109,12 +109,6 @@ const routeFixtures = [
109
109
  response: { state: 'COMPLETED' },
110
110
  route: () => appwriteFunctions.api.routes.pollsRun,
111
111
  },
112
- {
113
- name: 'watcher runner',
114
- request: { shardId: 'test-watcher-shard-id-1' },
115
- response: { state: 'COMPLETED' },
116
- route: () => appwriteFunctions.worker.routes.watchersRun,
117
- },
118
112
  ];
119
113
  describe('appwriteFunctions', () => {
120
114
  it('publishes the complete Appwrite Function route manifest', () => {
@@ -130,7 +124,6 @@ describe('appwriteFunctions', () => {
130
124
  { functionId: appwriteFunctions.api.id, route: appwriteFunctions.api.routes.pollsRun },
131
125
  { functionId: appwriteFunctions.worker.id, route: appwriteFunctions.worker.routes.supervisor },
132
126
  { functionId: appwriteFunctions.worker.id, route: appwriteFunctions.worker.routes.jobsRun },
133
- { functionId: appwriteFunctions.worker.id, route: appwriteFunctions.worker.routes.watchersRun },
134
127
  ].map(({ functionId, route }) => ({
135
128
  context: route.context,
136
129
  functionId,
@@ -148,7 +141,6 @@ describe('appwriteFunctions', () => {
148
141
  { context: 'internal', functionId: 'marco-api', method: 'POST', path: '/polls/run' },
149
142
  { context: 'internal', functionId: 'marco-worker', method: 'POST', path: '/' },
150
143
  { context: 'internal', functionId: 'marco-worker', method: 'POST', path: '/jobs/run' },
151
- { context: 'internal', functionId: 'marco-worker', method: 'POST', path: '/watchers/run' },
152
144
  ]);
153
145
  });
154
146
  for (const { name, request, response, route } of routeFixtures) {
@@ -178,19 +170,14 @@ describe('appwriteFunctions', () => {
178
170
  }).success).toBe(false);
179
171
  });
180
172
  }
181
- const workerShardRoutes = [
173
+ const shardRoutes = [
182
174
  {
183
175
  description: 'poll',
184
176
  request: { scheduledFor: '2026-07-23T12:00:30.000Z', shardId: 'test invalid shard id' },
185
177
  requestSchema: appwriteFunctions.api.routes.pollsRun.requestSchema,
186
178
  },
187
- {
188
- description: 'watcher',
189
- request: { shardId: 'test invalid shard id' },
190
- requestSchema: appwriteFunctions.worker.routes.watchersRun.requestSchema,
191
- },
192
179
  ];
193
- for (const { description, request, requestSchema } of workerShardRoutes) {
180
+ for (const { description, request, requestSchema } of shardRoutes) {
194
181
  it(`rejects a malformed ${description} shard ID`, () => {
195
182
  expect(v.safeParse(requestSchema, request).success).toBe(false);
196
183
  });
@@ -41,7 +41,7 @@ export declare const marcoConstants: {
41
41
  maxFileSize: number;
42
42
  };
43
43
  views: {
44
- maxAliasEmailsPerView: number;
44
+ maxAliasIdsPerView: number;
45
45
  maxViews: number;
46
46
  };
47
47
  };
@@ -5,7 +5,7 @@ export declare const user: {
5
5
  maxFileSize: number;
6
6
  };
7
7
  views: {
8
- maxAliasEmailsPerView: number;
8
+ maxAliasIdsPerView: number;
9
9
  maxViews: number;
10
10
  };
11
11
  };
@@ -5,7 +5,7 @@ export const user = {
5
5
  maxFileSize: 5 * 1024 * 1024,
6
6
  },
7
7
  views: {
8
- maxAliasEmailsPerView: 100,
8
+ maxAliasIdsPerView: 100,
9
9
  maxViews: 25,
10
10
  },
11
11
  };
@@ -313,7 +313,7 @@ export declare const marcoSchemas: {
313
313
  words: import("valibot").StringSchema<undefined>;
314
314
  }, undefined>;
315
315
  userViewSchema: import("valibot").ObjectSchema<{
316
- readonly aliasEmails: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
316
+ readonly aliasIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "AliasId">]>, undefined>, undefined>;
317
317
  readonly icon: import("valibot").PicklistSchema<readonly [import("..").CustomViewIcon.AIRPLANE, import("..").CustomViewIcon.BELL, import("..").CustomViewIcon.BRIEFCASE, import("..").CustomViewIcon.CLOCK, import("..").CustomViewIcon.CREDIT_CARD, import("..").CustomViewIcon.HEART, import("..").CustomViewIcon.HOME, import("..").CustomViewIcon.KEY, import("..").CustomViewIcon.MOON, import("..").CustomViewIcon.PERSON, import("..").CustomViewIcon.SHOPPING_CART, import("..").CustomViewIcon.STAR], undefined>;
318
318
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "ViewId">]>, undefined>;
319
319
  readonly name: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -1,6 +1,6 @@
1
1
  import * as v from 'valibot';
2
2
  export declare const userViewSchema: v.ObjectSchema<{
3
- readonly aliasEmails: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
3
+ readonly aliasIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>, undefined>;
4
4
  readonly icon: v.PicklistSchema<readonly [import("../../types").CustomViewIcon.AIRPLANE, import("../../types").CustomViewIcon.BELL, import("../../types").CustomViewIcon.BRIEFCASE, import("../../types").CustomViewIcon.CLOCK, import("../../types").CustomViewIcon.CREDIT_CARD, import("../../types").CustomViewIcon.HEART, import("../../types").CustomViewIcon.HOME, import("../../types").CustomViewIcon.KEY, import("../../types").CustomViewIcon.MOON, import("../../types").CustomViewIcon.PERSON, import("../../types").CustomViewIcon.SHOPPING_CART, import("../../types").CustomViewIcon.STAR], undefined>;
5
5
  readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ViewId">]>, undefined>;
6
6
  readonly name: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -3,7 +3,7 @@ import { id } from '../../schemas/id';
3
3
  import { string } from '../../schemas/string';
4
4
  import { USER_SETTINGS_CUSTOM_VIEW_ICONS } from '../../types';
5
5
  export const userViewSchema = v.object({
6
- aliasEmails: v.array(string.required()),
6
+ aliasIds: v.array(id.aliasId.required()),
7
7
  icon: v.picklist(USER_SETTINGS_CUSTOM_VIEW_ICONS),
8
8
  id: id.viewId.required(),
9
9
  name: string.required(),
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=user.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.test.d.ts","sourceRoot":"","sources":["../../../src/schemas/models/user.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { describe, expect, it } from 'bun:test';
2
+ import * as v from 'valibot';
3
+ import { userViewSchema } from './user';
4
+ describe('userViewSchema', () => {
5
+ it('keys saved views by stable alias IDs', () => {
6
+ const view = { aliasIds: ['alias-1'], icon: 'STAR', id: 'view-1', name: 'Important' };
7
+ const legacyView = { aliasEmails: ['marco@example.com'], icon: 'STAR', id: 'view-1', name: 'Important' };
8
+ expect(v.safeParse(userViewSchema, view).success).toBe(true);
9
+ expect(v.safeParse(userViewSchema, legacyView).success).toBe(false);
10
+ });
11
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "3.0.10",
3
+ "version": "4.0.0",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",