@marcoappio/marco-config 2.0.585 → 2.0.586

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.
@@ -241,6 +241,21 @@ declare const rowSchemas: {
241
241
  readonly $tableId: v.LiteralSchema<"saved_views", undefined>;
242
242
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
243
243
  }, undefined>;
244
+ readonly threadLabels: v.StrictObjectSchema<{
245
+ readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
246
+ readonly labelId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
247
+ readonly latestMessageAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
248
+ readonly locationCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
249
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
250
+ readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
251
+ readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
252
+ readonly $databaseId: v.LiteralSchema<"marco", undefined>;
253
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
254
+ readonly $permissions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
255
+ readonly $sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
256
+ readonly $tableId: v.LiteralSchema<"thread_labels", undefined>;
257
+ readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
258
+ }, undefined>;
244
259
  readonly threads: v.StrictObjectSchema<{
245
260
  readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
246
261
  readonly archived: v.BooleanSchema<undefined>;
@@ -251,11 +266,11 @@ declare const rowSchemas: {
251
266
  readonly latestMessageAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
252
267
  readonly latestMessageId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
253
268
  readonly messageCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
254
- readonly participants: v.StringSchema<undefined>;
255
- readonly preview: v.StringSchema<undefined>;
269
+ readonly participants: v.NullableSchema<v.StringSchema<undefined>, undefined>;
270
+ readonly preview: v.NullableSchema<v.StringSchema<undefined>, undefined>;
256
271
  readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
257
272
  readonly revision: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
258
- readonly searchText: v.StringSchema<undefined>;
273
+ readonly searchText: v.NullableSchema<v.StringSchema<undefined>, undefined>;
259
274
  readonly seen: v.BooleanSchema<undefined>;
260
275
  readonly senderEmail: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>, undefined>;
261
276
  readonly senderName: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
@@ -309,7 +324,6 @@ export declare const appwrite: {
309
324
  readonly jobPayload: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.CheckAction<unknown, undefined>, v.LooseObjectSchema<{}, undefined>]>;
310
325
  readonly messageRecipients: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.ArraySchema<v.UnknownSchema, undefined>]>;
311
326
  readonly messageSender: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.CheckAction<unknown, undefined>, v.LooseObjectSchema<{}, undefined>]>;
312
- readonly threadParticipants: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.ArraySchema<v.UnknownSchema, undefined>]>;
313
327
  };
