@marcoappio/marco-config 2.0.575 → 2.0.577
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/appwrite/commands.d.ts +345 -0
- package/dist/appwrite/commands.d.ts.map +1 -0
- package/dist/appwrite/commands.js +237 -0
- package/dist/appwrite/commands.test.d.ts +2 -0
- package/dist/appwrite/commands.test.d.ts.map +1 -0
- package/dist/appwrite/commands.test.js +381 -0
- package/dist/appwrite/index.d.ts +1 -0
- package/dist/appwrite/index.d.ts.map +1 -1
- package/dist/appwrite/index.js +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/mutators/mutatorSchemas.d.ts +2 -2
- package/dist/sdk/endpoints/private/mutations/draft/setEnvelope.d.ts +2 -2
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const appwriteCommands: {
|
|
3
|
+
readonly errorCodes: readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "COMMAND_CONFLICT", "COMMAND_NOT_FOUND", "INVALID_COMMAND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"];
|
|
4
|
+
readonly errorSchema: v.StrictObjectSchema<{
|
|
5
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "COMMAND_CONFLICT", "COMMAND_NOT_FOUND", "INVALID_COMMAND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
6
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
7
|
+
}, undefined>;
|
|
8
|
+
readonly kinds: readonly ["profile.settings.set", "account.settings.set", "account.delete", "alias.create", "alias.delete", "alias.name.set", "alias.primary.set", "alias.signature.set", "label.create", "label.delete", "label.rename", "thread.label.add", "thread.label.remove", "thread.archive.set", "thread.flagged.set", "thread.seen.set", "thread.snooze.set", "thread.spam.set", "thread.trash.set", "thread.delete", "draft.create", "draft.content.set", "draft.envelope.set", "draft.from.set", "draft.delete", "draft.attachment.link", "draft.attachment.delete", "draft.send", "draft.send.cancel", "draft.send.schedule"];
|
|
9
|
+
readonly requestSchema: v.VariantSchema<"kind", readonly [v.StrictObjectSchema<{
|
|
10
|
+
readonly accountId: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>, undefined>;
|
|
11
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
12
|
+
readonly kind: v.LiteralSchema<"profile.settings.set", undefined>;
|
|
13
|
+
readonly payload: v.StrictObjectSchema<{
|
|
14
|
+
readonly name: v.OptionalSchema<v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>, undefined>;
|
|
15
|
+
readonly timezone: v.OptionalSchema<v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>, undefined>;
|
|
16
|
+
}, undefined>;
|
|
17
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
18
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
19
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
20
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
21
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
22
|
+
readonly kind: v.LiteralSchema<"account.settings.set", undefined>;
|
|
23
|
+
readonly payload: v.StrictObjectSchema<{
|
|
24
|
+
readonly colour: v.OptionalSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
25
|
+
readonly displayName: v.OptionalSchema<v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>, undefined>;
|
|
26
|
+
}, undefined>;
|
|
27
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
28
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
29
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
30
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
31
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
32
|
+
readonly kind: v.LiteralSchema<"account.delete", undefined>;
|
|
33
|
+
readonly payload: v.StrictObjectSchema<{}, undefined>;
|
|
34
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
35
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
36
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
37
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
38
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
39
|
+
readonly kind: v.LiteralSchema<"alias.create", undefined>;
|
|
40
|
+
readonly payload: v.StrictObjectSchema<{
|
|
41
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
42
|
+
readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
43
|
+
readonly name: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
44
|
+
readonly signature: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 50000, undefined>]>, undefined>;
|
|
45
|
+
}, undefined>;
|
|
46
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
47
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
48
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
49
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
50
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
51
|
+
readonly kind: v.LiteralSchema<"alias.delete", undefined>;
|
|
52
|
+
readonly payload: v.StrictObjectSchema<{
|
|
53
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
54
|
+
}, undefined>;
|
|
55
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
56
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
57
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
58
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
59
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
60
|
+
readonly kind: v.LiteralSchema<"alias.name.set", undefined>;
|
|
61
|
+
readonly payload: v.StrictObjectSchema<{
|
|
62
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
63
|
+
readonly name: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
64
|
+
}, undefined>;
|
|
65
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
66
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
67
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
68
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
69
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
70
|
+
readonly kind: v.LiteralSchema<"alias.primary.set", undefined>;
|
|
71
|
+
readonly payload: v.StrictObjectSchema<{
|
|
72
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
73
|
+
}, undefined>;
|
|
74
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
75
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
76
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
77
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
78
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
79
|
+
readonly kind: v.LiteralSchema<"alias.signature.set", undefined>;
|
|
80
|
+
readonly payload: v.StrictObjectSchema<{
|
|
81
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
82
|
+
readonly signature: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 50000, undefined>]>, undefined>;
|
|
83
|
+
}, undefined>;
|
|
84
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
85
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
86
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
87
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
88
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
89
|
+
readonly kind: v.LiteralSchema<"label.create", undefined>;
|
|
90
|
+
readonly payload: v.StrictObjectSchema<{
|
|
91
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
92
|
+
readonly path: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
93
|
+
}, undefined>;
|
|
94
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
95
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
96
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
97
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
98
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
99
|
+
readonly kind: v.LiteralSchema<"label.delete", undefined>;
|
|
100
|
+
readonly payload: v.StrictObjectSchema<{
|
|
101
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
102
|
+
}, undefined>;
|
|
103
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
104
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
105
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
106
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
107
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
108
|
+
readonly kind: v.LiteralSchema<"label.rename", undefined>;
|
|
109
|
+
readonly payload: v.StrictObjectSchema<{
|
|
110
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
111
|
+
readonly path: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
112
|
+
}, undefined>;
|
|
113
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
114
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
115
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
116
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
117
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
118
|
+
readonly kind: v.LiteralSchema<"thread.label.add", undefined>;
|
|
119
|
+
readonly payload: v.StrictObjectSchema<{
|
|
120
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
121
|
+
readonly threadIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>, undefined>, v.MinLengthAction<(string & v.Brand<"ThreadId">)[], 1, undefined>]>;
|
|
122
|
+
}, undefined>;
|
|
123
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
124
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
125
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
126
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
127
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
128
|
+
readonly kind: v.LiteralSchema<"thread.label.remove", undefined>;
|
|
129
|
+
readonly payload: v.StrictObjectSchema<{
|
|
130
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
131
|
+
readonly threadIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>, undefined>, v.MinLengthAction<(string & v.Brand<"ThreadId">)[], 1, undefined>]>;
|
|
132
|
+
}, undefined>;
|
|
133
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
134
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
135
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
136
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
137
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
138
|
+
readonly kind: v.LiteralSchema<"thread.archive.set", undefined>;
|
|
139
|
+
readonly payload: v.StrictObjectSchema<{
|
|
140
|
+
readonly archived: v.BooleanSchema<undefined>;
|
|
141
|
+
readonly threadIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>, undefined>, v.MinLengthAction<(string & v.Brand<"ThreadId">)[], 1, undefined>]>;
|
|
142
|
+
}, undefined>;
|
|
143
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
144
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
145
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
146
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
147
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
148
|
+
readonly kind: v.LiteralSchema<"thread.flagged.set", undefined>;
|
|
149
|
+
readonly payload: v.StrictObjectSchema<{
|
|
150
|
+
readonly flagged: v.BooleanSchema<undefined>;
|
|
151
|
+
readonly threadIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>, undefined>, v.MinLengthAction<(string & v.Brand<"ThreadId">)[], 1, undefined>]>;
|
|
152
|
+
}, undefined>;
|
|
153
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
154
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
155
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
156
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
157
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
158
|
+
readonly kind: v.LiteralSchema<"thread.seen.set", undefined>;
|
|
159
|
+
readonly payload: v.StrictObjectSchema<{
|
|
160
|
+
readonly seen: v.BooleanSchema<undefined>;
|
|
161
|
+
readonly threadIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>, undefined>, v.MinLengthAction<(string & v.Brand<"ThreadId">)[], 1, undefined>]>;
|
|
162
|
+
}, undefined>;
|
|
163
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
164
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
165
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
166
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
167
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
168
|
+
readonly kind: v.LiteralSchema<"thread.snooze.set", undefined>;
|
|
169
|
+
readonly payload: v.StrictObjectSchema<{
|
|
170
|
+
readonly snoozedUntil: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
171
|
+
readonly threadIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>, undefined>, v.MinLengthAction<(string & v.Brand<"ThreadId">)[], 1, undefined>]>;
|
|
172
|
+
}, undefined>;
|
|
173
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
174
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
175
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
176
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
177
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
178
|
+
readonly kind: v.LiteralSchema<"thread.spam.set", undefined>;
|
|
179
|
+
readonly payload: v.StrictObjectSchema<{
|
|
180
|
+
readonly spam: v.BooleanSchema<undefined>;
|
|
181
|
+
readonly threadIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>, undefined>, v.MinLengthAction<(string & v.Brand<"ThreadId">)[], 1, undefined>]>;
|
|
182
|
+
}, undefined>;
|
|
183
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
184
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
185
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
186
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
187
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
188
|
+
readonly kind: v.LiteralSchema<"thread.trash.set", undefined>;
|
|
189
|
+
readonly payload: v.StrictObjectSchema<{
|
|
190
|
+
readonly threadIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>, undefined>, v.MinLengthAction<(string & v.Brand<"ThreadId">)[], 1, undefined>]>;
|
|
191
|
+
readonly trashed: v.BooleanSchema<undefined>;
|
|
192
|
+
}, undefined>;
|
|
193
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
194
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
195
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
196
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
197
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
198
|
+
readonly kind: v.LiteralSchema<"thread.delete", undefined>;
|
|
199
|
+
readonly payload: v.StrictObjectSchema<{
|
|
200
|
+
readonly threadIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>, undefined>, v.MinLengthAction<(string & v.Brand<"ThreadId">)[], 1, undefined>]>;
|
|
201
|
+
}, undefined>;
|
|
202
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
203
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
204
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
205
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
206
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
207
|
+
readonly kind: v.LiteralSchema<"draft.create", undefined>;
|
|
208
|
+
readonly payload: v.StrictObjectSchema<{
|
|
209
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
210
|
+
readonly fromAliasId: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>, undefined>;
|
|
211
|
+
readonly referencedMessageId: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>, undefined>;
|
|
212
|
+
readonly type: v.PicklistSchema<readonly ["NEW", "REPLY", "FORWARD"], undefined>;
|
|
213
|
+
}, undefined>;
|
|
214
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
215
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
216
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
217
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
218
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
219
|
+
readonly kind: v.LiteralSchema<"draft.content.set", undefined>;
|
|
220
|
+
readonly payload: v.StrictObjectSchema<{
|
|
221
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
222
|
+
readonly html: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
|
|
223
|
+
}, undefined>;
|
|
224
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
225
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
226
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
227
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
228
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
229
|
+
readonly kind: v.LiteralSchema<"draft.envelope.set", undefined>;
|
|
230
|
+
readonly payload: v.StrictObjectSchema<{
|
|
231
|
+
readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
232
|
+
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
233
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
234
|
+
readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 998, undefined>]>, undefined>;
|
|
235
|
+
readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
236
|
+
}, undefined>;
|
|
237
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
238
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
239
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
240
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
241
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
242
|
+
readonly kind: v.LiteralSchema<"draft.from.set", undefined>;
|
|
243
|
+
readonly payload: v.StrictObjectSchema<{
|
|
244
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
245
|
+
readonly fromAliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
246
|
+
}, undefined>;
|
|
247
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
248
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
249
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
250
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
251
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
252
|
+
readonly kind: v.LiteralSchema<"draft.delete", undefined>;
|
|
253
|
+
readonly payload: v.StrictObjectSchema<{
|
|
254
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
255
|
+
}, undefined>;
|
|
256
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
257
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
258
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
259
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
260
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
261
|
+
readonly kind: v.LiteralSchema<"draft.attachment.link", undefined>;
|
|
262
|
+
readonly payload: v.StrictObjectSchema<{
|
|
263
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
264
|
+
readonly fileId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
265
|
+
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
266
|
+
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
267
|
+
readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
268
|
+
}, undefined>;
|
|
269
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
270
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
271
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
272
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
273
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
274
|
+
readonly kind: v.LiteralSchema<"draft.attachment.delete", undefined>;
|
|
275
|
+
readonly payload: v.StrictObjectSchema<{
|
|
276
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
277
|
+
readonly fileId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
278
|
+
}, undefined>;
|
|
279
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
280
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
281
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
282
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
283
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
284
|
+
readonly kind: v.LiteralSchema<"draft.send", undefined>;
|
|
285
|
+
readonly payload: v.StrictObjectSchema<{
|
|
286
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
287
|
+
}, undefined>;
|
|
288
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
289
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
290
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
291
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
292
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
293
|
+
readonly kind: v.LiteralSchema<"draft.send.cancel", undefined>;
|
|
294
|
+
readonly payload: v.StrictObjectSchema<{
|
|
295
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
296
|
+
}, undefined>;
|
|
297
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
298
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
299
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
300
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
301
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
302
|
+
readonly kind: v.LiteralSchema<"draft.send.schedule", undefined>;
|
|
303
|
+
readonly payload: v.StrictObjectSchema<{
|
|
304
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
305
|
+
readonly scheduledAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
306
|
+
}, undefined>;
|
|
307
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
308
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
309
|
+
}, undefined>], undefined>;
|
|
310
|
+
readonly responseSchema: v.VariantSchema<"state", readonly [v.StrictObjectSchema<{
|
|
311
|
+
readonly canonicalRevision: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
312
|
+
readonly error: v.NullSchema<undefined>;
|
|
313
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
314
|
+
readonly state: v.LiteralSchema<"ACCEPTED", undefined>;
|
|
315
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
316
|
+
readonly canonicalRevision: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
317
|
+
readonly error: v.NullSchema<undefined>;
|
|
318
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
319
|
+
readonly state: v.LiteralSchema<"RUNNING", undefined>;
|
|
320
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
321
|
+
readonly canonicalRevision: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
322
|
+
readonly error: v.NullSchema<undefined>;
|
|
323
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
324
|
+
readonly state: v.LiteralSchema<"SUCCEEDED", undefined>;
|
|
325
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
326
|
+
readonly canonicalRevision: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
327
|
+
readonly error: v.StrictObjectSchema<{
|
|
328
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "COMMAND_CONFLICT", "COMMAND_NOT_FOUND", "INVALID_COMMAND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
329
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
330
|
+
}, undefined>;
|
|
331
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
332
|
+
readonly state: v.LiteralSchema<"FAILED", undefined>;
|
|
333
|
+
}, undefined>], undefined>;
|
|
334
|
+
readonly states: readonly ["ACCEPTED", "RUNNING", "SUCCEEDED", "FAILED"];
|
|
335
|
+
readonly version: 1;
|
|
336
|
+
};
|
|
337
|
+
export type AppwriteCommandError = v.InferOutput<typeof appwriteCommands.errorSchema>;
|
|
338
|
+
export type AppwriteCommandRequest = v.InferOutput<typeof appwriteCommands.requestSchema>;
|
|
339
|
+
export type AppwriteCommandKind = AppwriteCommandRequest['kind'];
|
|
340
|
+
export type AppwriteCommandPayload<TKind extends AppwriteCommandKind> = Extract<AppwriteCommandRequest, {
|
|
341
|
+
kind: TKind;
|
|
342
|
+
}>['payload'];
|
|
343
|
+
export type AppwriteCommandResponse = v.InferOutput<typeof appwriteCommands.responseSchema>;
|
|
344
|
+
export type AppwriteCommandState = AppwriteCommandResponse['state'];
|
|
345
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/appwrite/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAiQ5B,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnB,CAAA;AAEV,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,WAAW,CAAC,CAAA;AACrF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,aAAa,CAAC,CAAA;AACzF,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAA;AAChE,MAAM,MAAM,sBAAsB,CAAC,KAAK,SAAS,mBAAmB,IAAI,OAAO,CAC7E,sBAAsB,EACtB;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAChB,CAAC,SAAS,CAAC,CAAA;AACZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,cAAc,CAAC,CAAA;AAC3F,MAAM,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { id } from '../schemas/id';
|
|
3
|
+
import { string } from '../schemas/string';
|
|
4
|
+
import { DRAFT_TYPES } from '../types';
|
|
5
|
+
const commandIdSchema = v.pipe(v.string(), v.uuid(), v.brand('CommandId'));
|
|
6
|
+
const nonNegativeIntegerSchema = v.pipe(v.number(), v.integer(), v.minValue(0));
|
|
7
|
+
const timestampSchema = v.pipe(v.string(), v.isoTimestamp());
|
|
8
|
+
const threadIdsSchema = v.pipe(v.array(id.threadId.required()), v.minLength(1));
|
|
9
|
+
const commandKinds = {
|
|
10
|
+
accountDelete: 'account.delete',
|
|
11
|
+
accountSettingsSet: 'account.settings.set',
|
|
12
|
+
aliasCreate: 'alias.create',
|
|
13
|
+
aliasDelete: 'alias.delete',
|
|
14
|
+
aliasNameSet: 'alias.name.set',
|
|
15
|
+
aliasPrimarySet: 'alias.primary.set',
|
|
16
|
+
aliasSignatureSet: 'alias.signature.set',
|
|
17
|
+
draftAttachmentDelete: 'draft.attachment.delete',
|
|
18
|
+
draftAttachmentLink: 'draft.attachment.link',
|
|
19
|
+
draftContentSet: 'draft.content.set',
|
|
20
|
+
draftCreate: 'draft.create',
|
|
21
|
+
draftDelete: 'draft.delete',
|
|
22
|
+
draftEnvelopeSet: 'draft.envelope.set',
|
|
23
|
+
draftFromSet: 'draft.from.set',
|
|
24
|
+
draftSend: 'draft.send',
|
|
25
|
+
draftSendCancel: 'draft.send.cancel',
|
|
26
|
+
draftSendSchedule: 'draft.send.schedule',
|
|
27
|
+
labelCreate: 'label.create',
|
|
28
|
+
labelDelete: 'label.delete',
|
|
29
|
+
labelRename: 'label.rename',
|
|
30
|
+
profileSettingsSet: 'profile.settings.set',
|
|
31
|
+
threadArchiveSet: 'thread.archive.set',
|
|
32
|
+
threadDelete: 'thread.delete',
|
|
33
|
+
threadFlaggedSet: 'thread.flagged.set',
|
|
34
|
+
threadLabelAdd: 'thread.label.add',
|
|
35
|
+
threadLabelRemove: 'thread.label.remove',
|
|
36
|
+
threadSeenSet: 'thread.seen.set',
|
|
37
|
+
threadSnoozeSet: 'thread.snooze.set',
|
|
38
|
+
threadSpamSet: 'thread.spam.set',
|
|
39
|
+
threadTrashSet: 'thread.trash.set',
|
|
40
|
+
};
|
|
41
|
+
const appwriteCommandKinds = [
|
|
42
|
+
commandKinds.profileSettingsSet,
|
|
43
|
+
commandKinds.accountSettingsSet,
|
|
44
|
+
commandKinds.accountDelete,
|
|
45
|
+
commandKinds.aliasCreate,
|
|
46
|
+
commandKinds.aliasDelete,
|
|
47
|
+
commandKinds.aliasNameSet,
|
|
48
|
+
commandKinds.aliasPrimarySet,
|
|
49
|
+
commandKinds.aliasSignatureSet,
|
|
50
|
+
commandKinds.labelCreate,
|
|
51
|
+
commandKinds.labelDelete,
|
|
52
|
+
commandKinds.labelRename,
|
|
53
|
+
commandKinds.threadLabelAdd,
|
|
54
|
+
commandKinds.threadLabelRemove,
|
|
55
|
+
commandKinds.threadArchiveSet,
|
|
56
|
+
commandKinds.threadFlaggedSet,
|
|
57
|
+
commandKinds.threadSeenSet,
|
|
58
|
+
commandKinds.threadSnoozeSet,
|
|
59
|
+
commandKinds.threadSpamSet,
|
|
60
|
+
commandKinds.threadTrashSet,
|
|
61
|
+
commandKinds.threadDelete,
|
|
62
|
+
commandKinds.draftCreate,
|
|
63
|
+
commandKinds.draftContentSet,
|
|
64
|
+
commandKinds.draftEnvelopeSet,
|
|
65
|
+
commandKinds.draftFromSet,
|
|
66
|
+
commandKinds.draftDelete,
|
|
67
|
+
commandKinds.draftAttachmentLink,
|
|
68
|
+
commandKinds.draftAttachmentDelete,
|
|
69
|
+
commandKinds.draftSend,
|
|
70
|
+
commandKinds.draftSendCancel,
|
|
71
|
+
commandKinds.draftSendSchedule,
|
|
72
|
+
];
|
|
73
|
+
const commandStates = ['ACCEPTED', 'RUNNING', 'SUCCEEDED', 'FAILED'];
|
|
74
|
+
const commandErrorCodes = [
|
|
75
|
+
'AUTHENTICATION_FAILED',
|
|
76
|
+
'AUTHORIZATION_FAILED',
|
|
77
|
+
'COMMAND_CONFLICT',
|
|
78
|
+
'COMMAND_NOT_FOUND',
|
|
79
|
+
'INVALID_COMMAND',
|
|
80
|
+
'PROVIDER_REJECTED',
|
|
81
|
+
'TRANSIENT_FAILURE',
|
|
82
|
+
'INTERNAL_ERROR',
|
|
83
|
+
];
|
|
84
|
+
const accountIdSchema = id.accountId.required();
|
|
85
|
+
const createCommandRequestSchema = (kind, payload, accountId) => v.strictObject({
|
|
86
|
+
accountId,
|
|
87
|
+
id: commandIdSchema,
|
|
88
|
+
kind: v.literal(kind),
|
|
89
|
+
payload,
|
|
90
|
+
submittedAt: timestampSchema,
|
|
91
|
+
version: v.literal(1),
|
|
92
|
+
});
|
|
93
|
+
const createAccountCommandRequestSchema = (kind, payload) => createCommandRequestSchema(kind, payload, accountIdSchema);
|
|
94
|
+
const profileSettingsSetPayloadSchema = v.strictObject({
|
|
95
|
+
name: v.optional(v.nullable(string.required())),
|
|
96
|
+
timezone: v.optional(v.nullable(string.required())),
|
|
97
|
+
});
|
|
98
|
+
const accountSettingsSetPayloadSchema = v.strictObject({
|
|
99
|
+
colour: v.optional(string.required(64)),
|
|
100
|
+
displayName: v.optional(v.nullable(string.required())),
|
|
101
|
+
});
|
|
102
|
+
const accountDeletePayloadSchema = v.strictObject({});
|
|
103
|
+
const aliasCreatePayloadSchema = v.strictObject({
|
|
104
|
+
aliasId: id.aliasId.required(),
|
|
105
|
+
email: string.email(),
|
|
106
|
+
name: v.nullable(string.required()),
|
|
107
|
+
signature: v.nullable(v.pipe(v.string(), v.maxLength(50_000))),
|
|
108
|
+
});
|
|
109
|
+
const aliasDeletePayloadSchema = v.strictObject({ aliasId: id.aliasId.required() });
|
|
110
|
+
const aliasNameSetPayloadSchema = v.strictObject({
|
|
111
|
+
aliasId: id.aliasId.required(),
|
|
112
|
+
name: v.nullable(string.required()),
|
|
113
|
+
});
|
|
114
|
+
const aliasPrimarySetPayloadSchema = v.strictObject({ aliasId: id.aliasId.required() });
|
|
115
|
+
const aliasSignatureSetPayloadSchema = v.strictObject({
|
|
116
|
+
aliasId: id.aliasId.required(),
|
|
117
|
+
signature: v.nullable(v.pipe(v.string(), v.maxLength(50_000))),
|
|
118
|
+
});
|
|
119
|
+
const labelCreatePayloadSchema = v.strictObject({ labelId: id.labelId.required(), path: string.required() });
|
|
120
|
+
const labelDeletePayloadSchema = v.strictObject({ labelId: id.labelId.required() });
|
|
121
|
+
const labelRenamePayloadSchema = v.strictObject({ labelId: id.labelId.required(), path: string.required() });
|
|
122
|
+
const threadLabelAddPayloadSchema = v.strictObject({ labelId: id.labelId.required(), threadIds: threadIdsSchema });
|
|
123
|
+
const threadLabelRemovePayloadSchema = v.strictObject({ labelId: id.labelId.required(), threadIds: threadIdsSchema });
|
|
124
|
+
const threadArchiveSetPayloadSchema = v.strictObject({ archived: v.boolean(), threadIds: threadIdsSchema });
|
|
125
|
+
const threadFlaggedSetPayloadSchema = v.strictObject({ flagged: v.boolean(), threadIds: threadIdsSchema });
|
|
126
|
+
const threadSeenSetPayloadSchema = v.strictObject({ seen: v.boolean(), threadIds: threadIdsSchema });
|
|
127
|
+
const threadSnoozeSetPayloadSchema = v.strictObject({
|
|
128
|
+
snoozedUntil: v.nullable(timestampSchema),
|
|
129
|
+
threadIds: threadIdsSchema,
|
|
130
|
+
});
|
|
131
|
+
const threadSpamSetPayloadSchema = v.strictObject({ spam: v.boolean(), threadIds: threadIdsSchema });
|
|
132
|
+
const threadTrashSetPayloadSchema = v.strictObject({ threadIds: threadIdsSchema, trashed: v.boolean() });
|
|
133
|
+
const threadDeletePayloadSchema = v.strictObject({ threadIds: threadIdsSchema });
|
|
134
|
+
const draftCreatePayloadSchema = v.strictObject({
|
|
135
|
+
draftId: id.draftId.required(),
|
|
136
|
+
fromAliasId: v.nullable(id.aliasId.required()),
|
|
137
|
+
referencedMessageId: v.nullable(id.messageId.required()),
|
|
138
|
+
type: v.picklist(DRAFT_TYPES),
|
|
139
|
+
});
|
|
140
|
+
const draftContentSetPayloadSchema = v.strictObject({
|
|
141
|
+
draftId: id.draftId.required(),
|
|
142
|
+
html: v.pipe(v.string(), v.maxLength(384_000)),
|
|
143
|
+
});
|
|
144
|
+
const draftEnvelopeSetPayloadSchema = v.strictObject({
|
|
145
|
+
bcc: v.array(string.email()),
|
|
146
|
+
cc: v.array(string.email()),
|
|
147
|
+
draftId: id.draftId.required(),
|
|
148
|
+
subject: v.nullable(v.pipe(v.string(), v.maxLength(998))),
|
|
149
|
+
to: v.array(string.email()),
|
|
150
|
+
});
|
|
151
|
+
const draftFromSetPayloadSchema = v.strictObject({ draftId: id.draftId.required(), fromAliasId: id.aliasId.required() });
|
|
152
|
+
const draftDeletePayloadSchema = v.strictObject({ draftId: id.draftId.required() });
|
|
153
|
+
const draftAttachmentLinkPayloadSchema = v.strictObject({
|
|
154
|
+
draftId: id.draftId.required(),
|
|
155
|
+
fileId: string.required(36),
|
|
156
|
+
fileName: string.required(),
|
|
157
|
+
mimeType: string.required(),
|
|
158
|
+
size: nonNegativeIntegerSchema,
|
|
159
|
+
});
|
|
160
|
+
const draftAttachmentDeletePayloadSchema = v.strictObject({
|
|
161
|
+
draftId: id.draftId.required(),
|
|
162
|
+
fileId: string.required(36),
|
|
163
|
+
});
|
|
164
|
+
const draftSendPayloadSchema = v.strictObject({ draftId: id.draftId.required() });
|
|
165
|
+
const draftSendCancelPayloadSchema = v.strictObject({ draftId: id.draftId.required() });
|
|
166
|
+
const draftSendSchedulePayloadSchema = v.strictObject({ draftId: id.draftId.required(), scheduledAt: timestampSchema });
|
|
167
|
+
const commandRequestSchemas = [
|
|
168
|
+
createCommandRequestSchema(commandKinds.profileSettingsSet, profileSettingsSetPayloadSchema, v.nullable(accountIdSchema)),
|
|
169
|
+
createAccountCommandRequestSchema(commandKinds.accountSettingsSet, accountSettingsSetPayloadSchema),
|
|
170
|
+
createAccountCommandRequestSchema(commandKinds.accountDelete, accountDeletePayloadSchema),
|
|
171
|
+
createAccountCommandRequestSchema(commandKinds.aliasCreate, aliasCreatePayloadSchema),
|
|
172
|
+
createAccountCommandRequestSchema(commandKinds.aliasDelete, aliasDeletePayloadSchema),
|
|
173
|
+
createAccountCommandRequestSchema(commandKinds.aliasNameSet, aliasNameSetPayloadSchema),
|
|
174
|
+
createAccountCommandRequestSchema(commandKinds.aliasPrimarySet, aliasPrimarySetPayloadSchema),
|
|
175
|
+
createAccountCommandRequestSchema(commandKinds.aliasSignatureSet, aliasSignatureSetPayloadSchema),
|
|
176
|
+
createAccountCommandRequestSchema(commandKinds.labelCreate, labelCreatePayloadSchema),
|
|
177
|
+
createAccountCommandRequestSchema(commandKinds.labelDelete, labelDeletePayloadSchema),
|
|
178
|
+
createAccountCommandRequestSchema(commandKinds.labelRename, labelRenamePayloadSchema),
|
|
179
|
+
createAccountCommandRequestSchema(commandKinds.threadLabelAdd, threadLabelAddPayloadSchema),
|
|
180
|
+
createAccountCommandRequestSchema(commandKinds.threadLabelRemove, threadLabelRemovePayloadSchema),
|
|
181
|
+
createAccountCommandRequestSchema(commandKinds.threadArchiveSet, threadArchiveSetPayloadSchema),
|
|
182
|
+
createAccountCommandRequestSchema(commandKinds.threadFlaggedSet, threadFlaggedSetPayloadSchema),
|
|
183
|
+
createAccountCommandRequestSchema(commandKinds.threadSeenSet, threadSeenSetPayloadSchema),
|
|
184
|
+
createAccountCommandRequestSchema(commandKinds.threadSnoozeSet, threadSnoozeSetPayloadSchema),
|
|
185
|
+
createAccountCommandRequestSchema(commandKinds.threadSpamSet, threadSpamSetPayloadSchema),
|
|
186
|
+
createAccountCommandRequestSchema(commandKinds.threadTrashSet, threadTrashSetPayloadSchema),
|
|
187
|
+
createAccountCommandRequestSchema(commandKinds.threadDelete, threadDeletePayloadSchema),
|
|
188
|
+
createAccountCommandRequestSchema(commandKinds.draftCreate, draftCreatePayloadSchema),
|
|
189
|
+
createAccountCommandRequestSchema(commandKinds.draftContentSet, draftContentSetPayloadSchema),
|
|
190
|
+
createAccountCommandRequestSchema(commandKinds.draftEnvelopeSet, draftEnvelopeSetPayloadSchema),
|
|
191
|
+
createAccountCommandRequestSchema(commandKinds.draftFromSet, draftFromSetPayloadSchema),
|
|
192
|
+
createAccountCommandRequestSchema(commandKinds.draftDelete, draftDeletePayloadSchema),
|
|
193
|
+
createAccountCommandRequestSchema(commandKinds.draftAttachmentLink, draftAttachmentLinkPayloadSchema),
|
|
194
|
+
createAccountCommandRequestSchema(commandKinds.draftAttachmentDelete, draftAttachmentDeletePayloadSchema),
|
|
195
|
+
createAccountCommandRequestSchema(commandKinds.draftSend, draftSendPayloadSchema),
|
|
196
|
+
createAccountCommandRequestSchema(commandKinds.draftSendCancel, draftSendCancelPayloadSchema),
|
|
197
|
+
createAccountCommandRequestSchema(commandKinds.draftSendSchedule, draftSendSchedulePayloadSchema),
|
|
198
|
+
];
|
|
199
|
+
const commandErrorSchema = v.strictObject({
|
|
200
|
+
code: v.picklist(commandErrorCodes),
|
|
201
|
+
retryable: v.boolean(),
|
|
202
|
+
});
|
|
203
|
+
const commandResponseSchemas = [
|
|
204
|
+
v.strictObject({
|
|
205
|
+
canonicalRevision: v.nullable(nonNegativeIntegerSchema),
|
|
206
|
+
error: v.null_(),
|
|
207
|
+
id: commandIdSchema,
|
|
208
|
+
state: v.literal('ACCEPTED'),
|
|
209
|
+
}),
|
|
210
|
+
v.strictObject({
|
|
211
|
+
canonicalRevision: v.nullable(nonNegativeIntegerSchema),
|
|
212
|
+
error: v.null_(),
|
|
213
|
+
id: commandIdSchema,
|
|
214
|
+
state: v.literal('RUNNING'),
|
|
215
|
+
}),
|
|
216
|
+
v.strictObject({
|
|
217
|
+
canonicalRevision: v.nullable(nonNegativeIntegerSchema),
|
|
218
|
+
error: v.null_(),
|
|
219
|
+
id: commandIdSchema,
|
|
220
|
+
state: v.literal('SUCCEEDED'),
|
|
221
|
+
}),
|
|
222
|
+
v.strictObject({
|
|
223
|
+
canonicalRevision: v.nullable(nonNegativeIntegerSchema),
|
|
224
|
+
error: commandErrorSchema,
|
|
225
|
+
id: commandIdSchema,
|
|
226
|
+
state: v.literal('FAILED'),
|
|
227
|
+
}),
|
|
228
|
+
];
|
|
229
|
+
export const appwriteCommands = {
|
|
230
|
+
errorCodes: commandErrorCodes,
|
|
231
|
+
errorSchema: commandErrorSchema,
|
|
232
|
+
kinds: appwriteCommandKinds,
|
|
233
|
+
requestSchema: v.variant('kind', commandRequestSchemas),
|
|
234
|
+
responseSchema: v.variant('state', commandResponseSchemas),
|
|
235
|
+
states: commandStates,
|
|
236
|
+
version: 1,
|
|
237
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.test.d.ts","sourceRoot":"","sources":["../../src/appwrite/commands.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { appwriteCommands } from './commands';
|
|
4
|
+
const commandMetadata = {
|
|
5
|
+
id: '0197f3d4-1b22-7abc-8def-123456789abc',
|
|
6
|
+
submittedAt: '2026-07-15T00:00:00.000Z',
|
|
7
|
+
version: 1,
|
|
8
|
+
};
|
|
9
|
+
const commandFixtures = [
|
|
10
|
+
{
|
|
11
|
+
command: {
|
|
12
|
+
...commandMetadata,
|
|
13
|
+
accountId: null,
|
|
14
|
+
kind: 'profile.settings.set',
|
|
15
|
+
payload: { name: 'Isaac', timezone: 'Europe/London' },
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
command: {
|
|
20
|
+
...commandMetadata,
|
|
21
|
+
accountId: 'account_1',
|
|
22
|
+
kind: 'account.settings.set',
|
|
23
|
+
payload: { colour: '#000000', displayName: 'Marco' },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{ command: { ...commandMetadata, accountId: 'account_1', kind: 'account.delete', payload: {} } },
|
|
27
|
+
{
|
|
28
|
+
command: {
|
|
29
|
+
...commandMetadata,
|
|
30
|
+
accountId: 'account_1',
|
|
31
|
+
kind: 'alias.create',
|
|
32
|
+
payload: { aliasId: 'alias_1', email: 'marco@example.com', name: null, signature: null },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
command: {
|
|
37
|
+
...commandMetadata,
|
|
38
|
+
accountId: 'account_1',
|
|
39
|
+
kind: 'alias.delete',
|
|
40
|
+
payload: { aliasId: 'alias_1' },
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
command: {
|
|
45
|
+
...commandMetadata,
|
|
46
|
+
accountId: 'account_1',
|
|
47
|
+
kind: 'alias.name.set',
|
|
48
|
+
payload: { aliasId: 'alias_1', name: 'Marco' },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
command: {
|
|
53
|
+
...commandMetadata,
|
|
54
|
+
accountId: 'account_1',
|
|
55
|
+
kind: 'alias.primary.set',
|
|
56
|
+
payload: { aliasId: 'alias_1' },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
command: {
|
|
61
|
+
...commandMetadata,
|
|
62
|
+
accountId: 'account_1',
|
|
63
|
+
kind: 'alias.signature.set',
|
|
64
|
+
payload: { aliasId: 'alias_1', signature: 'Regards' },
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
command: {
|
|
69
|
+
...commandMetadata,
|
|
70
|
+
accountId: 'account_1',
|
|
71
|
+
kind: 'label.create',
|
|
72
|
+
payload: { labelId: 'label_1', path: 'Projects' },
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
command: {
|
|
77
|
+
...commandMetadata,
|
|
78
|
+
accountId: 'account_1',
|
|
79
|
+
kind: 'label.delete',
|
|
80
|
+
payload: { labelId: 'label_1' },
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
command: {
|
|
85
|
+
...commandMetadata,
|
|
86
|
+
accountId: 'account_1',
|
|
87
|
+
kind: 'label.rename',
|
|
88
|
+
payload: { labelId: 'label_1', path: 'Projects/Marco' },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
command: {
|
|
93
|
+
...commandMetadata,
|
|
94
|
+
accountId: 'account_1',
|
|
95
|
+
kind: 'thread.label.add',
|
|
96
|
+
payload: { labelId: 'label_1', threadIds: ['thread_1'] },
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
command: {
|
|
101
|
+
...commandMetadata,
|
|
102
|
+
accountId: 'account_1',
|
|
103
|
+
kind: 'thread.label.remove',
|
|
104
|
+
payload: { labelId: 'label_1', threadIds: ['thread_1'] },
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
command: {
|
|
109
|
+
...commandMetadata,
|
|
110
|
+
accountId: 'account_1',
|
|
111
|
+
kind: 'thread.archive.set',
|
|
112
|
+
payload: { archived: true, threadIds: ['thread_1'] },
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
command: {
|
|
117
|
+
...commandMetadata,
|
|
118
|
+
accountId: 'account_1',
|
|
119
|
+
kind: 'thread.flagged.set',
|
|
120
|
+
payload: { flagged: true, threadIds: ['thread_1'] },
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
command: {
|
|
125
|
+
...commandMetadata,
|
|
126
|
+
accountId: 'account_1',
|
|
127
|
+
kind: 'thread.seen.set',
|
|
128
|
+
payload: { seen: true, threadIds: ['thread_1'] },
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
command: {
|
|
133
|
+
...commandMetadata,
|
|
134
|
+
accountId: 'account_1',
|
|
135
|
+
kind: 'thread.snooze.set',
|
|
136
|
+
payload: { snoozedUntil: '2026-07-16T00:00:00.000Z', threadIds: ['thread_1'] },
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
command: {
|
|
141
|
+
...commandMetadata,
|
|
142
|
+
accountId: 'account_1',
|
|
143
|
+
kind: 'thread.spam.set',
|
|
144
|
+
payload: { spam: true, threadIds: ['thread_1'] },
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
command: {
|
|
149
|
+
...commandMetadata,
|
|
150
|
+
accountId: 'account_1',
|
|
151
|
+
kind: 'thread.trash.set',
|
|
152
|
+
payload: { threadIds: ['thread_1'], trashed: true },
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
command: {
|
|
157
|
+
...commandMetadata,
|
|
158
|
+
accountId: 'account_1',
|
|
159
|
+
kind: 'thread.delete',
|
|
160
|
+
payload: { threadIds: ['thread_1'] },
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
command: {
|
|
165
|
+
...commandMetadata,
|
|
166
|
+
accountId: 'account_1',
|
|
167
|
+
kind: 'draft.create',
|
|
168
|
+
payload: { draftId: 'draft_1', fromAliasId: null, referencedMessageId: null, type: 'NEW' },
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
command: {
|
|
173
|
+
...commandMetadata,
|
|
174
|
+
accountId: 'account_1',
|
|
175
|
+
kind: 'draft.content.set',
|
|
176
|
+
payload: { draftId: 'draft_1', html: '<p>Hello</p>' },
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
command: {
|
|
181
|
+
...commandMetadata,
|
|
182
|
+
accountId: 'account_1',
|
|
183
|
+
kind: 'draft.envelope.set',
|
|
184
|
+
payload: { bcc: [], cc: [], draftId: 'draft_1', subject: 'Hello', to: ['marco@example.com'] },
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
command: {
|
|
189
|
+
...commandMetadata,
|
|
190
|
+
accountId: 'account_1',
|
|
191
|
+
kind: 'draft.from.set',
|
|
192
|
+
payload: { draftId: 'draft_1', fromAliasId: 'alias_1' },
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
{ command: { ...commandMetadata, accountId: 'account_1', kind: 'draft.delete', payload: { draftId: 'draft_1' } } },
|
|
196
|
+
{
|
|
197
|
+
command: {
|
|
198
|
+
...commandMetadata,
|
|
199
|
+
accountId: 'account_1',
|
|
200
|
+
kind: 'draft.attachment.link',
|
|
201
|
+
payload: {
|
|
202
|
+
draftId: 'draft_1',
|
|
203
|
+
fileId: 'file_1',
|
|
204
|
+
fileName: 'proposal.pdf',
|
|
205
|
+
mimeType: 'application/pdf',
|
|
206
|
+
size: 1,
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
command: {
|
|
212
|
+
...commandMetadata,
|
|
213
|
+
accountId: 'account_1',
|
|
214
|
+
kind: 'draft.attachment.delete',
|
|
215
|
+
payload: { draftId: 'draft_1', fileId: 'file_1' },
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{ command: { ...commandMetadata, accountId: 'account_1', kind: 'draft.send', payload: { draftId: 'draft_1' } } },
|
|
219
|
+
{
|
|
220
|
+
command: {
|
|
221
|
+
...commandMetadata,
|
|
222
|
+
accountId: 'account_1',
|
|
223
|
+
kind: 'draft.send.cancel',
|
|
224
|
+
payload: { draftId: 'draft_1' },
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
command: {
|
|
229
|
+
...commandMetadata,
|
|
230
|
+
accountId: 'account_1',
|
|
231
|
+
kind: 'draft.send.schedule',
|
|
232
|
+
payload: { draftId: 'draft_1', scheduledAt: '2026-07-16T00:00:00.000Z' },
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
];
|
|
236
|
+
describe('appwriteCommands', () => {
|
|
237
|
+
it('publishes the complete version-one command and status manifest', () => {
|
|
238
|
+
expect(appwriteCommands.version).toBe(1);
|
|
239
|
+
expect(appwriteCommands.kinds).toEqual([
|
|
240
|
+
'profile.settings.set',
|
|
241
|
+
'account.settings.set',
|
|
242
|
+
'account.delete',
|
|
243
|
+
'alias.create',
|
|
244
|
+
'alias.delete',
|
|
245
|
+
'alias.name.set',
|
|
246
|
+
'alias.primary.set',
|
|
247
|
+
'alias.signature.set',
|
|
248
|
+
'label.create',
|
|
249
|
+
'label.delete',
|
|
250
|
+
'label.rename',
|
|
251
|
+
'thread.label.add',
|
|
252
|
+
'thread.label.remove',
|
|
253
|
+
'thread.archive.set',
|
|
254
|
+
'thread.flagged.set',
|
|
255
|
+
'thread.seen.set',
|
|
256
|
+
'thread.snooze.set',
|
|
257
|
+
'thread.spam.set',
|
|
258
|
+
'thread.trash.set',
|
|
259
|
+
'thread.delete',
|
|
260
|
+
'draft.create',
|
|
261
|
+
'draft.content.set',
|
|
262
|
+
'draft.envelope.set',
|
|
263
|
+
'draft.from.set',
|
|
264
|
+
'draft.delete',
|
|
265
|
+
'draft.attachment.link',
|
|
266
|
+
'draft.attachment.delete',
|
|
267
|
+
'draft.send',
|
|
268
|
+
'draft.send.cancel',
|
|
269
|
+
'draft.send.schedule',
|
|
270
|
+
]);
|
|
271
|
+
expect(appwriteCommands.states).toEqual(['ACCEPTED', 'RUNNING', 'SUCCEEDED', 'FAILED']);
|
|
272
|
+
expect(appwriteCommands.errorCodes).toEqual([
|
|
273
|
+
'AUTHENTICATION_FAILED',
|
|
274
|
+
'AUTHORIZATION_FAILED',
|
|
275
|
+
'COMMAND_CONFLICT',
|
|
276
|
+
'COMMAND_NOT_FOUND',
|
|
277
|
+
'INVALID_COMMAND',
|
|
278
|
+
'PROVIDER_REJECTED',
|
|
279
|
+
'TRANSIENT_FAILURE',
|
|
280
|
+
'INTERNAL_ERROR',
|
|
281
|
+
]);
|
|
282
|
+
});
|
|
283
|
+
for (const { command } of commandFixtures) {
|
|
284
|
+
it(`accepts ${command.kind}`, () => {
|
|
285
|
+
expect(v.safeParse(appwriteCommands.requestSchema, command).success).toBe(true);
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
const invalidCommands = [
|
|
289
|
+
{
|
|
290
|
+
command: { ...commandFixtures[0].command, payload: commandFixtures[1].command.payload },
|
|
291
|
+
description: 'a command and payload mismatch',
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
command: { ...commandFixtures[0].command, userId: 'another-user' },
|
|
295
|
+
description: 'a caller-provided owner',
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
command: { ...commandFixtures[1].command, accountId: null },
|
|
299
|
+
description: 'a null account ID for an account-scoped command',
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
command: {
|
|
303
|
+
...commandFixtures[21].command,
|
|
304
|
+
payload: { ...commandFixtures[21].command.payload, credentials: 'secret' },
|
|
305
|
+
},
|
|
306
|
+
description: 'credentials in a payload',
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
command: {
|
|
310
|
+
...commandFixtures[26].command,
|
|
311
|
+
payload: { ...commandFixtures[26].command.payload, token: 'secret' },
|
|
312
|
+
},
|
|
313
|
+
description: 'a token in a payload',
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
command: { ...commandFixtures[0].command, kind: 'saved-view.create' },
|
|
317
|
+
description: 'an excluded action family',
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
command: { ...commandFixtures[0].command, version: 2 },
|
|
321
|
+
description: 'an unknown command version',
|
|
322
|
+
},
|
|
323
|
+
];
|
|
324
|
+
for (const { command, description } of invalidCommands) {
|
|
325
|
+
it(`rejects ${description}`, () => {
|
|
326
|
+
expect(v.safeParse(appwriteCommands.requestSchema, command).success).toBe(false);
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
const responseFixtures = [
|
|
330
|
+
{
|
|
331
|
+
expected: true,
|
|
332
|
+
response: {
|
|
333
|
+
canonicalRevision: null,
|
|
334
|
+
error: null,
|
|
335
|
+
id: commandMetadata.id,
|
|
336
|
+
state: 'ACCEPTED',
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
expected: true,
|
|
341
|
+
response: {
|
|
342
|
+
canonicalRevision: null,
|
|
343
|
+
error: null,
|
|
344
|
+
id: commandMetadata.id,
|
|
345
|
+
state: 'RUNNING',
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
expected: true,
|
|
350
|
+
response: {
|
|
351
|
+
canonicalRevision: 3,
|
|
352
|
+
error: null,
|
|
353
|
+
id: commandMetadata.id,
|
|
354
|
+
state: 'SUCCEEDED',
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
expected: true,
|
|
359
|
+
response: {
|
|
360
|
+
canonicalRevision: 3,
|
|
361
|
+
error: { code: 'PROVIDER_REJECTED', retryable: false },
|
|
362
|
+
id: commandMetadata.id,
|
|
363
|
+
state: 'FAILED',
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
expected: false,
|
|
368
|
+
response: {
|
|
369
|
+
canonicalRevision: null,
|
|
370
|
+
error: { code: 'UNSAFE_CODE', retryable: false },
|
|
371
|
+
id: commandMetadata.id,
|
|
372
|
+
state: 'FAILED',
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
];
|
|
376
|
+
for (const { expected, response } of responseFixtures) {
|
|
377
|
+
it(`parses ${response.state} status as ${expected ? 'valid' : 'invalid'}`, () => {
|
|
378
|
+
expect(v.safeParse(appwriteCommands.responseSchema, response).success).toBe(expected);
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
});
|
package/dist/appwrite/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { type AppwriteRow, type AppwriteRowTable, appwrite } from './appwrite';
|
|
2
|
+
export { type AppwriteCommandError, type AppwriteCommandKind, type AppwriteCommandPayload, type AppwriteCommandRequest, type AppwriteCommandResponse, type AppwriteCommandState, appwriteCommands, } from './commands';
|
|
2
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appwrite/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appwrite/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC9E,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,gBAAgB,GACjB,MAAM,YAAY,CAAA"}
|
package/dist/appwrite/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type AppwriteRow, type AppwriteRowTable, appwrite } from './appwrite';
|
|
1
|
+
export { type AppwriteCommandError, type AppwriteCommandKind, type AppwriteCommandPayload, type AppwriteCommandRequest, type AppwriteCommandResponse, type AppwriteCommandState, type AppwriteRow, type AppwriteRowTable, appwrite, appwriteCommands, } from './appwrite';
|
|
2
2
|
export { marcoConstants } from './constants';
|
|
3
3
|
export { MARCO_ENV, MarcoEnvironment, marcoPublicConfig } from './marcoPublicConfig';
|
|
4
4
|
export { type Account, type AccountAlias, type AccountId, type AccountLabel, type AliasId, type AttachmentId, type Contact, type ContactId, type Draft, type DraftAttachment, type DraftBody, type DraftId, type LabelId, type MessageId, marcoSchemas, type PushNotificationTokenId, type RecipientId, type Thread, type ThreadId, type ThreadMessage, type ThreadMessageAttachment, type ThreadMessageRecipient, type User, type UserId, type UserPushNotificationToken, type UserView, type ViewId, } from './schemas';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,QAAQ,EACR,gBAAgB,GACjB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACpF,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,IAAI,EACT,KAAK,MAAM,EACX,KAAK,yBAAyB,EAC9B,KAAK,QAAQ,EACb,KAAK,MAAM,GACZ,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA"}
|
package/dist/index.js
CHANGED
package/dist/schemas/index.d.ts
CHANGED
|
@@ -601,7 +601,7 @@ export declare const marcoSchemas: {
|
|
|
601
601
|
bcc: string[];
|
|
602
602
|
cc: string[];
|
|
603
603
|
to: string[];
|
|
604
|
-
}, import("valibot").StringIssue | import("valibot").ArrayIssue | import("valibot").
|
|
604
|
+
}, import("valibot").StringIssue | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, number> | import("valibot").NonOptionalIssue | import("valibot").RfcEmailIssue<string> | import("valibot").ObjectIssue>;
|
|
605
605
|
readonly '~types'?: {
|
|
606
606
|
readonly input: {
|
|
607
607
|
subject: string | null;
|
|
@@ -615,7 +615,7 @@ export declare const marcoSchemas: {
|
|
|
615
615
|
cc: string[];
|
|
616
616
|
to: string[];
|
|
617
617
|
};
|
|
618
|
-
readonly issue: import("valibot").StringIssue | import("valibot").ArrayIssue | import("valibot").
|
|
618
|
+
readonly issue: import("valibot").StringIssue | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, number> | import("valibot").NonOptionalIssue | import("valibot").RfcEmailIssue<string> | import("valibot").ObjectIssue;
|
|
619
619
|
} | undefined;
|
|
620
620
|
};
|
|
621
621
|
readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "DraftId">]>, undefined>;
|
|
@@ -176,7 +176,7 @@ export declare const mutatorSchemas: {
|
|
|
176
176
|
bcc: string[];
|
|
177
177
|
cc: string[];
|
|
178
178
|
to: string[];
|
|
179
|
-
}, v.StringIssue | v.ArrayIssue | v.
|
|
179
|
+
}, v.StringIssue | v.ArrayIssue | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.RfcEmailIssue<string> | v.ObjectIssue>;
|
|
180
180
|
readonly '~types'?: {
|
|
181
181
|
readonly input: {
|
|
182
182
|
subject: string | null;
|
|
@@ -190,7 +190,7 @@ export declare const mutatorSchemas: {
|
|
|
190
190
|
cc: string[];
|
|
191
191
|
to: string[];
|
|
192
192
|
};
|
|
193
|
-
readonly issue: v.StringIssue | v.ArrayIssue | v.
|
|
193
|
+
readonly issue: v.StringIssue | v.ArrayIssue | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.RfcEmailIssue<string> | v.ObjectIssue;
|
|
194
194
|
} | undefined;
|
|
195
195
|
};
|
|
196
196
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
@@ -30,7 +30,7 @@ export declare const setEnvelope: import("../../../../..").EndpointConfig<"/v1/p
|
|
|
30
30
|
bcc: string[];
|
|
31
31
|
cc: string[];
|
|
32
32
|
to: string[];
|
|
33
|
-
}, v.StringIssue | v.ArrayIssue | v.
|
|
33
|
+
}, v.StringIssue | v.ArrayIssue | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.RfcEmailIssue<string> | v.ObjectIssue>;
|
|
34
34
|
readonly '~types'?: {
|
|
35
35
|
readonly input: {
|
|
36
36
|
subject: string | null;
|
|
@@ -44,7 +44,7 @@ export declare const setEnvelope: import("../../../../..").EndpointConfig<"/v1/p
|
|
|
44
44
|
cc: string[];
|
|
45
45
|
to: string[];
|
|
46
46
|
};
|
|
47
|
-
readonly issue: v.StringIssue | v.ArrayIssue | v.
|
|
47
|
+
readonly issue: v.StringIssue | v.ArrayIssue | v.NonEmptyIssue<string> | v.MaxLengthIssue<string, number> | v.NonOptionalIssue | v.RfcEmailIssue<string> | v.ObjectIssue;
|
|
48
48
|
} | undefined;
|
|
49
49
|
};
|
|
50
50
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,+BAA+B,CAAA;AAC7C,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA"}
|