@marcoappio/marco-config 2.0.527 → 2.0.529
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.
- package/dist/constants/index.d.ts +4 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/user.d.ts +4 -0
- package/dist/constants/user.d.ts.map +1 -1
- package/dist/constants/user.js +4 -0
- package/dist/zero/index.d.ts +232 -54
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/mutatorSchemas.d.ts +47 -0
- package/dist/zero/mutatorSchemas.d.ts.map +1 -1
- package/dist/zero/mutatorSchemas.js +22 -0
- package/dist/zero/mutators.d.ts +75 -18
- package/dist/zero/mutators.d.ts.map +1 -1
- package/dist/zero/mutators.js +38 -0
- package/dist/zero/mutators.test.js +221 -0
- package/dist/zero/queries.d.ts +46 -18
- package/dist/zero/queries.d.ts.map +1 -1
- package/dist/zero/schema.d.ts +58 -18
- package/dist/zero/schema.d.ts.map +1 -1
- package/dist/zero/schema.js +2 -0
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { beforeEach, describe, expect, it, mock } from 'bun:test';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { mutatorSchemas } from './mutatorSchemas';
|
|
2
4
|
import { mutators } from './mutators';
|
|
3
5
|
const createMockTx = () => ({
|
|
4
6
|
mutate: {
|
|
@@ -605,5 +607,224 @@ describe('mutators', () => {
|
|
|
605
607
|
expect(tx.mutate.userPushNotificationToken.insert).not.toHaveBeenCalled();
|
|
606
608
|
});
|
|
607
609
|
});
|
|
610
|
+
describe('createView', () => {
|
|
611
|
+
it('creates a new view', async () => {
|
|
612
|
+
tx.run = mock(() => Promise.resolve({ id: 'user-1', views: [] }));
|
|
613
|
+
const args = {
|
|
614
|
+
id: 'user-1',
|
|
615
|
+
view: { aliasEmails: ['a@example.com', 'b@example.com'], id: 'view-1', name: 'Work' },
|
|
616
|
+
};
|
|
617
|
+
await mutators.user.createView.fn({ args, ctx, tx: tx });
|
|
618
|
+
expect(tx.mutate.user.update).toHaveBeenCalledWith({
|
|
619
|
+
id: 'user-1',
|
|
620
|
+
views: [{ aliasEmails: ['a@example.com', 'b@example.com'], id: 'view-1', name: 'Work' }],
|
|
621
|
+
});
|
|
622
|
+
});
|
|
623
|
+
it('deduplicates aliasEmails', async () => {
|
|
624
|
+
tx.run = mock(() => Promise.resolve({ id: 'user-1', views: [] }));
|
|
625
|
+
const args = {
|
|
626
|
+
id: 'user-1',
|
|
627
|
+
view: { aliasEmails: ['a@example.com', 'b@example.com', 'a@example.com'], id: 'view-1', name: 'Work' },
|
|
628
|
+
};
|
|
629
|
+
await mutators.user.createView.fn({ args, ctx, tx: tx });
|
|
630
|
+
expect(tx.mutate.user.update).toHaveBeenCalledWith({
|
|
631
|
+
id: 'user-1',
|
|
632
|
+
views: [{ aliasEmails: ['a@example.com', 'b@example.com'], id: 'view-1', name: 'Work' }],
|
|
633
|
+
});
|
|
634
|
+
});
|
|
635
|
+
it('appends to existing views', async () => {
|
|
636
|
+
tx.run = mock(() => Promise.resolve({
|
|
637
|
+
id: 'user-1',
|
|
638
|
+
views: [{ aliasEmails: ['x@example.com'], id: 'view-0', name: 'Personal' }],
|
|
639
|
+
}));
|
|
640
|
+
const args = {
|
|
641
|
+
id: 'user-1',
|
|
642
|
+
view: { aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' },
|
|
643
|
+
};
|
|
644
|
+
await mutators.user.createView.fn({ args, ctx, tx: tx });
|
|
645
|
+
expect(tx.mutate.user.update).toHaveBeenCalledWith({
|
|
646
|
+
id: 'user-1',
|
|
647
|
+
views: [
|
|
648
|
+
{ aliasEmails: ['x@example.com'], id: 'view-0', name: 'Personal' },
|
|
649
|
+
{ aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' },
|
|
650
|
+
],
|
|
651
|
+
});
|
|
652
|
+
});
|
|
653
|
+
it('does nothing if user not found', async () => {
|
|
654
|
+
tx.run = mock(() => Promise.resolve(null));
|
|
655
|
+
const args = {
|
|
656
|
+
id: 'user-1',
|
|
657
|
+
view: { aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' },
|
|
658
|
+
};
|
|
659
|
+
await mutators.user.createView.fn({ args, ctx, tx: tx });
|
|
660
|
+
expect(tx.mutate.user.update).not.toHaveBeenCalled();
|
|
661
|
+
});
|
|
662
|
+
it('does nothing if view with same id already exists', async () => {
|
|
663
|
+
tx.run = mock(() => Promise.resolve({
|
|
664
|
+
id: 'user-1',
|
|
665
|
+
views: [{ aliasEmails: ['x@example.com'], id: 'view-1', name: 'Existing' }],
|
|
666
|
+
}));
|
|
667
|
+
const args = {
|
|
668
|
+
id: 'user-1',
|
|
669
|
+
view: { aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' },
|
|
670
|
+
};
|
|
671
|
+
await mutators.user.createView.fn({ args, ctx, tx: tx });
|
|
672
|
+
expect(tx.mutate.user.update).not.toHaveBeenCalled();
|
|
673
|
+
});
|
|
674
|
+
it('does nothing if max views limit reached', async () => {
|
|
675
|
+
const existingViews = Array.from({ length: 25 }, (_, i) => ({
|
|
676
|
+
aliasEmails: [`email${i}@example.com`],
|
|
677
|
+
id: `view-${i}`,
|
|
678
|
+
name: `View ${i}`,
|
|
679
|
+
}));
|
|
680
|
+
tx.run = mock(() => Promise.resolve({ id: 'user-1', views: existingViews }));
|
|
681
|
+
const args = {
|
|
682
|
+
id: 'user-1',
|
|
683
|
+
view: { aliasEmails: ['new@example.com'], id: 'view-new', name: 'New View' },
|
|
684
|
+
};
|
|
685
|
+
await mutators.user.createView.fn({ args, ctx, tx: tx });
|
|
686
|
+
expect(tx.mutate.user.update).not.toHaveBeenCalled();
|
|
687
|
+
});
|
|
688
|
+
it('handles null views array', async () => {
|
|
689
|
+
tx.run = mock(() => Promise.resolve({ id: 'user-1', views: null }));
|
|
690
|
+
const args = {
|
|
691
|
+
id: 'user-1',
|
|
692
|
+
view: { aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' },
|
|
693
|
+
};
|
|
694
|
+
await mutators.user.createView.fn({ args, ctx, tx: tx });
|
|
695
|
+
expect(tx.mutate.user.update).toHaveBeenCalledWith({
|
|
696
|
+
id: 'user-1',
|
|
697
|
+
views: [{ aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' }],
|
|
698
|
+
});
|
|
699
|
+
});
|
|
700
|
+
});
|
|
701
|
+
describe('deleteView', () => {
|
|
702
|
+
it('deletes a view', async () => {
|
|
703
|
+
tx.run = mock(() => Promise.resolve({
|
|
704
|
+
id: 'user-1',
|
|
705
|
+
views: [
|
|
706
|
+
{ aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' },
|
|
707
|
+
{ aliasEmails: ['b@example.com'], id: 'view-2', name: 'Personal' },
|
|
708
|
+
],
|
|
709
|
+
}));
|
|
710
|
+
const args = { id: 'user-1', viewId: 'view-1' };
|
|
711
|
+
await mutators.user.deleteView.fn({ args, ctx, tx: tx });
|
|
712
|
+
expect(tx.mutate.user.update).toHaveBeenCalledWith({
|
|
713
|
+
id: 'user-1',
|
|
714
|
+
views: [{ aliasEmails: ['b@example.com'], id: 'view-2', name: 'Personal' }],
|
|
715
|
+
});
|
|
716
|
+
});
|
|
717
|
+
it('does nothing if user not found', async () => {
|
|
718
|
+
tx.run = mock(() => Promise.resolve(null));
|
|
719
|
+
const args = { id: 'user-1', viewId: 'view-1' };
|
|
720
|
+
await mutators.user.deleteView.fn({ args, ctx, tx: tx });
|
|
721
|
+
expect(tx.mutate.user.update).not.toHaveBeenCalled();
|
|
722
|
+
});
|
|
723
|
+
it('handles null views array', async () => {
|
|
724
|
+
tx.run = mock(() => Promise.resolve({ id: 'user-1', views: null }));
|
|
725
|
+
const args = { id: 'user-1', viewId: 'view-1' };
|
|
726
|
+
await mutators.user.deleteView.fn({ args, ctx, tx: tx });
|
|
727
|
+
expect(tx.mutate.user.update).toHaveBeenCalledWith({
|
|
728
|
+
id: 'user-1',
|
|
729
|
+
views: [],
|
|
730
|
+
});
|
|
731
|
+
});
|
|
732
|
+
});
|
|
733
|
+
describe('updateView', () => {
|
|
734
|
+
it('updates view name', async () => {
|
|
735
|
+
tx.run = mock(() => Promise.resolve({
|
|
736
|
+
id: 'user-1',
|
|
737
|
+
views: [{ aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' }],
|
|
738
|
+
}));
|
|
739
|
+
const args = { id: 'user-1', updates: { name: 'Updated Work' }, viewId: 'view-1' };
|
|
740
|
+
await mutators.user.updateView.fn({ args, ctx, tx: tx });
|
|
741
|
+
expect(tx.mutate.user.update).toHaveBeenCalledWith({
|
|
742
|
+
id: 'user-1',
|
|
743
|
+
views: [{ aliasEmails: ['a@example.com'], id: 'view-1', name: 'Updated Work' }],
|
|
744
|
+
});
|
|
745
|
+
});
|
|
746
|
+
it('updates view aliasEmails', async () => {
|
|
747
|
+
tx.run = mock(() => Promise.resolve({
|
|
748
|
+
id: 'user-1',
|
|
749
|
+
views: [{ aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' }],
|
|
750
|
+
}));
|
|
751
|
+
const args = { id: 'user-1', updates: { aliasEmails: ['x@example.com', 'y@example.com'] }, viewId: 'view-1' };
|
|
752
|
+
await mutators.user.updateView.fn({ args, ctx, tx: tx });
|
|
753
|
+
expect(tx.mutate.user.update).toHaveBeenCalledWith({
|
|
754
|
+
id: 'user-1',
|
|
755
|
+
views: [{ aliasEmails: ['x@example.com', 'y@example.com'], id: 'view-1', name: 'Work' }],
|
|
756
|
+
});
|
|
757
|
+
});
|
|
758
|
+
it('deduplicates aliasEmails on update', async () => {
|
|
759
|
+
tx.run = mock(() => Promise.resolve({
|
|
760
|
+
id: 'user-1',
|
|
761
|
+
views: [{ aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' }],
|
|
762
|
+
}));
|
|
763
|
+
const args = {
|
|
764
|
+
id: 'user-1',
|
|
765
|
+
updates: { aliasEmails: ['x@example.com', 'y@example.com', 'x@example.com'] },
|
|
766
|
+
viewId: 'view-1',
|
|
767
|
+
};
|
|
768
|
+
await mutators.user.updateView.fn({ args, ctx, tx: tx });
|
|
769
|
+
expect(tx.mutate.user.update).toHaveBeenCalledWith({
|
|
770
|
+
id: 'user-1',
|
|
771
|
+
views: [{ aliasEmails: ['x@example.com', 'y@example.com'], id: 'view-1', name: 'Work' }],
|
|
772
|
+
});
|
|
773
|
+
});
|
|
774
|
+
it('updates both name and aliasEmails', async () => {
|
|
775
|
+
tx.run = mock(() => Promise.resolve({
|
|
776
|
+
id: 'user-1',
|
|
777
|
+
views: [{ aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' }],
|
|
778
|
+
}));
|
|
779
|
+
const args = {
|
|
780
|
+
id: 'user-1',
|
|
781
|
+
updates: { aliasEmails: ['x@example.com'], name: 'New Name' },
|
|
782
|
+
viewId: 'view-1',
|
|
783
|
+
};
|
|
784
|
+
await mutators.user.updateView.fn({ args, ctx, tx: tx });
|
|
785
|
+
expect(tx.mutate.user.update).toHaveBeenCalledWith({
|
|
786
|
+
id: 'user-1',
|
|
787
|
+
views: [{ aliasEmails: ['x@example.com'], id: 'view-1', name: 'New Name' }],
|
|
788
|
+
});
|
|
789
|
+
});
|
|
790
|
+
it('does nothing if user not found', async () => {
|
|
791
|
+
tx.run = mock(() => Promise.resolve(null));
|
|
792
|
+
const args = { id: 'user-1', updates: { name: 'Updated' }, viewId: 'view-1' };
|
|
793
|
+
await mutators.user.updateView.fn({ args, ctx, tx: tx });
|
|
794
|
+
expect(tx.mutate.user.update).not.toHaveBeenCalled();
|
|
795
|
+
});
|
|
796
|
+
it('does nothing if view does not exist', async () => {
|
|
797
|
+
tx.run = mock(() => Promise.resolve({
|
|
798
|
+
id: 'user-1',
|
|
799
|
+
views: [{ aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' }],
|
|
800
|
+
}));
|
|
801
|
+
const args = { id: 'user-1', updates: { name: 'Updated' }, viewId: 'non-existent-view' };
|
|
802
|
+
await mutators.user.updateView.fn({ args, ctx, tx: tx });
|
|
803
|
+
expect(tx.mutate.user.update).not.toHaveBeenCalled();
|
|
804
|
+
});
|
|
805
|
+
it('leaves non-matching views unchanged', async () => {
|
|
806
|
+
tx.run = mock(() => Promise.resolve({
|
|
807
|
+
id: 'user-1',
|
|
808
|
+
views: [
|
|
809
|
+
{ aliasEmails: ['a@example.com'], id: 'view-1', name: 'Work' },
|
|
810
|
+
{ aliasEmails: ['b@example.com'], id: 'view-2', name: 'Personal' },
|
|
811
|
+
],
|
|
812
|
+
}));
|
|
813
|
+
const args = { id: 'user-1', updates: { name: 'Updated Work' }, viewId: 'view-1' };
|
|
814
|
+
await mutators.user.updateView.fn({ args, ctx, tx: tx });
|
|
815
|
+
expect(tx.mutate.user.update).toHaveBeenCalledWith({
|
|
816
|
+
id: 'user-1',
|
|
817
|
+
views: [
|
|
818
|
+
{ aliasEmails: ['a@example.com'], id: 'view-1', name: 'Updated Work' },
|
|
819
|
+
{ aliasEmails: ['b@example.com'], id: 'view-2', name: 'Personal' },
|
|
820
|
+
],
|
|
821
|
+
});
|
|
822
|
+
});
|
|
823
|
+
it('schema rejects empty aliasEmails array', () => {
|
|
824
|
+
const args = { id: 'user-1', updates: { aliasEmails: [] }, viewId: 'view-1' };
|
|
825
|
+
const result = v.safeParse(mutatorSchemas.user.updateView, args);
|
|
826
|
+
expect(result.success).toBe(false);
|
|
827
|
+
});
|
|
828
|
+
});
|
|
608
829
|
});
|
|
609
830
|
});
|
package/dist/zero/queries.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
92
92
|
readonly senderEmail: string;
|
|
93
93
|
readonly senderName: string | null;
|
|
94
94
|
readonly threadId: string;
|
|
95
|
+
readonly unsubscribeUrl: string | null;
|
|
95
96
|
} & {
|
|
96
97
|
readonly recipients: readonly {
|
|
97
98
|
readonly emailAddress: string;
|
|
@@ -123,6 +124,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
123
124
|
readonly senderEmail: string;
|
|
124
125
|
readonly senderName: string | null;
|
|
125
126
|
readonly threadId: string;
|
|
127
|
+
readonly unsubscribeUrl: string | null;
|
|
126
128
|
} & {
|
|
127
129
|
readonly thread: {
|
|
128
130
|
readonly accountId: string;
|
|
@@ -240,6 +242,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
240
242
|
readonly senderEmail: string;
|
|
241
243
|
readonly senderName: string | null;
|
|
242
244
|
readonly threadId: string;
|
|
245
|
+
readonly unsubscribeUrl: string | null;
|
|
243
246
|
} & {
|
|
244
247
|
readonly recipients: readonly {
|
|
245
248
|
readonly emailAddress: string;
|
|
@@ -264,6 +267,11 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
264
267
|
readonly name: string | null;
|
|
265
268
|
readonly profilePicture: string | null;
|
|
266
269
|
readonly undoSendEnabled: boolean;
|
|
270
|
+
readonly views: {
|
|
271
|
+
id: string;
|
|
272
|
+
name: string;
|
|
273
|
+
aliasEmails: string[];
|
|
274
|
+
}[] | null;
|
|
267
275
|
} & {
|
|
268
276
|
readonly accounts: readonly ({
|
|
269
277
|
readonly color: string;
|
|
@@ -342,6 +350,17 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
342
350
|
} & {
|
|
343
351
|
serverName: string;
|
|
344
352
|
};
|
|
353
|
+
readonly views: Omit<{
|
|
354
|
+
type: "json";
|
|
355
|
+
optional: false;
|
|
356
|
+
customType: {
|
|
357
|
+
id: string;
|
|
358
|
+
name: string;
|
|
359
|
+
aliasEmails: string[];
|
|
360
|
+
}[];
|
|
361
|
+
}, "optional"> & {
|
|
362
|
+
optional: true;
|
|
363
|
+
};
|
|
345
364
|
};
|
|
346
365
|
primaryKey: readonly [string, ...string[]];
|
|
347
366
|
} & {
|
|
@@ -984,6 +1003,15 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
984
1003
|
} & {
|
|
985
1004
|
serverName: string;
|
|
986
1005
|
};
|
|
1006
|
+
readonly unsubscribeUrl: Omit<{
|
|
1007
|
+
type: "string";
|
|
1008
|
+
optional: false;
|
|
1009
|
+
customType: string;
|
|
1010
|
+
}, "optional"> & {
|
|
1011
|
+
optional: true;
|
|
1012
|
+
} & {
|
|
1013
|
+
serverName: string;
|
|
1014
|
+
};
|
|
987
1015
|
};
|
|
988
1016
|
primaryKey: readonly [string, ...string[]];
|
|
989
1017
|
} & {
|
|
@@ -1071,31 +1099,31 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
1071
1099
|
relationships: {
|
|
1072
1100
|
readonly user: {
|
|
1073
1101
|
accounts: [{
|
|
1074
|
-
readonly sourceField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name")[];
|
|
1102
|
+
readonly sourceField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name" | "views")[];
|
|
1075
1103
|
readonly destField: readonly ("id" | "userId" | "color" | "displayName" | "imapConnectionStatus" | "mailProcessedCount" | "mailTotalCount" | "primaryAliasId")[];
|
|
1076
1104
|
readonly destSchema: "account";
|
|
1077
1105
|
readonly cardinality: "many";
|
|
1078
1106
|
}];
|
|
1079
1107
|
contacts: [{
|
|
1080
|
-
readonly sourceField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name")[];
|
|
1108
|
+
readonly sourceField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name" | "views")[];
|
|
1081
1109
|
readonly destField: readonly ("id" | "name" | "userId" | "emailAddress")[];
|
|
1082
1110
|
readonly destSchema: "contact";
|
|
1083
1111
|
readonly cardinality: "many";
|
|
1084
1112
|
}];
|
|
1085
1113
|
drafts: [{
|
|
1086
|
-
readonly sourceField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name")[];
|
|
1114
|
+
readonly sourceField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name" | "views")[];
|
|
1087
1115
|
readonly destField: readonly ("type" | "status" | "id" | "userId" | "accountId" | "fromAliasId" | "fromEmail" | "fromName" | "referencedMessageId" | "scheduledFor" | "updatedAt" | "body" | "error" | "subject")[];
|
|
1088
1116
|
readonly destSchema: "draft";
|
|
1089
1117
|
readonly cardinality: "many";
|
|
1090
1118
|
}];
|
|
1091
1119
|
pushNotificationTokens: [{
|
|
1092
|
-
readonly sourceField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name")[];
|
|
1120
|
+
readonly sourceField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name" | "views")[];
|
|
1093
1121
|
readonly destField: readonly ("id" | "createdAt" | "token" | "userId")[];
|
|
1094
1122
|
readonly destSchema: "userPushNotificationToken";
|
|
1095
1123
|
readonly cardinality: "many";
|
|
1096
1124
|
}];
|
|
1097
1125
|
threads: [{
|
|
1098
|
-
readonly sourceField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name")[];
|
|
1126
|
+
readonly sourceField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name" | "views")[];
|
|
1099
1127
|
readonly destField: readonly ("id" | "userId" | "accountId" | "subject" | "flagged" | "hasAttachments" | "labelIdList" | "latestMessageDate" | "latestMessageId" | "messageCount" | "previewText" | "seen" | "senderEmail" | "senderName" | "words")[];
|
|
1100
1128
|
readonly destSchema: "thread";
|
|
1101
1129
|
readonly cardinality: "many";
|
|
@@ -1104,7 +1132,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
1104
1132
|
readonly userPushNotificationToken: {
|
|
1105
1133
|
user: [{
|
|
1106
1134
|
readonly sourceField: readonly ("id" | "createdAt" | "token" | "userId")[];
|
|
1107
|
-
readonly destField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name")[];
|
|
1135
|
+
readonly destField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name" | "views")[];
|
|
1108
1136
|
readonly destSchema: "user";
|
|
1109
1137
|
readonly cardinality: "one";
|
|
1110
1138
|
}];
|
|
@@ -1112,7 +1140,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
1112
1140
|
readonly contact: {
|
|
1113
1141
|
user: [{
|
|
1114
1142
|
readonly sourceField: readonly ("id" | "name" | "userId" | "emailAddress")[];
|
|
1115
|
-
readonly destField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name")[];
|
|
1143
|
+
readonly destField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name" | "views")[];
|
|
1116
1144
|
readonly destSchema: "user";
|
|
1117
1145
|
readonly cardinality: "one";
|
|
1118
1146
|
}];
|
|
@@ -1150,7 +1178,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
1150
1178
|
}];
|
|
1151
1179
|
user: [{
|
|
1152
1180
|
readonly sourceField: readonly ("id" | "userId" | "color" | "displayName" | "imapConnectionStatus" | "mailProcessedCount" | "mailTotalCount" | "primaryAliasId")[];
|
|
1153
|
-
readonly destField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name")[];
|
|
1181
|
+
readonly destField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name" | "views")[];
|
|
1154
1182
|
readonly destSchema: "user";
|
|
1155
1183
|
readonly cardinality: "one";
|
|
1156
1184
|
}];
|
|
@@ -1197,7 +1225,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
1197
1225
|
}];
|
|
1198
1226
|
user: [{
|
|
1199
1227
|
readonly sourceField: readonly ("type" | "status" | "id" | "userId" | "accountId" | "fromAliasId" | "fromEmail" | "fromName" | "referencedMessageId" | "scheduledFor" | "updatedAt" | "body" | "error" | "subject")[];
|
|
1200
|
-
readonly destField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name")[];
|
|
1228
|
+
readonly destField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name" | "views")[];
|
|
1201
1229
|
readonly destSchema: "user";
|
|
1202
1230
|
readonly cardinality: "one";
|
|
1203
1231
|
}];
|
|
@@ -1230,7 +1258,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
1230
1258
|
}];
|
|
1231
1259
|
messages: [{
|
|
1232
1260
|
readonly sourceField: readonly ("id" | "userId" | "accountId" | "subject" | "flagged" | "hasAttachments" | "labelIdList" | "latestMessageDate" | "latestMessageId" | "messageCount" | "previewText" | "seen" | "senderEmail" | "senderName" | "words")[];
|
|
1233
|
-
readonly destField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject")[];
|
|
1261
|
+
readonly destField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject" | "unsubscribeUrl")[];
|
|
1234
1262
|
readonly destSchema: "threadMessage";
|
|
1235
1263
|
readonly cardinality: "many";
|
|
1236
1264
|
}];
|
|
@@ -1242,7 +1270,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
1242
1270
|
}];
|
|
1243
1271
|
user: [{
|
|
1244
1272
|
readonly sourceField: readonly ("id" | "userId" | "accountId" | "subject" | "flagged" | "hasAttachments" | "labelIdList" | "latestMessageDate" | "latestMessageId" | "messageCount" | "previewText" | "seen" | "senderEmail" | "senderName" | "words")[];
|
|
1245
|
-
readonly destField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name")[];
|
|
1273
|
+
readonly destField: readonly ("id" | "profilePicture" | "undoSendEnabled" | "name" | "views")[];
|
|
1246
1274
|
readonly destSchema: "user";
|
|
1247
1275
|
readonly cardinality: "one";
|
|
1248
1276
|
}];
|
|
@@ -1256,7 +1284,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
1256
1284
|
}];
|
|
1257
1285
|
message: [{
|
|
1258
1286
|
readonly sourceField: readonly ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
|
|
1259
|
-
readonly destField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject")[];
|
|
1287
|
+
readonly destField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject" | "unsubscribeUrl")[];
|
|
1260
1288
|
readonly destSchema: "threadMessage";
|
|
1261
1289
|
readonly cardinality: "one";
|
|
1262
1290
|
}];
|
|
@@ -1283,13 +1311,13 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
1283
1311
|
};
|
|
1284
1312
|
readonly threadMessage: {
|
|
1285
1313
|
attachments: [{
|
|
1286
|
-
readonly sourceField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject")[];
|
|
1314
|
+
readonly sourceField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject" | "unsubscribeUrl")[];
|
|
1287
1315
|
readonly destField: readonly ("id" | "fileName" | "mimeType" | "threadMessageId" | "size")[];
|
|
1288
1316
|
readonly destSchema: "threadMessageAttachment";
|
|
1289
1317
|
readonly cardinality: "many";
|
|
1290
1318
|
}];
|
|
1291
1319
|
labels: [{
|
|
1292
|
-
readonly sourceField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject")[];
|
|
1320
|
+
readonly sourceField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject" | "unsubscribeUrl")[];
|
|
1293
1321
|
readonly destField: readonly ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
|
|
1294
1322
|
readonly destSchema: "threadLabel";
|
|
1295
1323
|
readonly cardinality: "many";
|
|
@@ -1300,13 +1328,13 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
1300
1328
|
readonly cardinality: "many";
|
|
1301
1329
|
}];
|
|
1302
1330
|
recipients: [{
|
|
1303
|
-
readonly sourceField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject")[];
|
|
1331
|
+
readonly sourceField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject" | "unsubscribeUrl")[];
|
|
1304
1332
|
readonly destField: readonly ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
|
|
1305
1333
|
readonly destSchema: "threadMessageRecipient";
|
|
1306
1334
|
readonly cardinality: "many";
|
|
1307
1335
|
}];
|
|
1308
1336
|
thread: [{
|
|
1309
|
-
readonly sourceField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject")[];
|
|
1337
|
+
readonly sourceField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject" | "unsubscribeUrl")[];
|
|
1310
1338
|
readonly destField: readonly ("id" | "userId" | "accountId" | "subject" | "flagged" | "hasAttachments" | "labelIdList" | "latestMessageDate" | "latestMessageId" | "messageCount" | "previewText" | "seen" | "senderEmail" | "senderName" | "words")[];
|
|
1311
1339
|
readonly destSchema: "thread";
|
|
1312
1340
|
readonly cardinality: "one";
|
|
@@ -1315,7 +1343,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
1315
1343
|
readonly threadMessageRecipient: {
|
|
1316
1344
|
message: [{
|
|
1317
1345
|
readonly sourceField: readonly ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
|
|
1318
|
-
readonly destField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject")[];
|
|
1346
|
+
readonly destField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject" | "unsubscribeUrl")[];
|
|
1319
1347
|
readonly destSchema: "threadMessage";
|
|
1320
1348
|
readonly cardinality: "one";
|
|
1321
1349
|
}];
|
|
@@ -1323,7 +1351,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
1323
1351
|
readonly threadMessageAttachment: {
|
|
1324
1352
|
message: [{
|
|
1325
1353
|
readonly sourceField: readonly ("id" | "fileName" | "mimeType" | "threadMessageId" | "size")[];
|
|
1326
|
-
readonly destField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject")[];
|
|
1354
|
+
readonly destField: readonly ("id" | "accountId" | "previewText" | "senderEmail" | "senderName" | "threadId" | "envelopeDate" | "envelopeSubject" | "unsubscribeUrl")[];
|
|
1327
1355
|
readonly destSchema: "threadMessage";
|
|
1328
1356
|
readonly cardinality: "one";
|
|
1329
1357
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/zero/queries.ts"],"names":[],"mappings":"AAOA,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAQjC,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/zero/queries.ts"],"names":[],"mappings":"AAOA,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAQjC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoOlB,CAAA"}
|