@marcoappio/marco-config 2.0.350 → 2.0.351

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.
Files changed (49) hide show
  1. package/dist/clients/account.d.ts +17 -17
  2. package/dist/clients/account.js +15 -15
  3. package/dist/clients/contact.d.ts +1 -1
  4. package/dist/clients/contact.js +1 -1
  5. package/dist/clients/draft.d.ts +23 -23
  6. package/dist/clients/draft.js +18 -18
  7. package/dist/clients/index.d.ts +62 -57
  8. package/dist/clients/index.d.ts.map +1 -1
  9. package/dist/clients/thread.d.ts +18 -13
  10. package/dist/clients/thread.d.ts.map +1 -1
  11. package/dist/clients/thread.js +18 -13
  12. package/dist/clients/user.d.ts +3 -3
  13. package/dist/clients/user.js +3 -3
  14. package/dist/schemas/index.d.ts +2 -2
  15. package/dist/schemas/pushNotifications.d.ts +2 -2
  16. package/dist/schemas/pushNotifications.js +2 -2
  17. package/dist/sdk/endpoints/index.d.ts +65 -58
  18. package/dist/sdk/endpoints/index.d.ts.map +1 -1
  19. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.d.ts +1 -1
  20. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.js +1 -1
  21. package/dist/sdk/endpoints/private/emailMessage/index.d.ts +1 -1
  22. package/dist/sdk/endpoints/private/index.d.ts +65 -58
  23. package/dist/sdk/endpoints/private/index.d.ts.map +1 -1
  24. package/dist/sdk/endpoints/private/sync/index.d.ts +64 -57
  25. package/dist/sdk/endpoints/private/sync/index.d.ts.map +1 -1
  26. package/dist/sdk/endpoints/private/sync/pull/account.d.ts +3 -3
  27. package/dist/sdk/endpoints/private/sync/pull/contact.d.ts +1 -1
  28. package/dist/sdk/endpoints/private/sync/pull/draft.d.ts +4 -4
  29. package/dist/sdk/endpoints/private/sync/pull/index.d.ts +13 -13
  30. package/dist/sdk/endpoints/private/sync/pull/thread.d.ts +4 -4
  31. package/dist/sdk/endpoints/private/sync/pull/user.d.ts +1 -1
  32. package/dist/sdk/endpoints/private/sync/push/account.d.ts +14 -14
  33. package/dist/sdk/endpoints/private/sync/push/draft.d.ts +19 -19
  34. package/dist/sdk/endpoints/private/sync/push/index.d.ts +51 -44
  35. package/dist/sdk/endpoints/private/sync/push/index.d.ts.map +1 -1
  36. package/dist/sdk/endpoints/private/sync/push/thread.d.ts +16 -9
  37. package/dist/sdk/endpoints/private/sync/push/thread.d.ts.map +1 -1
  38. package/dist/sdk/endpoints/private/sync/push/thread.js +7 -2
  39. package/dist/sdk/endpoints/private/sync/push/user.d.ts +2 -2
  40. package/dist/sdk/index.d.ts +65 -58
  41. package/dist/sdk/index.d.ts.map +1 -1
  42. package/dist/utils/accounts/index.d.ts +0 -4
  43. package/dist/utils/accounts/index.d.ts.map +1 -1
  44. package/dist/utils/accounts/index.js +0 -2
  45. package/dist/ws.js +1 -1
  46. package/package.json +1 -1
  47. package/dist/utils/accounts/labelIdGenerate.test.d.ts +0 -2
  48. package/dist/utils/accounts/labelIdGenerate.test.d.ts.map +0 -1
  49. package/dist/utils/accounts/labelIdGenerate.test.js +0 -51
