@marcoappio/marco-config 2.0.507 → 2.0.509

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 (97) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/types/Zero.d.ts +0 -17
  4. package/dist/types/Zero.d.ts.map +1 -1
  5. package/dist/zero/index.d.ts +2916 -7769
  6. package/dist/zero/index.d.ts.map +1 -1
  7. package/dist/zero/index.js +6 -16
  8. package/dist/zero/{queries/getThreadList.d.ts → mutators.d.ts} +572 -169
  9. package/dist/zero/{queries/getThreads.d.ts.map → mutators.d.ts.map} +1 -1
  10. package/dist/zero/mutators.js +659 -0
  11. package/dist/zero/mutators.test.d.ts +2 -0
  12. package/dist/zero/mutators.test.d.ts.map +1 -0
  13. package/dist/zero/mutators.test.js +603 -0
  14. package/dist/zero/{queries/getThreads.d.ts → queries.d.ts} +481 -196
  15. package/dist/zero/{queries/getThread.d.ts.map → queries.d.ts.map} +1 -1
  16. package/dist/zero/queries.js +168 -0
  17. package/dist/zero/schema.d.ts +138 -133
  18. package/dist/zero/schema.d.ts.map +1 -1
  19. package/dist/zero/schema.js +1 -1
  20. package/package.json +3 -3
  21. package/dist/zero/mutatorSchemas/account.d.ts +0 -80
  22. package/dist/zero/mutatorSchemas/account.d.ts.map +0 -1
  23. package/dist/zero/mutatorSchemas/account.js +0 -66
  24. package/dist/zero/mutatorSchemas/draft.d.ts +0 -150
  25. package/dist/zero/mutatorSchemas/draft.d.ts.map +0 -1
  26. package/dist/zero/mutatorSchemas/draft.js +0 -104
  27. package/dist/zero/mutatorSchemas/index.d.ts +0 -323
  28. package/dist/zero/mutatorSchemas/index.d.ts.map +0 -1
  29. package/dist/zero/mutatorSchemas/index.js +0 -10
  30. package/dist/zero/mutatorSchemas/thread.d.ts +0 -71
  31. package/dist/zero/mutatorSchemas/thread.d.ts.map +0 -1
  32. package/dist/zero/mutatorSchemas/thread.js +0 -47
  33. package/dist/zero/mutatorSchemas/user.d.ts +0 -26
  34. package/dist/zero/mutatorSchemas/user.d.ts.map +0 -1
  35. package/dist/zero/mutatorSchemas/user.js +0 -27
  36. package/dist/zero/mutators/accountMutators/accountMutators.d.ts +0 -4
  37. package/dist/zero/mutators/accountMutators/accountMutators.d.ts.map +0 -1
  38. package/dist/zero/mutators/accountMutators/accountMutators.js +0 -103
  39. package/dist/zero/mutators/accountMutators/accountMutators.test.d.ts +0 -2
  40. package/dist/zero/mutators/accountMutators/accountMutators.test.d.ts.map +0 -1
  41. package/dist/zero/mutators/accountMutators/accountMutators.test.js +0 -372
  42. package/dist/zero/mutators/accountMutators/index.d.ts +0 -2
  43. package/dist/zero/mutators/accountMutators/index.d.ts.map +0 -1
  44. package/dist/zero/mutators/accountMutators/index.js +0 -1
  45. package/dist/zero/mutators/draftMutators/draftMutators.d.ts +0 -4
  46. package/dist/zero/mutators/draftMutators/draftMutators.d.ts.map +0 -1
  47. package/dist/zero/mutators/draftMutators/draftMutators.js +0 -142
  48. package/dist/zero/mutators/draftMutators/draftMutators.test.d.ts +0 -2
  49. package/dist/zero/mutators/draftMutators/draftMutators.test.d.ts.map +0 -1
  50. package/dist/zero/mutators/draftMutators/draftMutators.test.js +0 -416
  51. package/dist/zero/mutators/draftMutators/index.d.ts +0 -2
  52. package/dist/zero/mutators/draftMutators/index.d.ts.map +0 -1
  53. package/dist/zero/mutators/draftMutators/index.js +0 -1
  54. package/dist/zero/mutators/index.d.ts +0 -3
  55. package/dist/zero/mutators/index.d.ts.map +0 -1
  56. package/dist/zero/mutators/index.js +0 -1
  57. package/dist/zero/mutators/mutators.d.ts +0 -18
  58. package/dist/zero/mutators/mutators.d.ts.map +0 -1
  59. package/dist/zero/mutators/mutators.js +0 -39
  60. package/dist/zero/mutators/threadMutators/index.d.ts +0 -2
  61. package/dist/zero/mutators/threadMutators/index.d.ts.map +0 -1
  62. package/dist/zero/mutators/threadMutators/index.js +0 -1
  63. package/dist/zero/mutators/threadMutators/threadMutators.d.ts +0 -8
  64. package/dist/zero/mutators/threadMutators/threadMutators.d.ts.map +0 -1
  65. package/dist/zero/mutators/threadMutators/threadMutators.js +0 -257
  66. package/dist/zero/mutators/threadMutators/threadMutators.test.d.ts +0 -2
  67. package/dist/zero/mutators/threadMutators/threadMutators.test.d.ts.map +0 -1
  68. package/dist/zero/mutators/threadMutators/threadMutators.test.js +0 -755
  69. package/dist/zero/mutators/userMutators/index.d.ts +0 -2
  70. package/dist/zero/mutators/userMutators/index.d.ts.map +0 -1
  71. package/dist/zero/mutators/userMutators/index.js +0 -1
  72. package/dist/zero/mutators/userMutators/userMutators.d.ts +0 -4
  73. package/dist/zero/mutators/userMutators/userMutators.d.ts.map +0 -1
  74. package/dist/zero/mutators/userMutators/userMutators.js +0 -28
  75. package/dist/zero/mutators/userMutators/userMutators.test.d.ts +0 -2
  76. package/dist/zero/mutators/userMutators/userMutators.test.d.ts.map +0 -1
  77. package/dist/zero/mutators/userMutators/userMutators.test.js +0 -84
  78. package/dist/zero/queries/getAccounts.d.ts +0 -1060
  79. package/dist/zero/queries/getAccounts.d.ts.map +0 -1
  80. package/dist/zero/queries/getAccounts.js +0 -3
  81. package/dist/zero/queries/getContacts.d.ts +0 -1040
  82. package/dist/zero/queries/getContacts.d.ts.map +0 -1
  83. package/dist/zero/queries/getContacts.js +0 -37
  84. package/dist/zero/queries/getDrafts.d.ts +0 -1061
  85. package/dist/zero/queries/getDrafts.d.ts.map +0 -1
  86. package/dist/zero/queries/getDrafts.js +0 -24
  87. package/dist/zero/queries/getThread.d.ts +0 -1072
  88. package/dist/zero/queries/getThread.js +0 -14
  89. package/dist/zero/queries/getThreadList.d.ts.map +0 -1
  90. package/dist/zero/queries/getThreadList.js +0 -57
  91. package/dist/zero/queries/getThreads.js +0 -59
  92. package/dist/zero/queries/getUser.d.ts +0 -1074
  93. package/dist/zero/queries/getUser.d.ts.map +0 -1
  94. package/dist/zero/queries/getUser.js +0 -7
  95. package/dist/zero/queries/index.d.ts +0 -1031
  96. package/dist/zero/queries/index.d.ts.map +0 -1
  97. package/dist/zero/queries/index.js +0 -10
