@marcoappio/marco-config 2.0.577 → 2.0.579
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/functions.d.ts +541 -0
- package/dist/appwrite/functions.d.ts.map +1 -0
- package/dist/appwrite/functions.js +147 -0
- package/dist/appwrite/functions.test.d.ts +2 -0
- package/dist/appwrite/functions.test.d.ts.map +1 -0
- package/dist/appwrite/functions.test.js +154 -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 +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/schemas/id.d.ts +5 -0
- package/dist/schemas/id.d.ts.map +1 -1
- package/dist/schemas/id.js +1 -0
- package/dist/schemas/index.d.ts +5 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
type AppwriteFunctionContext = 'authenticated' | 'internal' | 'webhook';
|
|
3
|
+
export declare const appwriteFunctions: {
|
|
4
|
+
readonly api: {
|
|
5
|
+
readonly id: "marco-api";
|
|
6
|
+
readonly routes: {
|
|
7
|
+
readonly accountConnection: {
|
|
8
|
+
errorSchema: v.StrictObjectSchema<{
|
|
9
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
10
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
11
|
+
}, undefined>;
|
|
12
|
+
context: "authenticated";
|
|
13
|
+
method: "PUT";
|
|
14
|
+
path: "/accounts/connection";
|
|
15
|
+
requestSchema: v.StrictObjectSchema<{
|
|
16
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
17
|
+
readonly connection: v.VariantSchema<"kind", [v.StrictObjectSchema<{
|
|
18
|
+
readonly kind: v.LiteralSchema<"OAUTH", undefined>;
|
|
19
|
+
readonly provider: v.PicklistSchema<["GMAIL", "OUTLOOK"], undefined>;
|
|
20
|
+
readonly redirectUri: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
21
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
22
|
+
readonly imap: v.StrictObjectSchema<{
|
|
23
|
+
readonly host: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
24
|
+
readonly password: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
25
|
+
readonly port: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>;
|
|
26
|
+
readonly socketType: v.PicklistSchema<readonly ["SSL", "STARTTLS"], undefined>;
|
|
27
|
+
readonly user: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
readonly kind: v.LiteralSchema<"IMAP", undefined>;
|
|
30
|
+
readonly smtp: v.StrictObjectSchema<{
|
|
31
|
+
readonly host: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
32
|
+
readonly password: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
33
|
+
readonly port: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>;
|
|
34
|
+
readonly socketType: v.PicklistSchema<readonly ["SSL", "STARTTLS"], undefined>;
|
|
35
|
+
readonly user: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
36
|
+
}, undefined>;
|
|
37
|
+
}, undefined>], undefined>;
|
|
38
|
+
}, undefined>;
|
|
39
|
+
responseSchema: v.StrictObjectSchema<{
|
|
40
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
41
|
+
readonly authorizationUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
|
|
42
|
+
readonly state: v.PicklistSchema<readonly ["AWAITING_CONNECTION", "CONNECTED", "DISCONNECTED", "ERROR"], undefined>;
|
|
43
|
+
}, undefined>;
|
|
44
|
+
};
|
|
45
|
+
readonly accountDelete: {
|
|
46
|
+
errorSchema: v.StrictObjectSchema<{
|
|
47
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
48
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
49
|
+
}, undefined>;
|
|
50
|
+
context: "authenticated";
|
|
51
|
+
method: "DELETE";
|
|
52
|
+
path: "/account/delete";
|
|
53
|
+
requestSchema: v.StrictObjectSchema<{}, undefined>;
|
|
54
|
+
responseSchema: v.StrictObjectSchema<{
|
|
55
|
+
readonly state: v.LiteralSchema<"ACCEPTED", undefined>;
|
|
56
|
+
}, undefined>;
|
|
57
|
+
};
|
|
58
|
+
readonly accountsConnect: {
|
|
59
|
+
errorSchema: v.StrictObjectSchema<{
|
|
60
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
61
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
62
|
+
}, undefined>;
|
|
63
|
+
context: "authenticated";
|
|
64
|
+
method: "POST";
|
|
65
|
+
path: "/accounts/connect";
|
|
66
|
+
requestSchema: v.StrictObjectSchema<{
|
|
67
|
+
readonly connection: v.VariantSchema<"kind", [v.StrictObjectSchema<{
|
|
68
|
+
readonly kind: v.LiteralSchema<"OAUTH", undefined>;
|
|
69
|
+
readonly provider: v.PicklistSchema<["GMAIL", "OUTLOOK"], undefined>;
|
|
70
|
+
readonly redirectUri: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
71
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
72
|
+
readonly imap: v.StrictObjectSchema<{
|
|
73
|
+
readonly host: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
74
|
+
readonly password: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
75
|
+
readonly port: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>;
|
|
76
|
+
readonly socketType: v.PicklistSchema<readonly ["SSL", "STARTTLS"], undefined>;
|
|
77
|
+
readonly user: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
78
|
+
}, undefined>;
|
|
79
|
+
readonly kind: v.LiteralSchema<"IMAP", undefined>;
|
|
80
|
+
readonly smtp: v.StrictObjectSchema<{
|
|
81
|
+
readonly host: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
82
|
+
readonly password: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
83
|
+
readonly port: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>;
|
|
84
|
+
readonly socketType: v.PicklistSchema<readonly ["SSL", "STARTTLS"], undefined>;
|
|
85
|
+
readonly user: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
86
|
+
}, undefined>;
|
|
87
|
+
}, undefined>], undefined>;
|
|
88
|
+
}, undefined>;
|
|
89
|
+
responseSchema: v.StrictObjectSchema<{
|
|
90
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
91
|
+
readonly authorizationUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
|
|
92
|
+
readonly state: v.PicklistSchema<readonly ["AWAITING_CONNECTION", "CONNECTED", "DISCONNECTED", "ERROR"], undefined>;
|
|
93
|
+
}, undefined>;
|
|
94
|
+
};
|
|
95
|
+
readonly commands: {
|
|
96
|
+
errorSchema: v.StrictObjectSchema<{
|
|
97
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
98
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
99
|
+
}, undefined>;
|
|
100
|
+
context: "authenticated";
|
|
101
|
+
method: "POST";
|
|
102
|
+
path: "/commands";
|
|
103
|
+
requestSchema: v.VariantSchema<"kind", readonly [v.StrictObjectSchema<{
|
|
104
|
+
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>;
|
|
105
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
106
|
+
readonly kind: v.LiteralSchema<"profile.settings.set", undefined>;
|
|
107
|
+
readonly payload: v.StrictObjectSchema<{
|
|
108
|
+
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>;
|
|
109
|
+
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>;
|
|
110
|
+
}, undefined>;
|
|
111
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
112
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
113
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
114
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
115
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
116
|
+
readonly kind: v.LiteralSchema<"account.settings.set", undefined>;
|
|
117
|
+
readonly payload: v.StrictObjectSchema<{
|
|
118
|
+
readonly colour: v.OptionalSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
119
|
+
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>;
|
|
120
|
+
}, undefined>;
|
|
121
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
122
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
123
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
124
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
125
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
126
|
+
readonly kind: v.LiteralSchema<"account.delete", undefined>;
|
|
127
|
+
readonly payload: v.StrictObjectSchema<{}, undefined>;
|
|
128
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
129
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
130
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
131
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
132
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
133
|
+
readonly kind: v.LiteralSchema<"alias.create", undefined>;
|
|
134
|
+
readonly payload: v.StrictObjectSchema<{
|
|
135
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
136
|
+
readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
137
|
+
readonly name: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
138
|
+
readonly signature: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 50000, undefined>]>, undefined>;
|
|
139
|
+
}, undefined>;
|
|
140
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
141
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
142
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
143
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
144
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
145
|
+
readonly kind: v.LiteralSchema<"alias.delete", undefined>;
|
|
146
|
+
readonly payload: v.StrictObjectSchema<{
|
|
147
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
148
|
+
}, undefined>;
|
|
149
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
150
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
151
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
152
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
153
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
154
|
+
readonly kind: v.LiteralSchema<"alias.name.set", undefined>;
|
|
155
|
+
readonly payload: v.StrictObjectSchema<{
|
|
156
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
157
|
+
readonly name: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
158
|
+
}, undefined>;
|
|
159
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
160
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
161
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
162
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
163
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
164
|
+
readonly kind: v.LiteralSchema<"alias.primary.set", undefined>;
|
|
165
|
+
readonly payload: v.StrictObjectSchema<{
|
|
166
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
167
|
+
}, undefined>;
|
|
168
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
169
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
170
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
171
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
172
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
173
|
+
readonly kind: v.LiteralSchema<"alias.signature.set", undefined>;
|
|
174
|
+
readonly payload: v.StrictObjectSchema<{
|
|
175
|
+
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
176
|
+
readonly signature: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 50000, undefined>]>, undefined>;
|
|
177
|
+
}, undefined>;
|
|
178
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
179
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
180
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
181
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
182
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
183
|
+
readonly kind: v.LiteralSchema<"label.create", undefined>;
|
|
184
|
+
readonly payload: v.StrictObjectSchema<{
|
|
185
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
186
|
+
readonly path: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
187
|
+
}, undefined>;
|
|
188
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
189
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
190
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
191
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
192
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
193
|
+
readonly kind: v.LiteralSchema<"label.delete", undefined>;
|
|
194
|
+
readonly payload: v.StrictObjectSchema<{
|
|
195
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
196
|
+
}, undefined>;
|
|
197
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
198
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
199
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
200
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
201
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
202
|
+
readonly kind: v.LiteralSchema<"label.rename", undefined>;
|
|
203
|
+
readonly payload: v.StrictObjectSchema<{
|
|
204
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
205
|
+
readonly path: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
206
|
+
}, undefined>;
|
|
207
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
208
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
209
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
210
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
211
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
212
|
+
readonly kind: v.LiteralSchema<"thread.label.add", undefined>;
|
|
213
|
+
readonly payload: v.StrictObjectSchema<{
|
|
214
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
215
|
+
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>]>;
|
|
216
|
+
}, undefined>;
|
|
217
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
218
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
219
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
220
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
221
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
222
|
+
readonly kind: v.LiteralSchema<"thread.label.remove", undefined>;
|
|
223
|
+
readonly payload: v.StrictObjectSchema<{
|
|
224
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
225
|
+
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>]>;
|
|
226
|
+
}, undefined>;
|
|
227
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
228
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
229
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
230
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
231
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
232
|
+
readonly kind: v.LiteralSchema<"thread.archive.set", undefined>;
|
|
233
|
+
readonly payload: v.StrictObjectSchema<{
|
|
234
|
+
readonly archived: v.BooleanSchema<undefined>;
|
|
235
|
+
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>]>;
|
|
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<"thread.flagged.set", undefined>;
|
|
243
|
+
readonly payload: v.StrictObjectSchema<{
|
|
244
|
+
readonly flagged: v.BooleanSchema<undefined>;
|
|
245
|
+
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>]>;
|
|
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<"thread.seen.set", undefined>;
|
|
253
|
+
readonly payload: v.StrictObjectSchema<{
|
|
254
|
+
readonly seen: v.BooleanSchema<undefined>;
|
|
255
|
+
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>]>;
|
|
256
|
+
}, undefined>;
|
|
257
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
258
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
259
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
260
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
261
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
262
|
+
readonly kind: v.LiteralSchema<"thread.snooze.set", undefined>;
|
|
263
|
+
readonly payload: v.StrictObjectSchema<{
|
|
264
|
+
readonly snoozedUntil: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
265
|
+
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>]>;
|
|
266
|
+
}, undefined>;
|
|
267
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
268
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
269
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
270
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
271
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
272
|
+
readonly kind: v.LiteralSchema<"thread.spam.set", undefined>;
|
|
273
|
+
readonly payload: v.StrictObjectSchema<{
|
|
274
|
+
readonly spam: v.BooleanSchema<undefined>;
|
|
275
|
+
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>]>;
|
|
276
|
+
}, undefined>;
|
|
277
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
278
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
279
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
280
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
281
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
282
|
+
readonly kind: v.LiteralSchema<"thread.trash.set", undefined>;
|
|
283
|
+
readonly payload: v.StrictObjectSchema<{
|
|
284
|
+
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>]>;
|
|
285
|
+
readonly trashed: v.BooleanSchema<undefined>;
|
|
286
|
+
}, undefined>;
|
|
287
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
288
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
289
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
290
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
291
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
292
|
+
readonly kind: v.LiteralSchema<"thread.delete", undefined>;
|
|
293
|
+
readonly payload: v.StrictObjectSchema<{
|
|
294
|
+
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>]>;
|
|
295
|
+
}, undefined>;
|
|
296
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
297
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
298
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
299
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
300
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
301
|
+
readonly kind: v.LiteralSchema<"draft.create", undefined>;
|
|
302
|
+
readonly payload: v.StrictObjectSchema<{
|
|
303
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
304
|
+
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>;
|
|
305
|
+
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>;
|
|
306
|
+
readonly type: v.PicklistSchema<readonly ["NEW", "REPLY", "FORWARD"], undefined>;
|
|
307
|
+
}, undefined>;
|
|
308
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
309
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
310
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
311
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
312
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
313
|
+
readonly kind: v.LiteralSchema<"draft.content.set", undefined>;
|
|
314
|
+
readonly payload: v.StrictObjectSchema<{
|
|
315
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
316
|
+
readonly html: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
|
|
317
|
+
}, undefined>;
|
|
318
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
319
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
320
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
321
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
322
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
323
|
+
readonly kind: v.LiteralSchema<"draft.envelope.set", undefined>;
|
|
324
|
+
readonly payload: v.StrictObjectSchema<{
|
|
325
|
+
readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
326
|
+
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
327
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
328
|
+
readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 998, undefined>]>, undefined>;
|
|
329
|
+
readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>, undefined>;
|
|
330
|
+
}, undefined>;
|
|
331
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
332
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
333
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
334
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
335
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
336
|
+
readonly kind: v.LiteralSchema<"draft.from.set", undefined>;
|
|
337
|
+
readonly payload: v.StrictObjectSchema<{
|
|
338
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
339
|
+
readonly fromAliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
340
|
+
}, undefined>;
|
|
341
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
342
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
343
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
344
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
345
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
346
|
+
readonly kind: v.LiteralSchema<"draft.delete", undefined>;
|
|
347
|
+
readonly payload: v.StrictObjectSchema<{
|
|
348
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
349
|
+
}, undefined>;
|
|
350
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
351
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
352
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
353
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
354
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
355
|
+
readonly kind: v.LiteralSchema<"draft.attachment.link", undefined>;
|
|
356
|
+
readonly payload: v.StrictObjectSchema<{
|
|
357
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
358
|
+
readonly fileId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
359
|
+
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
360
|
+
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
361
|
+
readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
362
|
+
}, undefined>;
|
|
363
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
364
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
365
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
366
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
367
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
368
|
+
readonly kind: v.LiteralSchema<"draft.attachment.delete", undefined>;
|
|
369
|
+
readonly payload: v.StrictObjectSchema<{
|
|
370
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
371
|
+
readonly fileId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
372
|
+
}, undefined>;
|
|
373
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
374
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
375
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
376
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
377
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
378
|
+
readonly kind: v.LiteralSchema<"draft.send", undefined>;
|
|
379
|
+
readonly payload: v.StrictObjectSchema<{
|
|
380
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
381
|
+
}, undefined>;
|
|
382
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
383
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
384
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
385
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
386
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
387
|
+
readonly kind: v.LiteralSchema<"draft.send.cancel", undefined>;
|
|
388
|
+
readonly payload: v.StrictObjectSchema<{
|
|
389
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
390
|
+
}, undefined>;
|
|
391
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
392
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
393
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
394
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
395
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
396
|
+
readonly kind: v.LiteralSchema<"draft.send.schedule", undefined>;
|
|
397
|
+
readonly payload: v.StrictObjectSchema<{
|
|
398
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
399
|
+
readonly scheduledAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
400
|
+
}, undefined>;
|
|
401
|
+
readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
402
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
403
|
+
}, undefined>], undefined>;
|
|
404
|
+
responseSchema: v.VariantSchema<"state", readonly [v.StrictObjectSchema<{
|
|
405
|
+
readonly canonicalRevision: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
406
|
+
readonly error: v.NullSchema<undefined>;
|
|
407
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
408
|
+
readonly state: v.LiteralSchema<"ACCEPTED", undefined>;
|
|
409
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
410
|
+
readonly canonicalRevision: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
411
|
+
readonly error: v.NullSchema<undefined>;
|
|
412
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
413
|
+
readonly state: v.LiteralSchema<"RUNNING", undefined>;
|
|
414
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
415
|
+
readonly canonicalRevision: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
416
|
+
readonly error: v.NullSchema<undefined>;
|
|
417
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
418
|
+
readonly state: v.LiteralSchema<"SUCCEEDED", undefined>;
|
|
419
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
420
|
+
readonly canonicalRevision: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
421
|
+
readonly error: v.StrictObjectSchema<{
|
|
422
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "COMMAND_CONFLICT", "COMMAND_NOT_FOUND", "INVALID_COMMAND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
423
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
424
|
+
}, undefined>;
|
|
425
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
|
|
426
|
+
readonly state: v.LiteralSchema<"FAILED", undefined>;
|
|
427
|
+
}, undefined>], undefined>;
|
|
428
|
+
};
|
|
429
|
+
readonly oauthWebhook: {
|
|
430
|
+
errorSchema: v.StrictObjectSchema<{
|
|
431
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
432
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
433
|
+
}, undefined>;
|
|
434
|
+
context: "webhook";
|
|
435
|
+
method: "GET";
|
|
436
|
+
path: "/webhooks/oauth";
|
|
437
|
+
requestSchema: v.StrictObjectSchema<{
|
|
438
|
+
readonly code: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
439
|
+
readonly state: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
440
|
+
}, undefined>;
|
|
441
|
+
responseSchema: v.StrictObjectSchema<{
|
|
442
|
+
readonly state: v.LiteralSchema<"COMPLETED", undefined>;
|
|
443
|
+
}, undefined>;
|
|
444
|
+
};
|
|
445
|
+
readonly profileEnsure: {
|
|
446
|
+
errorSchema: v.StrictObjectSchema<{
|
|
447
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
448
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
449
|
+
}, undefined>;
|
|
450
|
+
context: "authenticated";
|
|
451
|
+
method: "POST";
|
|
452
|
+
path: "/profile/ensure";
|
|
453
|
+
requestSchema: v.StrictObjectSchema<{}, undefined>;
|
|
454
|
+
responseSchema: v.StrictObjectSchema<{
|
|
455
|
+
readonly created: v.BooleanSchema<undefined>;
|
|
456
|
+
}, undefined>;
|
|
457
|
+
};
|
|
458
|
+
readonly pushTokens: {
|
|
459
|
+
errorSchema: v.StrictObjectSchema<{
|
|
460
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
461
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
462
|
+
}, undefined>;
|
|
463
|
+
context: "authenticated";
|
|
464
|
+
method: "POST";
|
|
465
|
+
path: "/push-tokens";
|
|
466
|
+
requestSchema: v.StrictObjectSchema<{
|
|
467
|
+
readonly operation: v.PicklistSchema<["REGISTER", "REMOVE"], undefined>;
|
|
468
|
+
readonly token: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
469
|
+
}, undefined>;
|
|
470
|
+
responseSchema: v.StrictObjectSchema<{
|
|
471
|
+
readonly registered: v.BooleanSchema<undefined>;
|
|
472
|
+
}, undefined>;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
readonly errorCodes: readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"];
|
|
477
|
+
readonly errorSchema: v.StrictObjectSchema<{
|
|
478
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
479
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
480
|
+
}, undefined>;
|
|
481
|
+
readonly worker: {
|
|
482
|
+
readonly id: "marco-worker";
|
|
483
|
+
readonly routes: {
|
|
484
|
+
readonly jobsRun: {
|
|
485
|
+
errorSchema: v.StrictObjectSchema<{
|
|
486
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
487
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
488
|
+
}, undefined>;
|
|
489
|
+
context: "internal";
|
|
490
|
+
method: "POST";
|
|
491
|
+
path: "/jobs/run";
|
|
492
|
+
requestSchema: v.StrictObjectSchema<{
|
|
493
|
+
readonly jobId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "JobId">]>, undefined>;
|
|
494
|
+
}, undefined>;
|
|
495
|
+
responseSchema: v.StrictObjectSchema<{
|
|
496
|
+
readonly state: v.LiteralSchema<"COMPLETED", undefined>;
|
|
497
|
+
}, undefined>;
|
|
498
|
+
};
|
|
499
|
+
readonly supervisor: {
|
|
500
|
+
errorSchema: v.StrictObjectSchema<{
|
|
501
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
502
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
503
|
+
}, undefined>;
|
|
504
|
+
context: "internal";
|
|
505
|
+
method: "POST";
|
|
506
|
+
path: "/";
|
|
507
|
+
requestSchema: v.StrictObjectSchema<{}, undefined>;
|
|
508
|
+
responseSchema: v.StrictObjectSchema<{
|
|
509
|
+
readonly state: v.LiteralSchema<"COMPLETED", undefined>;
|
|
510
|
+
}, undefined>;
|
|
511
|
+
};
|
|
512
|
+
readonly watchersRun: {
|
|
513
|
+
errorSchema: v.StrictObjectSchema<{
|
|
514
|
+
readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "CONFLICT", "INVALID_REQUEST", "NOT_FOUND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
|
|
515
|
+
readonly retryable: v.BooleanSchema<undefined>;
|
|
516
|
+
}, undefined>;
|
|
517
|
+
context: "internal";
|
|
518
|
+
method: "POST";
|
|
519
|
+
path: "/watchers/run";
|
|
520
|
+
requestSchema: v.StrictObjectSchema<{
|
|
521
|
+
readonly shardId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
522
|
+
}, undefined>;
|
|
523
|
+
responseSchema: v.StrictObjectSchema<{
|
|
524
|
+
readonly state: v.LiteralSchema<"COMPLETED", undefined>;
|
|
525
|
+
}, undefined>;
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
};
|
|
530
|
+
export type AppwriteFunctionError = v.InferOutput<typeof appwriteFunctions.errorSchema>;
|
|
531
|
+
export type { AppwriteFunctionContext };
|
|
532
|
+
export type AppwriteFunctionName = 'api' | 'worker';
|
|
533
|
+
export type AppwriteFunctionRouteName<TFunction extends AppwriteFunctionName> = TFunction extends AppwriteFunctionName ? keyof (typeof appwriteFunctions)[TFunction]['routes'] : never;
|
|
534
|
+
export type AppwriteFunctionRoute<TFunction extends AppwriteFunctionName, TRoute extends AppwriteFunctionRouteName<TFunction>> = TFunction extends AppwriteFunctionName ? TRoute extends keyof (typeof appwriteFunctions)[TFunction]['routes'] ? (typeof appwriteFunctions)[TFunction]['routes'][TRoute] : never : never;
|
|
535
|
+
export type AppwriteFunctionRequest<TFunction extends AppwriteFunctionName, TRoute extends AppwriteFunctionRouteName<TFunction>> = AppwriteFunctionRoute<TFunction, TRoute> extends {
|
|
536
|
+
requestSchema: infer TSchema extends v.GenericSchema;
|
|
537
|
+
} ? v.InferOutput<TSchema> : never;
|
|
538
|
+
export type AppwriteFunctionResponse<TFunction extends AppwriteFunctionName, TRoute extends AppwriteFunctionRouteName<TFunction>> = AppwriteFunctionRoute<TFunction, TRoute> extends {
|
|
539
|
+
responseSchema: infer TSchema extends v.GenericSchema;
|
|
540
|
+
} ? v.InferOutput<TSchema> : never;
|
|
541
|
+
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/appwrite/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,KAAK,uBAAuB,GAAG,eAAe,GAAG,UAAU,GAAG,SAAS,CAAA;AAqJvE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWpB,CAAA;AAEV,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,WAAW,CAAC,CAAA;AACvF,YAAY,EAAE,uBAAuB,EAAE,CAAA;AACvC,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,QAAQ,CAAA;AACnD,MAAM,MAAM,yBAAyB,CAAC,SAAS,SAAS,oBAAoB,IAAI,SAAS,SAAS,oBAAoB,GAClH,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,GACrD,KAAK,CAAA;AACT,MAAM,MAAM,qBAAqB,CAC/B,SAAS,SAAS,oBAAoB,EACtC,MAAM,SAAS,yBAAyB,CAAC,SAAS,CAAC,IACjD,SAAS,SAAS,oBAAoB,GACtC,MAAM,SAAS,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,GAClE,CAAC,OAAO,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GACvD,KAAK,GACP,KAAK,CAAA;AACT,MAAM,MAAM,uBAAuB,CACjC,SAAS,SAAS,oBAAoB,EACtC,MAAM,SAAS,yBAAyB,CAAC,SAAS,CAAC,IACjD,qBAAqB,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS;IAAE,aAAa,EAAE,MAAM,OAAO,SAAS,CAAC,CAAC,aAAa,CAAA;CAAE,GACzG,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,GACtB,KAAK,CAAA;AACT,MAAM,MAAM,wBAAwB,CAClC,SAAS,SAAS,oBAAoB,EACtC,MAAM,SAAS,yBAAyB,CAAC,SAAS,CAAC,IACjD,qBAAqB,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS;IAAE,cAAc,EAAE,MAAM,OAAO,SAAS,CAAC,CAAC,aAAa,CAAA;CAAE,GAC1G,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,GACtB,KAAK,CAAA"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { id } from '../schemas/id';
|
|
3
|
+
import { string } from '../schemas/string';
|
|
4
|
+
import { appwrite } from './appwrite';
|
|
5
|
+
import { appwriteCommands } from './commands';
|
|
6
|
+
const accountStates = ['AWAITING_CONNECTION', 'CONNECTED', 'DISCONNECTED', 'ERROR'];
|
|
7
|
+
const functionErrorCodes = [
|
|
8
|
+
'AUTHENTICATION_FAILED',
|
|
9
|
+
'AUTHORIZATION_FAILED',
|
|
10
|
+
'CONFLICT',
|
|
11
|
+
'INVALID_REQUEST',
|
|
12
|
+
'NOT_FOUND',
|
|
13
|
+
'PROVIDER_REJECTED',
|
|
14
|
+
'TRANSIENT_FAILURE',
|
|
15
|
+
'INTERNAL_ERROR',
|
|
16
|
+
];
|
|
17
|
+
const socketTypes = ['SSL', 'STARTTLS'];
|
|
18
|
+
const functionErrorSchema = v.strictObject({
|
|
19
|
+
code: v.picklist(functionErrorCodes),
|
|
20
|
+
retryable: v.boolean(),
|
|
21
|
+
});
|
|
22
|
+
const portSchema = v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(65_535));
|
|
23
|
+
const providerCredentialSchema = v.strictObject({
|
|
24
|
+
host: string.required(4096),
|
|
25
|
+
password: string.required(4096),
|
|
26
|
+
port: portSchema,
|
|
27
|
+
socketType: v.picklist(socketTypes),
|
|
28
|
+
user: string.required(4096),
|
|
29
|
+
});
|
|
30
|
+
const connectionSchema = v.variant('kind', [
|
|
31
|
+
v.strictObject({
|
|
32
|
+
kind: v.literal('OAUTH'),
|
|
33
|
+
provider: v.picklist(['GMAIL', 'OUTLOOK']),
|
|
34
|
+
redirectUri: v.pipe(v.string(), v.url()),
|
|
35
|
+
}),
|
|
36
|
+
v.strictObject({
|
|
37
|
+
imap: providerCredentialSchema,
|
|
38
|
+
kind: v.literal('IMAP'),
|
|
39
|
+
smtp: providerCredentialSchema,
|
|
40
|
+
}),
|
|
41
|
+
]);
|
|
42
|
+
const connectionResultSchema = v.strictObject({
|
|
43
|
+
accountId: id.accountId.required(),
|
|
44
|
+
authorizationUrl: v.optional(v.pipe(v.string(), v.url())),
|
|
45
|
+
state: v.picklist(accountStates),
|
|
46
|
+
});
|
|
47
|
+
const completedSchema = v.strictObject({ state: v.literal('COMPLETED') });
|
|
48
|
+
const emptySchema = v.strictObject({});
|
|
49
|
+
const createRoute = (route) => ({
|
|
50
|
+
...route,
|
|
51
|
+
errorSchema: functionErrorSchema,
|
|
52
|
+
});
|
|
53
|
+
const apiRoutes = {
|
|
54
|
+
accountConnection: createRoute({
|
|
55
|
+
context: 'authenticated',
|
|
56
|
+
method: 'PUT',
|
|
57
|
+
path: '/accounts/connection',
|
|
58
|
+
requestSchema: v.strictObject({
|
|
59
|
+
accountId: id.accountId.required(),
|
|
60
|
+
connection: connectionSchema,
|
|
61
|
+
}),
|
|
62
|
+
responseSchema: connectionResultSchema,
|
|
63
|
+
}),
|
|
64
|
+
accountDelete: createRoute({
|
|
65
|
+
context: 'authenticated',
|
|
66
|
+
method: 'DELETE',
|
|
67
|
+
path: '/account/delete',
|
|
68
|
+
requestSchema: emptySchema,
|
|
69
|
+
responseSchema: v.strictObject({ state: v.literal('ACCEPTED') }),
|
|
70
|
+
}),
|
|
71
|
+
accountsConnect: createRoute({
|
|
72
|
+
context: 'authenticated',
|
|
73
|
+
method: 'POST',
|
|
74
|
+
path: '/accounts/connect',
|
|
75
|
+
requestSchema: v.strictObject({ connection: connectionSchema }),
|
|
76
|
+
responseSchema: connectionResultSchema,
|
|
77
|
+
}),
|
|
78
|
+
commands: createRoute({
|
|
79
|
+
context: 'authenticated',
|
|
80
|
+
method: 'POST',
|
|
81
|
+
path: '/commands',
|
|
82
|
+
requestSchema: appwriteCommands.requestSchema,
|
|
83
|
+
responseSchema: appwriteCommands.responseSchema,
|
|
84
|
+
}),
|
|
85
|
+
oauthWebhook: createRoute({
|
|
86
|
+
context: 'webhook',
|
|
87
|
+
method: 'GET',
|
|
88
|
+
path: '/webhooks/oauth',
|
|
89
|
+
requestSchema: v.strictObject({
|
|
90
|
+
code: string.required(4096),
|
|
91
|
+
state: string.required(4096),
|
|
92
|
+
}),
|
|
93
|
+
responseSchema: completedSchema,
|
|
94
|
+
}),
|
|
95
|
+
profileEnsure: createRoute({
|
|
96
|
+
context: 'authenticated',
|
|
97
|
+
method: 'POST',
|
|
98
|
+
path: '/profile/ensure',
|
|
99
|
+
requestSchema: emptySchema,
|
|
100
|
+
responseSchema: v.strictObject({ created: v.boolean() }),
|
|
101
|
+
}),
|
|
102
|
+
pushTokens: createRoute({
|
|
103
|
+
context: 'authenticated',
|
|
104
|
+
method: 'POST',
|
|
105
|
+
path: '/push-tokens',
|
|
106
|
+
requestSchema: v.strictObject({
|
|
107
|
+
operation: v.picklist(['REGISTER', 'REMOVE']),
|
|
108
|
+
token: string.required(4096),
|
|
109
|
+
}),
|
|
110
|
+
responseSchema: v.strictObject({ registered: v.boolean() }),
|
|
111
|
+
}),
|
|
112
|
+
};
|
|
113
|
+
const workerRoutes = {
|
|
114
|
+
jobsRun: createRoute({
|
|
115
|
+
context: 'internal',
|
|
116
|
+
method: 'POST',
|
|
117
|
+
path: '/jobs/run',
|
|
118
|
+
requestSchema: v.strictObject({ jobId: id.jobId.required() }),
|
|
119
|
+
responseSchema: completedSchema,
|
|
120
|
+
}),
|
|
121
|
+
supervisor: createRoute({
|
|
122
|
+
context: 'internal',
|
|
123
|
+
method: 'POST',
|
|
124
|
+
path: '/',
|
|
125
|
+
requestSchema: emptySchema,
|
|
126
|
+
responseSchema: completedSchema,
|
|
127
|
+
}),
|
|
128
|
+
watchersRun: createRoute({
|
|
129
|
+
context: 'internal',
|
|
130
|
+
method: 'POST',
|
|
131
|
+
path: '/watchers/run',
|
|
132
|
+
requestSchema: v.strictObject({ shardId: string.required() }),
|
|
133
|
+
responseSchema: completedSchema,
|
|
134
|
+
}),
|
|
135
|
+
};
|
|
136
|
+
export const appwriteFunctions = {
|
|
137
|
+
api: {
|
|
138
|
+
id: appwrite.ids.functions.api,
|
|
139
|
+
routes: apiRoutes,
|
|
140
|
+
},
|
|
141
|
+
errorCodes: functionErrorCodes,
|
|
142
|
+
errorSchema: functionErrorSchema,
|
|
143
|
+
worker: {
|
|
144
|
+
id: appwrite.ids.functions.worker,
|
|
145
|
+
routes: workerRoutes,
|
|
146
|
+
},
|
|
147
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.test.d.ts","sourceRoot":"","sources":["../../src/appwrite/functions.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { appwriteFunctions } from './functions';
|
|
4
|
+
const command = {
|
|
5
|
+
accountId: null,
|
|
6
|
+
id: '0197f3d4-1b22-7abc-8def-123456789abc',
|
|
7
|
+
kind: 'profile.settings.set',
|
|
8
|
+
payload: { name: 'Isaac' },
|
|
9
|
+
submittedAt: '2026-07-15T00:00:00.000Z',
|
|
10
|
+
version: 1,
|
|
11
|
+
};
|
|
12
|
+
const routeFixtures = [
|
|
13
|
+
{
|
|
14
|
+
name: 'profile ensure',
|
|
15
|
+
request: {},
|
|
16
|
+
response: { created: true },
|
|
17
|
+
route: () => appwriteFunctions.api.routes.profileEnsure,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'commands',
|
|
21
|
+
request: command,
|
|
22
|
+
response: { canonicalRevision: null, error: null, id: command.id, state: 'ACCEPTED' },
|
|
23
|
+
route: () => appwriteFunctions.api.routes.commands,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'account connection',
|
|
27
|
+
request: {
|
|
28
|
+
accountId: 'account_1',
|
|
29
|
+
connection: {
|
|
30
|
+
imap: {
|
|
31
|
+
host: 'imap.example.com',
|
|
32
|
+
password: 'password',
|
|
33
|
+
port: 993,
|
|
34
|
+
socketType: 'SSL',
|
|
35
|
+
user: 'marco@example.com',
|
|
36
|
+
},
|
|
37
|
+
kind: 'IMAP',
|
|
38
|
+
smtp: {
|
|
39
|
+
host: 'smtp.example.com',
|
|
40
|
+
password: 'password',
|
|
41
|
+
port: 465,
|
|
42
|
+
socketType: 'SSL',
|
|
43
|
+
user: 'marco@example.com',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
response: { accountId: 'account_1', state: 'CONNECTED' },
|
|
48
|
+
route: () => appwriteFunctions.api.routes.accountConnection,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'account connect',
|
|
52
|
+
request: { connection: { kind: 'OAUTH', provider: 'GMAIL', redirectUri: 'https://marco.app/oauth' } },
|
|
53
|
+
response: {
|
|
54
|
+
accountId: 'account_1',
|
|
55
|
+
authorizationUrl: 'https://accounts.google.com/o/oauth2/auth',
|
|
56
|
+
state: 'AWAITING_CONNECTION',
|
|
57
|
+
},
|
|
58
|
+
route: () => appwriteFunctions.api.routes.accountsConnect,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'push tokens',
|
|
62
|
+
request: { operation: 'REGISTER', token: 'ExponentPushToken[example]' },
|
|
63
|
+
response: { registered: true },
|
|
64
|
+
route: () => appwriteFunctions.api.routes.pushTokens,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'account deletion',
|
|
68
|
+
request: {},
|
|
69
|
+
response: { state: 'ACCEPTED' },
|
|
70
|
+
route: () => appwriteFunctions.api.routes.accountDelete,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'OAuth webhook',
|
|
74
|
+
request: { code: 'authorisation-code', state: 'state' },
|
|
75
|
+
response: { state: 'COMPLETED' },
|
|
76
|
+
route: () => appwriteFunctions.api.routes.oauthWebhook,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'worker supervisor',
|
|
80
|
+
request: {},
|
|
81
|
+
response: { state: 'COMPLETED' },
|
|
82
|
+
route: () => appwriteFunctions.worker.routes.supervisor,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'job runner',
|
|
86
|
+
request: { jobId: 'job_1' },
|
|
87
|
+
response: { state: 'COMPLETED' },
|
|
88
|
+
route: () => appwriteFunctions.worker.routes.jobsRun,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'watcher runner',
|
|
92
|
+
request: { shardId: 'watcher-shard_1' },
|
|
93
|
+
response: { state: 'COMPLETED' },
|
|
94
|
+
route: () => appwriteFunctions.worker.routes.watchersRun,
|
|
95
|
+
},
|
|
96
|
+
];
|
|
97
|
+
describe('appwriteFunctions', () => {
|
|
98
|
+
it('publishes the complete Appwrite Function route manifest', () => {
|
|
99
|
+
expect([
|
|
100
|
+
{ functionId: appwriteFunctions.api.id, route: appwriteFunctions.api.routes.profileEnsure },
|
|
101
|
+
{ functionId: appwriteFunctions.api.id, route: appwriteFunctions.api.routes.commands },
|
|
102
|
+
{ functionId: appwriteFunctions.api.id, route: appwriteFunctions.api.routes.accountsConnect },
|
|
103
|
+
{ functionId: appwriteFunctions.api.id, route: appwriteFunctions.api.routes.accountConnection },
|
|
104
|
+
{ functionId: appwriteFunctions.api.id, route: appwriteFunctions.api.routes.pushTokens },
|
|
105
|
+
{ functionId: appwriteFunctions.api.id, route: appwriteFunctions.api.routes.accountDelete },
|
|
106
|
+
{ functionId: appwriteFunctions.api.id, route: appwriteFunctions.api.routes.oauthWebhook },
|
|
107
|
+
{ functionId: appwriteFunctions.worker.id, route: appwriteFunctions.worker.routes.supervisor },
|
|
108
|
+
{ functionId: appwriteFunctions.worker.id, route: appwriteFunctions.worker.routes.jobsRun },
|
|
109
|
+
{ functionId: appwriteFunctions.worker.id, route: appwriteFunctions.worker.routes.watchersRun },
|
|
110
|
+
].map(({ functionId, route }) => ({
|
|
111
|
+
context: route.context,
|
|
112
|
+
functionId,
|
|
113
|
+
method: route.method,
|
|
114
|
+
path: route.path,
|
|
115
|
+
}))).toEqual([
|
|
116
|
+
{ context: 'authenticated', functionId: 'marco-api', method: 'POST', path: '/profile/ensure' },
|
|
117
|
+
{ context: 'authenticated', functionId: 'marco-api', method: 'POST', path: '/commands' },
|
|
118
|
+
{ context: 'authenticated', functionId: 'marco-api', method: 'POST', path: '/accounts/connect' },
|
|
119
|
+
{ context: 'authenticated', functionId: 'marco-api', method: 'PUT', path: '/accounts/connection' },
|
|
120
|
+
{ context: 'authenticated', functionId: 'marco-api', method: 'POST', path: '/push-tokens' },
|
|
121
|
+
{ context: 'authenticated', functionId: 'marco-api', method: 'DELETE', path: '/account/delete' },
|
|
122
|
+
{ context: 'webhook', functionId: 'marco-api', method: 'GET', path: '/webhooks/oauth' },
|
|
123
|
+
{ context: 'internal', functionId: 'marco-worker', method: 'POST', path: '/' },
|
|
124
|
+
{ context: 'internal', functionId: 'marco-worker', method: 'POST', path: '/jobs/run' },
|
|
125
|
+
{ context: 'internal', functionId: 'marco-worker', method: 'POST', path: '/watchers/run' },
|
|
126
|
+
]);
|
|
127
|
+
});
|
|
128
|
+
for (const { name, request, response, route } of routeFixtures) {
|
|
129
|
+
it(`accepts the ${name} request and response`, () => {
|
|
130
|
+
expect(v.safeParse(route().requestSchema, request).success).toBe(true);
|
|
131
|
+
expect(v.safeParse(route().responseSchema, response).success).toBe(true);
|
|
132
|
+
});
|
|
133
|
+
it(`rejects caller ownership in the ${name} request and response`, () => {
|
|
134
|
+
expect(v.safeParse(route().requestSchema, { ...request, userId: 'another-user' }).success).toBe(false);
|
|
135
|
+
expect(v.safeParse(route().responseSchema, { ...response, userId: 'another-user' }).success).toBe(false);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
it('redacts credentials from connection responses and compact errors', () => {
|
|
139
|
+
expect(v.safeParse(appwriteFunctions.api.routes.accountsConnect.responseSchema, {
|
|
140
|
+
accountId: 'account_1',
|
|
141
|
+
credentials: { password: 'secret' },
|
|
142
|
+
state: 'CONNECTED',
|
|
143
|
+
}).success).toBe(false);
|
|
144
|
+
expect(v.safeParse(appwriteFunctions.errorSchema, {
|
|
145
|
+
code: 'AUTHENTICATION_FAILED',
|
|
146
|
+
retryable: false,
|
|
147
|
+
}).success).toBe(true);
|
|
148
|
+
expect(v.safeParse(appwriteFunctions.errorSchema, {
|
|
149
|
+
code: 'AUTHENTICATION_FAILED',
|
|
150
|
+
credentials: 'secret',
|
|
151
|
+
retryable: false,
|
|
152
|
+
}).success).toBe(false);
|
|
153
|
+
});
|
|
154
|
+
});
|
package/dist/appwrite/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { type AppwriteRow, type AppwriteRowTable, appwrite } from './appwrite';
|
|
2
2
|
export { type AppwriteCommandError, type AppwriteCommandKind, type AppwriteCommandPayload, type AppwriteCommandRequest, type AppwriteCommandResponse, type AppwriteCommandState, appwriteCommands, } from './commands';
|
|
3
|
+
export { type AppwriteFunctionContext, type AppwriteFunctionError, type AppwriteFunctionName, type AppwriteFunctionRequest, type AppwriteFunctionResponse, type AppwriteFunctionRoute, type AppwriteFunctionRouteName, appwriteFunctions, } from './functions';
|
|
3
4
|
//# 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;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"}
|
|
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;AACnB,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,iBAAiB,GAClB,MAAM,aAAa,CAAA"}
|
package/dist/appwrite/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { type AppwriteCommandError, type AppwriteCommandKind, type AppwriteCommandPayload, type AppwriteCommandRequest, type AppwriteCommandResponse, type AppwriteCommandState, type AppwriteRow, type AppwriteRowTable, appwrite, appwriteCommands, } from './appwrite';
|
|
1
|
+
export { type AppwriteCommandError, type AppwriteCommandKind, type AppwriteCommandPayload, type AppwriteCommandRequest, type AppwriteCommandResponse, type AppwriteCommandState, type AppwriteFunctionContext, type AppwriteFunctionError, type AppwriteFunctionName, type AppwriteFunctionRequest, type AppwriteFunctionResponse, type AppwriteFunctionRoute, type AppwriteFunctionRouteName, type AppwriteRow, type AppwriteRowTable, appwrite, appwriteCommands, appwriteFunctions, } from './appwrite';
|
|
2
2
|
export { marcoConstants } from './constants';
|
|
3
3
|
export { MARCO_ENV, MarcoEnvironment, marcoPublicConfig } from './marcoPublicConfig';
|
|
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';
|
|
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 JobId, 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';
|
|
5
5
|
export { marcoSDK } from './sdk';
|
|
6
6
|
export * from './types';
|
|
7
7
|
export { accountUtils, labelUtils, threadsUtils } from './utils';
|
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,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,
|
|
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,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,GAClB,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,KAAK,EACV,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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { appwrite, appwriteCommands, } from './appwrite';
|
|
1
|
+
export { appwrite, appwriteCommands, appwriteFunctions, } from './appwrite';
|
|
2
2
|
export { marcoConstants } from './constants';
|
|
3
3
|
export { MARCO_ENV, marcoPublicConfig } from './marcoPublicConfig';
|
|
4
4
|
export { marcoSchemas, } from './schemas';
|
package/dist/schemas/id.d.ts
CHANGED
|
@@ -20,6 +20,10 @@ export declare const id: {
|
|
|
20
20
|
nullable: (maxLength?: number) => v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
21
21
|
required: (maxLength?: number) => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
|
|
22
22
|
};
|
|
23
|
+
jobId: {
|
|
24
|
+
nullable: (maxLength?: number) => v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "JobId">]>, undefined>;
|
|
25
|
+
required: (maxLength?: number) => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "JobId">]>, undefined>;
|
|
26
|
+
};
|
|
23
27
|
labelId: {
|
|
24
28
|
nullable: (maxLength?: number) => v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
25
29
|
required: (maxLength?: number) => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
@@ -54,6 +58,7 @@ export type AliasId = v.InferOutput<ReturnType<typeof id.aliasId.required>>;
|
|
|
54
58
|
export type AttachmentId = v.InferOutput<ReturnType<typeof id.attachmentId.required>>;
|
|
55
59
|
export type ContactId = v.InferOutput<ReturnType<typeof id.contactId.required>>;
|
|
56
60
|
export type DraftId = v.InferOutput<ReturnType<typeof id.draftId.required>>;
|
|
61
|
+
export type JobId = v.InferOutput<ReturnType<typeof id.jobId.required>>;
|
|
57
62
|
export type LabelId = v.InferOutput<ReturnType<typeof id.labelId.required>>;
|
|
58
63
|
export type MessageId = v.InferOutput<ReturnType<typeof id.messageId.required>>;
|
|
59
64
|
export type PushNotificationTokenId = v.InferOutput<ReturnType<typeof id.pushNotificationTokenId.required>>;
|
package/dist/schemas/id.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/schemas/id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/schemas/id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcd,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC/E,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC3E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAA;AACrF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC/E,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC3E,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AACvE,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC3E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC/E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC3G,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAA;AACnF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC7E,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA;AACzE,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA"}
|
package/dist/schemas/id.js
CHANGED
|
@@ -9,6 +9,7 @@ export const id = {
|
|
|
9
9
|
attachmentId: brandedId('AttachmentId'),
|
|
10
10
|
contactId: brandedId('ContactId'),
|
|
11
11
|
draftId: brandedId('DraftId'),
|
|
12
|
+
jobId: brandedId('JobId'),
|
|
12
13
|
labelId: brandedId('LabelId'),
|
|
13
14
|
messageId: brandedId('MessageId'),
|
|
14
15
|
pushNotificationTokenId: brandedId('PushNotificationTokenId'),
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type StripeUserData } from './stripe';
|
|
2
2
|
export type { StripeUserData };
|
|
3
|
-
export type { AccountId, AliasId, AttachmentId, ContactId, DraftId, LabelId, MessageId, PushNotificationTokenId, RecipientId, ThreadId, UserId, ViewId, } from './id';
|
|
3
|
+
export type { AccountId, AliasId, AttachmentId, ContactId, DraftId, JobId, LabelId, MessageId, PushNotificationTokenId, RecipientId, ThreadId, UserId, ViewId, } from './id';
|
|
4
4
|
export type { Account, AccountAlias, AccountLabel, Contact, Draft, DraftAttachment, DraftBody, Thread, ThreadMessage, ThreadMessageAttachment, ThreadMessageRecipient, User, UserPushNotificationToken, UserView, } from './models';
|
|
5
5
|
export { mutatorSchemas } from './mutators';
|
|
6
6
|
export declare const marcoSchemas: {
|
|
@@ -59,6 +59,10 @@ export declare const marcoSchemas: {
|
|
|
59
59
|
nullable: (maxLength?: number) => import("valibot").NullableSchema<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>;
|
|
60
60
|
required: (maxLength?: number) => 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>;
|
|
61
61
|
};
|
|
62
|
+
jobId: {
|
|
63
|
+
nullable: (maxLength?: number) => import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "JobId">]>, undefined>;
|
|
64
|
+
required: (maxLength?: number) => 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, "JobId">]>, undefined>;
|
|
65
|
+
};
|
|
62
66
|
labelId: {
|
|
63
67
|
nullable: (maxLength?: number) => import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "LabelId">]>, undefined>;
|
|
64
68
|
required: (maxLength?: number) => 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, "LabelId">]>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,UAAU,CAAA;AAGpE,YAAY,EAAE,cAAc,EAAE,CAAA;AAE9B,YAAY,EACV,SAAS,EACT,OAAO,EACP,YAAY,EACZ,SAAS,EACT,OAAO,EACP,OAAO,EACP,SAAS,EACT,uBAAuB,EACvB,WAAW,EACX,QAAQ,EACR,MAAM,EACN,MAAM,GACP,MAAM,MAAM,CAAA;AACb,YAAY,EACV,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,KAAK,EACL,eAAe,EACf,SAAS,EACT,MAAM,EACN,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,IAAI,EACJ,yBAAyB,EACzB,QAAQ,GACT,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAE3C,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,UAAU,CAAA;AAGpE,YAAY,EAAE,cAAc,EAAE,CAAA;AAE9B,YAAY,EACV,SAAS,EACT,OAAO,EACP,YAAY,EACZ,SAAS,EACT,OAAO,EACP,KAAK,EACL,OAAO,EACP,SAAS,EACT,uBAAuB,EACvB,WAAW,EACX,QAAQ,EACR,MAAM,EACN,MAAM,GACP,MAAM,MAAM,CAAA;AACb,YAAY,EACV,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,KAAK,EACL,eAAe,EACf,SAAS,EACT,MAAM,EACN,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,IAAI,EACJ,yBAAyB,EACzB,QAAQ,GACT,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAE3C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxB,CAAA"}
|