@marcoappio/marco-config 2.0.584 → 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.
@@ -1,4 +1,19 @@
1
+ import type { ReadonlyDeep } from 'type-fest';
1
2
  import * as v from 'valibot';
3
+ declare const draftAttachmentSchema: v.StrictObjectSchema<{
4
+ readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
5
+ readonly fileName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
6
+ readonly mimeType: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 3, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
7
+ readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
8
+ }, undefined>;
9
+ declare const draftEnvelopeSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.StrictObjectSchema<{
10
+ readonly bcc: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
11
+ readonly cc: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
12
+ readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
13
+ readonly to: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
14
+ }, undefined>]>;
15
+ export type AppwriteDraftAttachment = ReadonlyDeep<v.InferOutput<typeof draftAttachmentSchema>>;
16
+ export type AppwriteDraftEnvelope = ReadonlyDeep<v.InferOutput<typeof draftEnvelopeSchema>>;
2
17
  declare const rowSchemas: {
3
18
  readonly accounts: v.StrictObjectSchema<{
4
19
  readonly colour: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 64, undefined>]>;
@@ -226,6 +241,21 @@ declare const rowSchemas: {
226
241
  readonly $tableId: v.LiteralSchema<"saved_views", undefined>;
227
242
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
228
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>;
229
259
  readonly threads: v.StrictObjectSchema<{
230
260
  readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
231
261
  readonly archived: v.BooleanSchema<undefined>;
@@ -236,11 +266,11 @@ declare const rowSchemas: {
236
266
  readonly latestMessageAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
237
267
  readonly latestMessageId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
238
268
  readonly messageCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
239
- readonly participants: v.StringSchema<undefined>;
240
- readonly preview: v.StringSchema<undefined>;
269
+ readonly participants: v.NullableSchema<v.StringSchema<undefined>, undefined>;
270
+ readonly preview: v.NullableSchema<v.StringSchema<undefined>, undefined>;
241
271
  readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
242
272
  readonly revision: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
243
- readonly searchText: v.StringSchema<undefined>;
273
+ readonly searchText: v.NullableSchema<v.StringSchema<undefined>, undefined>;
244
274
  readonly seen: v.BooleanSchema<undefined>;
245
275
  readonly senderEmail: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>, undefined>;
246
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>;
@@ -279,11 +309,21 @@ export declare const appwrite: {
279
309
  readonly decodedSchemas: {
280
310
  readonly attachmentMetadata: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.ArraySchema<v.UnknownSchema, undefined>]>;
281
311
  readonly commandPayload: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.CheckAction<unknown, undefined>, v.LooseObjectSchema<{}, undefined>]>;
282
- readonly draftEnvelope: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.CheckAction<unknown, undefined>, v.LooseObjectSchema<{}, undefined>]>;
312
+ readonly draftAttachments: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.ArraySchema<v.StrictObjectSchema<{
313
+ readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
314
+ readonly fileName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
315
+ readonly mimeType: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 3, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
316
+ readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
317
+ }, undefined>, undefined>]>;
318
+ readonly draftEnvelope: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.StrictObjectSchema<{
319
+ readonly bcc: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
320
+ readonly cc: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
321
+ readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
322
+ readonly to: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>;
323
+ }, undefined>]>;
283
324
  readonly jobPayload: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.CheckAction<unknown, undefined>, v.LooseObjectSchema<{}, undefined>]>;
284
325
  readonly messageRecipients: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.ArraySchema<v.UnknownSchema, undefined>]>;
285
326
  readonly messageSender: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.CheckAction<unknown, undefined>, v.LooseObjectSchema<{}, undefined>]>;
286
- readonly threadParticipants: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.ArraySchema<v.UnknownSchema, undefined>]>;
287
327
  };
