@workwae/sdk 0.1.0-alpha.1 → 0.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +7 -7
  2. package/client.d.ts +1 -1
  3. package/contract/accounts/models.d.ts +85 -45
  4. package/contract/accounts/routes.d.ts +191 -29
  5. package/contract/ai/models.d.ts +0 -1
  6. package/contract/ai/routes.d.ts +9 -0
  7. package/contract/audit-log/models.d.ts +19 -5
  8. package/contract/audit-log/routes.d.ts +10 -1
  9. package/contract/calendar/models.d.ts +249 -74
  10. package/contract/calendar/routes.d.ts +574 -30
  11. package/contract/connect/models.d.ts +28 -16
  12. package/contract/connect/routes.d.ts +46 -7
  13. package/contract/contacts/models.d.ts +0 -10
  14. package/contract/contacts/routes.d.ts +14 -0
  15. package/contract/email-validation/models.d.ts +119 -0
  16. package/contract/email-validation/routes.d.ts +106 -0
  17. package/contract/errors.d.ts +28 -20
  18. package/contract/events/models.d.ts +139 -79
  19. package/contract/events/routes.d.ts +54 -44
  20. package/contract/exports/routes.d.ts +10 -0
  21. package/contract/identities/models.d.ts +7 -9
  22. package/contract/identities/routes.d.ts +79 -10
  23. package/contract/limits.d.ts +21 -73
  24. package/contract/mail/models.d.ts +91 -48
  25. package/contract/mail/routes.d.ts +458 -18
  26. package/contract/mcp-keys/models.d.ts +125 -0
  27. package/contract/mcp-keys/routes.d.ts +151 -0
  28. package/contract/meetings/models.d.ts +28 -33
  29. package/contract/meetings/routes.d.ts +44 -25
  30. package/contract/oauth-apps/models.d.ts +0 -6
  31. package/contract/oauth-apps/routes.d.ts +8 -0
  32. package/contract/org-connections/models.d.ts +83 -39
  33. package/contract/org-connections/routes.d.ts +320 -43
  34. package/contract/plans/credit-packs.d.ts +30 -0
  35. package/contract/plans/models.d.ts +208 -0
  36. package/contract/primitives.d.ts +7 -62
  37. package/contract/public.d.ts +6 -0
  38. package/contract/reasons.d.ts +532 -21
  39. package/contract/router.d.ts +6425 -3212
  40. package/contract/scheduling/models.d.ts +405 -0
  41. package/contract/scheduling/routes.d.ts +756 -0
  42. package/contract/send/models.d.ts +82 -45
  43. package/contract/send/routes.d.ts +281 -32
  44. package/contract/settings/models.d.ts +73 -13
  45. package/contract/settings/routes.d.ts +56 -4
  46. package/contract/suppressions/models.d.ts +21 -28
  47. package/contract/suppressions/routes.d.ts +62 -14
  48. package/contract/templates/models.d.ts +0 -14
  49. package/contract/templates/routes.d.ts +30 -6
  50. package/contract/threads/models.d.ts +0 -5
  51. package/contract/threads/routes.d.ts +40 -0
  52. package/contract/tracking-domain/models.d.ts +41 -0
  53. package/contract/tracking-domain/routes.d.ts +193 -0
  54. package/contract/usage/models.d.ts +98 -126
  55. package/contract/usage/routes.d.ts +48 -20
  56. package/contract/webhooks/models.d.ts +45 -30
  57. package/contract/webhooks/routes.d.ts +52 -9
  58. package/contract/webhooks/signing.d.ts +0 -16
  59. package/index.js +1 -4334
  60. package/package.json +6 -7
  61. package/index.js.map +0 -59
@@ -1,170 +1,118 @@
1
- /** The longest address the capped fields take: a 64-character local part, "@", and a
2
- * 255-character domain (RFC 5321 section 4.5.3.1). */
3
1
  export declare const MAX_EMAIL_LENGTH = 320;
4
- /** A name a tenant gives what it registers: an API key, an app, a connection, a plan. */
5
2
  export declare const MAX_NAME_LENGTH = 100;
6
- /** The caller's own reference stored with an account or template. */
7
3
  export declare const MAX_EXTERNAL_REF_LENGTH = 255;
