@marcoappio/marco-config 2.0.567 → 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,21 +6,21 @@ 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
- code: string.required(),
21
+ code: string.required(4096),
22
22
  provider: oauth.provider(),
23
- user: string.required(),
23
+ user: string.required(4096),
24
24
  }),
25
25
  imapConnectionStatus: () => v.picklist(IMAP_CONNECTION_STATUSES),
26
26
  socketTypeSchema: () => socketTypeSchema,
@@ -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;AA0F5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6K1B,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 { socketTypeSchema } from '../emailAccount';
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: connectionConfigImapRawSchema,
96
+ connectionConfig: emailAccount.connectionConfigImapRaw(),
115
97
  id: id.accountId.required(),
116
98
  }),
117
99
  setConnectionConfigOauth: v.object({
118
- connectionConfig: connectionConfigOauthSchema,
100
+ connectionConfig: emailAccount.connectionConfigOauth(),
119
101
  id: id.accountId.required(),
120
102
  }),
121
103
  setSettings: v.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.567",
3
+ "version": "2.0.569",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",