@@ -1 +0,0 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/zero/mutatorSchemas/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAU5B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DxB,CAAA"}
@@ -1,66 +0,0 @@
1
- import * as v from 'valibot';
2
- import { marcoSchemas } from '../../schemas';
3
- const accountAliasSchema = v.object({
4
- emailAddress: marcoSchemas.string.email(),
5
- id: marcoSchemas.string.required(),
6
- name: marcoSchemas.string.nullable(),
7
- });
8
- export const accountMutatorSchemas = {
9
- createAccount: {
10
- delta: v.object({
11
- aliasId: marcoSchemas.string.required(),
12
- color: marcoSchemas.string.required(),
13
- emailAddress: marcoSchemas.string.email(),
14
- id: marcoSchemas.string.required(),
15
- }),
16
- },
17
- createAlias: {
18
- delta: v.object({
19
- accountId: marcoSchemas.string.required(),
20
- alias: accountAliasSchema,
21
- }),
22
- },
23
- deleteAccount: {
24
- delta: v.object({
25
- id: marcoSchemas.string.required(),
26
- }),
27
- },
28
- deleteAlias: {
29
- delta: v.object({
30
- accountId: marcoSchemas.string.required(),
31
- aliasId: marcoSchemas.string.required(),
32
- }),
33
- },
34
- setAliasName: {
35
- delta: v.object({
36
- accountId: marcoSchemas.string.required(),
37
- aliasId: marcoSchemas.string.required(),
38
- displayName: marcoSchemas.string.nullable(),
39
- }),
40
- },
41
- setAliasPrimary: {
42
- delta: v.object({
43
- accountId: marcoSchemas.string.required(),
44
- aliasId: marcoSchemas.string.required(),
45
- }),
46
- },
47
- setConnectionConfigImapRaw: {
48
- delta: v.object({
49
- connectionConfig: marcoSchemas.emailAccount.connectionConfigImapRaw(),
50
- id: marcoSchemas.string.required(),
51
- }),
52
- },
53
- setConnectionConfigOauth: {
54
- delta: v.object({
55
- connectionConfig: marcoSchemas.emailAccount.connectionConfigOauth(),
56
- id: marcoSchemas.string.required(),
57
- }),
58
- },
59
- setSettings: {
60
- delta: v.object({
61
- color: v.optional(marcoSchemas.string.nullable()),
62
- displayName: v.optional(marcoSchemas.string.nullable()),
63
- id: marcoSchemas.string.required(),
64
- }),
65
- },
66
- };
@@ -1,150 +0,0 @@
1
- import * as v from 'valibot';
2
- export declare const draftMutatorSchemas: {
3
- readonly cancelSend: {
4
- readonly delta: v.ObjectSchema<{
5
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
6
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
7
- }, undefined>;
8
- };
9
- readonly createAttachment: {
10
- readonly delta: v.ObjectSchema<{
11
- readonly attachment: v.ObjectSchema<{
12
- readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
13
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
14
- readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
15
- readonly status: v.PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
16
- readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
17
- }, undefined>;
18
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
19
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
20
- }, undefined>;
21
- };
22
- readonly createDraft: {
23
- readonly delta: v.ObjectSchema<{
24
- readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
25
- readonly attachments: v.ArraySchema<v.ObjectSchema<{
26
- readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
27
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
28
- readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
29
- readonly status: v.PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
30
- readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
31
- }, undefined>, undefined>;
32
- readonly body: v.ObjectSchema<{
33
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
34
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
35
- readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
36
- readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
37
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
38
- }, undefined>;
39
- readonly error: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
40
- readonly from: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
41
- readonly fromName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
42
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
43
- readonly referencedMessageId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
44
- readonly scheduledFor: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
45
- readonly status: v.PicklistSchema<readonly ["DRAFT", "SEND_REQUESTED", "SEND_CONFIRMED", "SEND_FAILED"], undefined>;
46
- readonly type: v.PicklistSchema<readonly ["NEW", "REPLY", "FORWARD"], undefined>;
47
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
48
- }, undefined>;
49
- };
50
- readonly deleteAttachment: {
51
- readonly delta: v.ObjectSchema<{
52
- readonly attachmentId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
53
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
54
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
55
- }, undefined>;
56
- };
57
- readonly deleteDraft: {
58
- readonly delta: v.ObjectSchema<{
59
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
60
- }, undefined>;
61
- };
62
- readonly scheduleSend: {
63
- readonly delta: v.UnionSchema<[v.ObjectSchema<{
64
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
65
- readonly kind: v.LiteralSchema<"IMMEDIATE", undefined>;
66
- readonly undoMs: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
67
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
68
- }, undefined>, v.ObjectSchema<{
69
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
70
- readonly kind: v.LiteralSchema<"SCHEDULED", undefined>;
71
- readonly scheduledFor: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
72
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
73
- }, undefined>], undefined>;
74
- };
75
- readonly setContent: {
76
- readonly delta: v.ObjectSchema<{
77
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
78
- readonly patch: v.ArraySchema<v.ObjectSchema<{
79
- readonly index: v.NumberSchema<undefined>;
80
- readonly type: v.UnionSchema<[v.LiteralSchema<"INSERTION", undefined>, v.LiteralSchema<"DELETION", undefined>], undefined>;
81
- readonly value: v.StringSchema<undefined>;
82
- }, undefined>, undefined>;
83
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
84
- }, undefined>;
85
- };
86
- readonly setEnvelope: {
87
- readonly delta: v.ObjectSchema<{
88
- readonly envelope: Omit<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>, "~standard" | "~run" | "~types" | "entries"> & {
95
- readonly entries: Omit<{
96
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
97
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
98
- readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
99
- readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
100
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
101
- }, "content">;
102
- readonly '~standard': v.StandardProps<{
103
- bcc: string[];
104
- cc: string[];
105
- to: string[];
106
- subject: string | null;
107
- }, {
108
- bcc: string[];
109
- cc: string[];
110
- to: string[];
111
- subject: string | null;
112
- }>;
113
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
114
- bcc: string[];
115
- cc: string[];
116
- to: string[];
117
- subject: string | null;
118
- }, v.StringIssue | v.RfcEmailIssue<string> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.ObjectIssue | v.ArrayIssue | v.NonOptionalIssue>;
119
- readonly '~types'?: {
120
- readonly input: {
121
- bcc: string[];
122
- cc: string[];
123
- to: string[];
124
- subject: string | null;
125
- };
126
- readonly output: {
127
- bcc: string[];
128
- cc: string[];
129
- to: string[];
130
- subject: string | null;
131
- };
132
- readonly issue: v.StringIssue | v.RfcEmailIssue<string> | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.ObjectIssue | v.ArrayIssue | v.NonOptionalIssue;
133
- } | undefined;
134
- };
135
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
136
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
137
- }, undefined>;
138
- };
139
- readonly setFrom: {
140
- readonly delta: v.ObjectSchema<{
141
- readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
142
- readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
143
- readonly from: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
144
- readonly fromName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
145
- readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
146
- readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
147
- }, undefined>;
148
- };
149
- };
150
- //# sourceMappingURL=draft.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../src/zero/mutatorSchemas/draft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAsD5B,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDtB,CAAA"}
@@ -1,104 +0,0 @@
1
- import * as v from 'valibot';
2
- import { marcoSchemas } from '../../schemas';
3
- import { DRAFT_ATTACHMENT_UPLOAD_STATUSES, DRAFT_STATUSES, DRAFT_TYPES } from '../../types';
4
- const draftStatusSchema = v.picklist(DRAFT_STATUSES);
5
- const draftTypeSchema = v.picklist(DRAFT_TYPES);
6
- const draftBodySchema = v.object({
7
- bcc: v.array(marcoSchemas.string.email()),
8
- cc: v.array(marcoSchemas.string.email()),
9
- content: v.pipe(v.string(), v.maxLength(384000)),
10
- subject: marcoSchemas.string.nullable(),
11
- to: v.array(marcoSchemas.string.email()),
12
- });
13
- const draftAttachmentSchema = v.object({
14
- fileName: marcoSchemas.string.required(),
15
- id: marcoSchemas.string.required(),
16
- mimeType: marcoSchemas.string.required(),
17
- status: v.picklist(DRAFT_ATTACHMENT_UPLOAD_STATUSES),
18
- totalSize: marcoSchemas.number.positiveInteger(),
19
- });
20
- const draftScheduleSchema = v.union([
21
- v.object({
22
- id: marcoSchemas.string.required(),
23
- kind: v.literal('IMMEDIATE'),
24
- undoMs: marcoSchemas.number.positiveInteger(),
25
- updatedAt: marcoSchemas.number.positiveInteger(),
26
- }),
27
- v.object({
28
- id: marcoSchemas.string.required(),
29
- kind: v.literal('SCHEDULED'),
30
- scheduledFor: marcoSchemas.number.positiveInteger(),
31
- updatedAt: marcoSchemas.number.positiveInteger(),
32
- }),
33
- ]);
34
- const draftModelSchema = v.object({
35
- accountId: marcoSchemas.string.required(),
36
- attachments: v.array(draftAttachmentSchema),
37
- body: draftBodySchema,
38
- error: marcoSchemas.string.nullable(),
39
- from: marcoSchemas.string.email(),
40
- fromName: marcoSchemas.string.nullable(),
41
- id: marcoSchemas.string.required(),
42
- referencedMessageId: marcoSchemas.string.nullable(),
43
- scheduledFor: v.nullable(marcoSchemas.number.positiveInteger()),
44
- status: draftStatusSchema,
45
- type: draftTypeSchema,
46
- updatedAt: marcoSchemas.number.positiveInteger(),
47
- });
48
- export const draftMutatorSchemas = {
49
- cancelSend: {
50
- delta: v.object({
51
- id: marcoSchemas.string.required(),
52
- updatedAt: marcoSchemas.number.positiveInteger(),
53
- }),
54
- },
55
- createAttachment: {
56
- delta: v.object({
57
- attachment: draftAttachmentSchema,
58
- id: marcoSchemas.string.required(),
59
- updatedAt: marcoSchemas.number.positiveInteger(),
60
- }),
61
- },
62
- createDraft: {
63
- delta: draftModelSchema,
64
- },
65
- deleteAttachment: {
66
- delta: v.object({
67
- attachmentId: marcoSchemas.string.required(),
68
- id: marcoSchemas.string.required(),
69
- updatedAt: marcoSchemas.number.positiveInteger(),
70
- }),
71
- },
72
- deleteDraft: {
73
- delta: v.object({
74
- id: marcoSchemas.string.required(),
75
- }),
76
- },
77
- scheduleSend: {
78
- delta: draftScheduleSchema,
79
- },
80
- setContent: {
81
- delta: v.object({
82
- id: marcoSchemas.string.required(),
83
- patch: marcoSchemas.drafts.contentPatch.patch(),
84
- updatedAt: marcoSchemas.number.positiveInteger(),
85
- }),
86
- },
87
- setEnvelope: {
88
- delta: v.object({
89
- envelope: v.omit(draftBodySchema, ['content']),
90
- id: marcoSchemas.string.required(),
91
- updatedAt: marcoSchemas.number.positiveInteger(),
92
- }),
93
- },
94
- setFrom: {
95
- delta: v.object({
96
- accountId: marcoSchemas.string.required(),
97
- aliasId: marcoSchemas.string.required(),
98
- from: marcoSchemas.string.email(),
99
- fromName: marcoSchemas.string.nullable(),
100
- id: marcoSchemas.string.required(),
101
- updatedAt: marcoSchemas.number.positiveInteger(),
102
- }),
103
- },
104
- };