8
- /** An account's display name. */
9
4
  export declare const MAX_DISPLAY_NAME_LENGTH = 255;
10
- /** The display name next to an address: a recipient's, an attendee's, an identity's. */
11
5
  export declare const MAX_ADDRESS_NAME_LENGTH = 256;
12
- /** A password or client secret. */
13
6
  export declare const MAX_SECRET_LENGTH = 1024;
14
- /** A free-text note or description an admin attaches. */
15
7
  export declare const MAX_NOTE_LENGTH = 500;
16
- /** A listing's text filter. */
17
8
  export declare const MAX_FILTER_QUERY_LENGTH = 200;
18
- /** A URL the caller gives: a DAV server, a meeting's join link. */
19
9
  export declare const MAX_URL_LENGTH = 2048;
20
- /** An IANA time zone name. */
21
10
  export declare const MAX_TIME_ZONE_LENGTH = 64;
22
- /** An opaque pagination cursor. */
23
11
  export declare const MAX_CURSOR_LENGTH = 512;
24
- /** A listing's page size, where the listing names no other. */
25
12
  export declare const MAX_PAGE_SIZE = 200;
26
13
  export declare const DEFAULT_PAGE_SIZE = 50;
27
- /** An id a provider issues (a thread id, an attachment id), as a path segment takes it. */
28
14
  export declare const MAX_PROVIDER_ID_LENGTH = 1024;
29
- /** A host name (RFC 1035): a server's, or a domain's. */
30
15
  export declare const MAX_HOST_LENGTH = 253;
31
- /** The highest TCP port. */
32
16
  export declare const MAX_PORT = 65535;
33
- /** The `state` a redirect flow echoes back. */
34
17
  export declare const MAX_STATE_LENGTH = 1024;
35
- /** Shortest and longest life of a token or a hosted session the caller asks for. */
36
18
  export declare const MIN_TOKEN_TTL_SECONDS = 60;
37
19
  export declare const MAX_TOKEN_TTL_SECONDS = 86400;
38
- /** Redirect URIs a tenant's allowlist holds. */
20
+ export declare const MAX_MCP_KEYS_PER_ACCOUNT = 25;
39
21
  export declare const MAX_REDIRECT_URIS = 50;
40
- /** The longest undo window for sends. */
41
22
  export declare const MAX_UNDO_SEND_SECONDS = 60;
42
- /** The range a tenant's event retention may be set within. */
43
23
  export declare const MIN_EVENT_RETENTION_DAYS = 7;
44
24
  export declare const MAX_EVENT_RETENTION_DAYS = 30;
25
+ export declare const MAX_MCP_ALLOWED_DOMAINS = 100;
26
+ export declare const MAX_MCP_DAILY_SEND_LIMIT = 10000;
45
27
  export declare const MAX_ATTACHMENT_BYTES: number;
46
- /** RFC 5322's line limit; also the longest Message-ID a mail merge entry takes. */
47
28
  export declare const MAX_SUBJECT_LENGTH = 998;
48
29
  export declare const MAX_MESSAGE_ID_LENGTH = 998;
49
- /** Longest html or text body a message takes (characters): what a template may render, so a send
50
- * gets no more inline than it could through a template. */
51
30
  export declare const MAX_BODY_LENGTH: number;
52
- /** Recipients of each of to, cc and bcc. */
53
31
  export declare const MAX_RECIPIENTS = 500;
54
32
  export declare const MAX_REPLY_TO = 10;
55
33
  export declare const MAX_ATTACHMENTS = 50;
56
34
  export declare const MAX_FILENAME_LENGTH = 255;
57
35
  export declare const MAX_CONTENT_TYPE_LENGTH = 255;
58
36
  export declare const MAX_CONTENT_ID_LENGTH = 255;
59
- /** A send's own `reference`. */
60
37
  export declare const MAX_SEND_REFERENCE_LENGTH = 255;
61
- /** Mailboxes one message update adds or removes. */
62
38
  export declare const MAX_MAILBOX_CHANGES = 50;
63
- /** The longest search query search.messages takes. */
64
39
  export declare const MAX_SEARCH_QUERY_LENGTH = 500;
65
- /** Hits one search page holds: a provider search reads a page of the provider's per call. */
66
40
  export declare const MAX_SEARCH_PAGE_SIZE = 100;