@@ -4,16 +4,16 @@ export declare const account: {
4
4
  readonly aliases: v.ObjectSchema<{
5
5
  readonly nonPrimary: v.ArraySchema<v.ObjectSchema<{
6
6
  readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
7
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
7
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
8
8
  readonly name: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
9
9
  }, undefined>, undefined>;
10
10
  readonly primary: v.ObjectSchema<{
11
11
  readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
12
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
12
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
13
13
  readonly name: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
14
14
  }, undefined>;
15
15
  }, undefined>;
16
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
16
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
17
17
  readonly imapConnectionStatus: v.UnionSchema<[v.LiteralSchema<"AWAITING_CONNECTION", undefined>, v.LiteralSchema<"CONNECTED", undefined>, v.LiteralSchema<"CONNECTION_FAILED_CONNECTION_ERROR", undefined>, v.LiteralSchema<"CONNECTION_FAILED_OAUTH_GOOGLE_EXCHANGE_ERROR", undefined>, v.LiteralSchema<"CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR", undefined>, v.LiteralSchema<"CONNECTION_FAILED_AUTHENTICATION_ERROR", undefined>, v.LiteralSchema<"CONNECTION_FAILED_UNKNOWN_ERROR", undefined>], undefined>;
18
18
  readonly labels: v.ArraySchema<v.ObjectSchema<{
19
19
  readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -32,44 +32,44 @@ export declare const account: {
32
32
  mutators: {
33
33
  createAccount: {
34
34
  delta: v.ObjectSchema<{
35
- readonly aliasId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
35
+ readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
36
36
  readonly color: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
37
37
  readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
38
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
38
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
39
39
  }, undefined>;
40
40
  };
41
41
  createAlias: {
42
42
  delta: v.ObjectSchema<{
43
- readonly accountId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
43
+ readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
44
44
  readonly alias: v.ObjectSchema<{
45
45
  readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
46
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
46
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
47
47
  readonly name: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
48
48
  }, undefined>;
49
49
  }, undefined>;
50
50
  };
51
51
  deleteAccount: {
52
52
  delta: v.ObjectSchema<{
53
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
53
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
54
54
  }, undefined>;
55
55
  };
56
56
  deleteAlias: {
57
57
  delta: v.ObjectSchema<{
58
- readonly accountId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
59
- readonly aliasId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
58
+ readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
59
+ readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
60
60
  }, undefined>;
61
61
  };
62
62
  setAliasName: {
63
63
  delta: v.ObjectSchema<{
64
- readonly accountId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
65
- readonly aliasId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
64
+ readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
65
+ readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
66
66
  readonly name: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
67
67
  }, undefined>;
68
68
  };
69
69
  setAliasPrimary: {
70
70
  delta: v.ObjectSchema<{
71
- readonly accountId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
72
- readonly aliasId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
71
+ readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
72
+ readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
73
73
  }, undefined>;
74
74
  };
75
75
  setConnectionConfigImapRaw: {
@@ -84,7 +84,7 @@ export declare const account: {
84
84
  readonly smtpPort: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
85
85
  readonly smtpUser: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
86
86
  }, undefined>;
87
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
87
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
88
88
  }, undefined>;
89
89
  };
90
90
  setConnectionConfigOauth: {
@@ -94,12 +94,12 @@ export declare const account: {
94
94
  readonly provider: v.UnionSchema<[v.LiteralSchema<"GOOGLE", undefined>, v.LiteralSchema<"OUTLOOK", undefined>], undefined>;
95
95
  readonly user: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
96
96
  }, undefined>;
97
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
97
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
98
98
  }, undefined>;
99
99
  };
100
100
  setSettings: {
101
101
  delta: v.ObjectSchema<{
102
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
102
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
103
103
  readonly settings: Omit<v.ObjectSchema<{
104
104
  readonly color: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
105
105
  readonly name: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -6,7 +6,7 @@ const accountSettingsSchema = v.object({
6
6
  });
7
7
  const aliasSchema = v.object({
8
8
  emailAddress: marcoSchemas.string.email(),
9
- id: marcoSchemas.string.shortUUID(),
9
+ id: marcoSchemas.string.required(),
10
10
  name: marcoSchemas.string.nullable(),
11
11
  });
12
12
  export const account = {
@@ -15,7 +15,7 @@ export const account = {
15
15
  nonPrimary: v.array(aliasSchema),
16
16
  primary: aliasSchema,
17
17
  }),
18
- id: marcoSchemas.string.shortUUID(),
18
+ id: marcoSchemas.string.required(),
19
19
  imapConnectionStatus: marcoSchemas.emailAccount.imapConnectionStatus(),
20
20
  labels: v.array(v.object({
21
21
  id: marcoSchemas.string.required(),
@@ -31,57 +31,57 @@ export const account = {
31
31
  mutators: {
32
32
  createAccount: {
33
33
  delta: v.object({
34
- aliasId: marcoSchemas.string.shortUUID(),
34
+ aliasId: marcoSchemas.string.required(),
35
35
  color: marcoSchemas.string.required(),
36
36
  emailAddress: marcoSchemas.string.email(),
37
- id: marcoSchemas.string.shortUUID(),
37
+ id: marcoSchemas.string.required(),
38
38
  }),
39
39
  },
40
40
  createAlias: {
41
41
  delta: v.object({
42
- accountId: marcoSchemas.string.shortUUID(),
42
+ accountId: marcoSchemas.string.required(),
43
43
  alias: aliasSchema,
44
44
  }),
45
45
  },
46
46
  deleteAccount: {
47
47
  delta: v.object({
48
- id: marcoSchemas.string.shortUUID(),
48
+ id: marcoSchemas.string.required(),
49
49
  }),
50
50
  },
51
51
  deleteAlias: {
52
52
  delta: v.object({
53
- accountId: marcoSchemas.string.shortUUID(),
54
- aliasId: marcoSchemas.string.shortUUID(),
53
+ accountId: marcoSchemas.string.required(),
54
+ aliasId: marcoSchemas.string.required(),
55
55
  }),
56
56
  },
57
57
  setAliasName: {
58
58
  delta: v.object({
59
- accountId: marcoSchemas.string.shortUUID(),
60
- aliasId: marcoSchemas.string.shortUUID(),
59
+ accountId: marcoSchemas.string.required(),
60
+ aliasId: marcoSchemas.string.required(),
61
61
  name: marcoSchemas.string.nullable(),
62
62
  }),
63
63
  },
64
64
  setAliasPrimary: {
65
65
  delta: v.object({
66
- accountId: marcoSchemas.string.shortUUID(),
67
- aliasId: marcoSchemas.string.shortUUID(),
66
+ accountId: marcoSchemas.string.required(),
67
+ aliasId: marcoSchemas.string.required(),
68
68
  }),
69
69
  },
70
70
  setConnectionConfigImapRaw: {
71
71
  delta: v.object({
72
72
  connectionConfig: marcoSchemas.emailAccount.connectionConfigImapRaw(),
73
- id: marcoSchemas.string.shortUUID(),
73
+ id: marcoSchemas.string.required(),
74
74
  }),
75
75
  },
76
76
  setConnectionConfigOauth: {
77
77
  delta: v.object({
78
78
  connectionConfig: marcoSchemas.emailAccount.connectionConfigOauth(),
79
- id: marcoSchemas.string.shortUUID(),
79
+ id: marcoSchemas.string.required(),
80
80
  }),
81
81
  },
82
82
  setSettings: {
83
83
  delta: v.object({
84
- id: marcoSchemas.string.shortUUID(),
84
+ id: marcoSchemas.string.required(),
85
85
  settings: v.partial(accountSettingsSchema),
86
86
  }),
87
87
  },
@@ -2,7 +2,7 @@ import * as v from 'valibot';
2
2
  export declare const contact: {
3
3
  model: v.ObjectSchema<{
4
4
  readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
5
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
5
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
6
6
  readonly name: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
7
7
  }, undefined>;
8
8
  mutators: {};
@@ -3,7 +3,7 @@ import { marcoSchemas } from '../schemas';
3
3
  export const contact = {
4
4
  model: v.object({
5
5
  emailAddress: marcoSchemas.string.email(),
6
- id: marcoSchemas.string.shortUUID(),
6
+ id: marcoSchemas.string.required(),
7
7
  name: marcoSchemas.string.nullable(),
8
8
  }),
9
9
  mutators: {},
@@ -4,7 +4,7 @@ export declare const draft: {
4
4
  readonly attachments: v.ArraySchema<v.ObjectSchema<{
5
5
  readonly failed: v.BooleanSchema<undefined>;
6
6
  readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
7
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
7
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
8
8
  readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
9
9
  readonly totalChunks: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
10
10
  readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
@@ -17,12 +17,12 @@ export declare const draft: {
17
17
  readonly subject: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
18
18
  readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
19
19
  }, undefined>;
20
- readonly emailAccountId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
20
+ readonly emailAccountId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
21
21
  readonly error: v.NullableSchema<v.StringSchema<undefined>, undefined>;
22
22
  readonly from: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
23
23
  readonly fromName: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
24
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
25
- readonly referencedMessageId: v.NullableSchema<v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
24
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
25
+ readonly referencedMessageId: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
26
26
  readonly scheduledFor: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
27
27
  readonly status: v.UnionSchema<[v.LiteralSchema<"DRAFT", undefined>, v.LiteralSchema<"SEND_REQUESTED", undefined>, v.LiteralSchema<"SEND_CONFIRMATION_PENDING", undefined>, v.LiteralSchema<"SEND_CONFIRMED", undefined>], undefined>;
28
28
  readonly type: v.UnionSchema<[v.LiteralSchema<"NEW", undefined>, v.LiteralSchema<"REPLY", undefined>, v.LiteralSchema<"FORWARD", undefined>], undefined>;
@@ -31,7 +31,7 @@ export declare const draft: {
31
31
  mutators: {
32
32
  cancelDraftSend: {
33
33
  delta: v.ObjectSchema<{
34
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
34
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
35
35
  readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
36
36
  }, undefined>;
37
37
  };
@@ -40,13 +40,13 @@ export declare const draft: {
40
40
  readonly attachment: v.ObjectSchema<{
41
41
  readonly failed: v.BooleanSchema<undefined>;
42
42
  readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
43
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
43
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
44
44
  readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
45
45
  readonly totalChunks: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
46
46
  readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
47
47
  readonly uploadedChunks: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
48
48
  }, undefined>;
49
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
49
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
50
50
  readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
51
51
  }, undefined>;
52
52
  };
@@ -55,7 +55,7 @@ export declare const draft: {
55
55
  readonly attachments: v.ArraySchema<v.ObjectSchema<{
56
56
  readonly failed: v.BooleanSchema<undefined>;
57
57
  readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
58
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
58
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
59
59
  readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
60
60
  readonly totalChunks: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
61
61
  readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
@@ -68,12 +68,12 @@ export declare const draft: {
68
68
  readonly subject: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
69
69
  readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
70
70
  }, undefined>;
71
- readonly emailAccountId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
71
+ readonly emailAccountId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
72
72
  readonly error: v.NullableSchema<v.StringSchema<undefined>, undefined>;
73
73
  readonly from: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
74
74
  readonly fromName: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
75
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
76
- readonly referencedMessageId: v.NullableSchema<v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
75
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
76
+ readonly referencedMessageId: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
77
77
  readonly scheduledFor: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
78
78
  readonly status: v.UnionSchema<[v.LiteralSchema<"DRAFT", undefined>, v.LiteralSchema<"SEND_REQUESTED", undefined>, v.LiteralSchema<"SEND_CONFIRMATION_PENDING", undefined>, v.LiteralSchema<"SEND_CONFIRMED", undefined>], undefined>;
79
79
  readonly type: v.UnionSchema<[v.LiteralSchema<"NEW", undefined>, v.LiteralSchema<"REPLY", undefined>, v.LiteralSchema<"FORWARD", undefined>], undefined>;
@@ -82,25 +82,25 @@ export declare const draft: {
82
82
  };
83
83
  deleteAttachment: {
84
84
  delta: v.ObjectSchema<{
85
- readonly attachmentId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
86
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
85
+ readonly attachmentId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
86
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
87
87
  readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
88
88
  }, undefined>;
89
89
  };
90
90
  deleteDraft: {
91
91
  delta: v.ObjectSchema<{
92
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
92
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
93
93
  }, undefined>;
94
94
  };
95
95
  sendDraft: {
96
96
  delta: v.ObjectSchema<{
97
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
97
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
98
98
  readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
99
99
  }, undefined>;
100
100
  };
101
101
  setContent: {
102
102
  delta: v.ObjectSchema<{
103
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
103
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
104
104
  readonly patch: v.ArraySchema<v.ObjectSchema<{
105
105
  readonly index: v.NumberSchema<undefined>;
106
106
  readonly type: v.UnionSchema<[v.LiteralSchema<"INSERTION", undefined>, v.LiteralSchema<"DELETION", undefined>], undefined>;
@@ -158,33 +158,33 @@ export declare const draft: {
158
158
  readonly issue: v.StringIssue | v.EmailIssue<string> | v.MaxLengthIssue<string, 255> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.ObjectIssue | v.ArrayIssue;
159
159
  } | undefined;
160
160
  };
161
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
161
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
162
162
  readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
163
163
  }, undefined>;
164
164
  };
165
165
  setFrom: {
166
166
  delta: v.ObjectSchema<{
167
- readonly aliasId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
168
- readonly emailAccountId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
167
+ readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
168
+ readonly emailAccountId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
169
169
  readonly from: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
170
170
  readonly fromName: v.NullableSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
171
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
171
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
172
172
  readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
173
173
  }, undefined>;
174
174
  };
175
175
  setScheduledFor: {
176
176
  delta: v.ObjectSchema<{
177
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
177
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
178
178
  readonly scheduledFor: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
179
179
  readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
180
180
  }, undefined>;
181
181
  };
182
182
  uploadAttachmentChunk: {
183
183
  delta: v.ObjectSchema<{
184
- readonly attachmentId: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
184
+ readonly attachmentId: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
185
185
  readonly chunk: v.SchemaWithPipe<[v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
186
186
  readonly chunkIndex: v.NonOptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
187
- readonly id: v.CustomSchema<string, v.ErrorMessage<v.CustomIssue> | undefined>;
187
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
188
188
  }, undefined>;
189
189
  };
190
190
  };
@@ -21,7 +21,7 @@ const bodySchema = v.object({
21
21
  const attachmentSchema = v.object({
22
22
  failed: v.boolean(),
23
23
  fileName: marcoSchemas.string.required(),
24
- id: marcoSchemas.string.shortUUID(),
24
+ id: marcoSchemas.string.required(),
25
25
  mimeType: marcoSchemas.string.required(),
26
26
  totalChunks: marcoSchemas.number.positiveInteger(),
27
27
  totalSize: marcoSchemas.number.positiveInteger(),
@@ -31,12 +31,12 @@ const scheduledForSchema = v.nullable(marcoSchemas.number.positiveInteger());
31
31
  const draftSchema = v.object({
32
32
  attachments: v.array(attachmentSchema),
33
33
  body: bodySchema,
34
- emailAccountId: marcoSchemas.string.shortUUID(),
34
+ emailAccountId: marcoSchemas.string.required(),
35
35
  error: v.nullable(v.string()),
36
36
  from: marcoSchemas.string.email(),
37
37
  fromName: marcoSchemas.string.nullable(),
38
- id: marcoSchemas.string.shortUUID(),
39
- referencedMessageId: v.nullable(marcoSchemas.string.shortUUID()),
38
+ id: marcoSchemas.string.required(),
39
+ referencedMessageId: v.nullable(marcoSchemas.string.required()),
40
40
  scheduledFor: scheduledForSchema,
41
41
  status: draftStatusSchema,
42
42
  type: draftTypeSchema,
@@ -47,14 +47,14 @@ export const draft = {
47
47
  mutators: {
48
48
  cancelDraftSend: {
49
49
  delta: v.object({
50
- id: marcoSchemas.string.shortUUID(),
50
+ id: marcoSchemas.string.required(),
51
51
  updatedAt: marcoSchemas.number.positiveInteger(),
52
52
  }),
53
53
  },
54
54
  createAttachment: {
55
55
  delta: v.object({
56
56
  attachment: attachmentSchema,
57
- id: marcoSchemas.string.shortUUID(),
57
+ id: marcoSchemas.string.required(),
58
58
  updatedAt: marcoSchemas.number.positiveInteger(),
59
59
  }),
60
60
  },
@@ -63,25 +63,25 @@ export const draft = {
63
63
  },
64
64
  deleteAttachment: {
65
65
  delta: v.object({
66
- attachmentId: marcoSchemas.string.shortUUID(),
67
- id: marcoSchemas.string.shortUUID(),
66
+ attachmentId: marcoSchemas.string.required(),
67
+ id: marcoSchemas.string.required(),
68
68
  updatedAt: marcoSchemas.number.positiveInteger(),
69
69
  }),
70
70
  },
71
71
  deleteDraft: {
72
72
  delta: v.object({
73
- id: marcoSchemas.string.shortUUID(),
73
+ id: marcoSchemas.string.required(),
74
74
  }),
75
75
  },
76
76
  sendDraft: {
77
77
  delta: v.object({
78
- id: marcoSchemas.string.shortUUID(),
78
+ id: marcoSchemas.string.required(),
79
79
  updatedAt: marcoSchemas.number.positiveInteger(),
80
80
  }),
81
81
  },
82
82
  setContent: {
83
83
  delta: v.object({
84
- id: marcoSchemas.string.shortUUID(),
84
+ id: marcoSchemas.string.required(),
85
85
  patch: marcoSchemas.drafts.contentPatch.patch(),
86
86
  updatedAt: marcoSchemas.number.positiveInteger(),
87
87
  }),
@@ -89,33 +89,33 @@ export const draft = {
89
89
  setEnvelope: {
90
90
  delta: v.object({
91
91
  envelope: v.omit(bodySchema, ['content']),
92
- id: marcoSchemas.string.shortUUID(),
92
+ id: marcoSchemas.string.required(),
93
93
  updatedAt: marcoSchemas.number.positiveInteger(),
94
94
  }),
95
95
  },
96
96
  setFrom: {
97
97
  delta: v.object({
98
- aliasId: marcoSchemas.string.shortUUID(),
99
- emailAccountId: marcoSchemas.string.shortUUID(),
98
+ aliasId: marcoSchemas.string.required(),
99
+ emailAccountId: marcoSchemas.string.required(),
100
100
  from: marcoSchemas.string.email(),
101
101
  fromName: marcoSchemas.string.nullable(),
102
- id: marcoSchemas.string.shortUUID(),
102
+ id: marcoSchemas.string.required(),
103
103
  updatedAt: marcoSchemas.number.positiveInteger(),
104
104
  }),
105
105
  },
106
106
  setScheduledFor: {
107
107
  delta: v.object({
108
- id: marcoSchemas.string.shortUUID(),
108
+ id: marcoSchemas.string.required(),
109
109
  scheduledFor: scheduledForSchema,
110
110
  updatedAt: marcoSchemas.number.positiveInteger(),
111
111
  }),
112
112
  },
113
113
  uploadAttachmentChunk: {
114
114
  delta: v.object({
115
- attachmentId: marcoSchemas.string.shortUUID(),
115
+ attachmentId: marcoSchemas.string.required(),
116
116
  chunk: v.pipe(v.string(), v.base64()),
117
117
  chunkIndex: marcoSchemas.number.positiveInteger(),
118
- id: marcoSchemas.string.shortUUID(),
118
+ id: marcoSchemas.string.required(),
119
119
  }),
120
120
  },
121
121
  },