@marcoappio/marco-config 2.0.514 → 2.0.516
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/DraftStatus.d.ts +1 -1
- package/dist/types/DraftStatus.d.ts.map +1 -1
- package/dist/types/DraftStatus.js +1 -1
- package/dist/zero/index.d.ts +10 -10
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/index.js +2 -1
- package/dist/zero/mutatorSchemas.d.ts +263 -0
- package/dist/zero/mutatorSchemas.d.ts.map +1 -0
- package/dist/zero/mutatorSchemas.js +194 -0
- package/dist/zero/mutators.d.ts +3 -265
- package/dist/zero/mutators.d.ts.map +1 -1
- package/dist/zero/mutators.js +2 -176
- package/dist/zero/queries.d.ts +4 -4
- package/dist/zero/schema.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const DRAFT_STATUSES: readonly ["DRAFT", "SEND_REQUESTED", "SEND_CONFIRMED", "SEND_FAILED"];
|
|
1
|
+
export declare const DRAFT_STATUSES: readonly ["DRAFT", "SEND_REQUESTED", "SEND_IN_PROGRESS", "SEND_CONFIRMED", "SEND_FAILED"];
|
|
2
2
|
export type DraftStatus = (typeof DRAFT_STATUSES)[number];
|
|
3
3
|
//# sourceMappingURL=DraftStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraftStatus.d.ts","sourceRoot":"","sources":["../../src/types/DraftStatus.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"DraftStatus.d.ts","sourceRoot":"","sources":["../../src/types/DraftStatus.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,2FAA4F,CAAA;AAEvH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DRAFT_STATUSES = ['DRAFT', 'SEND_REQUESTED', 'SEND_CONFIRMED', 'SEND_FAILED'];
|
|
1
|
+
export const DRAFT_STATUSES = ['DRAFT', 'SEND_REQUESTED', 'SEND_IN_PROGRESS', 'SEND_CONFIRMED', 'SEND_FAILED'];
|
package/dist/zero/index.d.ts
CHANGED
|
@@ -98,7 +98,7 @@ export declare const marcoZero: {
|
|
|
98
98
|
readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
99
99
|
readonly referencedMessageId: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
100
100
|
readonly scheduledFor: import("valibot").NullableSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
|
|
101
|
-
readonly status: import("valibot").PicklistSchema<readonly ["DRAFT", "SEND_REQUESTED", "SEND_CONFIRMED", "SEND_FAILED"], undefined>;
|
|
101
|
+
readonly status: import("valibot").PicklistSchema<readonly ["DRAFT", "SEND_REQUESTED", "SEND_IN_PROGRESS", "SEND_CONFIRMED", "SEND_FAILED"], undefined>;
|
|
102
102
|
readonly type: import("valibot").PicklistSchema<readonly ["NEW", "REPLY", "FORWARD"], undefined>;
|
|
103
103
|
readonly updatedAt: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>;
|
|
104
104
|
}, undefined>;
|
|
@@ -443,7 +443,7 @@ export declare const marcoZero: {
|
|
|
443
443
|
id: string;
|
|
444
444
|
referencedMessageId: string | null;
|
|
445
445
|
scheduledFor: number | null;
|
|
446
|
-
status: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
446
|
+
status: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
447
447
|
type: "NEW" | "REPLY" | "FORWARD";
|
|
448
448
|
updatedAt: number;
|
|
449
449
|
}, {
|
|
@@ -468,7 +468,7 @@ export declare const marcoZero: {
|
|
|
468
468
|
id: string;
|
|
469
469
|
referencedMessageId: string | null;
|
|
470
470
|
scheduledFor: number | null;
|
|
471
|
-
status: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
471
|
+
status: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
472
472
|
type: "NEW" | "REPLY" | "FORWARD";
|
|
473
473
|
updatedAt: number;
|
|
474
474
|
}, {
|
|
@@ -1097,7 +1097,7 @@ export declare const marcoZero: {
|
|
|
1097
1097
|
readonly status: {
|
|
1098
1098
|
type: "string";
|
|
1099
1099
|
optional: false;
|
|
1100
|
-
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
1100
|
+
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
1101
1101
|
};
|
|
1102
1102
|
readonly subject: Omit<{
|
|
1103
1103
|
type: "string";
|
|
@@ -1844,11 +1844,11 @@ export declare const marcoZero: {
|
|
|
1844
1844
|
readonly getDrafts: import("@rocicorp/zero").QueryDefinition<"draft", {
|
|
1845
1845
|
accountId?: string | undefined;
|
|
1846
1846
|
limit?: number | undefined;
|
|
1847
|
-
status?: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED" | undefined;
|
|
1847
|
+
status?: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED" | undefined;
|
|
1848
1848
|
}, {
|
|
1849
1849
|
accountId?: string | undefined;
|
|
1850
1850
|
limit: number;
|
|
1851
|
-
status?: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED" | undefined;
|
|
1851
|
+
status?: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED" | undefined;
|
|
1852
1852
|
}, {
|
|
1853
1853
|
readonly accountId: string;
|
|
1854
1854
|
readonly body: {
|
|
@@ -1864,7 +1864,7 @@ export declare const marcoZero: {
|
|
|
1864
1864
|
readonly id: string;
|
|
1865
1865
|
readonly referencedMessageId: string | null;
|
|
1866
1866
|
readonly scheduledFor: number | null;
|
|
1867
|
-
readonly status: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
1867
|
+
readonly status: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
1868
1868
|
readonly subject: string | null;
|
|
1869
1869
|
readonly type: "NEW" | "REPLY" | "FORWARD";
|
|
1870
1870
|
readonly updatedAt: number;
|
|
@@ -2480,7 +2480,7 @@ export declare const marcoZero: {
|
|
|
2480
2480
|
readonly status: {
|
|
2481
2481
|
type: "string";
|
|
2482
2482
|
optional: false;
|
|
2483
|
-
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
2483
|
+
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
2484
2484
|
};
|
|
2485
2485
|
readonly subject: Omit<{
|
|
2486
2486
|
type: "string";
|
|
@@ -3503,7 +3503,7 @@ export declare const marcoZero: {
|
|
|
3503
3503
|
readonly status: {
|
|
3504
3504
|
type: "string";
|
|
3505
3505
|
optional: false;
|
|
3506
|
-
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
3506
|
+
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
3507
3507
|
};
|
|
3508
3508
|
readonly subject: Omit<{
|
|
3509
3509
|
type: "string";
|
|
@@ -4457,7 +4457,7 @@ export declare const marcoZero: {
|
|
|
4457
4457
|
readonly status: {
|
|
4458
4458
|
type: "string";
|
|
4459
4459
|
optional: false;
|
|
4460
|
-
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
4460
|
+
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
4461
4461
|
};
|
|
4462
4462
|
readonly subject: Omit<{
|
|
4463
4463
|
type: "string";
|
package/dist/zero/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zero/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zero/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMZ,CAAA"}
|
package/dist/zero/index.js
CHANGED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const mutatorSchemas: {
|
|
3
|
+
account: {
|
|
4
|
+
createAccount: v.ObjectSchema<{
|
|
5
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
6
|
+
readonly color: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
7
|
+
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
8
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
9
|
+
}, undefined>;
|
|
10
|
+
createAlias: v.ObjectSchema<{
|
|
11
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
12
|
+
readonly alias: v.ObjectSchema<{
|
|
13
|
+
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
14
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
15
|
+
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
16
|
+
}, undefined>;
|
|
17
|
+
}, undefined>;
|
|
18
|
+
deleteAccount: v.ObjectSchema<{
|
|
19
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
20
|
+
}, undefined>;
|
|
21
|
+
deleteAlias: v.ObjectSchema<{
|
|
22
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
23
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
24
|
+
}, undefined>;
|
|
25
|
+
setAliasName: v.ObjectSchema<{
|
|
26
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
27
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
28
|
+
readonly displayName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
29
|
+
}, undefined>;
|
|
30
|
+
setAliasPrimary: v.ObjectSchema<{
|
|
31
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
32
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
33
|
+
}, undefined>;
|
|
34
|
+
setConnectionConfigImapRaw: v.ObjectSchema<{
|
|
35
|
+
readonly connectionConfig: v.ObjectSchema<{
|
|
36
|
+
readonly imapHost: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
37
|
+
readonly imapPassword: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
38
|
+
readonly imapPort: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
|
|
39
|
+
readonly imapSocketType: v.UnionSchema<[v.LiteralSchema<"STARTTLS", undefined>, v.LiteralSchema<"SSL", undefined>], undefined>;
|
|
40
|
+
readonly imapUser: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
41
|
+
readonly smtpHost: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
42
|
+
readonly smtpPassword: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
43
|
+
readonly smtpPort: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
|
|
44
|
+
readonly smtpSocketType: v.UnionSchema<[v.LiteralSchema<"STARTTLS", undefined>, v.LiteralSchema<"SSL", undefined>], undefined>;
|
|
45
|
+
readonly smtpUser: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
46
|
+
}, undefined>;
|
|
47
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
48
|
+
}, undefined>;
|
|
49
|
+
setConnectionConfigOauth: v.ObjectSchema<{
|
|
50
|
+
readonly connectionConfig: v.ObjectSchema<{
|
|
51
|
+
readonly code: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
52
|
+
readonly provider: v.PicklistSchema<readonly ["GOOGLE", "OUTLOOK"], undefined>;
|
|
53
|
+
readonly user: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
54
|
+
}, undefined>;
|
|
55
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
56
|
+
}, undefined>;
|
|
57
|
+
setSettings: v.ObjectSchema<{
|
|
58
|
+
readonly color: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
59
|
+
readonly displayName: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
60
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
61
|
+
}, undefined>;
|
|
62
|
+
};
|
|
63
|
+
draft: {
|
|
64
|
+
cancelSend: v.ObjectSchema<{
|
|
65
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
66
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
67
|
+
}, undefined>;
|
|
68
|
+
createAttachment: v.ObjectSchema<{
|
|
69
|
+
readonly attachment: v.ObjectSchema<{
|
|
70
|
+
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
71
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
72
|
+
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
73
|
+
readonly status: v.PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
|
|
74
|
+
readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
75
|
+
}, undefined>;
|
|
76
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
77
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
78
|
+
}, undefined>;
|
|
79
|
+
createDraft: v.ObjectSchema<{
|
|
80
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
81
|
+
readonly attachments: v.ArraySchema<v.ObjectSchema<{
|
|
82
|
+
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
83
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
84
|
+
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
85
|
+
readonly status: v.PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
|
|
86
|
+
readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
87
|
+
}, undefined>, undefined>;
|
|
88
|
+
readonly body: v.ObjectSchema<{
|
|
89
|
+
readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
90
|
+
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
91
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
|
|
92
|
+
readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
93
|
+
readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
94
|
+
}, undefined>;
|
|
95
|
+
readonly error: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
96
|
+
readonly from: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
97
|
+
readonly fromName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
98
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
99
|
+
readonly referencedMessageId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
100
|
+
readonly scheduledFor: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
|
|
101
|
+
readonly status: v.PicklistSchema<readonly ["DRAFT", "SEND_REQUESTED", "SEND_IN_PROGRESS", "SEND_CONFIRMED", "SEND_FAILED"], undefined>;
|
|
102
|
+
readonly type: v.PicklistSchema<readonly ["NEW", "REPLY", "FORWARD"], undefined>;
|
|
103
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
104
|
+
}, undefined>;
|
|
105
|
+
deleteAttachment: v.ObjectSchema<{
|
|
106
|
+
readonly attachmentId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
107
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
108
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
109
|
+
}, undefined>;
|
|
110
|
+
deleteDraft: v.ObjectSchema<{
|
|
111
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
112
|
+
}, undefined>;
|
|
113
|
+
scheduleSend: v.UnionSchema<[v.ObjectSchema<{
|
|
114
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
115
|
+
readonly kind: v.LiteralSchema<"IMMEDIATE", undefined>;
|
|
116
|
+
readonly undoMs: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
117
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
118
|
+
}, undefined>, v.ObjectSchema<{
|
|
119
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
120
|
+
readonly kind: v.LiteralSchema<"SCHEDULED", undefined>;
|
|
121
|
+
readonly scheduledFor: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
122
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
123
|
+
}, undefined>], undefined>;
|
|
124
|
+
setContent: v.ObjectSchema<{
|
|
125
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
126
|
+
readonly patch: v.ArraySchema<v.ObjectSchema<{
|
|
127
|
+
readonly index: v.NumberSchema<undefined>;
|
|
128
|
+
readonly type: v.UnionSchema<[v.LiteralSchema<"INSERTION", undefined>, v.LiteralSchema<"DELETION", undefined>], undefined>;
|
|
129
|
+
readonly value: v.StringSchema<undefined>;
|
|
130
|
+
}, undefined>, undefined>;
|
|
131
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
132
|
+
}, undefined>;
|
|
133
|
+
setEnvelope: v.ObjectSchema<{
|
|
134
|
+
readonly envelope: Omit<v.ObjectSchema<{
|
|
135
|
+
readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
136
|
+
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
137
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
|
|
138
|
+
readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
139
|
+
readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
140
|
+
}, undefined>, "~standard" | "~run" | "~types" | "entries"> & {
|
|
141
|
+
readonly entries: Omit<{
|
|
142
|
+
readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
143
|
+
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
144
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
|
|
145
|
+
readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
146
|
+
readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
147
|
+
}, "content">;
|
|
148
|
+
readonly '~standard': v.StandardProps<{
|
|
149
|
+
bcc: string[];
|
|
150
|
+
cc: string[];
|
|
151
|
+
to: string[];
|
|
152
|
+
subject: string | null;
|
|
153
|
+
}, {
|
|
154
|
+
bcc: string[];
|
|
155
|
+
cc: string[];
|
|
156
|
+
to: string[];
|
|
157
|
+
subject: string | null;
|
|
158
|
+
}>;
|
|
159
|
+
readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
160
|
+
bcc: string[];
|
|
161
|
+
cc: string[];
|
|
162
|
+
to: string[];
|
|
163
|
+
subject: string | null;
|
|
164
|
+
}, v.StringIssue | v.RfcEmailIssue<string> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.ObjectIssue | v.ArrayIssue | v.NonOptionalIssue>;
|
|
165
|
+
readonly '~types'?: {
|
|
166
|
+
readonly input: {
|
|
167
|
+
bcc: string[];
|
|
168
|
+
cc: string[];
|
|
169
|
+
to: string[];
|
|
170
|
+
subject: string | null;
|
|
171
|
+
};
|
|
172
|
+
readonly output: {
|
|
173
|
+
bcc: string[];
|
|
174
|
+
cc: string[];
|
|
175
|
+
to: string[];
|
|
176
|
+
subject: string | null;
|
|
177
|
+
};
|
|
178
|
+
readonly issue: v.StringIssue | v.RfcEmailIssue<string> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.ObjectIssue | v.ArrayIssue | v.NonOptionalIssue;
|
|
179
|
+
} | undefined;
|
|
180
|
+
};
|
|
181
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
182
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
183
|
+
}, undefined>;
|
|
184
|
+
setFrom: v.ObjectSchema<{
|
|
185
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
186
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
187
|
+
readonly from: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
188
|
+
readonly fromName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
189
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
190
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
191
|
+
}, undefined>;
|
|
192
|
+
};
|
|
193
|
+
thread: {
|
|
194
|
+
addLabel: v.ObjectSchema<{
|
|
195
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
196
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
197
|
+
}, undefined>, undefined>;
|
|
198
|
+
readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
199
|
+
}, undefined>;
|
|
200
|
+
delete: v.ObjectSchema<{
|
|
201
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
202
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
203
|
+
}, undefined>, undefined>;
|
|
204
|
+
}, undefined>;
|
|
205
|
+
removeLabel: v.ObjectSchema<{
|
|
206
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
207
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
208
|
+
}, undefined>, undefined>;
|
|
209
|
+
readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
210
|
+
}, undefined>;
|
|
211
|
+
setArchive: v.ObjectSchema<{
|
|
212
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
213
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
214
|
+
}, undefined>, undefined>;
|
|
215
|
+
}, undefined>;
|
|
216
|
+
setFlagged: v.ObjectSchema<{
|
|
217
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
218
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
219
|
+
}, undefined>, undefined>;
|
|
220
|
+
readonly flagged: v.BooleanSchema<undefined>;
|
|
221
|
+
}, undefined>;
|
|
222
|
+
setInbox: v.ObjectSchema<{
|
|
223
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
224
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
225
|
+
}, undefined>, undefined>;
|
|
226
|
+
}, undefined>;
|
|
227
|
+
setSeen: v.ObjectSchema<{
|
|
228
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
229
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
230
|
+
}, undefined>, undefined>;
|
|
231
|
+
readonly seen: v.BooleanSchema<undefined>;
|
|
232
|
+
}, undefined>;
|
|
233
|
+
setSpam: v.ObjectSchema<{
|
|
234
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
235
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
236
|
+
}, undefined>, undefined>;
|
|
237
|
+
}, undefined>;
|
|
238
|
+
setTrash: v.ObjectSchema<{
|
|
239
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
240
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
241
|
+
}, undefined>, undefined>;
|
|
242
|
+
}, undefined>;
|
|
243
|
+
};
|
|
244
|
+
user: {
|
|
245
|
+
deleteSettingsPushNotificationToken: v.ObjectSchema<{
|
|
246
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
247
|
+
readonly token: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
248
|
+
}, undefined>;
|
|
249
|
+
setSettingsName: v.ObjectSchema<{
|
|
250
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
251
|
+
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
252
|
+
}, undefined>;
|
|
253
|
+
setSettingsPushNotificationToken: v.ObjectSchema<{
|
|
254
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
255
|
+
readonly pushNotificationToken: v.ObjectSchema<{
|
|
256
|
+
readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
257
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
258
|
+
readonly token: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
259
|
+
}, undefined>;
|
|
260
|
+
}, undefined>;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
//# sourceMappingURL=mutatorSchemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutatorSchemas.d.ts","sourceRoot":"","sources":["../../src/zero/mutatorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAqE5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0I1B,CAAA"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { marcoSchemas } from '../schemas';
|
|
3
|
+
import { socketTypeSchema } from '../schemas/emailAccount';
|
|
4
|
+
import { DRAFT_ATTACHMENT_UPLOAD_STATUSES, DRAFT_STATUSES, DRAFT_TYPES } from '../types';
|
|
5
|
+
const accountAliasSchema = v.object({
|
|
6
|
+
emailAddress: marcoSchemas.string.email(),
|
|
7
|
+
id: marcoSchemas.string.required(),
|
|
8
|
+
name: marcoSchemas.string.nullable(),
|
|
9
|
+
});
|
|
10
|
+
const accountsSchema = v.record(marcoSchemas.string.required(), v.object({
|
|
11
|
+
threadIds: v.array(marcoSchemas.string.required()),
|
|
12
|
+
}));
|
|
13
|
+
const baseThreadSchema = v.object({
|
|
14
|
+
accounts: accountsSchema,
|
|
15
|
+
});
|
|
16
|
+
const threadChangeLabelSchema = v.object({
|
|
17
|
+
accounts: accountsSchema,
|
|
18
|
+
labelPath: marcoSchemas.string.required(),
|
|
19
|
+
});
|
|
20
|
+
const draftBodySchema = v.object({
|
|
21
|
+
bcc: v.array(marcoSchemas.string.email()),
|
|
22
|
+
cc: v.array(marcoSchemas.string.email()),
|
|
23
|
+
content: v.pipe(v.string(), v.maxLength(384000)),
|
|
24
|
+
subject: marcoSchemas.string.nullable(),
|
|
25
|
+
to: v.array(marcoSchemas.string.email()),
|
|
26
|
+
});
|
|
27
|
+
const draftAttachmentSchema = v.object({
|
|
28
|
+
fileName: marcoSchemas.string.required(),
|
|
29
|
+
id: marcoSchemas.string.required(),
|
|
30
|
+
mimeType: marcoSchemas.string.required(),
|
|
31
|
+
status: v.picklist(DRAFT_ATTACHMENT_UPLOAD_STATUSES),
|
|
32
|
+
totalSize: marcoSchemas.number.positiveInteger(),
|
|
33
|
+
});
|
|
34
|
+
const userPushNotificationTokenSchema = v.object({
|
|
35
|
+
createdAt: marcoSchemas.number.positiveInteger(),
|
|
36
|
+
id: marcoSchemas.string.required(),
|
|
37
|
+
token: marcoSchemas.string.required(),
|
|
38
|
+
});
|
|
39
|
+
const connectionConfigOauthSchema = v.object({
|
|
40
|
+
code: marcoSchemas.string.required(),
|
|
41
|
+
provider: marcoSchemas.oauth.provider(),
|
|
42
|
+
user: marcoSchemas.string.required(),
|
|
43
|
+
});
|
|
44
|
+
const connectionConfigImapRawSchema = v.object({
|
|
45
|
+
imapHost: marcoSchemas.string.required(),
|
|
46
|
+
imapPassword: marcoSchemas.string.required(),
|
|
47
|
+
imapPort: marcoSchemas.number.minMax(1, 65535),
|
|
48
|
+
imapSocketType: socketTypeSchema,
|
|
49
|
+
imapUser: marcoSchemas.string.required(),
|
|
50
|
+
smtpHost: marcoSchemas.string.required(),
|
|
51
|
+
smtpPassword: marcoSchemas.string.required(),
|
|
52
|
+
smtpPort: marcoSchemas.number.minMax(1, 65535),
|
|
53
|
+
smtpSocketType: socketTypeSchema,
|
|
54
|
+
smtpUser: marcoSchemas.string.required(),
|
|
55
|
+
});
|
|
56
|
+
export const mutatorSchemas = {
|
|
57
|
+
account: {
|
|
58
|
+
createAccount: v.object({
|
|
59
|
+
aliasId: marcoSchemas.string.required(),
|
|
60
|
+
color: marcoSchemas.string.required(),
|
|
61
|
+
emailAddress: marcoSchemas.string.email(),
|
|
62
|
+
id: marcoSchemas.string.required(),
|
|
63
|
+
}),
|
|
64
|
+
createAlias: v.object({
|
|
65
|
+
accountId: marcoSchemas.string.required(),
|
|
66
|
+
alias: accountAliasSchema,
|
|
67
|
+
}),
|
|
68
|
+
deleteAccount: v.object({
|
|
69
|
+
id: marcoSchemas.string.required(),
|
|
70
|
+
}),
|
|
71
|
+
deleteAlias: v.object({
|
|
72
|
+
accountId: marcoSchemas.string.required(),
|
|
73
|
+
aliasId: marcoSchemas.string.required(),
|
|
74
|
+
}),
|
|
75
|
+
setAliasName: v.object({
|
|
76
|
+
accountId: marcoSchemas.string.required(),
|
|
77
|
+
aliasId: marcoSchemas.string.required(),
|
|
78
|
+
displayName: marcoSchemas.string.nullable(),
|
|
79
|
+
}),
|
|
80
|
+
setAliasPrimary: v.object({
|
|
81
|
+
accountId: marcoSchemas.string.required(),
|
|
82
|
+
aliasId: marcoSchemas.string.required(),
|
|
83
|
+
}),
|
|
84
|
+
setConnectionConfigImapRaw: v.object({
|
|
85
|
+
connectionConfig: connectionConfigImapRawSchema,
|
|
86
|
+
id: marcoSchemas.string.required(),
|
|
87
|
+
}),
|
|
88
|
+
setConnectionConfigOauth: v.object({
|
|
89
|
+
connectionConfig: connectionConfigOauthSchema,
|
|
90
|
+
id: marcoSchemas.string.required(),
|
|
91
|
+
}),
|
|
92
|
+
setSettings: v.object({
|
|
93
|
+
color: v.optional(marcoSchemas.string.nullable()),
|
|
94
|
+
displayName: v.optional(marcoSchemas.string.nullable()),
|
|
95
|
+
id: marcoSchemas.string.required(),
|
|
96
|
+
}),
|
|
97
|
+
},
|
|
98
|
+
draft: {
|
|
99
|
+
cancelSend: v.object({
|
|
100
|
+
id: marcoSchemas.string.required(),
|
|
101
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
102
|
+
}),
|
|
103
|
+
createAttachment: v.object({
|
|
104
|
+
attachment: draftAttachmentSchema,
|
|
105
|
+
id: marcoSchemas.string.required(),
|
|
106
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
107
|
+
}),
|
|
108
|
+
createDraft: v.object({
|
|
109
|
+
accountId: marcoSchemas.string.required(),
|
|
110
|
+
attachments: v.array(draftAttachmentSchema),
|
|
111
|
+
body: draftBodySchema,
|
|
112
|
+
error: marcoSchemas.string.nullable(),
|
|
113
|
+
from: marcoSchemas.string.email(),
|
|
114
|
+
fromName: marcoSchemas.string.nullable(),
|
|
115
|
+
id: marcoSchemas.string.required(),
|
|
116
|
+
referencedMessageId: marcoSchemas.string.nullable(),
|
|
117
|
+
scheduledFor: v.nullable(marcoSchemas.number.positiveInteger()),
|
|
118
|
+
status: v.picklist(DRAFT_STATUSES),
|
|
119
|
+
type: v.picklist(DRAFT_TYPES),
|
|
120
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
121
|
+
}),
|
|
122
|
+
deleteAttachment: v.object({
|
|
123
|
+
attachmentId: marcoSchemas.string.required(),
|
|
124
|
+
id: marcoSchemas.string.required(),
|
|
125
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
126
|
+
}),
|
|
127
|
+
deleteDraft: v.object({
|
|
128
|
+
id: marcoSchemas.string.required(),
|
|
129
|
+
}),
|
|
130
|
+
scheduleSend: v.union([
|
|
131
|
+
v.object({
|
|
132
|
+
id: marcoSchemas.string.required(),
|
|
133
|
+
kind: v.literal('IMMEDIATE'),
|
|
134
|
+
undoMs: marcoSchemas.number.positiveInteger(),
|
|
135
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
136
|
+
}),
|
|
137
|
+
v.object({
|
|
138
|
+
id: marcoSchemas.string.required(),
|
|
139
|
+
kind: v.literal('SCHEDULED'),
|
|
140
|
+
scheduledFor: marcoSchemas.number.positiveInteger(),
|
|
141
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
142
|
+
}),
|
|
143
|
+
]),
|
|
144
|
+
setContent: v.object({
|
|
145
|
+
id: marcoSchemas.string.required(),
|
|
146
|
+
patch: marcoSchemas.drafts.contentPatch.patch(),
|
|
147
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
148
|
+
}),
|
|
149
|
+
setEnvelope: v.object({
|
|
150
|
+
envelope: v.omit(draftBodySchema, ['content']),
|
|
151
|
+
id: marcoSchemas.string.required(),
|
|
152
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
153
|
+
}),
|
|
154
|
+
setFrom: v.object({
|
|
155
|
+
accountId: marcoSchemas.string.required(),
|
|
156
|
+
aliasId: marcoSchemas.string.required(),
|
|
157
|
+
from: marcoSchemas.string.email(),
|
|
158
|
+
fromName: marcoSchemas.string.nullable(),
|
|
159
|
+
id: marcoSchemas.string.required(),
|
|
160
|
+
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
161
|
+
}),
|
|
162
|
+
},
|
|
163
|
+
thread: {
|
|
164
|
+
addLabel: threadChangeLabelSchema,
|
|
165
|
+
delete: baseThreadSchema,
|
|
166
|
+
removeLabel: threadChangeLabelSchema,
|
|
167
|
+
setArchive: baseThreadSchema,
|
|
168
|
+
setFlagged: v.object({
|
|
169
|
+
accounts: accountsSchema,
|
|
170
|
+
flagged: v.boolean(),
|
|
171
|
+
}),
|
|
172
|
+
setInbox: baseThreadSchema,
|
|
173
|
+
setSeen: v.object({
|
|
174
|
+
accounts: accountsSchema,
|
|
175
|
+
seen: v.boolean(),
|
|
176
|
+
}),
|
|
177
|
+
setSpam: baseThreadSchema,
|
|
178
|
+
setTrash: baseThreadSchema,
|
|
179
|
+
},
|
|
180
|
+
user: {
|
|
181
|
+
deleteSettingsPushNotificationToken: v.object({
|
|
182
|
+
id: marcoSchemas.string.required(),
|
|
183
|
+
token: marcoSchemas.string.required(),
|
|
184
|
+
}),
|
|
185
|
+
setSettingsName: v.object({
|
|
186
|
+
id: marcoSchemas.string.required(),
|
|
187
|
+
name: marcoSchemas.string.nullable(),
|
|
188
|
+
}),
|
|
189
|
+
setSettingsPushNotificationToken: v.object({
|
|
190
|
+
id: marcoSchemas.string.required(),
|
|
191
|
+
pushNotificationToken: userPushNotificationTokenSchema,
|
|
192
|
+
}),
|
|
193
|
+
},
|
|
194
|
+
};
|
package/dist/zero/mutators.d.ts
CHANGED
|
@@ -1,268 +1,6 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
1
|
type Context = {
|
|
3
2
|
userId: string;
|
|
4
3
|
};
|
|
5
|
-
export declare const mutatorSchemas: {
|
|
6
|
-
account: {
|
|
7
|
-
createAccount: v.ObjectSchema<{
|
|
8
|
-
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
9
|
-
readonly color: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
10
|
-
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
11
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
12
|
-
}, undefined>;
|
|
13
|
-
createAlias: v.ObjectSchema<{
|
|
14
|
-
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
15
|
-
readonly alias: v.ObjectSchema<{
|
|
16
|
-
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
17
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
18
|
-
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
19
|
-
}, undefined>;
|
|
20
|
-
}, undefined>;
|
|
21
|
-
deleteAccount: v.ObjectSchema<{
|
|
22
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
23
|
-
}, undefined>;
|
|
24
|
-
deleteAlias: v.ObjectSchema<{
|
|
25
|
-
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
26
|
-
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
27
|
-
}, undefined>;
|
|
28
|
-
setAliasName: v.ObjectSchema<{
|
|
29
|
-
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
30
|
-
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
31
|
-
readonly displayName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
32
|
-
}, undefined>;
|
|
33
|
-
setAliasPrimary: v.ObjectSchema<{
|
|
34
|
-
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
35
|
-
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
36
|
-
}, undefined>;
|
|
37
|
-
setConnectionConfigImapRaw: v.ObjectSchema<{
|
|
38
|
-
readonly connectionConfig: v.ObjectSchema<{
|
|
39
|
-
readonly imapHost: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
40
|
-
readonly imapPassword: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
41
|
-
readonly imapPort: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
|
|
42
|
-
readonly imapSocketType: v.UnionSchema<[v.LiteralSchema<"STARTTLS", undefined>, v.LiteralSchema<"SSL", undefined>], undefined>;
|
|
43
|
-
readonly imapUser: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
44
|
-
readonly smtpHost: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
45
|
-
readonly smtpPassword: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
46
|
-
readonly smtpPort: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
|
|
47
|
-
readonly smtpSocketType: v.UnionSchema<[v.LiteralSchema<"STARTTLS", undefined>, v.LiteralSchema<"SSL", undefined>], undefined>;
|
|
48
|
-
readonly smtpUser: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
49
|
-
}, undefined>;
|
|
50
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
51
|
-
}, undefined>;
|
|
52
|
-
setConnectionConfigOauth: v.ObjectSchema<{
|
|
53
|
-
readonly connectionConfig: v.ObjectSchema<{
|
|
54
|
-
readonly code: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
55
|
-
readonly provider: v.PicklistSchema<readonly ["GOOGLE", "OUTLOOK"], undefined>;
|
|
56
|
-
readonly user: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
57
|
-
}, undefined>;
|
|
58
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
59
|
-
}, undefined>;
|
|
60
|
-
setSettings: v.ObjectSchema<{
|
|
61
|
-
readonly color: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
62
|
-
readonly displayName: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
63
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
64
|
-
}, undefined>;
|
|
65
|
-
};
|
|
66
|
-
draft: {
|
|
67
|
-
cancelSend: v.ObjectSchema<{
|
|
68
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
69
|
-
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
70
|
-
}, undefined>;
|
|
71
|
-
createAttachment: v.ObjectSchema<{
|
|
72
|
-
readonly attachment: v.ObjectSchema<{
|
|
73
|
-
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
74
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
75
|
-
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
76
|
-
readonly status: v.PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
|
|
77
|
-
readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
78
|
-
}, undefined>;
|
|
79
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
80
|
-
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
81
|
-
}, undefined>;
|
|
82
|
-
createDraft: v.ObjectSchema<{
|
|
83
|
-
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
84
|
-
readonly attachments: v.ArraySchema<v.ObjectSchema<{
|
|
85
|
-
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
86
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
87
|
-
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
88
|
-
readonly status: v.PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
|
|
89
|
-
readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
90
|
-
}, undefined>, undefined>;
|
|
91
|
-
readonly body: v.ObjectSchema<{
|
|
92
|
-
readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
93
|
-
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
94
|
-
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
|
|
95
|
-
readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
96
|
-
readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
97
|
-
}, undefined>;
|
|
98
|
-
readonly error: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
99
|
-
readonly from: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
100
|
-
readonly fromName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
101
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
102
|
-
readonly referencedMessageId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
103
|
-
readonly scheduledFor: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
|
|
104
|
-
readonly status: v.PicklistSchema<readonly ["DRAFT", "SEND_REQUESTED", "SEND_CONFIRMED", "SEND_FAILED"], undefined>;
|
|
105
|
-
readonly type: v.PicklistSchema<readonly ["NEW", "REPLY", "FORWARD"], undefined>;
|
|
106
|
-
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
107
|
-
}, undefined>;
|
|
108
|
-
deleteAttachment: v.ObjectSchema<{
|
|
109
|
-
readonly attachmentId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
110
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
111
|
-
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
112
|
-
}, undefined>;
|
|
113
|
-
deleteDraft: v.ObjectSchema<{
|
|
114
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
115
|
-
}, undefined>;
|
|
116
|
-
scheduleSend: v.UnionSchema<[v.ObjectSchema<{
|
|
117
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
118
|
-
readonly kind: v.LiteralSchema<"IMMEDIATE", undefined>;
|
|
119
|
-
readonly undoMs: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
120
|
-
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
121
|
-
}, undefined>, v.ObjectSchema<{
|
|
122
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
123
|
-
readonly kind: v.LiteralSchema<"SCHEDULED", undefined>;
|
|
124
|
-
readonly scheduledFor: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
125
|
-
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
126
|
-
}, undefined>], undefined>;
|
|
127
|
-
setContent: v.ObjectSchema<{
|
|
128
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
129
|
-
readonly patch: v.ArraySchema<v.ObjectSchema<{
|
|
130
|
-
readonly index: v.NumberSchema<undefined>;
|
|
131
|
-
readonly type: v.UnionSchema<[v.LiteralSchema<"INSERTION", undefined>, v.LiteralSchema<"DELETION", undefined>], undefined>;
|
|
132
|
-
readonly value: v.StringSchema<undefined>;
|
|
133
|
-
}, undefined>, undefined>;
|
|
134
|
-
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
135
|
-
}, undefined>;
|
|
136
|
-
setEnvelope: v.ObjectSchema<{
|
|
137
|
-
readonly envelope: Omit<v.ObjectSchema<{
|
|
138
|
-
readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
139
|
-
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
140
|
-
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
|
|
141
|
-
readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
142
|
-
readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
143
|
-
}, undefined>, "~standard" | "~run" | "~types" | "entries"> & {
|
|
144
|
-
readonly entries: Omit<{
|
|
145
|
-
readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
146
|
-
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
147
|
-
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
|
|
148
|
-
readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
149
|
-
readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
150
|
-
}, "content">;
|
|
151
|
-
readonly '~standard': v.StandardProps<{
|
|
152
|
-
bcc: string[];
|
|
153
|
-
cc: string[];
|
|
154
|
-
to: string[];
|
|
155
|
-
subject: string | null;
|
|
156
|
-
}, {
|
|
157
|
-
bcc: string[];
|
|
158
|
-
cc: string[];
|
|
159
|
-
to: string[];
|
|
160
|
-
subject: string | null;
|
|
161
|
-
}>;
|
|
162
|
-
readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
163
|
-
bcc: string[];
|
|
164
|
-
cc: string[];
|
|
165
|
-
to: string[];
|
|
166
|
-
subject: string | null;
|
|
167
|
-
}, v.StringIssue | v.RfcEmailIssue<string> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.ObjectIssue | v.ArrayIssue | v.NonOptionalIssue>;
|
|
168
|
-
readonly '~types'?: {
|
|
169
|
-
readonly input: {
|
|
170
|
-
bcc: string[];
|
|
171
|
-
cc: string[];
|
|
172
|
-
to: string[];
|
|
173
|
-
subject: string | null;
|
|
174
|
-
};
|
|
175
|
-
readonly output: {
|
|
176
|
-
bcc: string[];
|
|
177
|
-
cc: string[];
|
|
178
|
-
to: string[];
|
|
179
|
-
subject: string | null;
|
|
180
|
-
};
|
|
181
|
-
readonly issue: v.StringIssue | v.RfcEmailIssue<string> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.ObjectIssue | v.ArrayIssue | v.NonOptionalIssue;
|
|
182
|
-
} | undefined;
|
|
183
|
-
};
|
|
184
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
185
|
-
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
186
|
-
}, undefined>;
|
|
187
|
-
setFrom: v.ObjectSchema<{
|
|
188
|
-
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
189
|
-
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
190
|
-
readonly from: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
191
|
-
readonly fromName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
192
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
193
|
-
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
194
|
-
}, undefined>;
|
|
195
|
-
};
|
|
196
|
-
thread: {
|
|
197
|
-
addLabel: v.ObjectSchema<{
|
|
198
|
-
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
199
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
200
|
-
}, undefined>, undefined>;
|
|
201
|
-
readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
202
|
-
}, undefined>;
|
|
203
|
-
delete: v.ObjectSchema<{
|
|
204
|
-
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
205
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
206
|
-
}, undefined>, undefined>;
|
|
207
|
-
}, undefined>;
|
|
208
|
-
removeLabel: v.ObjectSchema<{
|
|
209
|
-
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
210
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
211
|
-
}, undefined>, undefined>;
|
|
212
|
-
readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
213
|
-
}, undefined>;
|
|
214
|
-
setArchive: v.ObjectSchema<{
|
|
215
|
-
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
216
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
217
|
-
}, undefined>, undefined>;
|
|
218
|
-
}, undefined>;
|
|
219
|
-
setFlagged: v.ObjectSchema<{
|
|
220
|
-
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
221
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
222
|
-
}, undefined>, undefined>;
|
|
223
|
-
readonly flagged: v.BooleanSchema<undefined>;
|
|
224
|
-
}, undefined>;
|
|
225
|
-
setInbox: v.ObjectSchema<{
|
|
226
|
-
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
227
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
228
|
-
}, undefined>, undefined>;
|
|
229
|
-
}, undefined>;
|
|
230
|
-
setSeen: v.ObjectSchema<{
|
|
231
|
-
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
232
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
233
|
-
}, undefined>, undefined>;
|
|
234
|
-
readonly seen: v.BooleanSchema<undefined>;
|
|
235
|
-
}, undefined>;
|
|
236
|
-
setSpam: v.ObjectSchema<{
|
|
237
|
-
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
238
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
239
|
-
}, undefined>, undefined>;
|
|
240
|
-
}, undefined>;
|
|
241
|
-
setTrash: v.ObjectSchema<{
|
|
242
|
-
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
243
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
244
|
-
}, undefined>, undefined>;
|
|
245
|
-
}, undefined>;
|
|
246
|
-
};
|
|
247
|
-
user: {
|
|
248
|
-
deleteSettingsPushNotificationToken: v.ObjectSchema<{
|
|
249
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
250
|
-
readonly token: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
251
|
-
}, undefined>;
|
|
252
|
-
setSettingsName: v.ObjectSchema<{
|
|
253
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
254
|
-
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
255
|
-
}, undefined>;
|
|
256
|
-
setSettingsPushNotificationToken: v.ObjectSchema<{
|
|
257
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
258
|
-
readonly pushNotificationToken: v.ObjectSchema<{
|
|
259
|
-
readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
260
|
-
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
261
|
-
readonly token: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
262
|
-
}, undefined>;
|
|
263
|
-
}, undefined>;
|
|
264
|
-
};
|
|
265
|
-
};
|
|
266
4
|
export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
|
|
267
5
|
readonly account: {
|
|
268
6
|
readonly createAccount: import("@rocicorp/zero").MutatorDefinition<{
|
|
@@ -424,7 +162,7 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
|
|
|
424
162
|
id: string;
|
|
425
163
|
referencedMessageId: string | null;
|
|
426
164
|
scheduledFor: number | null;
|
|
427
|
-
status: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
165
|
+
status: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
428
166
|
type: "NEW" | "REPLY" | "FORWARD";
|
|
429
167
|
updatedAt: number;
|
|
430
168
|
}, {
|
|
@@ -449,7 +187,7 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
|
|
|
449
187
|
id: string;
|
|
450
188
|
referencedMessageId: string | null;
|
|
451
189
|
scheduledFor: number | null;
|
|
452
|
-
status: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
190
|
+
status: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
453
191
|
type: "NEW" | "REPLY" | "FORWARD";
|
|
454
192
|
updatedAt: number;
|
|
455
193
|
}, Context, unknown>;
|
|
@@ -1040,7 +778,7 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
|
|
|
1040
778
|
readonly status: {
|
|
1041
779
|
type: "string";
|
|
1042
780
|
optional: false;
|
|
1043
|
-
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
781
|
+
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
1044
782
|
};
|
|
1045
783
|
readonly subject: Omit<{
|
|
1046
784
|
type: "string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutators.d.ts","sourceRoot":"","sources":["../../src/zero/mutators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mutators.d.ts","sourceRoot":"","sources":["../../src/zero/mutators.ts"],"names":[],"mappings":"AASA,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAyGjC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0iBnB,CAAA"}
|
package/dist/zero/mutators.js
CHANGED
|
@@ -1,185 +1,11 @@
|
|
|
1
1
|
import { createBuilder, defineMutators, defineMutatorWithType } from '@rocicorp/zero';
|
|
2
|
-
import
|
|
3
|
-
import { marcoSchemas } from '../schemas';
|
|
4
|
-
import { DRAFT_ATTACHMENT_UPLOAD_STATUSES, DRAFT_STATUSES, DRAFT_TYPES, MutationError } from '../types';
|
|
2
|
+
import { MutationError } from '../types';
|
|
5
3
|
import { stringPatch } from '../utils';
|
|
6
4
|
import { threadsUtils } from '../utils/threads';
|
|
5
|
+
import { mutatorSchemas } from '../zero/mutatorSchemas';
|
|
7
6
|
import { schema } from '../zero/schema';
|
|
8
7
|
const zql = createBuilder(schema);
|
|
9
8
|
const defineMutator = defineMutatorWithType();
|
|
10
|
-
const accountAliasSchema = v.object({
|
|
11
|
-
emailAddress: marcoSchemas.string.email(),
|
|
12
|
-
id: marcoSchemas.string.required(),
|
|
13
|
-
name: marcoSchemas.string.nullable(),
|
|
14
|
-
});
|
|
15
|
-
const accountsSchema = v.record(marcoSchemas.string.required(), v.object({
|
|
16
|
-
threadIds: v.array(marcoSchemas.string.required()),
|
|
17
|
-
}));
|
|
18
|
-
const baseThreadSchema = v.object({
|
|
19
|
-
accounts: accountsSchema,
|
|
20
|
-
});
|
|
21
|
-
const threadChangeLabelSchema = v.object({
|
|
22
|
-
accounts: accountsSchema,
|
|
23
|
-
labelPath: marcoSchemas.string.required(),
|
|
24
|
-
});
|
|
25
|
-
const draftBodySchema = v.object({
|
|
26
|
-
bcc: v.array(marcoSchemas.string.email()),
|
|
27
|
-
cc: v.array(marcoSchemas.string.email()),
|
|
28
|
-
content: v.pipe(v.string(), v.maxLength(384000)),
|
|
29
|
-
subject: marcoSchemas.string.nullable(),
|
|
30
|
-
to: v.array(marcoSchemas.string.email()),
|
|
31
|
-
});
|
|
32
|
-
const draftAttachmentSchema = v.object({
|
|
33
|
-
fileName: marcoSchemas.string.required(),
|
|
34
|
-
id: marcoSchemas.string.required(),
|
|
35
|
-
mimeType: marcoSchemas.string.required(),
|
|
36
|
-
status: v.picklist(DRAFT_ATTACHMENT_UPLOAD_STATUSES),
|
|
37
|
-
totalSize: marcoSchemas.number.positiveInteger(),
|
|
38
|
-
});
|
|
39
|
-
const userPushNotificationTokenSchema = v.object({
|
|
40
|
-
createdAt: marcoSchemas.number.positiveInteger(),
|
|
41
|
-
id: marcoSchemas.string.required(),
|
|
42
|
-
token: marcoSchemas.string.required(),
|
|
43
|
-
});
|
|
44
|
-
export const mutatorSchemas = {
|
|
45
|
-
account: {
|
|
46
|
-
createAccount: v.object({
|
|
47
|
-
aliasId: marcoSchemas.string.required(),
|
|
48
|
-
color: marcoSchemas.string.required(),
|
|
49
|
-
emailAddress: marcoSchemas.string.email(),
|
|
50
|
-
id: marcoSchemas.string.required(),
|
|
51
|
-
}),
|
|
52
|
-
createAlias: v.object({
|
|
53
|
-
accountId: marcoSchemas.string.required(),
|
|
54
|
-
alias: accountAliasSchema,
|
|
55
|
-
}),
|
|
56
|
-
deleteAccount: v.object({
|
|
57
|
-
id: marcoSchemas.string.required(),
|
|
58
|
-
}),
|
|
59
|
-
deleteAlias: v.object({
|
|
60
|
-
accountId: marcoSchemas.string.required(),
|
|
61
|
-
aliasId: marcoSchemas.string.required(),
|
|
62
|
-
}),
|
|
63
|
-
setAliasName: v.object({
|
|
64
|
-
accountId: marcoSchemas.string.required(),
|
|
65
|
-
aliasId: marcoSchemas.string.required(),
|
|
66
|
-
displayName: marcoSchemas.string.nullable(),
|
|
67
|
-
}),
|
|
68
|
-
setAliasPrimary: v.object({
|
|
69
|
-
accountId: marcoSchemas.string.required(),
|
|
70
|
-
aliasId: marcoSchemas.string.required(),
|
|
71
|
-
}),
|
|
72
|
-
setConnectionConfigImapRaw: v.object({
|
|
73
|
-
connectionConfig: marcoSchemas.emailAccount.connectionConfigImapRaw(),
|
|
74
|
-
id: marcoSchemas.string.required(),
|
|
75
|
-
}),
|
|
76
|
-
setConnectionConfigOauth: v.object({
|
|
77
|
-
connectionConfig: marcoSchemas.emailAccount.connectionConfigOauth(),
|
|
78
|
-
id: marcoSchemas.string.required(),
|
|
79
|
-
}),
|
|
80
|
-
setSettings: v.object({
|
|
81
|
-
color: v.optional(marcoSchemas.string.nullable()),
|
|
82
|
-
displayName: v.optional(marcoSchemas.string.nullable()),
|
|
83
|
-
id: marcoSchemas.string.required(),
|
|
84
|
-
}),
|
|
85
|
-
},
|
|
86
|
-
draft: {
|
|
87
|
-
cancelSend: v.object({
|
|
88
|
-
id: marcoSchemas.string.required(),
|
|
89
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
90
|
-
}),
|
|
91
|
-
createAttachment: v.object({
|
|
92
|
-
attachment: draftAttachmentSchema,
|
|
93
|
-
id: marcoSchemas.string.required(),
|
|
94
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
95
|
-
}),
|
|
96
|
-
createDraft: v.object({
|
|
97
|
-
accountId: marcoSchemas.string.required(),
|
|
98
|
-
attachments: v.array(draftAttachmentSchema),
|
|
99
|
-
body: draftBodySchema,
|
|
100
|
-
error: marcoSchemas.string.nullable(),
|
|
101
|
-
from: marcoSchemas.string.email(),
|
|
102
|
-
fromName: marcoSchemas.string.nullable(),
|
|
103
|
-
id: marcoSchemas.string.required(),
|
|
104
|
-
referencedMessageId: marcoSchemas.string.nullable(),
|
|
105
|
-
scheduledFor: v.nullable(marcoSchemas.number.positiveInteger()),
|
|
106
|
-
status: v.picklist(DRAFT_STATUSES),
|
|
107
|
-
type: v.picklist(DRAFT_TYPES),
|
|
108
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
109
|
-
}),
|
|
110
|
-
deleteAttachment: v.object({
|
|
111
|
-
attachmentId: marcoSchemas.string.required(),
|
|
112
|
-
id: marcoSchemas.string.required(),
|
|
113
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
114
|
-
}),
|
|
115
|
-
deleteDraft: v.object({
|
|
116
|
-
id: marcoSchemas.string.required(),
|
|
117
|
-
}),
|
|
118
|
-
scheduleSend: v.union([
|
|
119
|
-
v.object({
|
|
120
|
-
id: marcoSchemas.string.required(),
|
|
121
|
-
kind: v.literal('IMMEDIATE'),
|
|
122
|
-
undoMs: marcoSchemas.number.positiveInteger(),
|
|
123
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
124
|
-
}),
|
|
125
|
-
v.object({
|
|
126
|
-
id: marcoSchemas.string.required(),
|
|
127
|
-
kind: v.literal('SCHEDULED'),
|
|
128
|
-
scheduledFor: marcoSchemas.number.positiveInteger(),
|
|
129
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
130
|
-
}),
|
|
131
|
-
]),
|
|
132
|
-
setContent: v.object({
|
|
133
|
-
id: marcoSchemas.string.required(),
|
|
134
|
-
patch: marcoSchemas.drafts.contentPatch.patch(),
|
|
135
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
136
|
-
}),
|
|
137
|
-
setEnvelope: v.object({
|
|
138
|
-
envelope: v.omit(draftBodySchema, ['content']),
|
|
139
|
-
id: marcoSchemas.string.required(),
|
|
140
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
141
|
-
}),
|
|
142
|
-
setFrom: v.object({
|
|
143
|
-
accountId: marcoSchemas.string.required(),
|
|
144
|
-
aliasId: marcoSchemas.string.required(),
|
|
145
|
-
from: marcoSchemas.string.email(),
|
|
146
|
-
fromName: marcoSchemas.string.nullable(),
|
|
147
|
-
id: marcoSchemas.string.required(),
|
|
148
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
149
|
-
}),
|
|
150
|
-
},
|
|
151
|
-
thread: {
|
|
152
|
-
addLabel: threadChangeLabelSchema,
|
|
153
|
-
delete: baseThreadSchema,
|
|
154
|
-
removeLabel: threadChangeLabelSchema,
|
|
155
|
-
setArchive: baseThreadSchema,
|
|
156
|
-
setFlagged: v.object({
|
|
157
|
-
accounts: accountsSchema,
|
|
158
|
-
flagged: v.boolean(),
|
|
159
|
-
}),
|
|
160
|
-
setInbox: baseThreadSchema,
|
|
161
|
-
setSeen: v.object({
|
|
162
|
-
accounts: accountsSchema,
|
|
163
|
-
seen: v.boolean(),
|
|
164
|
-
}),
|
|
165
|
-
setSpam: baseThreadSchema,
|
|
166
|
-
setTrash: baseThreadSchema,
|
|
167
|
-
},
|
|
168
|
-
user: {
|
|
169
|
-
deleteSettingsPushNotificationToken: v.object({
|
|
170
|
-
id: marcoSchemas.string.required(),
|
|
171
|
-
token: marcoSchemas.string.required(),
|
|
172
|
-
}),
|
|
173
|
-
setSettingsName: v.object({
|
|
174
|
-
id: marcoSchemas.string.required(),
|
|
175
|
-
name: marcoSchemas.string.nullable(),
|
|
176
|
-
}),
|
|
177
|
-
setSettingsPushNotificationToken: v.object({
|
|
178
|
-
id: marcoSchemas.string.required(),
|
|
179
|
-
pushNotificationToken: userPushNotificationTokenSchema,
|
|
180
|
-
}),
|
|
181
|
-
},
|
|
182
|
-
};
|
|
183
9
|
const buildLabelIdList = (x) => (x.length === 0 ? '' : ` ${[...new Set(x)].join(' ')} `);
|
|
184
10
|
const setSystemLabel = async (tx, builder, threadId, targetSpecialUse) => {
|
|
185
11
|
const thread = await tx.run(builder.thread.where('id', threadId).one());
|
package/dist/zero/queries.d.ts
CHANGED
|
@@ -63,11 +63,11 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
63
63
|
readonly getDrafts: import("@rocicorp/zero").QueryDefinition<"draft", {
|
|
64
64
|
accountId?: string | undefined;
|
|
65
65
|
limit?: number | undefined;
|
|
66
|
-
status?: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED" | undefined;
|
|
66
|
+
status?: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED" | undefined;
|
|
67
67
|
}, {
|
|
68
68
|
accountId?: string | undefined;
|
|
69
69
|
limit: number;
|
|
70
|
-
status?: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED" | undefined;
|
|
70
|
+
status?: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED" | undefined;
|
|
71
71
|
}, {
|
|
72
72
|
readonly accountId: string;
|
|
73
73
|
readonly body: {
|
|
@@ -83,7 +83,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
83
83
|
readonly id: string;
|
|
84
84
|
readonly referencedMessageId: string | null;
|
|
85
85
|
readonly scheduledFor: number | null;
|
|
86
|
-
readonly status: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
86
|
+
readonly status: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
87
87
|
readonly subject: string | null;
|
|
88
88
|
readonly type: "NEW" | "REPLY" | "FORWARD";
|
|
89
89
|
readonly updatedAt: number;
|
|
@@ -687,7 +687,7 @@ export declare const queries: import("@rocicorp/zero").QueryRegistry<{
|
|
|
687
687
|
readonly status: {
|
|
688
688
|
type: "string";
|
|
689
689
|
optional: false;
|
|
690
|
-
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
690
|
+
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
691
691
|
};
|
|
692
692
|
readonly subject: Omit<{
|
|
693
693
|
type: "string";
|
package/dist/zero/schema.d.ts
CHANGED
|
@@ -340,7 +340,7 @@ export declare const schema: {
|
|
|
340
340
|
readonly status: {
|
|
341
341
|
type: "string";
|
|
342
342
|
optional: false;
|
|
343
|
-
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
343
|
+
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
344
344
|
};
|
|
345
345
|
readonly subject: Omit<{
|
|
346
346
|
type: "string";
|
|
@@ -1294,7 +1294,7 @@ export declare const tables: {
|
|
|
1294
1294
|
readonly status: {
|
|
1295
1295
|
type: "string";
|
|
1296
1296
|
optional: false;
|
|
1297
|
-
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
1297
|
+
customType: "DRAFT" | "SEND_REQUESTED" | "SEND_IN_PROGRESS" | "SEND_CONFIRMED" | "SEND_FAILED";
|
|
1298
1298
|
};
|
|
1299
1299
|
readonly subject: Omit<{
|
|
1300
1300
|
type: "string";
|