67
41
  export declare const DEFAULT_SEARCH_PAGE_SIZE = 25;
68
- /** Threads one page holds: each summary aggregates every message of its thread. */
69
42
  export declare const MAX_THREAD_PAGE_SIZE = 100;
70
43
  export declare const DEFAULT_THREAD_PAGE_SIZE = 25;
71
44
  export declare const MAX_SIGNATURE_HTML_LENGTH = 100000;
72
45
  export declare const MAX_SIGNATURE_TEXT_LENGTH = 20000;
73
- /** Longest template name (after trimming) and description the API accepts. */
74
46
  export declare const MAX_TEMPLATE_NAME_LENGTH = 255;
75
47
  export declare const MAX_TEMPLATE_DESCRIPTION_LENGTH = 1000;
76
- /** Longest subject, preview line and body (html, text) source a template stores. */
77
48
  export declare const MAX_TEMPLATE_SUBJECT_LENGTH = 2000;
78
49
  export declare const MAX_TEMPLATE_PREVIEW_TEXT_LENGTH = 2000;
79
50
  export declare const MAX_TEMPLATE_BODY_LENGTH = 1000000;
80
- /** Most entries one mail merge call takes; split larger lists over several calls. */
81
51
  export declare const MAX_MAIL_MERGE_ENTRIES = 100;
82
- /** Most attachment bytes a mail merge queues in total (the attachments times the entries): every
83
- * copy is sealed with its own attachments. */
84
52
  export declare const MAX_MAIL_MERGE_ATTACHMENT_BYTES: number;
85
- /** Largest params object (serialized as JSON) one render takes: 400 reason params_too_large. */
86
53
  export declare const MAX_RENDER_PARAMS_BYTES: number;
87
- /** Block iterations (each, with, if/unless bodies, ...) one render may run before it fails with
88
- * template_render_failed. */
89
54
  export declare const MAX_RENDER_ITERATIONS = 10000;
90
- /** Longest Markdown (after rendering, values escaped) converted to HTML; beyond it the render, or
91
- * a send of the content as it is, fails with template_render_failed. Converting takes about 2 ms
92
- * per 1,000 characters at worst, so this keeps one conversion under about 200 ms. */
93
55
  export declare const MAX_MARKDOWN_LENGTH = 100000;
94
- /** How many addresses one call adding entries to a suppression list takes. */
95
56
  export declare const MAX_SUPPRESSION_BATCH = 1000;
96
57
  export declare const MAX_SUPPRESSION_LIST_DESCRIPTION_LENGTH = 500;
97
- /** The reason given with an address the API suppresses. */
98
58
  export declare const MAX_SUPPRESSION_REASON_LENGTH = 200;
99
- /** Attendees one event write may name; also the most an iMIP message from a CalDAV account goes
100
- * to, so email never reaches more people than the API would have let a caller invite. */
101
59
  export declare const MAX_EVENT_ATTENDEES = 500;
102
60
  export declare const MAX_EVENT_SUBJECT_LENGTH = 255;
103
61
  export declare const MAX_EVENT_LOCATION_LENGTH = 255;
104
62
  export declare const MAX_EVENT_BODY_LENGTH = 1000000;
105
- /** Longest note sent with a cancellation or an answer. */
106
63
  export declare const MAX_EVENT_COMMENT_LENGTH = 2000;
107
- /** RFC 5545 recurrence lines one event takes, and the longest. */
108
64
  export declare const MAX_RECURRENCE_LINES = 20;
109
65
  export declare const MAX_RECURRENCE_LINE_LENGTH = 1000;
110
- /** Four weeks. */
111
66
  export declare const MAX_REMINDER_MINUTES = 40320;
112
- /** Attendees one availability question takes. */
113
67
  export declare const MAX_AVAILABILITY_ATTENDEES = 20;
114
- /** The longest range an availability question spans. */
115
68
  export declare const MAX_AVAILABILITY_DAYS = 62;
116
- /** Shortest and longest suggested slot, and step between suggestions. */
117
69
  export declare const MIN_SLOT_MINUTES = 5;
118
70
  export declare const MAX_SLOT_MINUTES = 1440;
119
- /** Most free slots one availability question suggests. */
120
71
  export declare const MAX_SUGGESTIONS = 100;
