@marcoappio/marco-config 2.0.597 → 2.0.598
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.
|
|
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.
|
|
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>;
|
|
@@ -93,8 +93,8 @@ declare const rowSchemas: {
|
|
|
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.
|
|
97
|
-
readonly lastContactedAt: v.
|
|
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>;
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
318
|
-
readonly senderName: v.
|
|
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>;
|
|
@@ -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.
|
|
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.
|
|
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>;
|
|
@@ -474,8 +474,8 @@ export declare const appwrite: {
|
|
|
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.
|
|
478
|
-
readonly lastContactedAt: v.
|
|
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>;
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
699
|
-
readonly senderName: v.
|
|
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>;
|
|
@@ -114,9 +114,9 @@ const rowSchemas = {
|
|
|
114
114
|
accountId: identifierSchema,
|
|
115
115
|
email: emailSchema,
|
|
116
116
|
isPrimary: v.boolean(),
|
|
117
|
-
name: v.
|
|
117
|
+
name: v.nullable(identifierSchema),
|
|
118
118
|
providerId: identifierSchema,
|
|
119
|
-
signature: v.
|
|
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.
|
|
138
|
-
lastContactedAt: v.
|
|
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.
|
|
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.
|
|
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.
|
|
287
|
-
senderName: v.
|
|
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,7 +38,9 @@ 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: {
|
|
@@ -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',
|
|
@@ -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: {
|
|
@@ -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' },
|