@workwae/sdk 0.0.0-stage → 0.1.0-alpha.1
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/README.md +233 -2
- package/client.d.ts +36 -0
- package/contract/accounts/models.d.ts +726 -0
- package/contract/accounts/routes.d.ts +1318 -0
- package/contract/ai/models.d.ts +30 -0
- package/contract/ai/routes.d.ts +89 -0
- package/contract/audit-log/models.d.ts +107 -0
- package/contract/audit-log/routes.d.ts +72 -0
- package/contract/calendar/models.d.ts +837 -0
- package/contract/calendar/routes.d.ts +1299 -0
- package/contract/connect/models.d.ts +272 -0
- package/contract/connect/routes.d.ts +531 -0
- package/contract/contacts/models.d.ts +269 -0
- package/contract/contacts/routes.d.ts +634 -0
- package/contract/errors.d.ts +108 -0
- package/contract/events/models.d.ts +2364 -0
- package/contract/events/routes.d.ts +107 -0
- package/contract/exports/models.d.ts +67 -0
- package/contract/exports/routes.d.ts +196 -0
- package/contract/identities/models.d.ts +100 -0
- package/contract/identities/routes.d.ts +249 -0
- package/contract/limits.d.ts +170 -0
- package/contract/mail/models.d.ts +528 -0
- package/contract/mail/routes.d.ts +749 -0
- package/contract/meetings/models.d.ts +232 -0
- package/contract/meetings/routes.d.ts +386 -0
- package/contract/oauth-apps/models.d.ts +92 -0
- package/contract/oauth-apps/routes.d.ts +187 -0
- package/contract/org-connections/models.d.ts +383 -0
- package/contract/org-connections/routes.d.ts +830 -0
- package/contract/primitives.d.ts +140 -0
- package/contract/public.d.ts +26 -0
- package/contract/reasons.d.ts +711 -0
- package/contract/router.d.ts +9773 -0
- package/contract/send/models.d.ts +750 -0
- package/contract/send/routes.d.ts +1239 -0
- package/contract/settings/models.d.ts +103 -0
- package/contract/settings/routes.d.ts +110 -0
- package/contract/suppressions/models.d.ts +231 -0
- package/contract/suppressions/routes.d.ts +317 -0
- package/contract/templates/models.d.ts +169 -0
- package/contract/templates/routes.d.ts +281 -0
- package/contract/threads/models.d.ts +117 -0
- package/contract/threads/routes.d.ts +336 -0
- package/contract/usage/models.d.ts +213 -0
- package/contract/usage/routes.d.ts +81 -0
- package/contract/webhooks/models.d.ts +879 -0
- package/contract/webhooks/routes.d.ts +839 -0
- package/contract/webhooks/signing.d.ts +35 -0
- package/errors.d.ts +15 -0
- package/index.d.ts +6 -0
- package/index.js +4334 -0
- package/index.js.map +59 -0
- package/package.json +45 -4
- package/pagination.d.ts +40 -0
- package/webhooks.d.ts +28 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const MailboxRole: z.ZodEnum<{
|
|
3
|
+
custom: "custom";
|
|
4
|
+
inbox: "inbox";
|
|
5
|
+
sent: "sent";
|
|
6
|
+
drafts: "drafts";
|
|
7
|
+
trash: "trash";
|
|
8
|
+
junk: "junk";
|
|
9
|
+
archive: "archive";
|
|
10
|
+
all: "all";
|
|
11
|
+
important: "important";
|
|
12
|
+
}>;
|
|
13
|
+
export type MailboxRole = z.infer<typeof MailboxRole>;
|
|
14
|
+
/** folder: a message is in exactly one (Microsoft). label: a message can carry several (Gmail). */
|
|
15
|
+
export declare const MailboxKind: z.ZodEnum<{
|
|
16
|
+
label: "label";
|
|
17
|
+
folder: "folder";
|
|
18
|
+
}>;
|
|
19
|
+
export type MailboxKind = z.infer<typeof MailboxKind>;
|
|
20
|
+
export declare const Mailbox: z.ZodObject<{
|
|
21
|
+
id: z.ZodUUID;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
path: z.ZodString;
|
|
24
|
+
parentId: z.ZodNullable<z.ZodUUID>;
|
|
25
|
+
role: z.ZodEnum<{
|
|
26
|
+
custom: "custom";
|
|
27
|
+
inbox: "inbox";
|
|
28
|
+
sent: "sent";
|
|
29
|
+
drafts: "drafts";
|
|
30
|
+
trash: "trash";
|
|
31
|
+
junk: "junk";
|
|
32
|
+
archive: "archive";
|
|
33
|
+
all: "all";
|
|
34
|
+
important: "important";
|
|
35
|
+
}>;
|
|
36
|
+
kind: z.ZodEnum<{
|
|
37
|
+
label: "label";
|
|
38
|
+
folder: "folder";
|
|
39
|
+
}>;
|
|
40
|
+
totalCount: z.ZodNullable<z.ZodNumber>;
|
|
41
|
+
unreadCount: z.ZodNullable<z.ZodNumber>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export type Mailbox = z.infer<typeof Mailbox>;
|
|
44
|
+
export declare const MailboxList: z.ZodObject<{
|
|
45
|
+
items: z.ZodArray<z.ZodObject<{
|
|
46
|
+
id: z.ZodUUID;
|
|
47
|
+
name: z.ZodString;
|
|
48
|
+
path: z.ZodString;
|
|
49
|
+
parentId: z.ZodNullable<z.ZodUUID>;
|
|
50
|
+
role: z.ZodEnum<{
|
|
51
|
+
custom: "custom";
|
|
52
|
+
inbox: "inbox";
|
|
53
|
+
sent: "sent";
|
|
54
|
+
drafts: "drafts";
|
|
55
|
+
trash: "trash";
|
|
56
|
+
junk: "junk";
|
|
57
|
+
archive: "archive";
|
|
58
|
+
all: "all";
|
|
59
|
+
important: "important";
|
|
60
|
+
}>;
|
|
61
|
+
kind: z.ZodEnum<{
|
|
62
|
+
label: "label";
|
|
63
|
+
folder: "folder";
|
|
64
|
+
}>;
|
|
65
|
+
totalCount: z.ZodNullable<z.ZodNumber>;
|
|
66
|
+
unreadCount: z.ZodNullable<z.ZodNumber>;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type MailboxList = z.infer<typeof MailboxList>;
|
|
70
|
+
/** The Mailbox fields mailbox.updated names in `changes` (the counts move without an event). */
|
|
71
|
+
export declare const MailboxChangedField: z.ZodEnum<{
|
|
72
|
+
path: "path";
|
|
73
|
+
name: "name";
|
|
74
|
+
kind: "kind";
|
|
75
|
+
role: "role";
|
|
76
|
+
parentId: "parentId";
|
|
77
|
+
}>;
|
|
78
|
+
export type MailboxChangedField = z.infer<typeof MailboxChangedField>;
|
|
79
|
+
/**
|
|
80
|
+
* outbound: the message is in a mailbox with role `sent`, or its From is the account's own address
|
|
81
|
+
* or one of its identities (so drafts are outbound too). inbound: everything else.
|
|
82
|
+
*/
|
|
83
|
+
export declare const MessageDirection: z.ZodEnum<{
|
|
84
|
+
inbound: "inbound";
|
|
85
|
+
outbound: "outbound";
|
|
86
|
+
}>;
|
|
87
|
+
export type MessageDirection = z.infer<typeof MessageDirection>;
|
|
88
|
+
/**
|
|
89
|
+
* The priority mail clients mark with "!" (high) or a down arrow (low). Sent as
|
|
90
|
+
* X-Priority, X-MSMail-Priority, Importance and Priority headers; read from Graph's `importance`
|
|
91
|
+
* and from those headers on Gmail and IMAP.
|
|
92
|
+
*/
|
|
93
|
+
export declare const MessagePriority: z.ZodEnum<{
|
|
94
|
+
normal: "normal";
|
|
95
|
+
high: "high";
|
|
96
|
+
low: "low";
|
|
97
|
+
}>;
|
|
98
|
+
export type MessagePriority = z.infer<typeof MessagePriority>;
|
|
99
|
+
export declare const MessageSummary: z.ZodObject<{
|
|
100
|
+
id: z.ZodUUID;
|
|
101
|
+
threadId: z.ZodNullable<z.ZodString>;
|
|
102
|
+
internetMessageId: z.ZodNullable<z.ZodString>;
|
|
103
|
+
mailboxIds: z.ZodArray<z.ZodUUID>;
|
|
104
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
105
|
+
from: z.ZodNullable<z.ZodObject<{
|
|
106
|
+
name: z.ZodNullable<z.ZodString>;
|
|
107
|
+
address: z.ZodString;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
to: z.ZodArray<z.ZodObject<{
|
|
110
|
+
name: z.ZodNullable<z.ZodString>;
|
|
111
|
+
address: z.ZodString;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
cc: z.ZodArray<z.ZodObject<{
|
|
114
|
+
name: z.ZodNullable<z.ZodString>;
|
|
115
|
+
address: z.ZodString;
|
|
116
|
+
}, z.core.$strip>>;
|
|
117
|
+
snippet: z.ZodNullable<z.ZodString>;
|
|
118
|
+
receivedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
119
|
+
sentAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
120
|
+
isRead: z.ZodBoolean;
|
|
121
|
+
isFlagged: z.ZodBoolean;
|
|
122
|
+
isDraft: z.ZodBoolean;
|
|
123
|
+
hasAttachments: z.ZodBoolean;
|
|
124
|
+
categories: z.ZodArray<z.ZodString>;
|
|
125
|
+
direction: z.ZodEnum<{
|
|
126
|
+
inbound: "inbound";
|
|
127
|
+
outbound: "outbound";
|
|
128
|
+
}>;
|
|
129
|
+
outboxId: z.ZodNullable<z.ZodUUID>;
|
|
130
|
+
reference: z.ZodNullable<z.ZodString>;
|
|
131
|
+
importance: z.ZodNullable<z.ZodEnum<{
|
|
132
|
+
normal: "normal";
|
|
133
|
+
high: "high";
|
|
134
|
+
low: "low";
|
|
135
|
+
}>>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
export type MessageSummary = z.infer<typeof MessageSummary>;
|
|
138
|
+
/** The Message fields message.updated names in `changes`. `reference` changes only with
|
|
139
|
+
* outboxId and is not named on its own. */
|
|
140
|
+
export declare const MessageChangedField: z.ZodEnum<{
|
|
141
|
+
from: "from";
|
|
142
|
+
to: "to";
|
|
143
|
+
subject: "subject";
|
|
144
|
+
snippet: "snippet";
|
|
145
|
+
categories: "categories";
|
|
146
|
+
hasAttachments: "hasAttachments";
|
|
147
|
+
direction: "direction";
|
|
148
|
+
threadId: "threadId";
|
|
149
|
+
internetMessageId: "internetMessageId";
|
|
150
|
+
mailboxIds: "mailboxIds";
|
|
151
|
+
cc: "cc";
|
|
152
|
+
receivedAt: "receivedAt";
|
|
153
|
+
sentAt: "sentAt";
|
|
154
|
+
isRead: "isRead";
|
|
155
|
+
isFlagged: "isFlagged";
|
|
156
|
+
isDraft: "isDraft";
|
|
157
|
+
outboxId: "outboxId";
|
|
158
|
+
importance: "importance";
|
|
159
|
+
bcc: "bcc";
|
|
160
|
+
replyTo: "replyTo";
|
|
161
|
+
}>;
|
|
162
|
+
export type MessageChangedField = z.infer<typeof MessageChangedField>;
|
|
163
|
+
export declare const MessageSummaryPage: z.ZodObject<{
|
|
164
|
+
items: z.ZodArray<z.ZodObject<{
|
|
165
|
+
id: z.ZodUUID;
|
|
166
|
+
threadId: z.ZodNullable<z.ZodString>;
|
|
167
|
+
internetMessageId: z.ZodNullable<z.ZodString>;
|
|
168
|
+
mailboxIds: z.ZodArray<z.ZodUUID>;
|
|
169
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
170
|
+
from: z.ZodNullable<z.ZodObject<{
|
|
171
|
+
name: z.ZodNullable<z.ZodString>;
|
|
172
|
+
address: z.ZodString;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
to: z.ZodArray<z.ZodObject<{
|
|
175
|
+
name: z.ZodNullable<z.ZodString>;
|
|
176
|
+
address: z.ZodString;
|
|
177
|
+
}, z.core.$strip>>;
|
|
178
|
+
cc: z.ZodArray<z.ZodObject<{
|
|
179
|
+
name: z.ZodNullable<z.ZodString>;
|
|
180
|
+
address: z.ZodString;
|
|
181
|
+
}, z.core.$strip>>;
|
|
182
|
+
snippet: z.ZodNullable<z.ZodString>;
|
|
183
|
+
receivedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
184
|
+
sentAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
185
|
+
isRead: z.ZodBoolean;
|
|
186
|
+
isFlagged: z.ZodBoolean;
|
|
187
|
+
isDraft: z.ZodBoolean;
|
|
188
|
+
hasAttachments: z.ZodBoolean;
|
|
189
|
+
categories: z.ZodArray<z.ZodString>;
|
|
190
|
+
direction: z.ZodEnum<{
|
|
191
|
+
inbound: "inbound";
|
|
192
|
+
outbound: "outbound";
|
|
193
|
+
}>;
|
|
194
|
+
outboxId: z.ZodNullable<z.ZodUUID>;
|
|
195
|
+
reference: z.ZodNullable<z.ZodString>;
|
|
196
|
+
importance: z.ZodNullable<z.ZodEnum<{
|
|
197
|
+
normal: "normal";
|
|
198
|
+
high: "high";
|
|
199
|
+
low: "low";
|
|
200
|
+
}>>;
|
|
201
|
+
}, z.core.$strip>>;
|
|
202
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
export type MessageSummaryPage = z.infer<typeof MessageSummaryPage>;
|
|
205
|
+
export declare const Attachment: z.ZodObject<{
|
|
206
|
+
id: z.ZodString;
|
|
207
|
+
filename: z.ZodNullable<z.ZodString>;
|
|
208
|
+
contentType: z.ZodString;
|
|
209
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
210
|
+
isInline: z.ZodBoolean;
|
|
211
|
+
contentId: z.ZodNullable<z.ZodString>;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
export type Attachment = z.infer<typeof Attachment>;
|
|
214
|
+
/** What AI made of a reply to one of your sends (see the tenant setting aiReplyClassification). */
|
|
215
|
+
export declare const ReplyKind: z.ZodEnum<{
|
|
216
|
+
opt_out: "opt_out";
|
|
217
|
+
auto_reply: "auto_reply";
|
|
218
|
+
bounce: "bounce";
|
|
219
|
+
human_reply: "human_reply";
|
|
220
|
+
}>;
|
|
221
|
+
export type ReplyKind = z.infer<typeof ReplyKind>;
|
|
222
|
+
/** What kind of automatic answer an auto_reply is. out_of_office: away for a while;
|
|
223
|
+
* left_company: the person no longer works there, or the mailbox is unmonitored; address_changed:
|
|
224
|
+
* gives a new address to use; ticket_acknowledgment: an automated receipt or ticket number;
|
|
225
|
+
* challenge_response: asks the sender to verify before the mail is delivered; other: any other
|
|
226
|
+
* automatic answer. */
|
|
227
|
+
export declare const AutoReplyCategory: z.ZodEnum<{
|
|
228
|
+
other: "other";
|
|
229
|
+
out_of_office: "out_of_office";
|
|
230
|
+
left_company: "left_company";
|
|
231
|
+
address_changed: "address_changed";
|
|
232
|
+
ticket_acknowledgment: "ticket_acknowledgment";
|
|
233
|
+
challenge_response: "challenge_response";
|
|
234
|
+
}>;
|
|
235
|
+
export type AutoReplyCategory = z.infer<typeof AutoReplyCategory>;
|
|
236
|
+
export declare const MessageClassification: z.ZodObject<{
|
|
237
|
+
kind: z.ZodEnum<{
|
|
238
|
+
opt_out: "opt_out";
|
|
239
|
+
auto_reply: "auto_reply";
|
|
240
|
+
bounce: "bounce";
|
|
241
|
+
human_reply: "human_reply";
|
|
242
|
+
}>;
|
|
243
|
+
probabilities: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
244
|
+
optOutProbability: z.ZodNumber;
|
|
245
|
+
autoReplyCategory: z.ZodNullable<z.ZodEnum<{
|
|
246
|
+
other: "other";
|
|
247
|
+
out_of_office: "out_of_office";
|
|
248
|
+
left_company: "left_company";
|
|
249
|
+
address_changed: "address_changed";
|
|
250
|
+
ticket_acknowledgment: "ticket_acknowledgment";
|
|
251
|
+
challenge_response: "challenge_response";
|
|
252
|
+
}>>;
|
|
253
|
+
returnDate: z.ZodNullable<z.ZodISODate>;
|
|
254
|
+
alternateContacts: z.ZodArray<z.ZodString>;
|
|
255
|
+
outboxId: z.ZodNullable<z.ZodUUID>;
|
|
256
|
+
model: z.ZodString;
|
|
257
|
+
classifiedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
export type MessageClassification = z.infer<typeof MessageClassification>;
|
|
260
|
+
/** Served from stored content when the account stores bodies (bodyStorage cache or full),
|
|
261
|
+
* otherwise fetched from the provider on request; null parts are absent from the message. */
|
|
262
|
+
export declare const MessageBody: z.ZodObject<{
|
|
263
|
+
text: z.ZodNullable<z.ZodString>;
|
|
264
|
+
html: z.ZodNullable<z.ZodString>;
|
|
265
|
+
}, z.core.$strip>;
|
|
266
|
+
export type MessageBody = z.infer<typeof MessageBody>;
|
|
267
|
+
export declare const Message: z.ZodObject<{
|
|
268
|
+
id: z.ZodUUID;
|
|
269
|
+
threadId: z.ZodNullable<z.ZodString>;
|
|
270
|
+
internetMessageId: z.ZodNullable<z.ZodString>;
|
|
271
|
+
mailboxIds: z.ZodArray<z.ZodUUID>;
|
|
272
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
273
|
+
from: z.ZodNullable<z.ZodObject<{
|
|
274
|
+
name: z.ZodNullable<z.ZodString>;
|
|
275
|
+
address: z.ZodString;
|
|
276
|
+
}, z.core.$strip>>;
|
|
277
|
+
to: z.ZodArray<z.ZodObject<{
|
|
278
|
+
name: z.ZodNullable<z.ZodString>;
|
|
279
|
+
address: z.ZodString;
|
|
280
|
+
}, z.core.$strip>>;
|
|
281
|
+
cc: z.ZodArray<z.ZodObject<{
|
|
282
|
+
name: z.ZodNullable<z.ZodString>;
|
|
283
|
+
address: z.ZodString;
|
|
284
|
+
}, z.core.$strip>>;
|
|
285
|
+
snippet: z.ZodNullable<z.ZodString>;
|
|
286
|
+
receivedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
287
|
+
sentAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
288
|
+
isRead: z.ZodBoolean;
|
|
289
|
+
isFlagged: z.ZodBoolean;
|
|
290
|
+
isDraft: z.ZodBoolean;
|
|
291
|
+
hasAttachments: z.ZodBoolean;
|
|
292
|
+
categories: z.ZodArray<z.ZodString>;
|
|
293
|
+
direction: z.ZodEnum<{
|
|
294
|
+
inbound: "inbound";
|
|
295
|
+
outbound: "outbound";
|
|
296
|
+
}>;
|
|
297
|
+
outboxId: z.ZodNullable<z.ZodUUID>;
|
|
298
|
+
reference: z.ZodNullable<z.ZodString>;
|
|
299
|
+
importance: z.ZodNullable<z.ZodEnum<{
|
|
300
|
+
normal: "normal";
|
|
301
|
+
high: "high";
|
|
302
|
+
low: "low";
|
|
303
|
+
}>>;
|
|
304
|
+
bcc: z.ZodArray<z.ZodObject<{
|
|
305
|
+
name: z.ZodNullable<z.ZodString>;
|
|
306
|
+
address: z.ZodString;
|
|
307
|
+
}, z.core.$strip>>;
|
|
308
|
+
replyTo: z.ZodArray<z.ZodObject<{
|
|
309
|
+
name: z.ZodNullable<z.ZodString>;
|
|
310
|
+
address: z.ZodString;
|
|
311
|
+
}, z.core.$strip>>;
|
|
312
|
+
body: z.ZodObject<{
|
|
313
|
+
text: z.ZodNullable<z.ZodString>;
|
|
314
|
+
html: z.ZodNullable<z.ZodString>;
|
|
315
|
+
}, z.core.$strip>;
|
|
316
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
317
|
+
id: z.ZodString;
|
|
318
|
+
filename: z.ZodNullable<z.ZodString>;
|
|
319
|
+
contentType: z.ZodString;
|
|
320
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
321
|
+
isInline: z.ZodBoolean;
|
|
322
|
+
contentId: z.ZodNullable<z.ZodString>;
|
|
323
|
+
}, z.core.$strip>>;
|
|
324
|
+
classification: z.ZodNullable<z.ZodObject<{
|
|
325
|
+
kind: z.ZodEnum<{
|
|
326
|
+
opt_out: "opt_out";
|
|
327
|
+
auto_reply: "auto_reply";
|
|
328
|
+
bounce: "bounce";
|
|
329
|
+
human_reply: "human_reply";
|
|
330
|
+
}>;
|
|
331
|
+
probabilities: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
332
|
+
optOutProbability: z.ZodNumber;
|
|
333
|
+
autoReplyCategory: z.ZodNullable<z.ZodEnum<{
|
|
334
|
+
other: "other";
|
|
335
|
+
out_of_office: "out_of_office";
|
|
336
|
+
left_company: "left_company";
|
|
337
|
+
address_changed: "address_changed";
|
|
338
|
+
ticket_acknowledgment: "ticket_acknowledgment";
|
|
339
|
+
challenge_response: "challenge_response";
|
|
340
|
+
}>>;
|
|
341
|
+
returnDate: z.ZodNullable<z.ZodISODate>;
|
|
342
|
+
alternateContacts: z.ZodArray<z.ZodString>;
|
|
343
|
+
outboxId: z.ZodNullable<z.ZodUUID>;
|
|
344
|
+
model: z.ZodString;
|
|
345
|
+
classifiedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
346
|
+
}, z.core.$strip>>;
|
|
347
|
+
}, z.core.$strip>;
|
|
348
|
+
export type Message = z.infer<typeof Message>;
|
|
349
|
+
/** Where a search looks: the index, the provider, or the index first (see messages.search). */
|
|
350
|
+
export declare const SearchSource: z.ZodEnum<{
|
|
351
|
+
provider: "provider";
|
|
352
|
+
auto: "auto";
|
|
353
|
+
index: "index";
|
|
354
|
+
}>;
|
|
355
|
+
export type SearchSource = z.infer<typeof SearchSource>;
|
|
356
|
+
/** Which source answered a search. */
|
|
357
|
+
export declare const SearchResultSource: z.ZodEnum<{
|
|
358
|
+
provider: "provider";
|
|
359
|
+
index: "index";
|
|
360
|
+
}>;
|
|
361
|
+
export type SearchResultSource = z.infer<typeof SearchResultSource>;
|
|
362
|
+
/** A search result. `id` is null for a provider result the index does not hold (a message older
|
|
363
|
+
* than the sync window); such a result cannot be opened through the API. */
|
|
364
|
+
export declare const SearchHit: z.ZodObject<{
|
|
365
|
+
threadId: z.ZodNullable<z.ZodString>;
|
|
366
|
+
internetMessageId: z.ZodNullable<z.ZodString>;
|
|
367
|
+
mailboxIds: z.ZodArray<z.ZodUUID>;
|
|
368
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
369
|
+
from: z.ZodNullable<z.ZodObject<{
|
|
370
|
+
name: z.ZodNullable<z.ZodString>;
|
|
371
|
+
address: z.ZodString;
|
|
372
|
+
}, z.core.$strip>>;
|
|
373
|
+
to: z.ZodArray<z.ZodObject<{
|
|
374
|
+
name: z.ZodNullable<z.ZodString>;
|
|
375
|
+
address: z.ZodString;
|
|
376
|
+
}, z.core.$strip>>;
|
|
377
|
+
cc: z.ZodArray<z.ZodObject<{
|
|
378
|
+
name: z.ZodNullable<z.ZodString>;
|
|
379
|
+
address: z.ZodString;
|
|
380
|
+
}, z.core.$strip>>;
|
|
381
|
+
snippet: z.ZodNullable<z.ZodString>;
|
|
382
|
+
receivedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
383
|
+
sentAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
384
|
+
isRead: z.ZodBoolean;
|
|
385
|
+
isFlagged: z.ZodBoolean;
|
|
386
|
+
isDraft: z.ZodBoolean;
|
|
387
|
+
hasAttachments: z.ZodBoolean;
|
|
388
|
+
categories: z.ZodArray<z.ZodString>;
|
|
389
|
+
direction: z.ZodEnum<{
|
|
390
|
+
inbound: "inbound";
|
|
391
|
+
outbound: "outbound";
|
|
392
|
+
}>;
|
|
393
|
+
outboxId: z.ZodNullable<z.ZodUUID>;
|
|
394
|
+
reference: z.ZodNullable<z.ZodString>;
|
|
395
|
+
importance: z.ZodNullable<z.ZodEnum<{
|
|
396
|
+
normal: "normal";
|
|
397
|
+
high: "high";
|
|
398
|
+
low: "low";
|
|
399
|
+
}>>;
|
|
400
|
+
id: z.ZodNullable<z.ZodUUID>;
|
|
401
|
+
}, z.core.$strip>;
|
|
402
|
+
export type SearchHit = z.infer<typeof SearchHit>;
|
|
403
|
+
/** A search page, with the source that answered; later pages (through nextCursor) stay with it. */
|
|
404
|
+
export declare const SearchPage: z.ZodObject<{
|
|
405
|
+
source: z.ZodEnum<{
|
|
406
|
+
provider: "provider";
|
|
407
|
+
index: "index";
|
|
408
|
+
}>;
|
|
409
|
+
items: z.ZodArray<z.ZodObject<{
|
|
410
|
+
threadId: z.ZodNullable<z.ZodString>;
|
|
411
|
+
internetMessageId: z.ZodNullable<z.ZodString>;
|
|
412
|
+
mailboxIds: z.ZodArray<z.ZodUUID>;
|
|
413
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
414
|
+
from: z.ZodNullable<z.ZodObject<{
|
|
415
|
+
name: z.ZodNullable<z.ZodString>;
|
|
416
|
+
address: z.ZodString;
|
|
417
|
+
}, z.core.$strip>>;
|
|
418
|
+
to: z.ZodArray<z.ZodObject<{
|
|
419
|
+
name: z.ZodNullable<z.ZodString>;
|
|
420
|
+
address: z.ZodString;
|
|
421
|
+
}, z.core.$strip>>;
|
|
422
|
+
cc: z.ZodArray<z.ZodObject<{
|
|
423
|
+
name: z.ZodNullable<z.ZodString>;
|
|
424
|
+
address: z.ZodString;
|
|
425
|
+
}, z.core.$strip>>;
|
|
426
|
+
snippet: z.ZodNullable<z.ZodString>;
|
|
427
|
+
receivedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
428
|
+
sentAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
429
|
+
isRead: z.ZodBoolean;
|
|
430
|
+
isFlagged: z.ZodBoolean;
|
|
431
|
+
isDraft: z.ZodBoolean;
|
|
432
|
+
hasAttachments: z.ZodBoolean;
|
|
433
|
+
categories: z.ZodArray<z.ZodString>;
|
|
434
|
+
direction: z.ZodEnum<{
|
|
435
|
+
inbound: "inbound";
|
|
436
|
+
outbound: "outbound";
|
|
437
|
+
}>;
|
|
438
|
+
outboxId: z.ZodNullable<z.ZodUUID>;
|
|
439
|
+
reference: z.ZodNullable<z.ZodString>;
|
|
440
|
+
importance: z.ZodNullable<z.ZodEnum<{
|
|
441
|
+
normal: "normal";
|
|
442
|
+
high: "high";
|
|
443
|
+
low: "low";
|
|
444
|
+
}>>;
|
|
445
|
+
id: z.ZodNullable<z.ZodUUID>;
|
|
446
|
+
}, z.core.$strip>>;
|
|
447
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
448
|
+
}, z.core.$strip>;
|
|
449
|
+
export type SearchPage = z.infer<typeof SearchPage>;
|
|
450
|
+
/** Stored message content, for the whole tenant or one account. */
|
|
451
|
+
export declare const BodyStorageUsage: z.ZodObject<{
|
|
452
|
+
available: z.ZodBoolean;
|
|
453
|
+
storedMessages: z.ZodNumber;
|
|
454
|
+
storedBytes: z.ZodNumber;
|
|
455
|
+
cachedBytes: z.ZodNumber;
|
|
456
|
+
cacheBudgetBytes: z.ZodNumber;
|
|
457
|
+
cacheMaxAgeDays: z.ZodNumber;
|
|
458
|
+
}, z.core.$strip>;
|
|
459
|
+
export type BodyStorageUsage = z.infer<typeof BodyStorageUsage>;
|
|
460
|
+
export declare const MessageIdInput: z.ZodObject<{
|
|
461
|
+
accountId: z.ZodUUID;
|
|
462
|
+
messageId: z.ZodUUID;
|
|
463
|
+
}, z.core.$strip>;
|
|
464
|
+
export type MessageIdInput = z.infer<typeof MessageIdInput>;
|
|
465
|
+
export declare const AttachmentIdInput: z.ZodObject<{
|
|
466
|
+
accountId: z.ZodUUID;
|
|
467
|
+
messageId: z.ZodUUID;
|
|
468
|
+
attachmentId: z.ZodString;
|
|
469
|
+
}, z.core.$strip>;
|
|
470
|
+
export type AttachmentIdInput = z.infer<typeof AttachmentIdInput>;
|
|
471
|
+
export declare const ListMessagesQuery: z.ZodObject<{
|
|
472
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
473
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
474
|
+
mailboxId: z.ZodOptional<z.ZodUUID>;
|
|
475
|
+
unread: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
|
|
476
|
+
true: "true";
|
|
477
|
+
false: "false";
|
|
478
|
+
}>]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
|
|
479
|
+
importance: z.ZodOptional<z.ZodEnum<{
|
|
480
|
+
normal: "normal";
|
|
481
|
+
high: "high";
|
|
482
|
+
low: "low";
|
|
483
|
+
}>>;
|
|
484
|
+
}, z.core.$strip>;
|
|
485
|
+
export type ListMessagesQuery = z.infer<typeof ListMessagesQuery>;
|
|
486
|
+
export declare const SearchMessagesQuery: z.ZodObject<{
|
|
487
|
+
q: z.ZodString;
|
|
488
|
+
mailboxId: z.ZodOptional<z.ZodUUID>;
|
|
489
|
+
after: z.ZodOptional<z.ZodPreprocess<z.ZodDate, string | Date>>;
|
|
490
|
+
before: z.ZodOptional<z.ZodPreprocess<z.ZodDate, string | Date>>;
|
|
491
|
+
source: z.ZodDefault<z.ZodEnum<{
|
|
492
|
+
provider: "provider";
|
|
493
|
+
auto: "auto";
|
|
494
|
+
index: "index";
|
|
495
|
+
}>>;
|
|
496
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
497
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
498
|
+
}, z.core.$strip>;
|
|
499
|
+
export type SearchMessagesQuery = z.infer<typeof SearchMessagesQuery>;
|
|
500
|
+
export declare const UpdateMessage: z.ZodObject<{
|
|
501
|
+
isRead: z.ZodOptional<z.ZodBoolean>;
|
|
502
|
+
isFlagged: z.ZodOptional<z.ZodBoolean>;
|
|
503
|
+
mailboxId: z.ZodOptional<z.ZodUUID>;
|
|
504
|
+
addMailboxIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
|
|
505
|
+
removeMailboxIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
|
|
506
|
+
}, z.core.$strip>;
|
|
507
|
+
export type UpdateMessage = z.infer<typeof UpdateMessage>;
|
|
508
|
+
export declare const DeleteMessageQuery: z.ZodObject<{
|
|
509
|
+
permanent: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
|
|
510
|
+
true: "true";
|
|
511
|
+
false: "false";
|
|
512
|
+
}>]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
|
|
513
|
+
}, z.core.$strip>;
|
|
514
|
+
export type DeleteMessageQuery = z.infer<typeof DeleteMessageQuery>;
|
|
515
|
+
/** The path's message and the query's options, as a DELETE takes them. */
|
|
516
|
+
export declare const DeleteMessageInput: z.ZodObject<{
|
|
517
|
+
params: z.ZodObject<{
|
|
518
|
+
accountId: z.ZodUUID;
|
|
519
|
+
messageId: z.ZodUUID;
|
|
520
|
+
}, z.core.$strip>;
|
|
521
|
+
query: z.ZodObject<{
|
|
522
|
+
permanent: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
|
|
523
|
+
true: "true";
|
|
524
|
+
false: "false";
|
|
525
|
+
}>]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
|
|
526
|
+
}, z.core.$strip>;
|
|
527
|
+
}, z.core.$strip>;
|
|
528
|
+
export type DeleteMessageInput = z.infer<typeof DeleteMessageInput>;
|