121
- /** The longest range one event listing spans. */
72
+ export declare const MAX_AVAILABILITY_ACCOUNTS = 20;
122
73
  export declare const MAX_EVENT_RANGE_DAYS = 400;
123
- /** A page of events. */
124
74
  export declare const MAX_CALENDAR_EVENT_PAGE_SIZE = 500;
125
75
  export declare const DEFAULT_CALENDAR_EVENT_PAGE_SIZE = 100;
126
- /** Email addresses, and phone numbers, one contact takes. */
76
+ export declare const MAX_SCHEDULING_DAY_WINDOWS = 8;
77
+ export declare const MAX_SCHEDULING_WINDOW_DAYS = 365;
78
+ export declare const MAX_SCHEDULING_BUFFER_MINUTES = 1440;
79
+ export declare const MAX_SCHEDULING_NOTICE_MINUTES = 86400;
80
+ export declare const MAX_SCHEDULING_PER_DAY = 1000;
81
+ export declare const MAX_SCHEDULING_TITLE_LENGTH = 255;
82
+ export declare const MAX_SCHEDULING_DESCRIPTION_LENGTH = 10000;
83
+ export declare const MAX_BOOKING_NOTES_LENGTH = 2000;
84
+ export declare const MAX_SCHEDULING_SLOTS = 1000;
85
+ export declare const DEFAULT_SCHEDULING_SLOTS = 200;
127
86
  export declare const MAX_CONTACT_ENTRIES = 20;
128
- /** Longest name, organization, job title or department; phone number; notes. */
129
87
  export declare const MAX_CONTACT_FIELD_LENGTH = 256;
130
88
  export declare const MAX_CONTACT_PHONE_LENGTH = 64;
131
89
  export declare const MAX_CONTACT_NOTES_LENGTH = 10000;
132
- /** A page of contacts. */
133
90
  export declare const MAX_CONTACT_PAGE_SIZE = 500;
134
91
  export declare const DEFAULT_CONTACT_PAGE_SIZE = 100;
135
- /** Most values one list filter takes. */
136
92
  export declare const MAX_WEBHOOK_FILTER_VALUES = 100;
137
- /** A subjectContains filter value. */
138
93
  export declare const MAX_SUBJECT_FILTER_LENGTH = 200;
139
- /** Most events one range replay queues; ask for a narrower range beyond it. */
140
94
  export declare const MAX_REPLAY_EVENTS = 1000;
141
- /** A page of an endpoint's delivery log. */
142
95
  export declare const MAX_WEBHOOK_ATTEMPT_PAGE_SIZE = 500;
143
96
  export declare const DEFAULT_WEBHOOK_ATTEMPT_PAGE_SIZE = 50;
144
- /** Signatures in a webhook-signature header that a verifier checks; any after them are ignored. */
145
97
  export declare const MAX_SIGNATURE_CANDIDATES = 8;
146
- /** How long a rotated-out signing secret still signs deliveries when the rotation names no grace. */
147
98
  export declare const DEFAULT_WEBHOOK_SECRET_GRACE_SECONDS: number;
148
- /** The longest grace a signing secret rotation may give the old secret. */
149
99
  export declare const MAX_WEBHOOK_SECRET_GRACE_SECONDS: number;
150
100
  export declare const MAX_DRAFT_INSTRUCTIONS_LENGTH = 2000;
151
- /** The longest current draft a draft request carries. */
152
101
  export declare const MAX_DRAFT_CONTEXT_LENGTH = 20000;
153
- /** Longest client or account id a meeting service issues. */
102
+ export declare const MAX_EMAIL_VALIDATIONS = 10;
154
103
  export declare const MAX_MEETING_APP_ID_LENGTH = 200;
155
104
  export declare const MAX_REFRESH_TOKEN_LENGTH = 4096;
156
- /** Longest certificate or key file (PEM, or Google's JSON key). */
157
105
  export declare const MAX_KEY_FILE_LENGTH = 20000;
158
- /** Longest directory search. */
159
106
  export declare const MAX_DIRECTORY_QUERY_LENGTH = 100;
160
- /** Directory entries one page lists at most, and when no limit is given. */
161
107
  export declare const MAX_DIRECTORY_PAGE_SIZE = 200;
162
108
  export declare const DEFAULT_DIRECTORY_PAGE_SIZE = 100;
