@marcoappio/marco-config 2.0.597 → 2.0.599

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.
@@ -61,9 +61,9 @@ declare const rowSchemas: {
61
61
  readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
62
62
  readonly email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>;
63
63
  readonly isPrimary: v.BooleanSchema<undefined>;
64
- readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
64
+ readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
65
65
  readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
66
- readonly signature: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
66
+ readonly signature: v.NullableSchema<v.StringSchema<undefined>, undefined>;
67
67
  readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
68
68
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
69
69
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
@@ -89,12 +89,12 @@ declare const rowSchemas: {
89
89
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
90
90
  readonly $permissions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
91
91
  readonly $sequence: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
92
- readonly $tableId: v.LiteralSchema<"commands", undefined>;
92
+ readonly $tableId: v.LiteralSchema<"commands_v2", undefined>;
93
93
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
94
94
  }, undefined>;
95
95
  readonly contacts: v.StrictObjectSchema<{
96
- readonly displayName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
97
- readonly lastContactedAt: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
96
+ readonly displayName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
97
+ readonly lastContactedAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
98
98
  readonly messageCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
99
99
  readonly normalisedAddress: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>;
100
100
  readonly searchText: v.StringSchema<undefined>;
@@ -163,7 +163,7 @@ declare const rowSchemas: {
163
163
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
164
164
  readonly $permissions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
165
165
  readonly $sequence: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
166
- readonly $tableId: v.LiteralSchema<"jobs", undefined>;
166
+ readonly $tableId: v.LiteralSchema<"jobs_v2", undefined>;
167
167
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
168
168
  }, undefined>;
169
169
  readonly labels: v.StrictObjectSchema<{
@@ -273,7 +273,7 @@ declare const rowSchemas: {
273
273
  }, undefined>;
274
274
  readonly savedViews: v.StrictObjectSchema<{
275
275
  readonly aliasEmails: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
276
- readonly icon: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
276
+ readonly icon: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
277
277
  readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
278
278
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
279
279
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
@@ -301,7 +301,7 @@ declare const rowSchemas: {
301
301
  readonly threads: v.StrictObjectSchema<{
302
302
  readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
303
303
  readonly archived: v.BooleanSchema<undefined>;
304
- readonly firstMessageAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, undefined>;
304
+ readonly firstMessageAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
305
305
  readonly flagged: v.BooleanSchema<undefined>;
306
306
  readonly hasAttachments: v.BooleanSchema<undefined>;
307
307
  readonly labelIds: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
@@ -314,8 +314,8 @@ declare const rowSchemas: {
314
314
  readonly revision: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
315
315
  readonly searchText: v.NullableSchema<v.StringSchema<undefined>, undefined>;
316
316
  readonly seen: v.BooleanSchema<undefined>;
317
- readonly senderEmail: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>, undefined>;
318
- readonly senderName: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
317
+ readonly senderEmail: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
318
+ readonly senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
319
319
  readonly snoozedUntil: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
320
320
  readonly spam: v.BooleanSchema<undefined>;
321
321
  readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -387,11 +387,11 @@ export declare const appwrite: {
387
387
  readonly tables: {
388
388
  readonly accounts: "accounts";
389
389
  readonly aliases: "aliases";
390
- readonly commands: "commands";
390
+ readonly commands: "commands_v2";
391
391
  readonly contacts: "contacts";
392
392
  readonly credentials: "credentials";
393
393
  readonly drafts: "drafts";
394
- readonly jobs: "jobs";
394
+ readonly jobs: "jobs_v2";
395
395
  readonly labels: "labels";
396
396
  readonly mailboxSyncStates: "mailbox_sync_states";
397
397
  readonly messages: "messages";
@@ -442,9 +442,9 @@ export declare const appwrite: {
442
442
  readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
443
443
  readonly email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>;
444
444
  readonly isPrimary: v.BooleanSchema<undefined>;
445
- readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
445
+ readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
446
446
  readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
447
- readonly signature: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
447
+ readonly signature: v.NullableSchema<v.StringSchema<undefined>, undefined>;
448
448
  readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
449
449
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
450
450
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
@@ -470,12 +470,12 @@ export declare const appwrite: {
470
470
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
471
471
  readonly $permissions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
472
472
  readonly $sequence: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
473
- readonly $tableId: v.LiteralSchema<"commands", undefined>;
473
+ readonly $tableId: v.LiteralSchema<"commands_v2", undefined>;
474
474
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
475
475
  }, undefined>;
476
476
  readonly contacts: v.StrictObjectSchema<{
477
- readonly displayName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
478
- readonly lastContactedAt: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
477
+ readonly displayName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
478
+ readonly lastContactedAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
479
479
  readonly messageCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
480
480
  readonly normalisedAddress: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>;
481
481
  readonly searchText: v.StringSchema<undefined>;
@@ -544,7 +544,7 @@ export declare const appwrite: {
544
544
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
545
545
  readonly $permissions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
546
546
  readonly $sequence: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
547
- readonly $tableId: v.LiteralSchema<"jobs", undefined>;
547
+ readonly $tableId: v.LiteralSchema<"jobs_v2", undefined>;
548
548
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
549
549
  }, undefined>;
550
550
  readonly labels: v.StrictObjectSchema<{
@@ -654,7 +654,7 @@ export declare const appwrite: {
654
654
  }, undefined>;
655
655
  readonly savedViews: v.StrictObjectSchema<{
656
656
  readonly aliasEmails: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
657
- readonly icon: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
657
+ readonly icon: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
658
658
  readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
659
659
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
660
660
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
@@ -682,7 +682,7 @@ export declare const appwrite: {
682
682
  readonly threads: v.StrictObjectSchema<{
683
683
  readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
684
684
  readonly archived: v.BooleanSchema<undefined>;
685
- readonly firstMessageAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, undefined>;
685
+ readonly firstMessageAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
686
686
  readonly flagged: v.BooleanSchema<undefined>;
687
687
  readonly hasAttachments: v.BooleanSchema<undefined>;
688
688
  readonly labelIds: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
@@ -695,8 +695,8 @@ export declare const appwrite: {
695
695
  readonly revision: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
696
696
  readonly searchText: v.NullableSchema<v.StringSchema<undefined>, undefined>;
697
697
  readonly seen: v.BooleanSchema<undefined>;
698
- readonly senderEmail: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>, undefined>;
699
- readonly senderName: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
698
+ readonly senderEmail: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
699
+ readonly senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
700
700
  readonly snoozedUntil: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
701
701
  readonly spam: v.BooleanSchema<undefined>;
702
702
  readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -61,11 +61,11 @@ const appwriteIds = {
61
61
  tables: {
62
62
  accounts: 'accounts',
63
63
  aliases: 'aliases',
64
- commands: 'commands',
64
+ commands: 'commands_v2',
65
65
  contacts: 'contacts',
66
66
  credentials: 'credentials',
67
67
  drafts: 'drafts',
68
- jobs: 'jobs',
68
+ jobs: 'jobs_v2',
69
69
  labels: 'labels',
70
70
  mailboxSyncStates: 'mailbox_sync_states',
71
71
  messages: 'messages',
@@ -114,9 +114,9 @@ const rowSchemas = {
114
114
  accountId: identifierSchema,
115
115
  email: emailSchema,
116
116
  isPrimary: v.boolean(),
117
- name: v.optional(identifierSchema),
117
+ name: v.nullable(identifierSchema),
118
118
  providerId: identifierSchema,
119
- signature: v.optional(v.string()),
119
+ signature: v.nullable(v.string()),
120
120
  userId: identifierSchema,
121
121
  }),
122
122
  commands: v.strictObject({
@@ -134,8 +134,8 @@ const rowSchemas = {
134
134
  }),
135
135
  contacts: v.strictObject({
136
136
  ...wireMetadata(appwriteIds.tables.contacts),
137
- displayName: v.optional(identifierSchema),
138
- lastContactedAt: v.optional(timestampSchema),
137
+ displayName: v.nullable(identifierSchema),
138
+ lastContactedAt: v.nullable(timestampSchema),
139
139
  messageCount: nonNegativeIntegerSchema,
140
140
  normalisedAddress: emailSchema,
141
141
  searchText: v.string(),
@@ -254,7 +254,7 @@ const rowSchemas = {
254
254
  savedViews: v.strictObject({
255
255
  ...wireMetadata(appwriteIds.tables.savedViews),
256
256
  aliasEmails: v.array(emailSchema),
257
- icon: v.optional(identifierSchema),
257
+ icon: v.nullable(identifierSchema),
258
258
  name: identifierSchema,
259
259
  }),
260
260
  threadLabels: v.strictObject({
@@ -270,7 +270,7 @@ const rowSchemas = {
270
270
  ...wireMetadata(appwriteIds.tables.threads),
271
271
  accountId: identifierSchema,
272
272
  archived: v.boolean(),
273
- firstMessageAt: v.optional(v.nullable(timestampSchema)),
273
+ firstMessageAt: v.nullable(timestampSchema),
274
274
  flagged: v.boolean(),
275
275
  hasAttachments: v.boolean(),
276
276
  labelIds: v.array(identifierSchema),
@@ -283,8 +283,8 @@ const rowSchemas = {
283
283
  revision: nonNegativeIntegerSchema,
284
284
  searchText: v.nullable(v.string()),
285
285
  seen: v.boolean(),
286
- senderEmail: v.optional(v.nullable(emailSchema)),
287
- senderName: v.optional(v.nullable(identifierSchema)),
286
+ senderEmail: v.nullable(emailSchema),
287
+ senderName: v.nullable(identifierSchema),
288
288
  snoozedUntil: v.nullable(timestampSchema),
289
289
  spam: v.boolean(),
290
290
  subject: v.nullable(v.string()),
@@ -38,12 +38,14 @@ const validRows = {
38
38
  accountId: 'account-1',
39
39
  email: 'marco@example.com',
40
40
  isPrimary: true,
41
+ name: 'Marco',
41
42
  providerId: 'provider-1',
43
+ signature: '<p>Test signature</p>',
42
44
  userId: 'user-1',
43
45
  },
44
46
  commands: {
45
47
  ...metadata,
46
- $tableId: 'commands',
48
+ $tableId: 'commands_v2',
47
49
  accountId: null,
48
50
  attempts: 0,
49
51
  canonicalRevision: null,
@@ -58,6 +60,8 @@ const validRows = {
58
60
  contacts: {
59
61
  ...metadata,
60
62
  $tableId: 'contacts',
63
+ displayName: 'Marco',
64
+ lastContactedAt: '2026-07-15T00:00:00.000Z',
61
65
  messageCount: 0,
62
66
  normalisedAddress: 'marco@example.com',
63
67
  searchText: 'marco',
@@ -92,7 +96,7 @@ const validRows = {
92
96
  },
93
97
  jobs: {
94
98
  ...metadata,
95
- $tableId: 'jobs',
99
+ $tableId: 'jobs_v2',
96
100
  accountId: null,
97
101
  attempts: 0,
98
102
  commandId: 'command-1',
@@ -186,6 +190,7 @@ const validRows = {
186
190
  ...metadata,
187
191
  $tableId: 'saved_views',
188
192
  aliasEmails: ['marco@example.com'],
193
+ icon: 'mail',
189
194
  name: 'Unread',
190
195
  },
191
196
  threadLabels: {
@@ -246,11 +251,11 @@ describe('appwrite', () => {
246
251
  tables: {
247
252
  accounts: 'accounts',
248
253
  aliases: 'aliases',
249
- commands: 'commands',
254
+ commands: 'commands_v2',
250
255
  contacts: 'contacts',
251
256
  credentials: 'credentials',
252
257
  drafts: 'drafts',
253
- jobs: 'jobs',
258
+ jobs: 'jobs_v2',
254
259
  labels: 'labels',
255
260
  mailboxSyncStates: 'mailbox_sync_states',
256
261
  messages: 'messages',
@@ -284,6 +289,108 @@ describe('appwrite', () => {
284
289
  expect(v.safeParse(appwrite.rowSchemas[table], rowWithoutId).success).toBe(false);
285
290
  });
286
291
  }
292
+ const nullableColumnTestCases = [
293
+ {
294
+ description: 'alias name',
295
+ row: { ...validRows.aliases, name: null },
296
+ schema: appwrite.rowSchemas.aliases,
297
+ },
298
+ {
299
+ description: 'alias signature',
300
+ row: { ...validRows.aliases, signature: null },
301
+ schema: appwrite.rowSchemas.aliases,
302
+ },
303
+ {
304
+ description: 'contact display name',
305
+ row: { ...validRows.contacts, displayName: null },
306
+ schema: appwrite.rowSchemas.contacts,
307
+ },
308
+ {
309
+ description: 'contact last-contacted timestamp',
310
+ row: { ...validRows.contacts, lastContactedAt: null },
311
+ schema: appwrite.rowSchemas.contacts,
312
+ },
313
+ {
314
+ description: 'saved-view icon',
315
+ row: { ...validRows.savedViews, icon: null },
316
+ schema: appwrite.rowSchemas.savedViews,
317
+ },
318
+ {
319
+ description: 'thread first-message timestamp',
320
+ row: { ...validRows.threads, firstMessageAt: null },
321
+ schema: appwrite.rowSchemas.threads,
322
+ },
323
+ {
324
+ description: 'thread sender email',
325
+ row: { ...validRows.threads, senderEmail: null },
326
+ schema: appwrite.rowSchemas.threads,
327
+ },
328
+ {
329
+ description: 'thread sender name',
330
+ row: { ...validRows.threads, senderName: null },
331
+ schema: appwrite.rowSchemas.threads,
332
+ },
333
+ ];
334
+ for (const { description, row, schema } of nullableColumnTestCases) {
335
+ it(`accepts a wire row with a nullable ${description}`, () => {
336
+ expect(v.safeParse(schema, row).success).toBe(true);
337
+ });
338
+ }
339
+ const { name: _aliasName, ...aliasWithoutName } = validRows.aliases;
340
+ const { signature: _aliasSignature, ...aliasWithoutSignature } = validRows.aliases;
341
+ const { displayName: _contactDisplayName, ...contactWithoutDisplayName } = validRows.contacts;
342
+ const { lastContactedAt: _contactLastContactedAt, ...contactWithoutLastContactedAt } = validRows.contacts;
343
+ const { icon: _savedViewIcon, ...savedViewWithoutIcon } = validRows.savedViews;
344
+ const { firstMessageAt: _threadFirstMessageAt, ...threadWithoutFirstMessageAt } = validRows.threads;
345
+ const { senderEmail: _threadSenderEmail, ...threadWithoutSenderEmail } = validRows.threads;
346
+ const { senderName: _threadSenderName, ...threadWithoutSenderName } = validRows.threads;
347
+ const missingNullableColumnTestCases = [
348
+ {
349
+ description: 'alias name',
350
+ row: aliasWithoutName,
351
+ schema: appwrite.rowSchemas.aliases,
352
+ },
353
+ {
354
+ description: 'alias signature',
355
+ row: aliasWithoutSignature,
356
+ schema: appwrite.rowSchemas.aliases,
357
+ },
358
+ {
359
+ description: 'contact display name',
360
+ row: contactWithoutDisplayName,
361
+ schema: appwrite.rowSchemas.contacts,
362
+ },
363
+ {
364
+ description: 'contact last-contacted timestamp',
365
+ row: contactWithoutLastContactedAt,
366
+ schema: appwrite.rowSchemas.contacts,
367
+ },
368
+ {
369
+ description: 'saved-view icon',
370
+ row: savedViewWithoutIcon,
371
+ schema: appwrite.rowSchemas.savedViews,
372
+ },
373
+ {
374
+ description: 'thread first-message timestamp',
375
+ row: threadWithoutFirstMessageAt,
376
+ schema: appwrite.rowSchemas.threads,
377
+ },
378
+ {
379
+ description: 'thread sender email',
380
+ row: threadWithoutSenderEmail,
381
+ schema: appwrite.rowSchemas.threads,
382
+ },
383
+ {
384
+ description: 'thread sender name',
385
+ row: threadWithoutSenderName,
386
+ schema: appwrite.rowSchemas.threads,
387
+ },
388
+ ];
389
+ for (const { description, row, schema } of missingNullableColumnTestCases) {
390
+ it(`rejects a wire row missing its nullable ${description}`, () => {
391
+ expect(v.safeParse(schema, row).success).toBe(false);
392
+ });
393
+ }
287
394
  const validOAuthStates = [
288
395
  { expected: true, operation: 'CONNECT', provider: 'GMAIL' },
289
396
  { expected: true, operation: 'REPLACE', provider: 'OUTLOOK' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.597",
3
+ "version": "2.0.599",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",