288
328
  readonly ids: {
289
329
  readonly bucket: "marco-files";
@@ -306,6 +346,7 @@ export declare const appwrite: {
306
346
  readonly profiles: "profiles";
307
347
  readonly pushNotificationTokens: "push_notification_tokens";
308
348
  readonly savedViews: "saved_views";
349
+ readonly threadLabels: "thread_labels";
309
350
  readonly threads: "threads";
310
351
  readonly watcherShards: "watcher_shards";
311
352
  };
@@ -537,6 +578,21 @@ export declare const appwrite: {
537
578
  readonly $tableId: v.LiteralSchema<"saved_views", undefined>;
538
579
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
539
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>;
540
596
  readonly threads: v.StrictObjectSchema<{
541
597
  readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
542
598
  readonly archived: v.BooleanSchema<undefined>;
@@ -547,11 +603,11 @@ export declare const appwrite: {
547
603
  readonly latestMessageAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
548
604
  readonly latestMessageId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
549
605
  readonly messageCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
550
- readonly participants: v.StringSchema<undefined>;
551
- readonly preview: v.StringSchema<undefined>;
606
+ readonly participants: v.NullableSchema<v.StringSchema<undefined>, undefined>;
607
+ readonly preview: v.NullableSchema<v.StringSchema<undefined>, undefined>;
552
608
  readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
553
609
  readonly revision: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
554
- readonly searchText: v.StringSchema<undefined>;
610
+ readonly searchText: v.NullableSchema<v.StringSchema<undefined>, undefined>;
555
611
  readonly seen: v.BooleanSchema<undefined>;
556
612
  readonly senderEmail: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>, undefined>;
557
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,CAAC,MAAM,SAAS,CAAA;AAgE5B,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ipe(v.string(), v.parseJson(), v.array(v.unknown()));
9
9
  const jsonObjectTextSchema = v.pipe(v.string(), v.parseJson(), v.check(value => !Array.isArray(value)), v.looseObject({}));
10
+ const draftAttachmentSchema = v.strictObject({
11
+ fileId: appwriteRowIdSchema,
12
+ fileName: v.pipe(v.string(), v.minLength(1), v.maxLength(255)),
13
+ mimeType: v.pipe(v.string(), v.minLength(3), v.maxLength(255)),
14
+ size: nonNegativeIntegerSchema,
15
+ });
16
+ const draftAttachmentsSchema = v.pipe(v.string(), v.parseJson(), v.array(draftAttachmentSchema));
17
+ const draftEnvelopeSchema = v.pipe(v.string(), v.parseJson(), v.strictObject({
18
+ bcc: v.array(emailSchema),
19
+ cc: v.array(emailSchema),
20
+ subject: v.nullable(v.string()),
21
+ to: v.array(emailSchema),
22
+ }));
10
23
  const accountProviders = ['GMAIL', 'OUTLOOK', 'IMAP'];
11
24
  const accountStates = ['AWAITING_CONNECTION', 'CONNECTED', 'ERROR', 'DISCONNECTED'];
12
25
  const commandStates = ['ACCEPTED', 'RUNNING', 'SUCCEEDED', 'FAILED'];
@@ -37,6 +50,7 @@ const appwriteIds = {
37
50
  profiles: 'profiles',
38
51
  pushNotificationTokens: 'push_notification_tokens',
39
52
  savedViews: 'saved_views',
53
+ threadLabels: 'thread_labels',
40
54
  threads: 'threads',
41
55
  watcherShards: 'watcher_shards',
42
56
  },
@@ -199,6 +213,15 @@ const rowSchemas = {
199
213
  icon: v.optional(identifierSchema),
200
214
  name: identifierSchema,
201
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
+ }),
202
225
  threads: v.strictObject({
203
226
  ...wireMetadata(appwriteIds.tables.threads),
204
227
  accountId: identifierSchema,
@@ -210,11 +233,11 @@ const rowSchemas = {
210
233
  latestMessageAt: timestampSchema,
211
234
  latestMessageId: identifierSchema,
212
235
  messageCount: nonNegativeIntegerSchema,
213
- participants: v.string(),
214
- preview: v.string(),
236
+ participants: v.nullable(v.string()),
237
+ preview: v.nullable(v.string()),
215
238
  providerId: identifierSchema,
216
239
  revision: nonNegativeIntegerSchema,
217
- searchText: v.string(),
240
+ searchText: v.nullable(v.string()),
218
241
  seen: v.boolean(),
219
242
  senderEmail: v.optional(v.nullable(emailSchema)),
220
243
  senderName: v.optional(v.nullable(identifierSchema)),
@@ -240,11 +263,11 @@ export const appwrite = {
240
263
  decodedSchemas: {
241
264
  attachmentMetadata: jsonArrayTextSchema,
242
265
  commandPayload: jsonObjectTextSchema,
243
- draftEnvelope: jsonObjectTextSchema,
266
+ draftAttachments: draftAttachmentsSchema,
267
+ draftEnvelope: draftEnvelopeSchema,
244
268
  jobPayload: jsonObjectTextSchema,
245
269
  messageRecipients: jsonArrayTextSchema,
246
270
  messageSender: jsonObjectTextSchema,
247
- threadParticipants: jsonArrayTextSchema,
248
271
  },
249
272
  ids: appwriteIds,
250
273
  rowSchemas,
@@ -65,7 +65,7 @@ const validRows = {
65
65
  accountId: 'account-1',
66
66
  attachmentMetadata: '[]',
67
67
  contentHash: 'hash-1',
68
- envelope: '{"to":[]}',
68
+ envelope: '{"bcc":[],"cc":[],"subject":null,"to":[]}',
69
69
  errorCode: null,
70
70
  fromAliasId: null,
71
71
  html: '<p>Draft</p>',
@@ -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' } },
@@ -255,6 +274,20 @@ describe('appwrite', () => {
255
274
  schema: appwrite.decodedSchemas.attachmentMetadata,
256
275
  value: '[]',
257
276
  },
277
+ {
278
+ expected: [
279
+ {
280
+ fileId: 'test-file-id-1',
281
+ fileName: 'test-file-name-1.txt',
282
+ mimeType: 'text/plain',
283
+ size: 1,
284
+ },
285
+ ],
286
+ invalidValue: '[{"fileId":"test-file-id-1"}]',
287
+ name: 'draft attachments',
288
+ schema: appwrite.decodedSchemas.draftAttachments,
289
+ value: '[{"fileId":"test-file-id-1","fileName":"test-file-name-1.txt","mimeType":"text/plain","size":1}]',
290
+ },
258
291
  {
259
292
  expected: { threadId: 'thread-1' },
260
293
  invalidValue: '[]',
@@ -263,11 +296,11 @@ describe('appwrite', () => {
263
296
  value: '{"threadId":"thread-1"}',
264
297
  },
265
298
  {
266
- expected: { to: [] },
299
+ expected: { bcc: [], cc: [], subject: null, to: [] },
267
300
  invalidValue: '[]',
268
301
  name: 'draft envelope',
269
302
  schema: appwrite.decodedSchemas.draftEnvelope,
270
- value: '{"to":[]}',
303
+ value: '{"bcc":[],"cc":[],"subject":null,"to":[]}',
271
304
  },
272
305
  {
273
306
  expected: { threadId: 'thread-1' },
@@ -290,13 +323,6 @@ describe('appwrite', () => {
290
323
  schema: appwrite.decodedSchemas.messageSender,
291
324
  value: '{"email":"marco@example.com"}',
292
325
  },
293
- {
294
- expected: [],
295
- invalidValue: '{}',
296
- name: 'thread participants',
297
- schema: appwrite.decodedSchemas.threadParticipants,
298
- value: '[]',
299
- },
300
326
  ];
301
327
  for (const testCase of jsonTextTestCases) {
302
328
  it(`decodes ${testCase.name} JSON text`, () => {
@@ -1,4 +1,4 @@
1
- export { type AppwriteRow, type AppwriteRowTable, appwrite } from './appwrite';
1
+ export { type AppwriteDraftAttachment, type AppwriteDraftEnvelope, type AppwriteRow, type AppwriteRowTable, appwrite, } from './appwrite';
2
2
  export { type AppwriteCommandError, type AppwriteCommandKind, type AppwriteCommandPayload, type AppwriteCommandRequest, type AppwriteCommandResponse, type AppwriteCommandState, appwriteAvatar, appwriteCommands, } from './commands';
3
3
  export { type AppwriteFunctionContext, type AppwriteFunctionError, type AppwriteFunctionName, type AppwriteFunctionRequest, type AppwriteFunctionResponse, type AppwriteFunctionRoute, type AppwriteFunctionRouteName, appwriteFunctions, } from './functions';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appwrite/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC9E,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,iBAAiB,GAClB,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appwrite/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,QAAQ,GACT,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,iBAAiB,GAClB,MAAM,aAAa,CAAA"}
@@ -1,3 +1,3 @@
1
- export { appwrite } from './appwrite';
1
+ export { appwrite, } from './appwrite';
2
2
  export { appwriteAvatar, appwriteCommands, } from './commands';
3
3
  export { appwriteFunctions, } from './functions';
@@ -590,33 +590,33 @@ export declare const marcoSchemas: {
590
590
  readonly to: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>, undefined>;
591
591
  }, "content">;
592
592
  readonly '~standard': import("valibot").StandardProps<{
593
- subject: string | null;
594
593
  bcc: string[];
595
594
  cc: string[];
595
+ subject: string | null;
596
596
  to: string[];
597
597
  }, {
598
- subject: string | null;
599
598
  bcc: string[];
600
599
  cc: string[];
600
+ subject: string | null;
601
601
  to: string[];
602
602
  }>;
603
603
  readonly '~run': (dataset: import("valibot").UnknownDataset, config: import("valibot").Config<import("valibot").BaseIssue<unknown>>) => import("valibot").OutputDataset<{
604
- subject: string | null;
605
604
  bcc: string[];
606
605
  cc: string[];
606
+ subject: string | null;
607
607
  to: string[];
608
608
  }, import("valibot").StringIssue | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, number> | import("valibot").NonOptionalIssue | import("valibot").RfcEmailIssue<string> | import("valibot").ObjectIssue>;
609
609
  readonly '~types'?: {
610
610
  readonly input: {
611
- subject: string | null;
612
611
  bcc: string[];
613
612
  cc: string[];
613
+ subject: string | null;
614
614
  to: string[];
615
615
  };
616
616
  readonly output: {
617
- subject: string | null;
618
617
  bcc: string[];
619
618
  cc: string[];
619
+ subject: string | null;
620
620
  to: string[];
621
621
  };
622
622
  readonly issue: import("valibot").StringIssue | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, number> | import("valibot").NonOptionalIssue | import("valibot").RfcEmailIssue<string> | import("valibot").ObjectIssue;
@@ -161,33 +161,33 @@ export declare const mutatorSchemas: {
161
161
  readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
162
162
  }, "content">;
163
163
  readonly '~standard': v.StandardProps<{
164
- subject: string | null;
165
164
  bcc: string[];
166
165
  cc: string[];
166
+ subject: string | null;
167
167
  to: string[];
168
168
  }, {
169
- subject: string | null;
170
169
  bcc: string[];
171
170
  cc: string[];
171
+ subject: string | null;
172
172
  to: string[];
173
173
  }>;
174
174
  readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
175
- subject: string | null;
176
175
  bcc: string[];
177
176
  cc: string[];
177
+ subject: string | null;
178
178
  to: string[];
179
179
  }, v.StringIssue | v.ArrayIssue | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.RfcEmailIssue<string> | v.ObjectIssue>;
180
180
  readonly '~types'?: {
181
181
  readonly input: {
182
- subject: string | null;
183
182
  bcc: string[];
184
183
  cc: string[];
184
+ subject: string | null;
185
185
  to: string[];
186
186
  };
187
187
  readonly output: {
188
- subject: string | null;
189
188
  bcc: string[];
190
189
  cc: string[];
190
+ subject: string | null;
191
191
  to: string[];
192
192
  };
193
193
  readonly issue: v.StringIssue | v.ArrayIssue | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.RfcEmailIssue<string> | v.ObjectIssue;
@@ -15,33 +15,33 @@ export declare const setEnvelope: import("../../../../..").EndpointConfig<"/v1/p
15
15
  readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
16
16
  }, "content">;
17
17
  readonly '~standard': v.StandardProps<{
18
- subject: string | null;
19
18
  bcc: string[];
20
19
  cc: string[];
20
+ subject: string | null;
21
21
  to: string[];
22
22
  }, {
23
- subject: string | null;
24
23
  bcc: string[];
25
24
  cc: string[];
25
+ subject: string | null;
26
26
  to: string[];
27
27
  }>;
28
28
  readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
29
- subject: string | null;
30
29
  bcc: string[];
31
30
  cc: string[];
31
+ subject: string | null;
32
32
  to: string[];
33
33
  }, v.StringIssue | v.ArrayIssue | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.RfcEmailIssue<string> | v.ObjectIssue>;
34
34
  readonly '~types'?: {
35
35
  readonly input: {
36
- subject: string | null;
37
36
  bcc: string[];
38
37
  cc: string[];
38
+ subject: string | null;
39
39
  to: string[];
40
40
  };
41
41
  readonly output: {
42
- subject: string | null;
43
42
  bcc: string[];
44
43
  cc: string[];
44
+ subject: string | null;
45
45
  to: string[];
46
46
  };
47
47
  readonly issue: v.StringIssue | v.ArrayIssue | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.RfcEmailIssue<string> | v.ObjectIssue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.584",
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",