163
- /** Mailboxes one addAccounts request takes. */
164
109
  export declare const MAX_ADD_MAILBOXES = 100;
165
- /** An Entra application id or directory (tenant) id. */
166
110
  export declare const MAX_ENTRA_ID_LENGTH = 100;
167
- /** A Stripe price id. */
168
111
  export declare const MAX_STRIPE_ID_LENGTH = 255;
169
- /** UTC days one usage read spans at most, both ends included. */
112
+ export declare const MAX_VALIDATION_CREDITS = 1000000000;
113
+ export declare const MAX_CREDIT_PACKS_PER_PURCHASE = 100;
114
+ export declare const MAX_CREDIT_PACK_CREDITS = 10000000;
115
+ export declare const MAX_CREDIT_PACKS_PER_PLAN = 5;
116
+ export declare const MAX_TRIAL_DAYS = 730;
170
117
  export declare const MAX_USAGE_RANGE_DAYS = 366;
118
+ export declare const MAX_LIMIT_HIT_DAYS = 90;
@@ -1,17 +1,16 @@
1
1
  import * as z from "zod";
2
2
  export declare const MailboxRole: z.ZodEnum<{
3
3
  custom: "custom";
4
+ all: "all";
4
5
  inbox: "inbox";
5
6
  sent: "sent";
6
7
  drafts: "drafts";
7
8
  trash: "trash";
8
9
  junk: "junk";
9
10
  archive: "archive";
10
- all: "all";
11
11
  important: "important";
12
12
  }>;
