@marcoappio/marco-config 2.0.568 → 2.0.569
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.
|
@@ -6,16 +6,16 @@ import { string } from './string';
|
|
|
6
6
|
export const socketTypeSchema = v.union([v.literal('STARTTLS'), v.literal('SSL')]);
|
|
7
7
|
export const emailAccount = {
|
|
8
8
|
connectionConfigImapRaw: () => v.object({
|
|
9
|
-
imapHost: string.required(),
|
|
10
|
-
imapPassword: string.required(),
|
|
9
|
+
imapHost: string.required(4096),
|
|
10
|
+
imapPassword: string.required(4096),
|
|
11
11
|
imapPort: number.minMax(1, 65535),
|
|
12
12
|
imapSocketType: socketTypeSchema,
|
|
13
|
-
imapUser: string.required(),
|
|
14
|
-
smtpHost: string.required(),
|
|
15
|
-
smtpPassword: string.required(),
|
|
13
|
+
imapUser: string.required(4096),
|
|
14
|
+
smtpHost: string.required(4096),
|
|
15
|
+
smtpPassword: string.required(4096),
|
|
16
16
|
smtpPort: number.minMax(1, 65535),
|
|
17
17
|
smtpSocketType: socketTypeSchema,
|
|
18
|
-
smtpUser: string.required(),
|
|
18
|
+
smtpUser: string.required(4096),
|
|
19
19
|
}),
|
|
20
20
|
connectionConfigOauth: () => v.object({
|
|
21
21
|
code: string.required(4096),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutatorSchemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/mutators/mutatorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"mutatorSchemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/mutators/mutatorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAsE5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6K1B,CAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import { marcoConstants } from '../../constants';
|
|
3
3
|
import { DRAFT_ATTACHMENT_UPLOAD_STATUSES, DRAFT_STATUSES, DRAFT_TYPES, USER_SETTINGS_CUSTOM_VIEW_ICONS, } from '../../types';
|
|
4
|
-
import {
|
|
4
|
+
import { emailAccount } from '../emailAccount';
|
|
5
5
|
import { id } from '../id';
|
|
6
6
|
import { number } from '../number';
|
|
7
|
-
import { oauth } from '../oauth';
|
|
8
7
|
import { string } from '../string';
|
|
9
8
|
const accountAliasSchema = v.object({
|
|
10
9
|
emailAddress: string.email(),
|
|
@@ -40,23 +39,6 @@ const userPushNotificationTokenSchema = v.object({
|
|
|
40
39
|
id: id.pushNotificationTokenId.required(),
|
|
41
40
|
token: string.required(),
|
|
42
41
|
});
|
|
43
|
-
const connectionConfigOauthSchema = v.object({
|
|
44
|
-
code: string.required(),
|
|
45
|
-
provider: oauth.provider(),
|
|
46
|
-
user: string.required(),
|
|
47
|
-
});
|
|
48
|
-
const connectionConfigImapRawSchema = v.object({
|
|
49
|
-
imapHost: string.required(),
|
|
50
|
-
imapPassword: string.required(),
|
|
51
|
-
imapPort: number.minMax(1, 65535),
|
|
52
|
-
imapSocketType: socketTypeSchema,
|
|
53
|
-
imapUser: string.required(),
|
|
54
|
-
smtpHost: string.required(),
|
|
55
|
-
smtpPassword: string.required(),
|
|
56
|
-
smtpPort: number.minMax(1, 65535),
|
|
57
|
-
smtpSocketType: socketTypeSchema,
|
|
58
|
-
smtpUser: string.required(),
|
|
59
|
-
});
|
|
60
42
|
const userViewSchema = v.object({
|
|
61
43
|
aliasEmails: v.pipe(v.array(string.email()), v.minLength(2), v.maxLength(marcoConstants.user.views.maxAliasEmailsPerView)),
|
|
62
44
|
icon: v.picklist(USER_SETTINGS_CUSTOM_VIEW_ICONS),
|
|
@@ -111,11 +93,11 @@ export const mutatorSchemas = {
|
|
|
111
93
|
signature: v.nullable(v.pipe(v.string(), v.maxLength(50000))),
|
|
112
94
|
}),
|
|
113
95
|
setConnectionConfigImapRaw: v.object({
|
|
114
|
-
connectionConfig:
|
|
96
|
+
connectionConfig: emailAccount.connectionConfigImapRaw(),
|
|
115
97
|
id: id.accountId.required(),
|
|
116
98
|
}),
|
|
117
99
|
setConnectionConfigOauth: v.object({
|
|
118
|
-
connectionConfig:
|
|
100
|
+
connectionConfig: emailAccount.connectionConfigOauth(),
|
|
119
101
|
id: id.accountId.required(),
|
|
120
102
|
}),
|
|
121
103
|
setSettings: v.object({
|