314
328
  readonly ids: {
315
329
  readonly bucket: "marco-files";
@@ -332,6 +346,7 @@ export declare const appwrite: {
332
346
  readonly profiles: "profiles";
333
347
  readonly pushNotificationTokens: "push_notification_tokens";
334
348
  readonly savedViews: "saved_views";
349
+ readonly threadLabels: "thread_labels";
335
350
  readonly threads: "threads";
336
351
  readonly watcherShards: "watcher_shards";
337
352
  };
@@ -563,6 +578,21 @@ export declare const appwrite: {
563
578
  readonly $tableId: v.LiteralSchema<"saved_views", undefined>;
564
579
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
565
580
  }, undefined>;
581
+ readonly threadLabels: v.StrictObjectSchema<{
582
+ readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
583
+ readonly labelId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
584
+ readonly latestMessageAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
585
+ readonly locationCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
586
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
587
+ readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
588
+ readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
589
+ readonly $databaseId: v.LiteralSchema<"marco", undefined>;
590
+ readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
591
+ readonly $permissions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
592
+ readonly $sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
593
+ readonly $tableId: v.LiteralSchema<"thread_labels", undefined>;
594
+ readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
595
+ }, undefined>;
566
596
  readonly threads: v.StrictObjectSchema<{
567
597
  readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
568
598
  readonly archived: v.BooleanSchema<undefined>;
@@ -573,11 +603,11 @@ export declare const appwrite: {
573
603
  readonly latestMessageAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
574
604
  readonly latestMessageId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
575
605
  readonly messageCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
576
- readonly participants: v.StringSchema<undefined>;
577
- readonly preview: v.StringSchema<undefined>;
606
+ readonly participants: v.NullableSchema<v.StringSchema<undefined>, undefined>;
607
+ readonly preview: v.NullableSchema<v.StringSchema<undefined>, undefined>;
578
608
  readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
579
609
  readonly revision: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
580
- readonly searchText: v.StringSchema<undefined>;
610
+ readonly searchText: v.NullableSchema<v.StringSchema<undefined>, undefined>;
581
611
  readonly seen: v.BooleanSchema<undefined>;
582
612
  readonly senderEmail: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>, undefined>;
583
613
  readonly senderName: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"appwrite.d.ts","sourceRoot":"","sources":["../../src/appwrite/appwrite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAe5B,QAAA,MAAM,qBAAqB;;;;;aAKzB,CAAA;AAEF,QAAA,MAAM,mBAAmB;;;;;eASxB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,OAA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,CAAA;AACtD,MAAM,MAAM,WAAW,CAAC,MAAM,SAAS,gBAAgB,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA"}
@@ -50,6 +50,7 @@ const appwriteIds = {
50
50
  profiles: 'profiles',
51
51
  pushNotificationTokens: 'push_notification_tokens',
52
52
  savedViews: 'saved_views',
53
+ threadLabels: 'thread_labels',
53
54
  threads: 'threads',
54
55
  watcherShards: 'watcher_shards',
55
56
  },
@@ -212,6 +213,15 @@ const rowSchemas = {
212
213
  icon: v.optional(identifierSchema),
213
214
  name: identifierSchema,
214
215
  }),
216
+ threadLabels: v.strictObject({
217
+ ...wireMetadata(appwriteIds.tables.threadLabels),
218
+ accountId: identifierSchema,
219
+ labelId: identifierSchema,
220
+ latestMessageAt: timestampSchema,
221
+ locationCount: nonNegativeIntegerSchema,
222
+ threadId: identifierSchema,
223
+ userId: identifierSchema,
224
+ }),
215
225
  threads: v.strictObject({
216
226
  ...wireMetadata(appwriteIds.tables.threads),
217
227
  accountId: identifierSchema,
@@ -223,11 +233,11 @@ const rowSchemas = {
223
233
  latestMessageAt: timestampSchema,
224
234
  latestMessageId: identifierSchema,
225
235
  messageCount: nonNegativeIntegerSchema,
226
- participants: v.string(),
227
- preview: v.string(),
236
+ participants: v.nullable(v.string()),
237
+ preview: v.nullable(v.string()),
228
238
  providerId: identifierSchema,
229
239
  revision: nonNegativeIntegerSchema,
230
- searchText: v.string(),
240
+ searchText: v.nullable(v.string()),
231
241
  seen: v.boolean(),
232
242
  senderEmail: v.optional(v.nullable(emailSchema)),
233
243
  senderName: v.optional(v.nullable(identifierSchema)),
@@ -258,7 +268,6 @@ export const appwrite = {
258
268
  jobPayload: jsonObjectTextSchema,
259
269
  messageRecipients: jsonArrayTextSchema,
260
270
  messageSender: jsonObjectTextSchema,
261
- threadParticipants: jsonArrayTextSchema,
262
271
  },
263
272
  ids: appwriteIds,
264
273
  rowSchemas,
@@ -159,6 +159,16 @@ const validRows = {
159
159
  aliasEmails: ['marco@example.com'],
160
160
  name: 'Unread',
161
161
  },
162
+ threadLabels: {
163
+ ...metadata,
164
+ $tableId: 'thread_labels',
165
+ accountId: 'account-1',
166
+ labelId: 'label-1',
167
+ latestMessageAt: '2026-07-15T00:00:00.000Z',
168
+ locationCount: 1,
169
+ threadId: 'thread-1',
170
+ userId: 'user-1',
171
+ },
162
172
  threads: {
163
173
  ...metadata,
164
174
  $tableId: 'threads',
@@ -171,7 +181,7 @@ const validRows = {
171
181
  latestMessageAt: '2026-07-15T00:00:00.000Z',
172
182
  latestMessageId: 'message-1',
173
183
  messageCount: 1,
174
- participants: '[]',
184
+ participants: 'sender@example.com recipient@example.com',
175
185
  preview: 'Preview',
176
186
  providerId: 'provider-1',
177
187
  revision: 0,
@@ -218,6 +228,7 @@ describe('appwrite', () => {
218
228
  profiles: 'profiles',
219
229
  pushNotificationTokens: 'push_notification_tokens',
220
230
  savedViews: 'saved_views',
231
+ threadLabels: 'thread_labels',
221
232
  threads: 'threads',
222
233
  watcherShards: 'watcher_shards',
223
234
  },
@@ -236,6 +247,14 @@ describe('appwrite', () => {
236
247
  it('accepts a provider-canonical label name', () => {
237
248
  expect(v.safeParse(appwrite.rowSchemas.labels, { ...validRows.labels, name: 'CATEGORY_PROMOTIONS' }).success).toBe(true);
238
249
  });
250
+ it('accepts nullable thread text before body materialisation', () => {
251
+ expect(v.safeParse(appwrite.rowSchemas.threads, {
252
+ ...validRows.threads,
253
+ participants: null,
254
+ preview: null,
255
+ searchText: null,
256
+ }).success).toBe(true);
257
+ });
239
258
  const invalidAccountRows = [
240
259
  { description: 'an unknown state', row: { ...validRows.accounts, state: 'UNKNOWN' } },
241
260
  { description: 'an unknown database ID', row: { ...validRows.accounts, $databaseId: 'other' } },
@@ -304,13 +323,6 @@ describe('appwrite', () => {
304
323
  schema: appwrite.decodedSchemas.messageSender,
305
324
  value: '{"email":"marco@example.com"}',
306
325
  },
307
- {
308
- expected: [],
309
- invalidValue: '{}',
310
- name: 'thread participants',
311
- schema: appwrite.decodedSchemas.threadParticipants,
312
- value: '[]',
313
- },
314
326
  ];
315
327
  for (const testCase of jsonTextTestCases) {
316
328
  it(`decodes ${testCase.name} JSON text`, () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.585",
3
+ "version": "2.0.586",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",