@marcoappio/marco-config 2.0.492 → 2.0.493
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/types/Zero.d.ts +0 -14
- package/dist/types/Zero.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -1
- package/dist/zero/index.d.ts +1553 -1439
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/index.js +2 -4
- package/dist/zero/mutators/accountMutators/accountMutators.d.ts +109 -3
- package/dist/zero/mutators/accountMutators/accountMutators.d.ts.map +1 -1
- package/dist/zero/mutators/accountMutators/accountMutators.js +59 -25
- package/dist/zero/mutators/defineMutator.d.ts +16 -0
- package/dist/zero/mutators/defineMutator.d.ts.map +1 -0
- package/dist/zero/mutators/defineMutator.js +7 -0
- package/dist/zero/mutators/draftMutators/draftMutators.d.ts +167 -3
- package/dist/zero/mutators/draftMutators/draftMutators.d.ts.map +1 -1
- package/dist/zero/mutators/draftMutators/draftMutators.js +97 -25
- package/dist/zero/mutators/index.d.ts +2 -1
- package/dist/zero/mutators/index.d.ts.map +1 -1
- package/dist/zero/mutators/index.js +2 -1
- package/dist/zero/mutators/mutators.d.ts +438 -17
- package/dist/zero/mutators/mutators.d.ts.map +1 -1
- package/dist/zero/mutators/mutators.js +11 -38
- package/dist/zero/mutators/threadMutators/threadMutators.d.ts +127 -3
- package/dist/zero/mutators/threadMutators/threadMutators.d.ts.map +1 -1
- package/dist/zero/mutators/threadMutators/threadMutators.js +39 -20
- package/dist/zero/mutators/userMutators/userMutators.d.ts +31 -3
- package/dist/zero/mutators/userMutators/userMutators.d.ts.map +1 -1
- package/dist/zero/mutators/userMutators/userMutators.js +25 -8
- package/dist/zero/queries/getAccounts.d.ts +134 -134
- package/dist/zero/queries/getContacts.d.ts +134 -134
- package/dist/zero/queries/getDrafts.d.ts +134 -134
- package/dist/zero/queries/getThread.d.ts +134 -134
- package/dist/zero/queries/getThreadList.d.ts +134 -134
- package/dist/zero/queries/getThreads.d.ts +134 -134
- package/dist/zero/queries/getUser.d.ts +134 -134
- package/dist/zero/queries/index.d.ts +132 -132
- package/dist/zero/schema.d.ts +132 -132
- package/dist/zero/schema.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/types/AuthData.d.ts +0 -4
- package/dist/types/AuthData.d.ts.map +0 -1
- package/dist/types/AuthData.js +0 -1
- package/dist/zero/mutatorSchemas/account.d.ts +0 -80
- package/dist/zero/mutatorSchemas/account.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/account.js +0 -66
- package/dist/zero/mutatorSchemas/draft.d.ts +0 -150
- package/dist/zero/mutatorSchemas/draft.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/draft.js +0 -104
- package/dist/zero/mutatorSchemas/index.d.ts +0 -323
- package/dist/zero/mutatorSchemas/index.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/index.js +0 -10
- package/dist/zero/mutatorSchemas/thread.d.ts +0 -71
- package/dist/zero/mutatorSchemas/thread.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/thread.js +0 -47
- package/dist/zero/mutatorSchemas/user.d.ts +0 -26
- package/dist/zero/mutatorSchemas/user.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/user.js +0 -27
- package/dist/zero/mutators/accountMutators/accountMutators.test.d.ts +0 -2
- package/dist/zero/mutators/accountMutators/accountMutators.test.d.ts.map +0 -1
- package/dist/zero/mutators/accountMutators/accountMutators.test.js +0 -372
- package/dist/zero/mutators/draftMutators/draftMutators.test.d.ts +0 -2
- package/dist/zero/mutators/draftMutators/draftMutators.test.d.ts.map +0 -1
- package/dist/zero/mutators/draftMutators/draftMutators.test.js +0 -416
- package/dist/zero/mutators/threadMutators/threadMutators.test.d.ts +0 -2
- package/dist/zero/mutators/threadMutators/threadMutators.test.d.ts.map +0 -1
- package/dist/zero/mutators/threadMutators/threadMutators.test.js +0 -755
- package/dist/zero/mutators/userMutators/userMutators.test.d.ts +0 -2
- package/dist/zero/mutators/userMutators/userMutators.test.d.ts.map +0 -1
- package/dist/zero/mutators/userMutators/userMutators.test.js +0 -84
|
@@ -1,7 +1,57 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { marcoSchemas } from '../../../schemas';
|
|
3
|
+
import { DRAFT_ATTACHMENT_UPLOAD_STATUSES, DRAFT_STATUSES, DRAFT_TYPES, MutationError } from '../../../types';
|
|
2
4
|
import { stringPatch } from '../../../utils';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
import { defineMutator } from '../../../zero/mutators/defineMutator';
|
|
6
|
+
const draftStatusSchema = v.picklist(DRAFT_STATUSES);
|
|
7
|
+
const draftTypeSchema = v.picklist(DRAFT_TYPES);
|
|
8
|
+
const draftBodySchema = v.object({
|
|
9
|
+
bcc: v.array(marcoSchemas.string.email()),
|
|
10
|
+
cc: v.array(marcoSchemas.string.email()),
|
|
11
|
+
content: v.pipe(v.string(), v.maxLength(384000)),
|
|
12
|
+
subject: marcoSchemas.string.nullable(),
|
|
13
|
+
to: v.array(marcoSchemas.string.email()),
|
|
14
|
+
});
|
|
15
|
+
const draftAttachmentSchema = v.object({
|
|
16
|
+
fileName: marcoSchemas.string.required(),
|
|
17
|
+
id: marcoSchemas.string.required(),
|
|
18
|
+
mimeType: marcoSchemas.string.required(),
|
|
19
|
+
status: v.picklist(DRAFT_ATTACHMENT_UPLOAD_STATUSES),
|
|
20
|
+
totalSize: marcoSchemas.number.positiveInteger(),
|
|
21
|
+
});
|
|
22
|
+
const draftScheduleSchema = v.union([
|
|
23
|
+
v.object({
|
|
24
|
+
id: marcoSchemas.string.required(),
|
|
25
|
+
kind: v.literal('IMMEDIATE'),
|
|
26
|
+
undoMs: marcoSchemas.number.positiveInteger(),
|
|
27
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
28
|
+
}),
|
|
29
|
+
v.object({
|
|
30
|
+
id: marcoSchemas.string.required(),
|
|
31
|
+
kind: v.literal('SCHEDULED'),
|
|
32
|
+
scheduledFor: marcoSchemas.number.positiveInteger(),
|
|
33
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
34
|
+
}),
|
|
35
|
+
]);
|
|
36
|
+
const draftModelSchema = v.object({
|
|
37
|
+
accountId: marcoSchemas.string.required(),
|
|
38
|
+
attachments: v.array(draftAttachmentSchema),
|
|
39
|
+
body: draftBodySchema,
|
|
40
|
+
error: marcoSchemas.string.nullable(),
|
|
41
|
+
from: marcoSchemas.string.email(),
|
|
42
|
+
fromName: marcoSchemas.string.nullable(),
|
|
43
|
+
id: marcoSchemas.string.required(),
|
|
44
|
+
referencedMessageId: marcoSchemas.string.nullable(),
|
|
45
|
+
scheduledFor: v.nullable(marcoSchemas.number.positiveInteger()),
|
|
46
|
+
status: draftStatusSchema,
|
|
47
|
+
type: draftTypeSchema,
|
|
48
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
49
|
+
});
|
|
50
|
+
export const draftMutators = {
|
|
51
|
+
cancelSend: defineMutator(v.object({
|
|
52
|
+
id: marcoSchemas.string.required(),
|
|
53
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
54
|
+
}), async ({ tx, args }) => {
|
|
5
55
|
const draft = await tx.query.draft.where('id', args.id).one().run();
|
|
6
56
|
if (!draft) {
|
|
7
57
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
@@ -15,8 +65,12 @@ export const createDraftMutators = (authData) => ({
|
|
|
15
65
|
status: 'DRAFT',
|
|
16
66
|
updatedAt: args.updatedAt,
|
|
17
67
|
});
|
|
18
|
-
},
|
|
19
|
-
createAttachment:
|
|
68
|
+
}),
|
|
69
|
+
createAttachment: defineMutator(v.object({
|
|
70
|
+
attachment: draftAttachmentSchema,
|
|
71
|
+
id: marcoSchemas.string.required(),
|
|
72
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
73
|
+
}), async ({ tx, args }) => {
|
|
20
74
|
await tx.mutate.draftAttachment.insert({
|
|
21
75
|
draftId: args.id,
|
|
22
76
|
fileName: args.attachment.fileName,
|
|
@@ -29,11 +83,8 @@ export const createDraftMutators = (authData) => ({
|
|
|
29
83
|
id: args.id,
|
|
30
84
|
updatedAt: args.updatedAt,
|
|
31
85
|
});
|
|
32
|
-
},
|
|
33
|
-
createDraft: async (tx, args) => {
|
|
34
|
-
if (!authData) {
|
|
35
|
-
throw new Error(MutationError.AUTHENTICATION_REQUIRED);
|
|
36
|
-
}
|
|
86
|
+
}),
|
|
87
|
+
createDraft: defineMutator(draftModelSchema, async ({ tx, ctx: { userId }, args }) => {
|
|
37
88
|
await tx.mutate.draft.insert({
|
|
38
89
|
accountId: args.accountId,
|
|
39
90
|
body: {
|
|
@@ -53,7 +104,7 @@ export const createDraftMutators = (authData) => ({
|
|
|
53
104
|
subject: args.body.subject,
|
|
54
105
|
type: args.type,
|
|
55
106
|
updatedAt: args.updatedAt,
|
|
56
|
-
userId
|
|
107
|
+
userId,
|
|
57
108
|
});
|
|
58
109
|
for (const attachment of args.attachments) {
|
|
59
110
|
await tx.mutate.draftAttachment.insert({
|
|
@@ -65,8 +116,12 @@ export const createDraftMutators = (authData) => ({
|
|
|
65
116
|
totalSize: attachment.totalSize,
|
|
66
117
|
});
|
|
67
118
|
}
|
|
68
|
-
},
|
|
69
|
-
deleteAttachment:
|
|
119
|
+
}),
|
|
120
|
+
deleteAttachment: defineMutator(v.object({
|
|
121
|
+
attachmentId: marcoSchemas.string.required(),
|
|
122
|
+
id: marcoSchemas.string.required(),
|
|
123
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
124
|
+
}), async ({ tx, args }) => {
|
|
70
125
|
await tx.mutate.draftAttachment.delete({
|
|
71
126
|
id: args.attachmentId,
|
|
72
127
|
});
|
|
@@ -74,13 +129,15 @@ export const createDraftMutators = (authData) => ({
|
|
|
74
129
|
id: args.id,
|
|
75
130
|
updatedAt: args.updatedAt,
|
|
76
131
|
});
|
|
77
|
-
},
|
|
78
|
-
deleteDraft:
|
|
132
|
+
}),
|
|
133
|
+
deleteDraft: defineMutator(v.object({
|
|
134
|
+
id: marcoSchemas.string.required(),
|
|
135
|
+
}), async ({ tx, args }) => {
|
|
79
136
|
await tx.mutate.draft.delete({
|
|
80
137
|
id: args.id,
|
|
81
138
|
});
|
|
82
|
-
},
|
|
83
|
-
scheduleSend: async (tx, args) => {
|
|
139
|
+
}),
|
|
140
|
+
scheduleSend: defineMutator(draftScheduleSchema, async ({ tx, args }) => {
|
|
84
141
|
if (args.kind === 'IMMEDIATE') {
|
|
85
142
|
await tx.mutate.draft.update({
|
|
86
143
|
id: args.id,
|
|
@@ -97,8 +154,12 @@ export const createDraftMutators = (authData) => ({
|
|
|
97
154
|
updatedAt: args.updatedAt,
|
|
98
155
|
});
|
|
99
156
|
}
|
|
100
|
-
},
|
|
101
|
-
setContent:
|
|
157
|
+
}),
|
|
158
|
+
setContent: defineMutator(v.object({
|
|
159
|
+
id: marcoSchemas.string.required(),
|
|
160
|
+
patch: marcoSchemas.drafts.contentPatch.patch(),
|
|
161
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
162
|
+
}), async ({ tx, args }) => {
|
|
102
163
|
const draft = await tx.query.draft.where('id', args.id).one().run();
|
|
103
164
|
if (!draft) {
|
|
104
165
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
@@ -111,8 +172,12 @@ export const createDraftMutators = (authData) => ({
|
|
|
111
172
|
id: args.id,
|
|
112
173
|
updatedAt: args.updatedAt,
|
|
113
174
|
});
|
|
114
|
-
},
|
|
115
|
-
setEnvelope:
|
|
175
|
+
}),
|
|
176
|
+
setEnvelope: defineMutator(v.object({
|
|
177
|
+
envelope: v.omit(draftBodySchema, ['content']),
|
|
178
|
+
id: marcoSchemas.string.required(),
|
|
179
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
180
|
+
}), async ({ tx, args }) => {
|
|
116
181
|
const draft = await tx.query.draft.where('id', args.id).one().run();
|
|
117
182
|
if (!draft) {
|
|
118
183
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
@@ -128,8 +193,15 @@ export const createDraftMutators = (authData) => ({
|
|
|
128
193
|
subject: args.envelope.subject,
|
|
129
194
|
updatedAt: args.updatedAt,
|
|
130
195
|
});
|
|
131
|
-
},
|
|
132
|
-
setFrom:
|
|
196
|
+
}),
|
|
197
|
+
setFrom: defineMutator(v.object({
|
|
198
|
+
accountId: marcoSchemas.string.required(),
|
|
199
|
+
aliasId: marcoSchemas.string.required(),
|
|
200
|
+
from: marcoSchemas.string.email(),
|
|
201
|
+
fromName: marcoSchemas.string.nullable(),
|
|
202
|
+
id: marcoSchemas.string.required(),
|
|
203
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
204
|
+
}), async ({ tx, args }) => {
|
|
133
205
|
await tx.mutate.draft.update({
|
|
134
206
|
accountId: args.accountId,
|
|
135
207
|
fromAliasId: args.aliasId,
|
|
@@ -138,5 +210,5 @@ export const createDraftMutators = (authData) => ({
|
|
|
138
210
|
id: args.id,
|
|
139
211
|
updatedAt: args.updatedAt,
|
|
140
212
|
});
|
|
141
|
-
},
|
|
142
|
-
}
|
|
213
|
+
}),
|
|
214
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { defineMutator, type MarcoZeroContext } from './defineMutator';
|
|
1
2
|
export type { MarcoZeroMutators } from './mutators';
|
|
2
|
-
export {
|
|
3
|
+
export { mutators } from './mutators';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/zero/mutators/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/zero/mutators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACtE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { defineMutator } from './defineMutator';
|
|
2
|
+
export { mutators } from './mutators';
|
|
@@ -1,18 +1,439 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
export { defineMutator, type MarcoZeroContext } from './defineMutator';
|
|
2
|
+
export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
|
|
3
|
+
readonly account: {
|
|
4
|
+
createAccount: import("@rocicorp/zero").MutatorDefinition<{
|
|
5
|
+
aliasId: string;
|
|
6
|
+
color: string;
|
|
7
|
+
emailAddress: string;
|
|
8
|
+
id: string;
|
|
9
|
+
}, {
|
|
10
|
+
aliasId: string;
|
|
11
|
+
color: string;
|
|
12
|
+
emailAddress: string;
|
|
13
|
+
id: string;
|
|
14
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
15
|
+
createAlias: import("@rocicorp/zero").MutatorDefinition<{
|
|
16
|
+
accountId: string;
|
|
17
|
+
alias: {
|
|
18
|
+
emailAddress: string;
|
|
19
|
+
id: string;
|
|
20
|
+
name: string | null;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
accountId: string;
|
|
24
|
+
alias: {
|
|
25
|
+
emailAddress: string;
|
|
26
|
+
id: string;
|
|
27
|
+
name: string | null;
|
|
28
|
+
};
|
|
29
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
30
|
+
deleteAccount: import("@rocicorp/zero").MutatorDefinition<{
|
|
31
|
+
id: string;
|
|
32
|
+
}, {
|
|
33
|
+
id: string;
|
|
34
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
35
|
+
deleteAlias: import("@rocicorp/zero").MutatorDefinition<{
|
|
36
|
+
accountId: string;
|
|
37
|
+
aliasId: string;
|
|
38
|
+
}, {
|
|
39
|
+
accountId: string;
|
|
40
|
+
aliasId: string;
|
|
41
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
42
|
+
setAliasName: import("@rocicorp/zero").MutatorDefinition<{
|
|
43
|
+
accountId: string;
|
|
44
|
+
aliasId: string;
|
|
45
|
+
displayName: string | null;
|
|
46
|
+
}, {
|
|
47
|
+
accountId: string;
|
|
48
|
+
aliasId: string;
|
|
49
|
+
displayName: string | null;
|
|
50
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
51
|
+
setAliasPrimary: import("@rocicorp/zero").MutatorDefinition<{
|
|
52
|
+
accountId: string;
|
|
53
|
+
aliasId: string;
|
|
54
|
+
}, {
|
|
55
|
+
accountId: string;
|
|
56
|
+
aliasId: string;
|
|
57
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
58
|
+
setConnectionConfigImapRaw: import("@rocicorp/zero").MutatorDefinition<{
|
|
59
|
+
connectionConfig: {
|
|
60
|
+
imapHost: string;
|
|
61
|
+
imapPassword: string;
|
|
62
|
+
imapPort: number;
|
|
63
|
+
imapSocketType: "STARTTLS" | "SSL";
|
|
64
|
+
imapUser: string;
|
|
65
|
+
smtpHost: string;
|
|
66
|
+
smtpPassword: string;
|
|
67
|
+
smtpPort: number;
|
|
68
|
+
smtpSocketType: "STARTTLS" | "SSL";
|
|
69
|
+
smtpUser: string;
|
|
70
|
+
};
|
|
71
|
+
id: string;
|
|
72
|
+
}, {
|
|
73
|
+
connectionConfig: {
|
|
74
|
+
imapHost: string;
|
|
75
|
+
imapPassword: string;
|
|
76
|
+
imapPort: number;
|
|
77
|
+
imapSocketType: "STARTTLS" | "SSL";
|
|
78
|
+
imapUser: string;
|
|
79
|
+
smtpHost: string;
|
|
80
|
+
smtpPassword: string;
|
|
81
|
+
smtpPort: number;
|
|
82
|
+
smtpSocketType: "STARTTLS" | "SSL";
|
|
83
|
+
smtpUser: string;
|
|
84
|
+
};
|
|
85
|
+
id: string;
|
|
86
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
87
|
+
setConnectionConfigOauth: import("@rocicorp/zero").MutatorDefinition<{
|
|
88
|
+
connectionConfig: {
|
|
89
|
+
code: string;
|
|
90
|
+
provider: "GOOGLE" | "OUTLOOK";
|
|
91
|
+
user: string;
|
|
92
|
+
};
|
|
93
|
+
id: string;
|
|
94
|
+
}, {
|
|
95
|
+
connectionConfig: {
|
|
96
|
+
code: string;
|
|
97
|
+
provider: "GOOGLE" | "OUTLOOK";
|
|
98
|
+
user: string;
|
|
99
|
+
};
|
|
100
|
+
id: string;
|
|
101
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
102
|
+
setSettings: import("@rocicorp/zero").MutatorDefinition<{
|
|
103
|
+
color?: string | null | undefined;
|
|
104
|
+
displayName?: string | null | undefined;
|
|
105
|
+
id: string;
|
|
106
|
+
}, {
|
|
107
|
+
color?: string | null | undefined;
|
|
108
|
+
displayName?: string | null | undefined;
|
|
109
|
+
id: string;
|
|
110
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
111
|
+
};
|
|
112
|
+
readonly draft: {
|
|
113
|
+
cancelSend: import("@rocicorp/zero").MutatorDefinition<{
|
|
114
|
+
id: string;
|
|
115
|
+
updatedAt: number;
|
|
116
|
+
}, {
|
|
117
|
+
id: string;
|
|
118
|
+
updatedAt: number;
|
|
119
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
120
|
+
createAttachment: import("@rocicorp/zero").MutatorDefinition<{
|
|
121
|
+
attachment: {
|
|
122
|
+
fileName: string;
|
|
123
|
+
id: string;
|
|
124
|
+
mimeType: string;
|
|
125
|
+
status: "PENDING" | "COMPLETE" | "FAILED";
|
|
126
|
+
totalSize: number;
|
|
127
|
+
};
|
|
128
|
+
id: string;
|
|
129
|
+
updatedAt: number;
|
|
130
|
+
}, {
|
|
131
|
+
attachment: {
|
|
132
|
+
fileName: string;
|
|
133
|
+
id: string;
|
|
134
|
+
mimeType: string;
|
|
135
|
+
status: "PENDING" | "COMPLETE" | "FAILED";
|
|
136
|
+
totalSize: number;
|
|
137
|
+
};
|
|
138
|
+
id: string;
|
|
139
|
+
updatedAt: number;
|
|
140
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
141
|
+
createDraft: import("@rocicorp/zero").MutatorDefinition<{
|
|
142
|
+
accountId: string;
|
|
143
|
+
attachments: {
|
|
144
|
+
fileName: string;
|
|
145
|
+
id: string;
|
|
146
|
+
mimeType: string;
|
|
147
|
+
status: "PENDING" | "COMPLETE" | "FAILED";
|
|
148
|
+
totalSize: number;
|
|
149
|
+
}[];
|
|
150
|
+
body: {
|
|
151
|
+
bcc: string[];
|
|
152
|
+
cc: string[];
|
|
153
|
+
content: string;
|
|
154
|
+
subject: string | null;
|
|
155
|
+
to: string[];
|
|
156
|
+
};
|
|
157
|
+
error: string | null;
|
|
158
|
+
from: string;
|
|
159
|
+
fromName: string | null;
|
|
160
|
+
id: string;
|
|
161
|
+
referencedMessageId: string | null;
|
|
162
|
+
scheduledFor: number | null;
|
|
163
|
+
status: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
164
|
+
type: "NEW" | "REPLY" | "FORWARD";
|
|
165
|
+
updatedAt: number;
|
|
166
|
+
}, {
|
|
167
|
+
accountId: string;
|
|
168
|
+
attachments: {
|
|
169
|
+
fileName: string;
|
|
170
|
+
id: string;
|
|
171
|
+
mimeType: string;
|
|
172
|
+
status: "PENDING" | "COMPLETE" | "FAILED";
|
|
173
|
+
totalSize: number;
|
|
174
|
+
}[];
|
|
175
|
+
body: {
|
|
176
|
+
bcc: string[];
|
|
177
|
+
cc: string[];
|
|
178
|
+
content: string;
|
|
179
|
+
subject: string | null;
|
|
180
|
+
to: string[];
|
|
181
|
+
};
|
|
182
|
+
error: string | null;
|
|
183
|
+
from: string;
|
|
184
|
+
fromName: string | null;
|
|
185
|
+
id: string;
|
|
186
|
+
referencedMessageId: string | null;
|
|
187
|
+
scheduledFor: number | null;
|
|
188
|
+
status: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
189
|
+
type: "NEW" | "REPLY" | "FORWARD";
|
|
190
|
+
updatedAt: number;
|
|
191
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
192
|
+
deleteAttachment: import("@rocicorp/zero").MutatorDefinition<{
|
|
193
|
+
attachmentId: string;
|
|
194
|
+
id: string;
|
|
195
|
+
updatedAt: number;
|
|
196
|
+
}, {
|
|
197
|
+
attachmentId: string;
|
|
198
|
+
id: string;
|
|
199
|
+
updatedAt: number;
|
|
200
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
201
|
+
deleteDraft: import("@rocicorp/zero").MutatorDefinition<{
|
|
202
|
+
id: string;
|
|
203
|
+
}, {
|
|
204
|
+
id: string;
|
|
205
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
206
|
+
scheduleSend: import("@rocicorp/zero").MutatorDefinition<{
|
|
207
|
+
id: string;
|
|
208
|
+
kind: "IMMEDIATE";
|
|
209
|
+
undoMs: number;
|
|
210
|
+
updatedAt: number;
|
|
211
|
+
} | {
|
|
212
|
+
id: string;
|
|
213
|
+
kind: "SCHEDULED";
|
|
214
|
+
scheduledFor: number;
|
|
215
|
+
updatedAt: number;
|
|
216
|
+
}, {
|
|
217
|
+
id: string;
|
|
218
|
+
kind: "IMMEDIATE";
|
|
219
|
+
undoMs: number;
|
|
220
|
+
updatedAt: number;
|
|
221
|
+
} | {
|
|
222
|
+
id: string;
|
|
223
|
+
kind: "SCHEDULED";
|
|
224
|
+
scheduledFor: number;
|
|
225
|
+
updatedAt: number;
|
|
226
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
227
|
+
setContent: import("@rocicorp/zero").MutatorDefinition<{
|
|
228
|
+
id: string;
|
|
229
|
+
patch: {
|
|
230
|
+
index: number;
|
|
231
|
+
type: "INSERTION" | "DELETION";
|
|
232
|
+
value: string;
|
|
233
|
+
}[];
|
|
234
|
+
updatedAt: number;
|
|
235
|
+
}, {
|
|
236
|
+
id: string;
|
|
237
|
+
patch: {
|
|
238
|
+
index: number;
|
|
239
|
+
type: "INSERTION" | "DELETION";
|
|
240
|
+
value: string;
|
|
241
|
+
}[];
|
|
242
|
+
updatedAt: number;
|
|
243
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
244
|
+
setEnvelope: import("@rocicorp/zero").MutatorDefinition<{
|
|
245
|
+
envelope: {
|
|
246
|
+
bcc: string[];
|
|
247
|
+
cc: string[];
|
|
248
|
+
to: string[];
|
|
249
|
+
subject: string | null;
|
|
250
|
+
};
|
|
251
|
+
id: string;
|
|
252
|
+
updatedAt: number;
|
|
253
|
+
}, {
|
|
254
|
+
envelope: {
|
|
255
|
+
bcc: string[];
|
|
256
|
+
cc: string[];
|
|
257
|
+
to: string[];
|
|
258
|
+
subject: string | null;
|
|
259
|
+
};
|
|
260
|
+
id: string;
|
|
261
|
+
updatedAt: number;
|
|
262
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
263
|
+
setFrom: import("@rocicorp/zero").MutatorDefinition<{
|
|
264
|
+
accountId: string;
|
|
265
|
+
aliasId: string;
|
|
266
|
+
from: string;
|
|
267
|
+
fromName: string | null;
|
|
268
|
+
id: string;
|
|
269
|
+
updatedAt: number;
|
|
270
|
+
}, {
|
|
271
|
+
accountId: string;
|
|
272
|
+
aliasId: string;
|
|
273
|
+
from: string;
|
|
274
|
+
fromName: string | null;
|
|
275
|
+
id: string;
|
|
276
|
+
updatedAt: number;
|
|
277
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
278
|
+
};
|
|
279
|
+
readonly thread: {
|
|
280
|
+
addLabel: import("@rocicorp/zero").MutatorDefinition<{
|
|
281
|
+
accounts: {
|
|
282
|
+
[x: string]: {
|
|
283
|
+
threadIds: string[];
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
labelPath: string;
|
|
287
|
+
}, {
|
|
288
|
+
accounts: {
|
|
289
|
+
[x: string]: {
|
|
290
|
+
threadIds: string[];
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
labelPath: string;
|
|
294
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
295
|
+
delete: import("@rocicorp/zero").MutatorDefinition<{
|
|
296
|
+
accounts: {
|
|
297
|
+
[x: string]: {
|
|
298
|
+
threadIds: string[];
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
}, {
|
|
302
|
+
accounts: {
|
|
303
|
+
[x: string]: {
|
|
304
|
+
threadIds: string[];
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
308
|
+
removeLabel: import("@rocicorp/zero").MutatorDefinition<{
|
|
309
|
+
accounts: {
|
|
310
|
+
[x: string]: {
|
|
311
|
+
threadIds: string[];
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
labelPath: string;
|
|
315
|
+
}, {
|
|
316
|
+
accounts: {
|
|
317
|
+
[x: string]: {
|
|
318
|
+
threadIds: string[];
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
labelPath: string;
|
|
322
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
323
|
+
setArchive: import("@rocicorp/zero").MutatorDefinition<{
|
|
324
|
+
accounts: {
|
|
325
|
+
[x: string]: {
|
|
326
|
+
threadIds: string[];
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
}, {
|
|
330
|
+
accounts: {
|
|
331
|
+
[x: string]: {
|
|
332
|
+
threadIds: string[];
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
336
|
+
setFlagged: import("@rocicorp/zero").MutatorDefinition<{
|
|
337
|
+
accounts: {
|
|
338
|
+
[x: string]: {
|
|
339
|
+
threadIds: string[];
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
flagged: boolean;
|
|
343
|
+
}, {
|
|
344
|
+
accounts: {
|
|
345
|
+
[x: string]: {
|
|
346
|
+
threadIds: string[];
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
flagged: boolean;
|
|
350
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
351
|
+
setInbox: import("@rocicorp/zero").MutatorDefinition<{
|
|
352
|
+
accounts: {
|
|
353
|
+
[x: string]: {
|
|
354
|
+
threadIds: string[];
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
}, {
|
|
358
|
+
accounts: {
|
|
359
|
+
[x: string]: {
|
|
360
|
+
threadIds: string[];
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
364
|
+
setSeen: import("@rocicorp/zero").MutatorDefinition<{
|
|
365
|
+
accounts: {
|
|
366
|
+
[x: string]: {
|
|
367
|
+
threadIds: string[];
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
seen: boolean;
|
|
371
|
+
}, {
|
|
372
|
+
accounts: {
|
|
373
|
+
[x: string]: {
|
|
374
|
+
threadIds: string[];
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
seen: boolean;
|
|
378
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
379
|
+
setSpam: import("@rocicorp/zero").MutatorDefinition<{
|
|
380
|
+
accounts: {
|
|
381
|
+
[x: string]: {
|
|
382
|
+
threadIds: string[];
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
}, {
|
|
386
|
+
accounts: {
|
|
387
|
+
[x: string]: {
|
|
388
|
+
threadIds: string[];
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
392
|
+
setTrash: import("@rocicorp/zero").MutatorDefinition<{
|
|
393
|
+
accounts: {
|
|
394
|
+
[x: string]: {
|
|
395
|
+
threadIds: string[];
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
}, {
|
|
399
|
+
accounts: {
|
|
400
|
+
[x: string]: {
|
|
401
|
+
threadIds: string[];
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
405
|
+
};
|
|
406
|
+
readonly user: {
|
|
407
|
+
deleteSettingsPushNotificationToken: import("@rocicorp/zero").MutatorDefinition<{
|
|
408
|
+
id: string;
|
|
409
|
+
token: string;
|
|
410
|
+
}, {
|
|
411
|
+
id: string;
|
|
412
|
+
token: string;
|
|
413
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
414
|
+
setSettingsName: import("@rocicorp/zero").MutatorDefinition<{
|
|
415
|
+
id: string;
|
|
416
|
+
name: string | null;
|
|
417
|
+
}, {
|
|
418
|
+
id: string;
|
|
419
|
+
name: string | null;
|
|
420
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
421
|
+
setSettingsPushNotificationToken: import("@rocicorp/zero").MutatorDefinition<{
|
|
422
|
+
id: string;
|
|
423
|
+
pushNotificationToken: {
|
|
424
|
+
createdAt: number;
|
|
425
|
+
id: string;
|
|
426
|
+
token: string;
|
|
427
|
+
};
|
|
428
|
+
}, {
|
|
429
|
+
id: string;
|
|
430
|
+
pushNotificationToken: {
|
|
431
|
+
createdAt: number;
|
|
432
|
+
id: string;
|
|
433
|
+
token: string;
|
|
434
|
+
};
|
|
435
|
+
}, import("./defineMutator").MarcoZeroContext>;
|
|
436
|
+
};
|
|
437
|
+
}, import("@rocicorp/zero").Schema>;
|
|
438
|
+
export type MarcoZeroMutators = typeof mutators;
|
|
18
439
|
//# sourceMappingURL=mutators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutators.d.ts","sourceRoot":"","sources":["../../../src/zero/mutators/mutators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mutators.d.ts","sourceRoot":"","sources":["../../../src/zero/mutators/mutators.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEtE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAKnB,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,OAAO,QAAQ,CAAA"}
|