13
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
14
  export declare const MailboxKind: z.ZodEnum<{
16
15
  label: "label";
17
16
  folder: "folder";
@@ -24,13 +23,13 @@ export declare const Mailbox: z.ZodObject<{
24
23
  parentId: z.ZodNullable<z.ZodUUID>;
25
24
  role: z.ZodEnum<{
26
25
  custom: "custom";
26
+ all: "all";
27
27
  inbox: "inbox";
28
28
  sent: "sent";
29
29
  drafts: "drafts";
30
30
  trash: "trash";
31
31
  junk: "junk";
32
32
  archive: "archive";
33
- all: "all";
34
33
  important: "important";
35
34
  }>;
36
35
  kind: z.ZodEnum<{
@@ -49,13 +48,13 @@ export declare const MailboxList: z.ZodObject<{
49
48
  parentId: z.ZodNullable<z.ZodUUID>;
50
49
  role: z.ZodEnum<{
51
50
  custom: "custom";
51
+ all: "all";
52
52
  inbox: "inbox";
53
53
  sent: "sent";
54
54
  drafts: "drafts";
55
55
  trash: "trash";
56
56
  junk: "junk";
57
57
  archive: "archive";
58
- all: "all";
59
58
  important: "important";
60
59
  }>;
61
60
  kind: z.ZodEnum<{
@@ -67,7 +66,27 @@ export declare const MailboxList: z.ZodObject<{
67
66
  }, z.core.$strip>>;
68
67
  }, z.core.$strip>;
69
68
  export type MailboxList = z.infer<typeof MailboxList>;
70
- /** The Mailbox fields mailbox.updated names in `changes` (the counts move without an event). */
69
+ export declare const MailboxIdInput: z.ZodObject<{
70
+ accountId: z.ZodUUID;
71
+ mailboxId: z.ZodUUID;
72
+ }, z.core.$strip>;
73
+ export type MailboxIdInput = z.infer<typeof MailboxIdInput>;
74
+ export declare const CreateMailbox: z.ZodObject<{
75
+ name: z.ZodString;
76
+ parentId: z.ZodOptional<z.ZodUUID>;
77
+ }, z.core.$strip>;
78
+ export type CreateMailbox = z.infer<typeof CreateMailbox>;
79
+ export declare const CreateMailboxInput: z.ZodObject<{
80
+ accountId: z.ZodUUID;
81
+ name: z.ZodString;
82
+ parentId: z.ZodOptional<z.ZodUUID>;
83
+ }, z.core.$strip>;
84
+ export type CreateMailboxInput = z.infer<typeof CreateMailboxInput>;
85
+ export declare const UpdateMailbox: z.ZodObject<{
86
+ name: z.ZodOptional<z.ZodString>;
87
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
88
+ }, z.core.$strip>;
89
+ export type UpdateMailbox = z.infer<typeof UpdateMailbox>;
71
90
  export declare const MailboxChangedField: z.ZodEnum<{
72
91
  path: "path";
73
92
  name: "name";
@@ -76,20 +95,11 @@ export declare const MailboxChangedField: z.ZodEnum<{
76
95
  parentId: "parentId";
77
96
  }>;
78
97
  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
98
  export declare const MessageDirection: z.ZodEnum<{
84
99
  inbound: "inbound";
85
100
  outbound: "outbound";
86
101
  }>;
87
102
  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
103
  export declare const MessagePriority: z.ZodEnum<{
94
104
  normal: "normal";
95
105
  high: "high";
@@ -135,8 +145,6 @@ export declare const MessageSummary: z.ZodObject<{
135
145
  }>>;
136
146
  }, z.core.$strip>;
137
147
  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
148
  export declare const MessageChangedField: z.ZodEnum<{
141
149
  from: "from";
142
150
  to: "to";
@@ -211,7 +219,6 @@ export declare const Attachment: z.ZodObject<{
211
219
  contentId: z.ZodNullable<z.ZodString>;
212
220
  }, z.core.$strip>;
213
221
  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
222
  export declare const ReplyKind: z.ZodEnum<{
216
223
  opt_out: "opt_out";
217
224
  auto_reply: "auto_reply";
@@ -219,11 +226,6 @@ export declare const ReplyKind: z.ZodEnum<{
219
226
  human_reply: "human_reply";
220
227
  }>;
221
228
  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
229
  export declare const AutoReplyCategory: z.ZodEnum<{
228
230
  other: "other";
229
231
  out_of_office: "out_of_office";
@@ -257,8 +259,6 @@ export declare const MessageClassification: z.ZodObject<{
257
259
  classifiedAt: z.ZodPreprocess<z.ZodDate, Date>;
258
260
  }, z.core.$strip>;
259
261
  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
262
  export declare const MessageBody: z.ZodObject<{
263
263
  text: z.ZodNullable<z.ZodString>;
264
264
  html: z.ZodNullable<z.ZodString>;
@@ -346,21 +346,17 @@ export declare const Message: z.ZodObject<{
346
346
  }, z.core.$strip>>;
347
347
  }, z.core.$strip>;
348
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
349
  export declare const SearchSource: z.ZodEnum<{
351
350
  provider: "provider";
352
- auto: "auto";
353
351
  index: "index";
352
+ auto: "auto";
354
353
  }>;
355
354
  export type SearchSource = z.infer<typeof SearchSource>;
356
- /** Which source answered a search. */
357
355
  export declare const SearchResultSource: z.ZodEnum<{
358
356
  provider: "provider";
359
357
  index: "index";
360
358
  }>;
361
359
  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
360
  export declare const SearchHit: z.ZodObject<{
365
361
  threadId: z.ZodNullable<z.ZodString>;
366
362
  internetMessageId: z.ZodNullable<z.ZodString>;
@@ -400,7 +396,6 @@ export declare const SearchHit: z.ZodObject<{
400
396
  id: z.ZodNullable<z.ZodUUID>;
401
397
  }, z.core.$strip>;
402
398
  export type SearchHit = z.infer<typeof SearchHit>;
403
- /** A search page, with the source that answered; later pages (through nextCursor) stay with it. */
404
399
  export declare const SearchPage: z.ZodObject<{
405
400
  source: z.ZodEnum<{
406
401
  provider: "provider";
@@ -447,7 +442,6 @@ export declare const SearchPage: z.ZodObject<{
447
442
  nextCursor: z.ZodNullable<z.ZodString>;
448
443
  }, z.core.$strip>;
449
444
  export type SearchPage = z.infer<typeof SearchPage>;
450
- /** Stored message content, for the whole tenant or one account. */
451
445
  export declare const BodyStorageUsage: z.ZodObject<{
452
446
  available: z.ZodBoolean;
453
447
  storedMessages: z.ZodNumber;
@@ -471,30 +465,74 @@ export type AttachmentIdInput = z.infer<typeof AttachmentIdInput>;
471
465
  export declare const ListMessagesQuery: z.ZodObject<{
472
466
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
473
467
  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
468
  importance: z.ZodOptional<z.ZodEnum<{
480
469
  normal: "normal";
481
470
  high: "high";
482
471
  low: "low";
483
472
  }>>;
473
+ after: z.ZodOptional<z.ZodPreprocess<z.ZodDate, string | Date>>;
474
+ before: z.ZodOptional<z.ZodPreprocess<z.ZodDate, string | Date>>;
475
+ from: z.ZodOptional<z.ZodString>;
476
+ to: z.ZodOptional<z.ZodString>;
477
+ unread: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [
478
+ z.ZodBoolean,
479
+ z.ZodEnum<{
480
+ true: "true";
481
+ false: "false";
482
+ }>
483
+ ]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
484
+ flagged: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [
485
+ z.ZodBoolean,
486
+ z.ZodEnum<{
487
+ true: "true";
488
+ false: "false";
489
+ }>
490
+ ]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
491
+ hasAttachments: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [
492
+ z.ZodBoolean,
493
+ z.ZodEnum<{
494
+ true: "true";
495
+ false: "false";
496
+ }>
497
+ ]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
498
+ mailboxId: z.ZodOptional<z.ZodUUID>;
484
499
  }, z.core.$strip>;
485
500
  export type ListMessagesQuery = z.infer<typeof ListMessagesQuery>;
486
501
  export declare const SearchMessagesQuery: z.ZodObject<{
487
- q: z.ZodString;
488
- mailboxId: z.ZodOptional<z.ZodUUID>;
489
502
  after: z.ZodOptional<z.ZodPreprocess<z.ZodDate, string | Date>>;
490
503
  before: z.ZodOptional<z.ZodPreprocess<z.ZodDate, string | Date>>;
491
504
  source: z.ZodDefault<z.ZodEnum<{
492
505
  provider: "provider";
493
- auto: "auto";
494
506
  index: "index";
507
+ auto: "auto";
495
508
  }>>;
496
509
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
497
510
  cursor: z.ZodOptional<z.ZodString>;
511
+ from: z.ZodOptional<z.ZodString>;
512
+ to: z.ZodOptional<z.ZodString>;
513
+ unread: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [
514
+ z.ZodBoolean,
515
+ z.ZodEnum<{
516
+ true: "true";
517
+ false: "false";
518
+ }>
519
+ ]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
520
+ flagged: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [
521
+ z.ZodBoolean,
522
+ z.ZodEnum<{
523
+ true: "true";
524
+ false: "false";
525
+ }>
526
+ ]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
527
+ hasAttachments: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [
528
+ z.ZodBoolean,
529
+ z.ZodEnum<{
530
+ true: "true";
531
+ false: "false";
532
+ }>
533
+ ]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
534
+ q: z.ZodString;
535
+ mailboxId: z.ZodOptional<z.ZodUUID>;
498
536
  }, z.core.$strip>;
499
537
  export type SearchMessagesQuery = z.infer<typeof SearchMessagesQuery>;
500
538
  export declare const UpdateMessage: z.ZodObject<{
@@ -506,23 +544,28 @@ export declare const UpdateMessage: z.ZodObject<{
506
544
  }, z.core.$strip>;
507
545
  export type UpdateMessage = z.infer<typeof UpdateMessage>;
508
546
  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">>>;
547
+ permanent: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [
548
+ z.ZodBoolean,
549
+ z.ZodEnum<{
550
+ true: "true";
551
+ false: "false";
552
+ }>
553
+ ]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
513
554
  }, z.core.$strip>;
514
555
  export type DeleteMessageQuery = z.infer<typeof DeleteMessageQuery>;
515
- /** The path's message and the query's options, as a DELETE takes them. */
516
556
  export declare const DeleteMessageInput: z.ZodObject<{
517
557
  params: z.ZodObject<{
518
558
  accountId: z.ZodUUID;
519
559
  messageId: z.ZodUUID;
520
560
  }, z.core.$strip>;
521
561
  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">>>;
562
+ permanent: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [
563
+ z.ZodBoolean,
564
+ z.ZodEnum<{
565
+ true: "true";
566
+ false: "false";
567
+ }>
568
+ ]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
526
569
  }, z.core.$strip>;
527
570
  }, z.core.$strip>;
528
571
  export type DeleteMessageInput = z.infer<typeof DeleteMessageInput>;