@marcoappio/marco-config 4.0.24 → 4.0.26

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.
@@ -182,8 +182,12 @@ const validRows = {
182
182
  accountAssignmentKey: 'account-1',
183
183
  attachmentMetadata: '[]',
184
184
  htmlFileId: null,
185
+ materialisationGeneration: 1,
185
186
  preview: 'Preview',
187
+ providerHistoryId: '987654321',
186
188
  providerId: 'provider-1',
189
+ providerLabelIds: ['INBOX'],
190
+ providerThreadId: 'provider-thread-1',
187
191
  rawFileId: null,
188
192
  receivedAt: null,
189
193
  recipients: '[{"emailAddress":"recipient@example.com","name":"Recipient","type":"to"}]',
@@ -568,22 +572,6 @@ describe('appwrite', () => {
568
572
  const profileAvatarCleanup = v.parse(appwrite.rowSchemas.profileAvatarCleanups, { ...validRows.profileAvatarCleanups, profile: { $id: 'user-1' } });
569
573
  const pushNotificationToken = v.parse(appwrite.rowSchemas.pushNotificationTokens, { ...validRows.pushNotificationTokens, profile: { $id: 'user-1' } });
570
574
  const savedView = v.parse(appwrite.rowSchemas.savedViews, { ...validRows.savedViews, profile: { $id: 'user-1' } });
571
- const thread = v.parse(appwrite.rowSchemas.threads, { ...validRows.threads, account: { $id: 'account-1' } });
572
- const message = v.parse(appwrite.rowSchemas.messages, {
573
- ...validRows.messages,
574
- account: { $id: 'account-1' },
575
- thread: { $id: 'thread-1' },
576
- });
577
- const threadAlias = v.parse(appwrite.rowSchemas.threadAliases, {
578
- ...validRows.threadAliases,
579
- alias: { $id: 'alias-1' },
580
- thread: { $id: 'thread-1' },
581
- });
582
- const threadLabel = v.parse(appwrite.rowSchemas.threadLabels, {
583
- ...validRows.threadLabels,
584
- label: { $id: 'label-1' },
585
- thread: { $id: 'thread-1' },
586
- });
587
575
  expect(account.credential).toBe('credential-1');
588
576
  expect(account.mailboxSyncState).toBe('mailbox-sync-state-1');
589
577
  expect(account.primaryAlias).toBe('alias-1');
@@ -607,13 +595,6 @@ describe('appwrite', () => {
607
595
  expect(profileAvatarCleanup.profile).toBe('user-1');
608
596
  expect(pushNotificationToken.profile).toBe('user-1');
609
597
  expect(savedView.profile).toBe('user-1');
610
- expect(thread.account).toBe('account-1');
611
- expect(message.account).toBe('account-1');
612
- expect(message.thread).toBe('thread-1');
613
- expect(threadAlias.alias).toBe('alias-1');
614
- expect(threadAlias.thread).toBe('thread-1');
615
- expect(threadLabel.label).toBe('label-1');
616
- expect(threadLabel.thread).toBe('thread-1');
617
598
  });
618
599
  it('accepts backend message sender fields as plain nullable text', () => {
619
600
  expect(v.safeParse(appwrite.rowSchemas.messages, {
@@ -622,7 +603,7 @@ describe('appwrite', () => {
622
603
  senderName: '',
623
604
  }).success).toBe(true);
624
605
  });
625
- const requiredRelationshipFieldTestCases = [
606
+ const requiredMailboxReferenceFieldTestCases = [
626
607
  { field: 'account', row: { ...validRows.messages, account: null }, schema: appwrite.rowSchemas.messages, table: 'messages' },
627
608
  { field: 'thread', row: { ...validRows.messages, thread: null }, schema: appwrite.rowSchemas.messages, table: 'messages' },
628
609
  { field: 'account', row: { ...validRows.threads, account: null }, schema: appwrite.rowSchemas.threads, table: 'threads' },
@@ -631,8 +612,8 @@ describe('appwrite', () => {
631
612
  { field: 'label', row: { ...validRows.threadLabels, label: null }, schema: appwrite.rowSchemas.threadLabels, table: 'threadLabels' },
632
613
  { field: 'thread', row: { ...validRows.threadLabels, thread: null }, schema: appwrite.rowSchemas.threadLabels, table: 'threadLabels' },
633
614
  ];
634
- for (const { field, row, schema, table } of requiredRelationshipFieldTestCases) {
635
- it(`rejects nullable ${field} relationships on ${table}`, () => {
615
+ for (const { field, row, schema, table } of requiredMailboxReferenceFieldTestCases) {
616
+ it(`rejects nullable ${field} references on ${table}`, () => {
636
617
  expect(v.safeParse(schema, row).success).toBe(false);
637
618
  });
638
619
  }