@marcoappio/marco-config 2.0.492 → 2.0.494
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/Zero.d.ts +8 -14
- package/dist/types/Zero.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -1
- package/dist/zero/crud.d.ts +1024 -0
- package/dist/zero/crud.d.ts.map +1 -0
- package/dist/zero/crud.js +3 -0
- package/dist/zero/index.d.ts +1621 -1447
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/index.js +2 -4
- package/dist/zero/mutators/accountMutators/accountMutators.d.ts +127 -3
- package/dist/zero/mutators/accountMutators/accountMutators.d.ts.map +1 -1
- package/dist/zero/mutators/accountMutators/accountMutators.js +88 -53
- package/dist/zero/mutators/draftMutators/draftMutators.d.ts +185 -3
- package/dist/zero/mutators/draftMutators/draftMutators.d.ts.map +1 -1
- package/dist/zero/mutators/draftMutators/draftMutators.js +124 -51
- package/dist/zero/mutators/index.d.ts +1 -1
- package/dist/zero/mutators/index.d.ts.map +1 -1
- package/dist/zero/mutators/index.js +1 -1
- package/dist/zero/mutators/mutators.d.ts +497 -17
- package/dist/zero/mutators/mutators.d.ts.map +1 -1
- package/dist/zero/mutators/mutators.js +10 -38
- package/dist/zero/mutators/threadMutators/threadMutators.d.ts +147 -6
- package/dist/zero/mutators/threadMutators/threadMutators.d.ts.map +1 -1
- package/dist/zero/mutators/threadMutators/threadMutators.js +79 -59
- package/dist/zero/mutators/userMutators/userMutators.d.ts +37 -3
- package/dist/zero/mutators/userMutators/userMutators.d.ts.map +1 -1
- package/dist/zero/mutators/userMutators/userMutators.js +32 -14
- package/dist/zero/queries/getAccounts.d.ts +135 -135
- package/dist/zero/queries/getContacts.d.ts +135 -135
- package/dist/zero/queries/getDrafts.d.ts +135 -135
- package/dist/zero/queries/getThread.d.ts +135 -135
- package/dist/zero/queries/getThreadList.d.ts +135 -135
- package/dist/zero/queries/getThreads.d.ts +135 -135
- package/dist/zero/queries/getUser.d.ts +135 -135
- package/dist/zero/queries/index.d.ts +133 -133
- package/dist/zero/schema.d.ts +133 -133
- package/dist/zero/schema.d.ts.map +1 -1
- package/dist/zero/schema.js +0 -1
- package/package.json +2 -2
- package/dist/types/AuthData.d.ts +0 -4
- package/dist/types/AuthData.d.ts.map +0 -1
- package/dist/types/AuthData.js +0 -1
- package/dist/zero/mutatorSchemas/account.d.ts +0 -80
- package/dist/zero/mutatorSchemas/account.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/account.js +0 -66
- package/dist/zero/mutatorSchemas/draft.d.ts +0 -150
- package/dist/zero/mutatorSchemas/draft.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/draft.js +0 -104
- package/dist/zero/mutatorSchemas/index.d.ts +0 -323
- package/dist/zero/mutatorSchemas/index.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/index.js +0 -10
- package/dist/zero/mutatorSchemas/thread.d.ts +0 -71
- package/dist/zero/mutatorSchemas/thread.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/thread.js +0 -47
- package/dist/zero/mutatorSchemas/user.d.ts +0 -26
- package/dist/zero/mutatorSchemas/user.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/user.js +0 -27
- package/dist/zero/mutators/accountMutators/accountMutators.test.d.ts +0 -2
- package/dist/zero/mutators/accountMutators/accountMutators.test.d.ts.map +0 -1
- package/dist/zero/mutators/accountMutators/accountMutators.test.js +0 -372
- package/dist/zero/mutators/draftMutators/draftMutators.test.d.ts +0 -2
- package/dist/zero/mutators/draftMutators/draftMutators.test.d.ts.map +0 -1
- package/dist/zero/mutators/draftMutators/draftMutators.test.js +0 -416
- package/dist/zero/mutators/threadMutators/threadMutators.test.d.ts +0 -2
- package/dist/zero/mutators/threadMutators/threadMutators.test.d.ts.map +0 -1
- package/dist/zero/mutators/threadMutators/threadMutators.test.js +0 -755
- package/dist/zero/mutators/userMutators/userMutators.test.d.ts +0 -2
- package/dist/zero/mutators/userMutators/userMutators.test.d.ts.map +0 -1
- package/dist/zero/mutators/userMutators/userMutators.test.js +0 -84
|
@@ -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.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
|
|
34
|
-
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, 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.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, 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.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, 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.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
|
|
90
|
-
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, 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.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, 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.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
|
|
97
|
-
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, 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.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, 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.EmailIssue<string> | v.MaxLengthIssue<string, 255> | 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.EmailIssue<string> | v.MaxLengthIssue<string, 255> | 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.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, 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
|
-
};
|