@remit/api-zod-schemas 0.0.60 → 0.0.62
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 +34 -5
- package/middleware.d.ts +43 -0
- package/middleware.d.ts.map +1 -0
- package/middleware.js +801 -0
- package/middleware.js.map +1 -0
- package/middleware.ts +918 -0
- package/package.json +6 -2
- package/schemas.d.ts +1779 -457
- package/schemas.d.ts.map +1 -1
- package/schemas.js +494 -457
- package/schemas.js.map +1 -1
- package/schemas.ts +504 -461
package/schemas.js
CHANGED
|
@@ -7,6 +7,7 @@ export const AccountExportStateSchema = z.enum(["Pending", "Processing", "Ready"
|
|
|
7
7
|
export const CanonicalMailboxRoleSchema = z.enum(["Inbox", "Drafts", "Sent", "Archive", "Junk", "Trash", "All", "Flagged"]);
|
|
8
8
|
export const QuarantineFailureStageSchema = z.enum(["BodyParse"]);
|
|
9
9
|
export const QuarantineFailureCodeSchema = z.enum(["UnknownCharset", "UnreadableBody"]);
|
|
10
|
+
export const SyncWarningStageSchema = z.enum(["Header", "Body"]);
|
|
10
11
|
export const AccountConfigStateSchema = z.enum(["active", "deleting"]);
|
|
11
12
|
export const AccountAuthTypeSchema = z.enum(["password", "oauthMicrosoft"]);
|
|
12
13
|
export const AccountServiceSchema = z.enum(["Mail", "Calendar"]);
|
|
@@ -45,7 +46,6 @@ export const MessageStatusSchema = z.enum(["active", "deleting", "deleted", "mov
|
|
|
45
46
|
export const MessageSyncStatusSchema = z.enum(["synced", "pending", "failed", "abandoned"]);
|
|
46
47
|
export const MessageMutationSchema = z.enum(["none", "move", "delete", "copy"]);
|
|
47
48
|
export const PlacementActionSchema = z.enum(["MoveToInbox", "MoveToJunk"]);
|
|
48
|
-
export const SemanticSearchChunkTypeSchema = z.enum(["sender", "recipient", "subject", "attachment", "body", "entities"]);
|
|
49
49
|
export const OutboxMessageStatusSchema = z.enum(["draft", "queued", "sending", "sent", "unfiled", "failed", "blocked"]);
|
|
50
50
|
export const OutboxAttachmentStateSchema = z.enum(["Pending", "Stored"]);
|
|
51
51
|
export const OutboxAttachmentRejectionReasonSchema = z.enum(["EmptyFile", "UnusableFilename", "FileTooLarge", "MessageTooLarge", "TooManyAttachments", "ReservationExpired", "UploadMissing", "SizeMismatch"]);
|
|
@@ -75,12 +75,13 @@ export const SenderOverrideSchema = z.enum(["none", "blocked", "neverSpam"]);
|
|
|
75
75
|
export const AccountSettingNameSchema = z.enum(["Theme", "Density", "DefaultComposerFormat", "PinnedFolders", "AccountSignaturePlainText", "AccountSignatureHtml", "AccountDisplayName", "AccountMuted", "AccountComposeLanguages", "MailboxDisplayName", "MailboxMuted", "FolderRoleAppointment", "FolderRoleAppointmentLabel", "MailboxRole"]);
|
|
76
76
|
export const ConfigImportStateSchema = z.enum(["Pending", "Complete"]);
|
|
77
77
|
export const ConfigImportRefKindSchema = z.enum(["FolderRole", "MailboxOverride", "FilterAction"]);
|
|
78
|
+
export const SyncWarningStateSchema = z.enum(["Retrying", "GaveUp"]);
|
|
78
79
|
export const MessagePlacementMoveStateSchema = z.enum(["pending", "queued", "processing", "processed"]);
|
|
79
80
|
export const FlagPushOperationSchema = z.enum(["add", "remove"]);
|
|
80
81
|
export const MessageFlagPushStateSchema = z.enum(["pending", "queued", "processing", "processed"]);
|
|
81
82
|
export const CognitoAuthorizerSchema = z.object({
|
|
82
|
-
type: z.
|
|
83
|
-
"in": z.
|
|
83
|
+
type: z.literal("apiKey"),
|
|
84
|
+
"in": z.literal("header"),
|
|
84
85
|
name: z.literal("Authorization")
|
|
85
86
|
});
|
|
86
87
|
export const ApiErrorSchema = z.object({
|
|
@@ -195,7 +196,7 @@ export const DeleteAccountConfigResponseSchema = z.object({
|
|
|
195
196
|
message: z.string()
|
|
196
197
|
});
|
|
197
198
|
export const VipSuggestionEntrySchema = z.object({
|
|
198
|
-
addressId: z.string(),
|
|
199
|
+
addressId: z.string().min(25).max(25),
|
|
199
200
|
displayName: z.string().optional(),
|
|
200
201
|
normalizedEmail: z.string(),
|
|
201
202
|
inboundCount: z.number(),
|
|
@@ -212,8 +213,8 @@ export const CreateExportResponseSchema = z.object({
|
|
|
212
213
|
exportId: z.string()
|
|
213
214
|
});
|
|
214
215
|
export const AccountExportRequestSchema = z.object({
|
|
215
|
-
accountExportRequestId: z.string(),
|
|
216
|
-
accountConfigId: z.string(),
|
|
216
|
+
accountExportRequestId: z.string().min(25).max(25),
|
|
217
|
+
accountConfigId: z.string().min(25).max(25),
|
|
217
218
|
userId: z.string(),
|
|
218
219
|
state: AccountExportStateSchema,
|
|
219
220
|
createdAt: z.number(),
|
|
@@ -224,8 +225,8 @@ export const AccountExportRequestSchema = z.object({
|
|
|
224
225
|
errorMessage: z.string().optional()
|
|
225
226
|
});
|
|
226
227
|
export const AccountExportRequestResponseSchema = z.object({
|
|
227
|
-
accountExportRequestId: z.string(),
|
|
228
|
-
accountConfigId: z.string(),
|
|
228
|
+
accountExportRequestId: z.string().min(25).max(25),
|
|
229
|
+
accountConfigId: z.string().min(25).max(25),
|
|
229
230
|
userId: z.string(),
|
|
230
231
|
state: AccountExportStateSchema,
|
|
231
232
|
createdAt: z.number(),
|
|
@@ -237,64 +238,88 @@ export const AccountExportRequestResponseSchema = z.object({
|
|
|
237
238
|
});
|
|
238
239
|
export const QuarantineMimeNodeSchema = z.object({
|
|
239
240
|
depth: z.number(),
|
|
240
|
-
contentType: z.string()
|
|
241
|
+
contentType: z.string().max(140)
|
|
241
242
|
});
|
|
242
243
|
export const QuarantineResponseSchema = z.object({
|
|
243
|
-
quarantineId: z.string(),
|
|
244
|
-
accountConfigId: z.string(),
|
|
245
|
-
accountId: z.string(),
|
|
246
|
-
mailboxId: z.string(),
|
|
244
|
+
quarantineId: z.string().min(25).max(25),
|
|
245
|
+
accountConfigId: z.string().min(25).max(25),
|
|
246
|
+
accountId: z.string().min(25).max(25),
|
|
247
|
+
mailboxId: z.string().min(25).max(25),
|
|
247
248
|
uidValidity: z.number(),
|
|
248
249
|
uid: z.number(),
|
|
249
250
|
mailboxRole: CanonicalMailboxRoleSchema.optional(),
|
|
250
|
-
mailboxPath: z.string(),
|
|
251
|
+
mailboxPath: z.string().max(512),
|
|
251
252
|
quarantinedAt: z.number(),
|
|
252
253
|
attempts: z.number(),
|
|
253
254
|
failureStage: QuarantineFailureStageSchema,
|
|
254
255
|
failureCode: QuarantineFailureCodeSchema,
|
|
255
|
-
failureMessage: z.string(),
|
|
256
|
-
failurePartPath: z.string().optional(),
|
|
257
|
-
workerVersion: z.string(),
|
|
258
|
-
contentType: z.string().optional(),
|
|
259
|
-
transferEncoding: z.string().optional(),
|
|
260
|
-
charset: z.string().optional(),
|
|
256
|
+
failureMessage: z.string().max(512),
|
|
257
|
+
failurePartPath: z.string().max(140).optional(),
|
|
258
|
+
workerVersion: z.string().max(64),
|
|
259
|
+
contentType: z.string().max(140).optional(),
|
|
260
|
+
transferEncoding: z.string().max(64).optional(),
|
|
261
|
+
charset: z.string().max(64).optional(),
|
|
261
262
|
sizeBytes: z.number().optional(),
|
|
262
263
|
structure: z.array(QuarantineMimeNodeSchema),
|
|
263
|
-
messageIdHash: z.string().optional(),
|
|
264
|
+
messageIdHash: z.string().max(140).optional(),
|
|
264
265
|
createdAt: z.number(),
|
|
265
266
|
updatedAt: z.number()
|
|
266
267
|
});
|
|
268
|
+
export const SyncWarningResponseSchema = z.object({
|
|
269
|
+
syncWarningId: z.string().min(25).max(25),
|
|
270
|
+
accountConfigId: z.string().min(25).max(25),
|
|
271
|
+
accountId: z.string().min(25).max(25),
|
|
272
|
+
mailboxId: z.string().min(25).max(25),
|
|
273
|
+
uidValidity: z.number(),
|
|
274
|
+
uid: z.number(),
|
|
275
|
+
stage: SyncWarningStageSchema,
|
|
276
|
+
attempts: z.number(),
|
|
277
|
+
createdAt: z.number()
|
|
278
|
+
});
|
|
267
279
|
export const QuarantineListResponseSchema = z.object({
|
|
268
|
-
entries: z.array(QuarantineResponseSchema)
|
|
280
|
+
entries: z.array(QuarantineResponseSchema),
|
|
281
|
+
warnings: z.array(SyncWarningResponseSchema),
|
|
282
|
+
warningsTotal: z.number()
|
|
269
283
|
});
|
|
270
284
|
export const QuarantineSchema = z.object({
|
|
271
|
-
quarantineId: z.string(),
|
|
272
|
-
accountConfigId: z.string(),
|
|
273
|
-
accountId: z.string(),
|
|
274
|
-
mailboxId: z.string(),
|
|
285
|
+
quarantineId: z.string().min(25).max(25),
|
|
286
|
+
accountConfigId: z.string().min(25).max(25),
|
|
287
|
+
accountId: z.string().min(25).max(25),
|
|
288
|
+
mailboxId: z.string().min(25).max(25),
|
|
275
289
|
uidValidity: z.number(),
|
|
276
290
|
uid: z.number(),
|
|
277
291
|
mailboxRole: CanonicalMailboxRoleSchema.optional(),
|
|
278
|
-
mailboxPath: z.string(),
|
|
292
|
+
mailboxPath: z.string().max(512),
|
|
279
293
|
quarantinedAt: z.number(),
|
|
280
294
|
attempts: z.number(),
|
|
281
295
|
failureStage: QuarantineFailureStageSchema,
|
|
282
296
|
failureCode: QuarantineFailureCodeSchema,
|
|
283
|
-
failureMessage: z.string(),
|
|
284
|
-
failurePartPath: z.string().optional(),
|
|
285
|
-
workerVersion: z.string(),
|
|
286
|
-
contentType: z.string().optional(),
|
|
287
|
-
transferEncoding: z.string().optional(),
|
|
288
|
-
charset: z.string().optional(),
|
|
297
|
+
failureMessage: z.string().max(512),
|
|
298
|
+
failurePartPath: z.string().max(140).optional(),
|
|
299
|
+
workerVersion: z.string().max(64),
|
|
300
|
+
contentType: z.string().max(140).optional(),
|
|
301
|
+
transferEncoding: z.string().max(64).optional(),
|
|
302
|
+
charset: z.string().max(64).optional(),
|
|
289
303
|
sizeBytes: z.number().optional(),
|
|
290
304
|
structure: z.array(QuarantineMimeNodeSchema),
|
|
291
|
-
messageIdHash: z.string().optional(),
|
|
305
|
+
messageIdHash: z.string().max(140).optional(),
|
|
292
306
|
createdAt: z.number(),
|
|
293
307
|
updatedAt: z.number()
|
|
294
308
|
});
|
|
309
|
+
export const SyncWarningSchema = z.object({
|
|
310
|
+
syncWarningId: z.string().min(25).max(25),
|
|
311
|
+
accountConfigId: z.string().min(25).max(25),
|
|
312
|
+
accountId: z.string().min(25).max(25),
|
|
313
|
+
mailboxId: z.string().min(25).max(25),
|
|
314
|
+
uidValidity: z.number(),
|
|
315
|
+
uid: z.number(),
|
|
316
|
+
stage: SyncWarningStageSchema,
|
|
317
|
+
attempts: z.number(),
|
|
318
|
+
createdAt: z.number()
|
|
319
|
+
});
|
|
295
320
|
export const AccountConfigResponseSchema = z.object({
|
|
296
|
-
accountConfigId: z.string(),
|
|
297
|
-
userId: z.string(),
|
|
321
|
+
accountConfigId: z.string().min(25).max(25),
|
|
322
|
+
userId: z.string().min(25).max(25),
|
|
298
323
|
name: z.string().optional(),
|
|
299
324
|
state: AccountConfigStateSchema,
|
|
300
325
|
deletedAt: z.number().optional(),
|
|
@@ -312,25 +337,25 @@ export const MutedFlagSchema = z.object({
|
|
|
312
337
|
export const FolderAppointmentSchema = z.object({
|
|
313
338
|
role: CanonicalMailboxRoleSchema,
|
|
314
339
|
source: FolderAppointmentSourceSchema,
|
|
315
|
-
mailboxId: z.string().optional(),
|
|
316
|
-
staleAppointmentMailboxId: z.string().optional(),
|
|
317
|
-
staleAppointmentPath: z.string().optional()
|
|
340
|
+
mailboxId: z.string().min(25).max(25).optional(),
|
|
341
|
+
staleAppointmentMailboxId: z.string().min(25).max(25).optional(),
|
|
342
|
+
staleAppointmentPath: z.string().max(512).optional()
|
|
318
343
|
});
|
|
319
344
|
export const AccountResponseSchema = z.object({
|
|
320
|
-
accountId: z.string(),
|
|
321
|
-
accountConfigId: z.string(),
|
|
322
|
-
username: z.string(),
|
|
345
|
+
accountId: z.string().min(25).max(25),
|
|
346
|
+
accountConfigId: z.string().min(25).max(25),
|
|
347
|
+
username: z.string().min(1),
|
|
323
348
|
email: z.string(),
|
|
324
349
|
authType: AccountAuthTypeSchema,
|
|
325
350
|
syncedServices: z.array(AccountServiceSchema),
|
|
326
351
|
grantedScopes: z.array(z.string()),
|
|
327
|
-
imapHost: z.string(),
|
|
328
|
-
imapPort: z.number(),
|
|
352
|
+
imapHost: z.string().min(1),
|
|
353
|
+
imapPort: z.number().min(1).max(65535),
|
|
329
354
|
imapTls: z.boolean(),
|
|
330
355
|
imapStartTls: z.boolean(),
|
|
331
356
|
smtpEnabled: z.boolean(),
|
|
332
357
|
smtpHost: z.string(),
|
|
333
|
-
smtpPort: z.number(),
|
|
358
|
+
smtpPort: z.number().min(1).max(65535),
|
|
334
359
|
smtpTls: z.boolean(),
|
|
335
360
|
smtpStartTls: z.boolean(),
|
|
336
361
|
smtpUsername: z.string(),
|
|
@@ -340,8 +365,8 @@ export const AccountResponseSchema = z.object({
|
|
|
340
365
|
lastSyncAt: z.number().optional(),
|
|
341
366
|
lastError: z.string().optional(),
|
|
342
367
|
syncPhase: SyncPhaseSchema.optional(),
|
|
343
|
-
mailboxCountTotal: z.number().optional(),
|
|
344
|
-
mailboxCountSynced: z.number().optional(),
|
|
368
|
+
mailboxCountTotal: z.number().min(0).optional(),
|
|
369
|
+
mailboxCountSynced: z.number().min(0).optional(),
|
|
345
370
|
createdAt: z.number(),
|
|
346
371
|
updatedAt: z.number(),
|
|
347
372
|
displayName: z.string().optional(),
|
|
@@ -352,18 +377,18 @@ export const AccountResponseSchema = z.object({
|
|
|
352
377
|
folderAppointments: z.array(FolderAppointmentSchema)
|
|
353
378
|
});
|
|
354
379
|
export const PendingConfigImportSchema = z.object({
|
|
355
|
-
importId: z.string(),
|
|
380
|
+
importId: z.string().min(25).max(25),
|
|
356
381
|
folderPaths: z.array(z.string())
|
|
357
382
|
});
|
|
358
383
|
export const ConfigDescriptionResponseSchema = z.object({
|
|
359
384
|
accountConfig: AccountConfigResponseSchema,
|
|
360
385
|
accounts: z.array(AccountResponseSchema),
|
|
361
|
-
|
|
362
|
-
|
|
386
|
+
buildCommit: z.string(),
|
|
387
|
+
pendingImport: PendingConfigImportSchema.optional()
|
|
363
388
|
});
|
|
364
389
|
export const AccountConfigSchema = z.object({
|
|
365
|
-
accountConfigId: z.string(),
|
|
366
|
-
userId: z.string(),
|
|
390
|
+
accountConfigId: z.string().min(25).max(25),
|
|
391
|
+
userId: z.string().min(25).max(25),
|
|
367
392
|
name: z.string().optional(),
|
|
368
393
|
state: AccountConfigStateSchema,
|
|
369
394
|
deletedAt: z.number().optional(),
|
|
@@ -372,9 +397,9 @@ export const AccountConfigSchema = z.object({
|
|
|
372
397
|
updatedAt: z.number()
|
|
373
398
|
});
|
|
374
399
|
export const AccountSchema = z.object({
|
|
375
|
-
accountId: z.string(),
|
|
376
|
-
accountConfigId: z.string(),
|
|
377
|
-
username: z.string(),
|
|
400
|
+
accountId: z.string().min(25).max(25),
|
|
401
|
+
accountConfigId: z.string().min(25).max(25),
|
|
402
|
+
username: z.string().min(1),
|
|
378
403
|
email: z.string(),
|
|
379
404
|
authType: AccountAuthTypeSchema,
|
|
380
405
|
syncedServices: z.array(AccountServiceSchema),
|
|
@@ -382,13 +407,13 @@ export const AccountSchema = z.object({
|
|
|
382
407
|
passwordHash: z.string().optional(),
|
|
383
408
|
oauthRefreshTokenHash: z.string().optional(),
|
|
384
409
|
oauthTokenUpdatedAt: z.number().optional(),
|
|
385
|
-
imapHost: z.string(),
|
|
386
|
-
imapPort: z.number(),
|
|
410
|
+
imapHost: z.string().min(1),
|
|
411
|
+
imapPort: z.number().min(1).max(65535),
|
|
387
412
|
imapTls: z.boolean(),
|
|
388
413
|
imapStartTls: z.boolean(),
|
|
389
414
|
smtpEnabled: z.boolean(),
|
|
390
415
|
smtpHost: z.string(),
|
|
391
|
-
smtpPort: z.number(),
|
|
416
|
+
smtpPort: z.number().min(1).max(65535),
|
|
392
417
|
smtpTls: z.boolean(),
|
|
393
418
|
smtpStartTls: z.boolean(),
|
|
394
419
|
smtpUsername: z.string(),
|
|
@@ -399,8 +424,8 @@ export const AccountSchema = z.object({
|
|
|
399
424
|
lastSyncAt: z.number().optional(),
|
|
400
425
|
lastError: z.string().optional(),
|
|
401
426
|
syncPhase: SyncPhaseSchema.optional(),
|
|
402
|
-
mailboxCountTotal: z.number().optional(),
|
|
403
|
-
mailboxCountSynced: z.number().optional(),
|
|
427
|
+
mailboxCountTotal: z.number().min(0).optional(),
|
|
428
|
+
mailboxCountSynced: z.number().min(0).optional(),
|
|
404
429
|
createdAt: z.number(),
|
|
405
430
|
updatedAt: z.number(),
|
|
406
431
|
deletedAt: z.number().optional()
|
|
@@ -427,14 +452,14 @@ export const ConfigImportItemReportSchema = z.object({
|
|
|
427
452
|
reason: z.string().optional()
|
|
428
453
|
});
|
|
429
454
|
export const ConfigImportReportSchema = z.object({
|
|
430
|
-
importId: z.string().optional(),
|
|
455
|
+
importId: z.string().min(25).max(25).optional(),
|
|
431
456
|
valid: z.boolean(),
|
|
432
457
|
schemaVersion: z.number(),
|
|
433
458
|
applied: z.boolean(),
|
|
434
459
|
items: z.array(ConfigImportItemReportSchema),
|
|
435
460
|
errors: z.array(ApiErrorSchema),
|
|
436
461
|
warnings: z.array(ApiErrorSchema),
|
|
437
|
-
accountsNeedingCredentials: z.array(z.string())
|
|
462
|
+
accountsNeedingCredentials: z.array(z.string().min(25).max(25))
|
|
438
463
|
});
|
|
439
464
|
export const ConfigImportConflictSchema = z.object({
|
|
440
465
|
statusCode: z.literal(409),
|
|
@@ -458,7 +483,7 @@ export const SystemUpdateRunSchema = z.object({
|
|
|
458
483
|
fromVersion: z.string(),
|
|
459
484
|
targetVersion: z.string(),
|
|
460
485
|
phase: SystemUpdatePhaseSchema,
|
|
461
|
-
outcome: z.union([SystemUpdateOutcomeSchema, z.
|
|
486
|
+
outcome: z.union([SystemUpdateOutcomeSchema, z.null()]),
|
|
462
487
|
startedAt: z.string(),
|
|
463
488
|
updatedAt: z.string(),
|
|
464
489
|
message: z.string(),
|
|
@@ -468,32 +493,32 @@ export const SystemUpdateResponseSchema = z.object({
|
|
|
468
493
|
currentVersion: z.string(),
|
|
469
494
|
currentSchemaVersion: z.number().optional(),
|
|
470
495
|
check: SystemUpdateCheckSchema,
|
|
471
|
-
run: z.union([SystemUpdateRunSchema, z.
|
|
496
|
+
run: z.union([SystemUpdateRunSchema, z.null()])
|
|
472
497
|
});
|
|
473
498
|
export const ApplyUpdateInputSchema = z.object({
|
|
474
499
|
targetVersion: z.string()
|
|
475
500
|
});
|
|
476
501
|
export const MailboxSchema = z.object({
|
|
477
|
-
mailboxId: z.string(),
|
|
478
|
-
accountId: z.string(),
|
|
502
|
+
mailboxId: z.string().min(25).max(25),
|
|
503
|
+
accountId: z.string().min(25).max(25),
|
|
479
504
|
namespaceType: NamespaceTypeSchema,
|
|
480
505
|
namespacePrefix: z.string(),
|
|
481
|
-
hierarchyDelimiter: z.string(),
|
|
482
|
-
fullPath: z.string(),
|
|
483
|
-
uidValidity: z.number(),
|
|
484
|
-
uidNext: z.number(),
|
|
485
|
-
highestModseq: z.string(),
|
|
486
|
-
messageCount: z.number(),
|
|
487
|
-
unseenCount: z.number(),
|
|
488
|
-
deletedCount: z.number(),
|
|
489
|
-
totalSize: z.number(),
|
|
506
|
+
hierarchyDelimiter: z.string().min(1).max(1),
|
|
507
|
+
fullPath: z.string().min(1).max(512),
|
|
508
|
+
uidValidity: z.number().min(1),
|
|
509
|
+
uidNext: z.number().min(1),
|
|
510
|
+
highestModseq: z.string().max(32),
|
|
511
|
+
messageCount: z.number().min(0),
|
|
512
|
+
unseenCount: z.number().min(0),
|
|
513
|
+
deletedCount: z.number().min(0),
|
|
514
|
+
totalSize: z.number().min(0),
|
|
490
515
|
lastSyncUid: z.number(),
|
|
491
516
|
highWaterMarkUid: z.number(),
|
|
492
517
|
lastMessageSyncAt: z.number(),
|
|
493
518
|
initialSyncCompletedAt: z.number().optional(),
|
|
494
519
|
parentMailboxId: z.string(),
|
|
495
520
|
syncStatus: MailboxSyncStatusSchema,
|
|
496
|
-
pendingPath: z.string().optional(),
|
|
521
|
+
pendingPath: z.string().max(512).optional(),
|
|
497
522
|
syncFailureReason: z.string(),
|
|
498
523
|
cursorState: MailboxCursorStateSchema,
|
|
499
524
|
specialUse: z.array(MailboxSpecialUseSchema).optional(),
|
|
@@ -501,103 +526,103 @@ export const MailboxSchema = z.object({
|
|
|
501
526
|
updatedAt: z.number()
|
|
502
527
|
});
|
|
503
528
|
export const MailboxResponseSchema = z.object({
|
|
504
|
-
mailboxId: z.string(),
|
|
505
|
-
accountId: z.string(),
|
|
529
|
+
mailboxId: z.string().min(25).max(25),
|
|
530
|
+
accountId: z.string().min(25).max(25),
|
|
506
531
|
namespaceType: NamespaceTypeSchema,
|
|
507
532
|
namespacePrefix: z.string(),
|
|
508
|
-
hierarchyDelimiter: z.string(),
|
|
509
|
-
fullPath: z.string(),
|
|
510
|
-
messageCount: z.number(),
|
|
511
|
-
unseenCount: z.number(),
|
|
512
|
-
deletedCount: z.number(),
|
|
533
|
+
hierarchyDelimiter: z.string().min(1).max(1),
|
|
534
|
+
fullPath: z.string().min(1).max(512),
|
|
535
|
+
messageCount: z.number().min(0),
|
|
536
|
+
unseenCount: z.number().min(0),
|
|
537
|
+
deletedCount: z.number().min(0),
|
|
513
538
|
lastSyncUid: z.number(),
|
|
514
539
|
highWaterMarkUid: z.number(),
|
|
515
540
|
lastMessageSyncAt: z.number(),
|
|
516
541
|
syncStatus: MailboxSyncStatusSchema,
|
|
517
|
-
pendingPath: z.string().optional(),
|
|
542
|
+
pendingPath: z.string().max(512).optional(),
|
|
518
543
|
syncFailureReason: z.string(),
|
|
519
544
|
specialUse: z.array(MailboxSpecialUseSchema).optional(),
|
|
520
545
|
createdAt: z.number(),
|
|
521
546
|
updatedAt: z.number(),
|
|
522
547
|
muted: MutedFlagSchema.optional(),
|
|
523
|
-
displayNameOverride: z.string().optional()
|
|
548
|
+
displayNameOverride: z.string().max(256).optional()
|
|
549
|
+
});
|
|
550
|
+
export const MailboxListResponseSchema = z.object({
|
|
551
|
+
continuationToken: z.string().max(800).optional(),
|
|
552
|
+
items: z.array(MailboxResponseSchema)
|
|
524
553
|
});
|
|
525
554
|
export const CreateMailboxInputSchema = z.object({
|
|
526
555
|
namespaceType: NamespaceTypeSchema,
|
|
527
|
-
fullPath: z.string()
|
|
556
|
+
fullPath: z.string().min(1).max(512)
|
|
528
557
|
});
|
|
529
558
|
export const RenameMailboxInputSchema = z.object({
|
|
530
|
-
fullPath: z.string().optional(),
|
|
531
|
-
muted: z.union([MutedFlagSchema, z.
|
|
532
|
-
displayNameOverride: z.union([z.string(), z.
|
|
559
|
+
fullPath: z.string().max(512).optional(),
|
|
560
|
+
muted: z.union([MutedFlagSchema, z.null()]).optional(),
|
|
561
|
+
displayNameOverride: z.union([z.string(), z.null()]).optional()
|
|
533
562
|
});
|
|
534
563
|
export const AppointFolderRoleInputSchema = z.object({
|
|
535
|
-
mailboxId: z.union([z.string(), z.
|
|
564
|
+
mailboxId: z.union([z.string(), z.null()])
|
|
536
565
|
});
|
|
537
566
|
export const FilterClauseSchema = z.object({
|
|
538
567
|
field: FilterClauseFieldSchema,
|
|
539
|
-
value: z.string()
|
|
568
|
+
value: z.string().max(256)
|
|
540
569
|
});
|
|
541
570
|
export const FilterSchema = z.object({
|
|
542
|
-
filterId: z.string(),
|
|
543
|
-
accountConfigId: z.string(),
|
|
544
|
-
name: z.string(),
|
|
571
|
+
filterId: z.string().min(25).max(25),
|
|
572
|
+
accountConfigId: z.string().min(25).max(25),
|
|
573
|
+
name: z.string().max(256),
|
|
545
574
|
scope: FilterScopeSchema,
|
|
546
575
|
expiresAt: z.string().optional(),
|
|
547
576
|
ttl: z.number().optional(),
|
|
548
577
|
state: FilterStateSchema,
|
|
549
578
|
disabledReason: FilterDisabledReasonSchema,
|
|
550
|
-
hasAnchor: z.boolean(),
|
|
551
579
|
ruleChangedAt: z.number(),
|
|
552
580
|
actionChangedAt: z.number(),
|
|
553
581
|
matchOperator: FilterMatchOperatorSchema,
|
|
554
|
-
literalClauses: z.array(FilterClauseSchema),
|
|
582
|
+
literalClauses: z.array(FilterClauseSchema).min(1),
|
|
555
583
|
actionLabelId: z.string(),
|
|
556
584
|
actionMailboxId: z.string(),
|
|
557
585
|
createdAt: z.number(),
|
|
558
586
|
updatedAt: z.number()
|
|
559
587
|
});
|
|
560
588
|
export const FilterResponseSchema = z.object({
|
|
561
|
-
filterId: z.string(),
|
|
562
|
-
accountConfigId: z.string(),
|
|
563
|
-
name: z.string(),
|
|
589
|
+
filterId: z.string().min(25).max(25),
|
|
590
|
+
accountConfigId: z.string().min(25).max(25),
|
|
591
|
+
name: z.string().max(256),
|
|
564
592
|
scope: FilterScopeSchema,
|
|
565
593
|
expiresAt: z.string().optional(),
|
|
566
594
|
state: FilterStateSchema,
|
|
567
595
|
disabledReason: FilterDisabledReasonSchema,
|
|
568
|
-
hasAnchor: z.boolean(),
|
|
569
596
|
ruleChangedAt: z.number(),
|
|
570
597
|
actionChangedAt: z.number(),
|
|
571
598
|
matchOperator: FilterMatchOperatorSchema,
|
|
572
|
-
literalClauses: z.array(FilterClauseSchema),
|
|
599
|
+
literalClauses: z.array(FilterClauseSchema).min(1),
|
|
573
600
|
actionLabelId: z.string(),
|
|
574
601
|
actionMailboxId: z.string(),
|
|
575
602
|
createdAt: z.number(),
|
|
576
603
|
updatedAt: z.number()
|
|
577
604
|
});
|
|
578
605
|
export const CreateFilterInputSchema = z.object({
|
|
579
|
-
name: z.string(),
|
|
606
|
+
name: z.string().max(256),
|
|
580
607
|
scope: FilterScopeSchema,
|
|
581
608
|
expiresAt: z.string().optional(),
|
|
582
609
|
matchOperator: FilterMatchOperatorSchema,
|
|
583
|
-
literalClauses: z.array(FilterClauseSchema),
|
|
610
|
+
literalClauses: z.array(FilterClauseSchema).min(1),
|
|
584
611
|
actionLabelId: z.string(),
|
|
585
|
-
actionMailboxId: z.string()
|
|
586
|
-
anchorMessageId: z.string().optional()
|
|
612
|
+
actionMailboxId: z.string()
|
|
587
613
|
});
|
|
588
614
|
export const CreateFilterResponseSchema = z.object({
|
|
589
|
-
filterId: z.string(),
|
|
590
|
-
accountConfigId: z.string(),
|
|
591
|
-
name: z.string(),
|
|
615
|
+
filterId: z.string().min(25).max(25),
|
|
616
|
+
accountConfigId: z.string().min(25).max(25),
|
|
617
|
+
name: z.string().max(256),
|
|
592
618
|
scope: FilterScopeSchema,
|
|
593
619
|
expiresAt: z.string().optional(),
|
|
594
620
|
state: FilterStateSchema,
|
|
595
621
|
disabledReason: FilterDisabledReasonSchema,
|
|
596
|
-
hasAnchor: z.boolean(),
|
|
597
622
|
ruleChangedAt: z.number(),
|
|
598
623
|
actionChangedAt: z.number(),
|
|
599
624
|
matchOperator: FilterMatchOperatorSchema,
|
|
600
|
-
literalClauses: z.array(FilterClauseSchema),
|
|
625
|
+
literalClauses: z.array(FilterClauseSchema).min(1),
|
|
601
626
|
actionLabelId: z.string(),
|
|
602
627
|
actionMailboxId: z.string(),
|
|
603
628
|
createdAt: z.number(),
|
|
@@ -605,47 +630,45 @@ export const CreateFilterResponseSchema = z.object({
|
|
|
605
630
|
organizeJobId: z.string()
|
|
606
631
|
});
|
|
607
632
|
export const UpdateFilterInputSchema = z.object({
|
|
608
|
-
name: z.string(),
|
|
633
|
+
name: z.string().max(256),
|
|
609
634
|
scope: FilterScopeSchema,
|
|
610
635
|
expiresAt: z.string().optional(),
|
|
611
636
|
state: FilterStateSchema,
|
|
612
637
|
matchOperator: FilterMatchOperatorSchema,
|
|
613
|
-
literalClauses: z.array(FilterClauseSchema),
|
|
638
|
+
literalClauses: z.array(FilterClauseSchema).min(1),
|
|
614
639
|
actionLabelId: z.string(),
|
|
615
640
|
actionMailboxId: z.string()
|
|
616
641
|
});
|
|
617
642
|
export const LabelSchema = z.object({
|
|
618
|
-
labelId: z.string(),
|
|
619
|
-
accountConfigId: z.string(),
|
|
620
|
-
name: z.string(),
|
|
621
|
-
normalizedName: z.string(),
|
|
643
|
+
labelId: z.string().min(25).max(25),
|
|
644
|
+
accountConfigId: z.string().min(25).max(25),
|
|
645
|
+
name: z.string().max(140),
|
|
646
|
+
normalizedName: z.string().max(140),
|
|
622
647
|
color: LabelColorSchema,
|
|
623
648
|
createdAt: z.number(),
|
|
624
649
|
updatedAt: z.number()
|
|
625
650
|
});
|
|
626
651
|
export const LabelResponseSchema = z.object({
|
|
627
|
-
labelId: z.string(),
|
|
628
|
-
accountConfigId: z.string(),
|
|
629
|
-
name: z.string(),
|
|
652
|
+
labelId: z.string().min(25).max(25),
|
|
653
|
+
accountConfigId: z.string().min(25).max(25),
|
|
654
|
+
name: z.string().max(140),
|
|
630
655
|
color: LabelColorSchema,
|
|
631
656
|
createdAt: z.number(),
|
|
632
657
|
updatedAt: z.number(),
|
|
633
658
|
filterCount: z.number()
|
|
634
659
|
});
|
|
635
660
|
export const CreateLabelInputSchema = z.object({
|
|
636
|
-
name: z.string(),
|
|
661
|
+
name: z.string().max(140),
|
|
637
662
|
color: LabelColorSchema
|
|
638
663
|
});
|
|
639
664
|
export const UpdateLabelInputSchema = z.object({
|
|
640
|
-
name: z.string(),
|
|
665
|
+
name: z.string().max(140),
|
|
641
666
|
color: LabelColorSchema
|
|
642
667
|
});
|
|
643
668
|
export const OrganizeInputSchema = z.object({
|
|
644
|
-
filterId: z.string().optional(),
|
|
645
|
-
anchorMessageId: z.string().optional(),
|
|
669
|
+
filterId: z.string().min(25).max(25).optional(),
|
|
646
670
|
matchOperator: FilterMatchOperatorSchema,
|
|
647
671
|
literalClauses: z.array(FilterClauseSchema),
|
|
648
|
-
similarityThreshold: z.number().optional(),
|
|
649
672
|
actionLabelId: z.string(),
|
|
650
673
|
actionMailboxId: z.string()
|
|
651
674
|
});
|
|
@@ -656,20 +679,16 @@ export const CreateOrganizeJobResponseSchema = z.object({
|
|
|
656
679
|
});
|
|
657
680
|
export const OrganizePreviewResponseSchema = z.object({
|
|
658
681
|
matchedCount: z.number(),
|
|
659
|
-
messageIds: z.array(z.string())
|
|
660
|
-
semanticUnavailable: z.boolean().optional(),
|
|
661
|
-
semanticIndexEmpty: z.boolean().optional()
|
|
682
|
+
messageIds: z.array(z.string())
|
|
662
683
|
});
|
|
663
684
|
export const OrganizeJobRequestSchema = z.object({
|
|
664
|
-
organizeJobId: z.string(),
|
|
665
|
-
accountConfigId: z.string(),
|
|
685
|
+
organizeJobId: z.string().min(25).max(25),
|
|
686
|
+
accountConfigId: z.string().min(25).max(25),
|
|
666
687
|
userId: z.string(),
|
|
667
688
|
state: OrganizeJobStateSchema,
|
|
668
689
|
filterId: z.string(),
|
|
669
|
-
anchorMessageId: z.string(),
|
|
670
690
|
matchOperator: FilterMatchOperatorSchema,
|
|
671
691
|
literalClauses: z.array(FilterClauseSchema),
|
|
672
|
-
similarityThreshold: z.number(),
|
|
673
692
|
actionLabelId: z.string(),
|
|
674
693
|
actionMailboxId: z.string(),
|
|
675
694
|
matchedCount: z.number(),
|
|
@@ -681,15 +700,13 @@ export const OrganizeJobRequestSchema = z.object({
|
|
|
681
700
|
updatedAt: z.number()
|
|
682
701
|
});
|
|
683
702
|
export const OrganizeJobResponseSchema = z.object({
|
|
684
|
-
organizeJobId: z.string(),
|
|
685
|
-
accountConfigId: z.string(),
|
|
703
|
+
organizeJobId: z.string().min(25).max(25),
|
|
704
|
+
accountConfigId: z.string().min(25).max(25),
|
|
686
705
|
userId: z.string(),
|
|
687
706
|
state: OrganizeJobStateSchema,
|
|
688
707
|
filterId: z.string(),
|
|
689
|
-
anchorMessageId: z.string(),
|
|
690
708
|
matchOperator: FilterMatchOperatorSchema,
|
|
691
709
|
literalClauses: z.array(FilterClauseSchema),
|
|
692
|
-
similarityThreshold: z.number(),
|
|
693
710
|
actionLabelId: z.string(),
|
|
694
711
|
actionMailboxId: z.string(),
|
|
695
712
|
matchedCount: z.number(),
|
|
@@ -700,20 +717,20 @@ export const OrganizeJobResponseSchema = z.object({
|
|
|
700
717
|
updatedAt: z.number()
|
|
701
718
|
});
|
|
702
719
|
export const CalendarResponseSchema = z.object({
|
|
703
|
-
calendarId: z.string(),
|
|
704
|
-
accountConfigId: z.string(),
|
|
705
|
-
urlSegment: z.string(),
|
|
706
|
-
displayName: z.string(),
|
|
720
|
+
calendarId: z.string().min(25).max(25),
|
|
721
|
+
accountConfigId: z.string().min(25).max(25),
|
|
722
|
+
urlSegment: z.string().max(64),
|
|
723
|
+
displayName: z.string().max(140),
|
|
707
724
|
color: CalendarColorSchema,
|
|
708
725
|
componentSet: CalendarComponentSetSchema,
|
|
709
726
|
source: CalendarSourceSchema,
|
|
710
|
-
timezone: z.string(),
|
|
727
|
+
timezone: z.string().max(64),
|
|
711
728
|
syncSequence: z.number(),
|
|
712
|
-
subscriptionUrl: z.string(),
|
|
729
|
+
subscriptionUrl: z.string().max(2048),
|
|
713
730
|
subscriptionEnabled: z.boolean(),
|
|
714
731
|
subscriptionCheckedAt: z.number(),
|
|
715
732
|
subscriptionFetchedAt: z.number(),
|
|
716
|
-
subscriptionError: z.string(),
|
|
733
|
+
subscriptionError: z.string().max(512),
|
|
717
734
|
createdAt: z.number(),
|
|
718
735
|
updatedAt: z.number()
|
|
719
736
|
});
|
|
@@ -721,47 +738,47 @@ export const CalendarListResponseSchema = z.object({
|
|
|
721
738
|
items: z.array(CalendarResponseSchema)
|
|
722
739
|
});
|
|
723
740
|
export const CalendarCollectionSchema = z.object({
|
|
724
|
-
calendarId: z.string(),
|
|
725
|
-
accountConfigId: z.string(),
|
|
726
|
-
urlSegment: z.string(),
|
|
727
|
-
displayName: z.string(),
|
|
741
|
+
calendarId: z.string().min(25).max(25),
|
|
742
|
+
accountConfigId: z.string().min(25).max(25),
|
|
743
|
+
urlSegment: z.string().max(64),
|
|
744
|
+
displayName: z.string().max(140),
|
|
728
745
|
color: CalendarColorSchema,
|
|
729
746
|
componentSet: CalendarComponentSetSchema,
|
|
730
747
|
source: CalendarSourceSchema,
|
|
731
|
-
timezone: z.string(),
|
|
748
|
+
timezone: z.string().max(64),
|
|
732
749
|
syncSequence: z.number(),
|
|
733
|
-
subscriptionUrl: z.string(),
|
|
750
|
+
subscriptionUrl: z.string().max(2048),
|
|
734
751
|
subscriptionEnabled: z.boolean(),
|
|
735
752
|
subscriptionCheckedAt: z.number(),
|
|
736
753
|
subscriptionFetchedAt: z.number(),
|
|
737
|
-
subscriptionError: z.string(),
|
|
754
|
+
subscriptionError: z.string().max(512),
|
|
738
755
|
createdAt: z.number(),
|
|
739
756
|
updatedAt: z.number()
|
|
740
757
|
});
|
|
741
758
|
export const CreateCalendarInputSchema = z.object({
|
|
742
|
-
displayName: z.string(),
|
|
743
|
-
urlSegment: z.string(),
|
|
759
|
+
displayName: z.string().max(140),
|
|
760
|
+
urlSegment: z.string().max(64),
|
|
744
761
|
color: CalendarColorSchema.optional(),
|
|
745
|
-
timezone: z.string().optional(),
|
|
746
|
-
subscriptionUrl: z.string().optional()
|
|
762
|
+
timezone: z.string().max(64).optional(),
|
|
763
|
+
subscriptionUrl: z.string().max(2048).optional()
|
|
747
764
|
});
|
|
748
765
|
export const UpdateCalendarInputSchema = z.object({
|
|
749
|
-
displayName: z.string(),
|
|
766
|
+
displayName: z.string().max(140),
|
|
750
767
|
color: CalendarColorSchema,
|
|
751
|
-
timezone: z.string(),
|
|
768
|
+
timezone: z.string().max(64),
|
|
752
769
|
subscriptionEnabled: z.boolean()
|
|
753
770
|
});
|
|
754
771
|
export const CalendarNoContentSchema = z.object({
|
|
755
772
|
statusCode: z.literal(204)
|
|
756
773
|
});
|
|
757
774
|
export const CalendarFeedStateResponseSchema = z.object({
|
|
758
|
-
calendarId: z.string(),
|
|
775
|
+
calendarId: z.string().min(25).max(25),
|
|
759
776
|
createdAt: z.number(),
|
|
760
777
|
rotatedAt: z.number()
|
|
761
778
|
});
|
|
762
779
|
export const CalendarFeedResponseSchema = z.object({
|
|
763
|
-
calendarId: z.string(),
|
|
764
|
-
feedToken: z.string(),
|
|
780
|
+
calendarId: z.string().min(25).max(25),
|
|
781
|
+
feedToken: z.string().max(512),
|
|
765
782
|
createdAt: z.number(),
|
|
766
783
|
rotatedAt: z.number()
|
|
767
784
|
});
|
|
@@ -782,93 +799,93 @@ export const CalendarFeedNotFoundSchema = z.object({
|
|
|
782
799
|
message: z.string()
|
|
783
800
|
});
|
|
784
801
|
export const CalendarEventInstanceSchema = z.object({
|
|
785
|
-
calendarId: z.string(),
|
|
786
|
-
calendarObjectId: z.string(),
|
|
787
|
-
recurrenceId: z.string(),
|
|
788
|
-
icalUid: z.string(),
|
|
789
|
-
summary: z.string(),
|
|
790
|
-
start: z.string(),
|
|
791
|
-
end: z.string(),
|
|
802
|
+
calendarId: z.string().min(25).max(25),
|
|
803
|
+
calendarObjectId: z.string().min(25).max(25),
|
|
804
|
+
recurrenceId: z.string().max(64),
|
|
805
|
+
icalUid: z.string().max(512),
|
|
806
|
+
summary: z.string().max(512),
|
|
807
|
+
start: z.string().max(64),
|
|
808
|
+
end: z.string().max(64),
|
|
792
809
|
allDay: z.boolean(),
|
|
793
810
|
status: CalendarEventStatusSchema,
|
|
794
811
|
transparency: CalendarTransparencySchema,
|
|
795
812
|
zoneCertainty: ZoneCertaintySchema,
|
|
796
|
-
etag: z.string(),
|
|
813
|
+
etag: z.string().max(64),
|
|
797
814
|
hasRecurrence: z.boolean()
|
|
798
815
|
});
|
|
799
816
|
export const CalendarEventListResponseSchema = z.object({
|
|
800
817
|
items: z.array(CalendarEventInstanceSchema)
|
|
801
818
|
});
|
|
802
819
|
export const CreateCalendarEventInputSchema = z.object({
|
|
803
|
-
calendarId: z.string(),
|
|
804
|
-
summary: z.string(),
|
|
805
|
-
description: z.string().optional(),
|
|
806
|
-
location: z.string().optional(),
|
|
807
|
-
start: z.string(),
|
|
808
|
-
end: z.string(),
|
|
820
|
+
calendarId: z.string().min(25).max(25),
|
|
821
|
+
summary: z.string().max(512),
|
|
822
|
+
description: z.string().max(2048).optional(),
|
|
823
|
+
location: z.string().max(512).optional(),
|
|
824
|
+
start: z.string().max(64),
|
|
825
|
+
end: z.string().max(64),
|
|
809
826
|
allDay: z.boolean().optional(),
|
|
810
|
-
timeZone: z.string().optional(),
|
|
827
|
+
timeZone: z.string().max(64).optional(),
|
|
811
828
|
status: CalendarEventStatusSchema.optional(),
|
|
812
829
|
transparency: CalendarTransparencySchema.optional(),
|
|
813
|
-
recurrenceRule: z.string().optional()
|
|
830
|
+
recurrenceRule: z.string().max(512).optional()
|
|
814
831
|
});
|
|
815
832
|
export const CalendarObjectSchema = z.object({
|
|
816
|
-
calendarObjectId: z.string(),
|
|
817
|
-
calendarId: z.string(),
|
|
818
|
-
resourceName: z.string(),
|
|
819
|
-
icalUid: z.string(),
|
|
833
|
+
calendarObjectId: z.string().min(25).max(25),
|
|
834
|
+
calendarId: z.string().min(25).max(25),
|
|
835
|
+
resourceName: z.string().max(256),
|
|
836
|
+
icalUid: z.string().max(512),
|
|
820
837
|
icalData: z.string(),
|
|
821
|
-
etag: z.string(),
|
|
838
|
+
etag: z.string().max(64),
|
|
822
839
|
sequence: z.number(),
|
|
823
840
|
syncSequence: z.number(),
|
|
824
|
-
summary: z.string(),
|
|
825
|
-
dtStart: z.string(),
|
|
826
|
-
dtEnd: z.string(),
|
|
841
|
+
summary: z.string().max(512),
|
|
842
|
+
dtStart: z.string().max(64),
|
|
843
|
+
dtEnd: z.string().max(64),
|
|
827
844
|
allDay: z.boolean(),
|
|
828
845
|
zoneCertainty: ZoneCertaintySchema,
|
|
829
846
|
status: CalendarEventStatusSchema,
|
|
830
847
|
transparency: CalendarTransparencySchema,
|
|
831
848
|
hasRecurrence: z.boolean(),
|
|
832
|
-
expandedThrough: z.string(),
|
|
849
|
+
expandedThrough: z.string().max(64),
|
|
833
850
|
createdAt: z.number(),
|
|
834
851
|
updatedAt: z.number()
|
|
835
852
|
});
|
|
836
853
|
export const CalendarEventResponseSchema = z.object({
|
|
837
|
-
calendarObjectId: z.string(),
|
|
838
|
-
calendarId: z.string(),
|
|
839
|
-
resourceName: z.string(),
|
|
840
|
-
icalUid: z.string(),
|
|
854
|
+
calendarObjectId: z.string().min(25).max(25),
|
|
855
|
+
calendarId: z.string().min(25).max(25),
|
|
856
|
+
resourceName: z.string().max(256),
|
|
857
|
+
icalUid: z.string().max(512),
|
|
841
858
|
icalData: z.string(),
|
|
842
|
-
etag: z.string(),
|
|
859
|
+
etag: z.string().max(64),
|
|
843
860
|
sequence: z.number(),
|
|
844
861
|
syncSequence: z.number(),
|
|
845
|
-
summary: z.string(),
|
|
846
|
-
dtStart: z.string(),
|
|
847
|
-
dtEnd: z.string(),
|
|
862
|
+
summary: z.string().max(512),
|
|
863
|
+
dtStart: z.string().max(64),
|
|
864
|
+
dtEnd: z.string().max(64),
|
|
848
865
|
allDay: z.boolean(),
|
|
849
866
|
zoneCertainty: ZoneCertaintySchema,
|
|
850
867
|
status: CalendarEventStatusSchema,
|
|
851
868
|
transparency: CalendarTransparencySchema,
|
|
852
869
|
hasRecurrence: z.boolean(),
|
|
853
|
-
expandedThrough: z.string(),
|
|
870
|
+
expandedThrough: z.string().max(64),
|
|
854
871
|
createdAt: z.number(),
|
|
855
872
|
updatedAt: z.number()
|
|
856
873
|
});
|
|
857
874
|
export const UpdateCalendarEventInputSchema = z.object({
|
|
858
|
-
summary: z.string().optional(),
|
|
859
|
-
description: z.string().optional(),
|
|
860
|
-
location: z.string().optional(),
|
|
861
|
-
start: z.string().optional(),
|
|
862
|
-
end: z.string().optional(),
|
|
875
|
+
summary: z.string().max(512).optional(),
|
|
876
|
+
description: z.string().max(2048).optional(),
|
|
877
|
+
location: z.string().max(512).optional(),
|
|
878
|
+
start: z.string().max(64).optional(),
|
|
879
|
+
end: z.string().max(64).optional(),
|
|
863
880
|
allDay: z.boolean().optional(),
|
|
864
|
-
timeZone: z.string().optional(),
|
|
881
|
+
timeZone: z.string().max(64).optional(),
|
|
865
882
|
status: CalendarEventStatusSchema.optional(),
|
|
866
883
|
transparency: CalendarTransparencySchema.optional(),
|
|
867
|
-
recurrenceRule: z.string().optional()
|
|
884
|
+
recurrenceRule: z.string().max(512).optional()
|
|
868
885
|
});
|
|
869
886
|
export const CalendarFreeBusySpanSchema = z.object({
|
|
870
|
-
start: z.string(),
|
|
871
|
-
end: z.string()
|
|
887
|
+
start: z.string().max(64),
|
|
888
|
+
end: z.string().max(64)
|
|
872
889
|
});
|
|
873
890
|
export const CalendarFreeBusyResponseSchema = z.object({
|
|
874
891
|
items: z.array(CalendarFreeBusySpanSchema)
|
|
@@ -881,7 +898,7 @@ export const SyncTriggerResponseSchema = z.object({
|
|
|
881
898
|
message: z.string()
|
|
882
899
|
});
|
|
883
900
|
export const MailboxSyncProgressSchema = z.object({
|
|
884
|
-
mailboxId: z.string(),
|
|
901
|
+
mailboxId: z.string().min(25).max(25),
|
|
885
902
|
fullPath: z.string(),
|
|
886
903
|
phase: z.string(),
|
|
887
904
|
messagesTotal: z.number(),
|
|
@@ -890,7 +907,7 @@ export const MailboxSyncProgressSchema = z.object({
|
|
|
890
907
|
lastSyncedAt: z.number().optional()
|
|
891
908
|
});
|
|
892
909
|
export const AccountSyncStatusResponseSchema = z.object({
|
|
893
|
-
accountId: z.string(),
|
|
910
|
+
accountId: z.string().min(25).max(25),
|
|
894
911
|
syncPhase: SyncPhaseSchema.optional(),
|
|
895
912
|
mailboxCountTotal: z.number().optional(),
|
|
896
913
|
mailboxCountSynced: z.number().optional(),
|
|
@@ -898,34 +915,34 @@ export const AccountSyncStatusResponseSchema = z.object({
|
|
|
898
915
|
mailboxes: z.array(MailboxSyncProgressSchema)
|
|
899
916
|
});
|
|
900
917
|
export const CreateAccountInputSchema = z.object({
|
|
901
|
-
email: z.string(),
|
|
918
|
+
email: z.string().min(1),
|
|
902
919
|
displayName: z.string().optional(),
|
|
903
920
|
username: z.string().optional(),
|
|
904
921
|
authType: AccountAuthTypeSchema.optional(),
|
|
905
922
|
syncedServices: z.array(AccountServiceSchema).optional(),
|
|
906
923
|
password: z.string().optional(),
|
|
907
|
-
imapHost: z.string(),
|
|
908
|
-
imapPort: z.number(),
|
|
924
|
+
imapHost: z.string().min(1),
|
|
925
|
+
imapPort: z.number().min(1).max(65535),
|
|
909
926
|
imapTls: z.boolean(),
|
|
910
927
|
imapStartTls: z.boolean(),
|
|
911
928
|
smtpEnabled: z.boolean().optional(),
|
|
912
929
|
smtpHost: z.string().optional(),
|
|
913
|
-
smtpPort: z.number().optional(),
|
|
930
|
+
smtpPort: z.number().min(1).max(65535).optional(),
|
|
914
931
|
smtpTls: z.boolean().optional(),
|
|
915
932
|
smtpStartTls: z.boolean().optional(),
|
|
916
933
|
smtpUsername: z.string().optional(),
|
|
917
934
|
smtpPassword: z.string().optional()
|
|
918
935
|
});
|
|
919
936
|
export const TestConnectionInputSchema = z.object({
|
|
920
|
-
accountId: z.string().optional(),
|
|
921
|
-
username: z.string(),
|
|
937
|
+
accountId: z.string().min(25).max(25).optional(),
|
|
938
|
+
username: z.string().min(1),
|
|
922
939
|
password: z.string().optional(),
|
|
923
|
-
imapHost: z.string(),
|
|
924
|
-
imapPort: z.number(),
|
|
940
|
+
imapHost: z.string().min(1),
|
|
941
|
+
imapPort: z.number().min(1).max(65535),
|
|
925
942
|
imapTls: z.boolean(),
|
|
926
943
|
imapStartTls: z.boolean(),
|
|
927
944
|
smtpHost: z.string().optional(),
|
|
928
|
-
smtpPort: z.number().optional(),
|
|
945
|
+
smtpPort: z.number().min(1).max(65535).optional(),
|
|
929
946
|
smtpTls: z.boolean().optional(),
|
|
930
947
|
smtpStartTls: z.boolean().optional(),
|
|
931
948
|
smtpUsername: z.string().optional(),
|
|
@@ -941,12 +958,12 @@ export const UpdateAccountInputSchema = z.object({
|
|
|
941
958
|
displayName: z.string().optional(),
|
|
942
959
|
password: z.string().optional(),
|
|
943
960
|
imapHost: z.string().optional(),
|
|
944
|
-
imapPort: z.number().optional(),
|
|
961
|
+
imapPort: z.number().min(1).max(65535).optional(),
|
|
945
962
|
imapTls: z.boolean().optional(),
|
|
946
963
|
imapStartTls: z.boolean().optional(),
|
|
947
964
|
smtpEnabled: z.boolean().optional(),
|
|
948
965
|
smtpHost: z.string().optional(),
|
|
949
|
-
smtpPort: z.number().optional(),
|
|
966
|
+
smtpPort: z.number().min(1).max(65535).optional(),
|
|
950
967
|
smtpTls: z.boolean().optional(),
|
|
951
968
|
smtpStartTls: z.boolean().optional(),
|
|
952
969
|
smtpUsername: z.string().optional(),
|
|
@@ -956,27 +973,27 @@ export const UpdateAccountInputSchema = z.object({
|
|
|
956
973
|
signaturePlainText: z.string().optional(),
|
|
957
974
|
signatureHtml: z.string().optional(),
|
|
958
975
|
composeLanguages: z.array(z.string()).optional(),
|
|
959
|
-
muted: z.union([MutedFlagSchema, z.
|
|
976
|
+
muted: z.union([MutedFlagSchema, z.null()]).optional()
|
|
960
977
|
});
|
|
961
978
|
export const DeleteAccountResponseSchema = z.object({
|
|
962
|
-
accountId: z.string(),
|
|
979
|
+
accountId: z.string().min(25).max(25),
|
|
963
980
|
deletedAt: z.number(),
|
|
964
981
|
message: z.string()
|
|
965
982
|
});
|
|
966
983
|
export const ThreadMessageSchema = z.object({
|
|
967
|
-
threadMessageId: z.string(),
|
|
968
|
-
threadId: z.string(),
|
|
969
|
-
messageId: z.string(),
|
|
970
|
-
accountConfigId: z.string(),
|
|
971
|
-
mailboxId: z.string(),
|
|
972
|
-
uid: z.number(),
|
|
984
|
+
threadMessageId: z.string().min(25).max(25),
|
|
985
|
+
threadId: z.string().min(25).max(25),
|
|
986
|
+
messageId: z.string().min(25).max(25),
|
|
987
|
+
accountConfigId: z.string().min(25).max(25),
|
|
988
|
+
mailboxId: z.string().min(25).max(25),
|
|
989
|
+
uid: z.number().min(1),
|
|
973
990
|
messageIdHeader: z.string().optional(),
|
|
974
991
|
inReplyTo: z.string().optional(),
|
|
975
|
-
referenceOrder: z.number(),
|
|
992
|
+
referenceOrder: z.number().min(0),
|
|
976
993
|
fromEmail: z.string().optional(),
|
|
977
994
|
fromName: z.string().optional(),
|
|
978
995
|
subject: z.string().optional(),
|
|
979
|
-
listId: z.string().optional(),
|
|
996
|
+
listId: z.string().max(256).optional(),
|
|
980
997
|
internalDate: z.number(),
|
|
981
998
|
sentDate: z.number(),
|
|
982
999
|
isRead: z.boolean(),
|
|
@@ -984,7 +1001,7 @@ export const ThreadMessageSchema = z.object({
|
|
|
984
1001
|
star: StarColorSchema,
|
|
985
1002
|
hasStars: z.boolean(),
|
|
986
1003
|
isDeleted: z.boolean(),
|
|
987
|
-
snippet: z.string().optional(),
|
|
1004
|
+
snippet: z.string().max(256).optional(),
|
|
988
1005
|
category: MessageCategorySchema,
|
|
989
1006
|
createdAt: z.number(),
|
|
990
1007
|
updatedAt: z.number()
|
|
@@ -1003,24 +1020,24 @@ export const MessageAuthenticitySchema = z.object({
|
|
|
1003
1020
|
export const AutoMovedInfoSchema = z.object({
|
|
1004
1021
|
action: PlacementActionSchema.optional(),
|
|
1005
1022
|
fromPlacement: z.string().optional(),
|
|
1006
|
-
fromMailboxId: z.string().optional(),
|
|
1007
|
-
destinationMailboxId: z.string().optional(),
|
|
1008
|
-
filterId: z.string().optional()
|
|
1023
|
+
fromMailboxId: z.string().min(25).max(25).optional(),
|
|
1024
|
+
destinationMailboxId: z.string().min(25).max(25).optional(),
|
|
1025
|
+
filterId: z.string().min(25).max(25).optional()
|
|
1009
1026
|
});
|
|
1010
1027
|
export const LabelSummaryResponseSchema = z.object({
|
|
1011
|
-
labelId: z.string(),
|
|
1012
|
-
name: z.string(),
|
|
1028
|
+
labelId: z.string().min(25).max(25),
|
|
1029
|
+
name: z.string().max(140),
|
|
1013
1030
|
color: LabelColorSchema
|
|
1014
1031
|
});
|
|
1015
1032
|
export const MessageSpamReportSchema = z.object({
|
|
1016
1033
|
reportedAt: z.number()
|
|
1017
1034
|
});
|
|
1018
1035
|
export const ThreadMessageResponseSchema = z.object({
|
|
1019
|
-
threadMessageId: z.string(),
|
|
1020
|
-
threadId: z.string(),
|
|
1021
|
-
messageId: z.string(),
|
|
1022
|
-
accountConfigId: z.string(),
|
|
1023
|
-
mailboxId: z.string(),
|
|
1036
|
+
threadMessageId: z.string().min(25).max(25),
|
|
1037
|
+
threadId: z.string().min(25).max(25),
|
|
1038
|
+
messageId: z.string().min(25).max(25),
|
|
1039
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1040
|
+
mailboxId: z.string().min(25).max(25),
|
|
1024
1041
|
fromEmail: z.string().optional(),
|
|
1025
1042
|
fromName: z.string().optional(),
|
|
1026
1043
|
subject: z.string().optional(),
|
|
@@ -1030,7 +1047,7 @@ export const ThreadMessageResponseSchema = z.object({
|
|
|
1030
1047
|
star: StarColorSchema,
|
|
1031
1048
|
hasStars: z.boolean(),
|
|
1032
1049
|
isDeleted: z.boolean(),
|
|
1033
|
-
snippet: z.string().optional(),
|
|
1050
|
+
snippet: z.string().max(256).optional(),
|
|
1034
1051
|
createdAt: z.number(),
|
|
1035
1052
|
updatedAt: z.number(),
|
|
1036
1053
|
category: MessageCategorySchema,
|
|
@@ -1040,30 +1057,23 @@ export const ThreadMessageResponseSchema = z.object({
|
|
|
1040
1057
|
status: MessageStatusSchema,
|
|
1041
1058
|
syncStatus: MessageSyncStatusSchema,
|
|
1042
1059
|
abandonedMutation: MessageMutationSchema,
|
|
1043
|
-
accountId: z.string().optional(),
|
|
1060
|
+
accountId: z.string().min(25).max(25).optional(),
|
|
1044
1061
|
autoMoved: AutoMovedInfoSchema.optional(),
|
|
1045
1062
|
labels: z.array(LabelSummaryResponseSchema).optional(),
|
|
1046
1063
|
spamReport: MessageSpamReportSchema.optional()
|
|
1047
1064
|
});
|
|
1065
|
+
export const ThreadMessageListResponseSchema = z.object({
|
|
1066
|
+
continuationToken: z.string().max(800).optional(),
|
|
1067
|
+
items: z.array(ThreadMessageResponseSchema)
|
|
1068
|
+
});
|
|
1048
1069
|
export const ThreadSearchResponseSchema = z.object({
|
|
1049
1070
|
items: z.array(ThreadMessageResponseSchema).optional(),
|
|
1050
|
-
continuationToken: z.string().optional(),
|
|
1071
|
+
continuationToken: z.string().max(800).optional(),
|
|
1051
1072
|
count: z.number().optional()
|
|
1052
1073
|
});
|
|
1053
|
-
export const SemanticSearchResultSchema = z.object({
|
|
1054
|
-
messageId: z.string(),
|
|
1055
|
-
threadId: z.string(),
|
|
1056
|
-
score: z.number(),
|
|
1057
|
-
matchedChunkType: SemanticSearchChunkTypeSchema,
|
|
1058
|
-
mailboxIds: z.array(z.string()),
|
|
1059
|
-
fromName: z.string().optional(),
|
|
1060
|
-
subject: z.string().optional(),
|
|
1061
|
-
sentDate: z.number().optional(),
|
|
1062
|
-
category: MessageCategorySchema.optional()
|
|
1063
|
-
});
|
|
1064
1074
|
export const CreateOutboxMessageInputSchema = z.object({
|
|
1065
|
-
accountId: z.string(),
|
|
1066
|
-
toAddresses: z.array(z.string()),
|
|
1075
|
+
accountId: z.string().min(25).max(25),
|
|
1076
|
+
toAddresses: z.array(z.string()).min(1),
|
|
1067
1077
|
ccAddresses: z.array(z.string()).optional(),
|
|
1068
1078
|
bccAddresses: z.array(z.string()).optional(),
|
|
1069
1079
|
subject: z.string().optional(),
|
|
@@ -1074,9 +1084,9 @@ export const CreateOutboxMessageInputSchema = z.object({
|
|
|
1074
1084
|
sendImmediately: z.boolean().optional()
|
|
1075
1085
|
});
|
|
1076
1086
|
export const OutboxMessageSchema = z.object({
|
|
1077
|
-
outboxMessageId: z.string(),
|
|
1078
|
-
accountId: z.string(),
|
|
1079
|
-
accountConfigId: z.string(),
|
|
1087
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
1088
|
+
accountId: z.string().min(25).max(25),
|
|
1089
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1080
1090
|
fromAddress: z.string(),
|
|
1081
1091
|
fromName: z.string().optional(),
|
|
1082
1092
|
toAddresses: z.array(z.string()),
|
|
@@ -1099,18 +1109,18 @@ export const OutboxMessageSchema = z.object({
|
|
|
1099
1109
|
updatedAt: z.number()
|
|
1100
1110
|
});
|
|
1101
1111
|
export const OutboxAttachmentResponseSchema = z.object({
|
|
1102
|
-
outboxAttachmentId: z.string(),
|
|
1103
|
-
outboxMessageId: z.string(),
|
|
1104
|
-
filename: z.string(),
|
|
1105
|
-
contentType: z.string(),
|
|
1106
|
-
sizeBytes: z.number(),
|
|
1112
|
+
outboxAttachmentId: z.string().min(25).max(25),
|
|
1113
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
1114
|
+
filename: z.string().max(256),
|
|
1115
|
+
contentType: z.string().max(256),
|
|
1116
|
+
sizeBytes: z.number().min(0),
|
|
1107
1117
|
state: OutboxAttachmentStateSchema,
|
|
1108
|
-
contentId: z.string(),
|
|
1118
|
+
contentId: z.string().max(256),
|
|
1109
1119
|
contentUrl: z.string().url()
|
|
1110
1120
|
});
|
|
1111
1121
|
export const OutboxMessageResponseSchema = z.object({
|
|
1112
|
-
outboxMessageId: z.string(),
|
|
1113
|
-
accountId: z.string(),
|
|
1122
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
1123
|
+
accountId: z.string().min(25).max(25),
|
|
1114
1124
|
fromAddress: z.string(),
|
|
1115
1125
|
fromName: z.string().optional(),
|
|
1116
1126
|
toAddresses: z.array(z.string()),
|
|
@@ -1129,21 +1139,25 @@ export const OutboxMessageResponseSchema = z.object({
|
|
|
1129
1139
|
attachments: z.array(OutboxAttachmentResponseSchema)
|
|
1130
1140
|
});
|
|
1131
1141
|
export const OutboxAttachmentSchema = z.object({
|
|
1132
|
-
outboxAttachmentId: z.string(),
|
|
1133
|
-
outboxMessageId: z.string(),
|
|
1134
|
-
accountId: z.string(),
|
|
1135
|
-
accountConfigId: z.string(),
|
|
1136
|
-
filename: z.string(),
|
|
1137
|
-
contentType: z.string(),
|
|
1138
|
-
sizeBytes: z.number(),
|
|
1142
|
+
outboxAttachmentId: z.string().min(25).max(25),
|
|
1143
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
1144
|
+
accountId: z.string().min(25).max(25),
|
|
1145
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1146
|
+
filename: z.string().max(256),
|
|
1147
|
+
contentType: z.string().max(256),
|
|
1148
|
+
sizeBytes: z.number().min(0),
|
|
1139
1149
|
state: OutboxAttachmentStateSchema,
|
|
1140
|
-
storageKey: z.string(),
|
|
1141
|
-
reservationExpiresAt: z.number(),
|
|
1150
|
+
storageKey: z.string().max(2048),
|
|
1151
|
+
reservationExpiresAt: z.number().min(0),
|
|
1142
1152
|
createdAt: z.number(),
|
|
1143
1153
|
updatedAt: z.number()
|
|
1144
1154
|
});
|
|
1155
|
+
export const OutboxMessageListResponseSchema = z.object({
|
|
1156
|
+
continuationToken: z.string().max(800).optional(),
|
|
1157
|
+
items: z.array(OutboxMessageResponseSchema)
|
|
1158
|
+
});
|
|
1145
1159
|
export const UpdateOutboxMessageInputSchema = z.object({
|
|
1146
|
-
attachmentIds: z.array(z.string()).optional(),
|
|
1160
|
+
attachmentIds: z.array(z.string().min(25).max(25)).optional(),
|
|
1147
1161
|
toAddresses: z.array(z.string()).optional(),
|
|
1148
1162
|
ccAddresses: z.array(z.string()).optional(),
|
|
1149
1163
|
bccAddresses: z.array(z.string()).optional(),
|
|
@@ -1154,34 +1168,34 @@ export const UpdateOutboxMessageInputSchema = z.object({
|
|
|
1154
1168
|
references: z.array(z.string()).optional()
|
|
1155
1169
|
});
|
|
1156
1170
|
export const MintOutboxAttachmentInputSchema = z.object({
|
|
1157
|
-
filename: z.string(),
|
|
1158
|
-
contentType: z.string(),
|
|
1159
|
-
sizeBytes: z.number()
|
|
1171
|
+
filename: z.string().max(256),
|
|
1172
|
+
contentType: z.string().max(256),
|
|
1173
|
+
sizeBytes: z.number().min(1)
|
|
1160
1174
|
});
|
|
1161
1175
|
export const MintOutboxAttachmentResponseSchema = z.object({
|
|
1162
|
-
outboxAttachmentId: z.string(),
|
|
1163
|
-
outboxMessageId: z.string(),
|
|
1164
|
-
filename: z.string(),
|
|
1165
|
-
contentType: z.string(),
|
|
1166
|
-
sizeBytes: z.number(),
|
|
1167
|
-
contentId: z.string(),
|
|
1168
|
-
uploadUrl: z.string(),
|
|
1176
|
+
outboxAttachmentId: z.string().min(25).max(25),
|
|
1177
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
1178
|
+
filename: z.string().max(256),
|
|
1179
|
+
contentType: z.string().max(256),
|
|
1180
|
+
sizeBytes: z.number().min(1),
|
|
1181
|
+
contentId: z.string().max(256),
|
|
1182
|
+
uploadUrl: z.string().max(2048),
|
|
1169
1183
|
uploadExpiresAt: z.number()
|
|
1170
1184
|
});
|
|
1171
1185
|
export const OutboxAttachmentRejectionSchema = z.object({
|
|
1172
1186
|
code: z.string(),
|
|
1173
1187
|
reason: OutboxAttachmentRejectionReasonSchema,
|
|
1174
|
-
message: z.string(),
|
|
1175
|
-
limitBytes: z.number(),
|
|
1176
|
-
usedBytes: z.number()
|
|
1188
|
+
message: z.string().max(512),
|
|
1189
|
+
limitBytes: z.number().min(0),
|
|
1190
|
+
usedBytes: z.number().min(0)
|
|
1177
1191
|
});
|
|
1178
1192
|
export const OutboxAttachmentRejectedSchema = z.object({
|
|
1179
1193
|
statusCode: z.union([z.literal(400), z.literal(413)]),
|
|
1180
1194
|
code: z.string(),
|
|
1181
1195
|
reason: OutboxAttachmentRejectionReasonSchema,
|
|
1182
|
-
message: z.string(),
|
|
1183
|
-
limitBytes: z.number(),
|
|
1184
|
-
usedBytes: z.number()
|
|
1196
|
+
message: z.string().max(512),
|
|
1197
|
+
limitBytes: z.number().min(0),
|
|
1198
|
+
usedBytes: z.number().min(0)
|
|
1185
1199
|
});
|
|
1186
1200
|
export const TrustedFlagSchema = z.object({
|
|
1187
1201
|
setAt: z.number(),
|
|
@@ -1259,11 +1273,11 @@ export const AddressFlagsSchema = z.object({
|
|
|
1259
1273
|
unsubscribed: UnsubscribedFlagSchema.optional()
|
|
1260
1274
|
});
|
|
1261
1275
|
export const AddressSchema = z.object({
|
|
1262
|
-
addressId: z.string(),
|
|
1263
|
-
accountConfigId: z.string(),
|
|
1276
|
+
addressId: z.string().min(25).max(25),
|
|
1277
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1264
1278
|
displayName: z.string().optional(),
|
|
1265
|
-
localPart: z.string(),
|
|
1266
|
-
domain: z.string(),
|
|
1279
|
+
localPart: z.string().min(1),
|
|
1280
|
+
domain: z.string().min(1),
|
|
1267
1281
|
normalizedEmail: z.string(),
|
|
1268
1282
|
normalizedCompound: z.string(),
|
|
1269
1283
|
flags: AddressFlagsSchema,
|
|
@@ -1277,11 +1291,11 @@ export const AddressSchema = z.object({
|
|
|
1277
1291
|
updatedAt: z.number()
|
|
1278
1292
|
});
|
|
1279
1293
|
export const AddressResponseSchema = z.object({
|
|
1280
|
-
addressId: z.string(),
|
|
1281
|
-
accountConfigId: z.string(),
|
|
1294
|
+
addressId: z.string().min(25).max(25),
|
|
1295
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1282
1296
|
displayName: z.string().optional(),
|
|
1283
|
-
localPart: z.string(),
|
|
1284
|
-
domain: z.string(),
|
|
1297
|
+
localPart: z.string().min(1),
|
|
1298
|
+
domain: z.string().min(1),
|
|
1285
1299
|
normalizedEmail: z.string(),
|
|
1286
1300
|
flags: AddressFlagsSchema,
|
|
1287
1301
|
inboundCount: z.number(),
|
|
@@ -1293,38 +1307,38 @@ export const AddressResponseSchema = z.object({
|
|
|
1293
1307
|
updatedAt: z.number()
|
|
1294
1308
|
});
|
|
1295
1309
|
export const UpdateAddressFlagsInputSchema = z.object({
|
|
1296
|
-
trusted: z.union([TrustedFlagSchema, z.
|
|
1297
|
-
blocked: z.union([BlockedFlagSchema, z.
|
|
1298
|
-
neverSpam: z.union([NeverSpamFlagSchema, z.
|
|
1299
|
-
muted: z.union([MutedFlagSchema, z.
|
|
1300
|
-
vip: z.union([VipFlagSchema, z.
|
|
1301
|
-
wellknown: z.union([WellknownFlagSchema, z.
|
|
1302
|
-
junkOnly: z.union([JunkOnlyFlagSchema, z.
|
|
1303
|
-
category: z.union([CategoryFlagSchema, z.
|
|
1304
|
-
autoArchive: z.union([AutoArchiveFlagSchema, z.
|
|
1305
|
-
unsubscribed: z.union([UnsubscribedFlagSchema, z.
|
|
1310
|
+
trusted: z.union([TrustedFlagSchema, z.null()]).optional(),
|
|
1311
|
+
blocked: z.union([BlockedFlagSchema, z.null()]).optional(),
|
|
1312
|
+
neverSpam: z.union([NeverSpamFlagSchema, z.null()]).optional(),
|
|
1313
|
+
muted: z.union([MutedFlagSchema, z.null()]).optional(),
|
|
1314
|
+
vip: z.union([VipFlagSchema, z.null()]).optional(),
|
|
1315
|
+
wellknown: z.union([WellknownFlagSchema, z.null()]).optional(),
|
|
1316
|
+
junkOnly: z.union([JunkOnlyFlagSchema, z.null()]).optional(),
|
|
1317
|
+
category: z.union([CategoryFlagSchema, z.null()]).optional(),
|
|
1318
|
+
autoArchive: z.union([AutoArchiveFlagSchema, z.null()]).optional(),
|
|
1319
|
+
unsubscribed: z.union([UnsubscribedFlagSchema, z.null()]).optional()
|
|
1306
1320
|
});
|
|
1307
1321
|
export const UpdateAddressInputSchema = z.object({
|
|
1308
1322
|
flags: UpdateAddressFlagsInputSchema.optional(),
|
|
1309
1323
|
clearFlags: z.array(AddressFlagKeySchema).optional()
|
|
1310
1324
|
});
|
|
1311
1325
|
export const MessageSummaryResponseSchema = z.object({
|
|
1312
|
-
messageId: z.string(),
|
|
1313
|
-
mailboxId: z.string(),
|
|
1314
|
-
uid: z.number(),
|
|
1315
|
-
rfc822Size: z.number(),
|
|
1326
|
+
messageId: z.string().min(25).max(25),
|
|
1327
|
+
mailboxId: z.string().min(25).max(25),
|
|
1328
|
+
uid: z.number().min(1),
|
|
1329
|
+
rfc822Size: z.number().min(0),
|
|
1316
1330
|
internalDate: z.number(),
|
|
1317
|
-
messageIdHeader: z.string().optional(),
|
|
1318
1331
|
status: MessageStatusSchema,
|
|
1319
1332
|
syncStatus: MessageSyncStatusSchema,
|
|
1320
1333
|
abandonedMutation: MessageMutationSchema,
|
|
1321
1334
|
authenticity: MessageAuthenticitySchema.optional(),
|
|
1335
|
+
messageIdHeader: z.string().optional(),
|
|
1322
1336
|
autoMoved: AutoMovedInfoSchema.optional(),
|
|
1323
1337
|
labels: z.array(LabelSummaryResponseSchema).optional(),
|
|
1324
1338
|
spamReport: MessageSpamReportSchema.optional()
|
|
1325
1339
|
});
|
|
1326
1340
|
export const EnvelopeAddressResponseSchema = z.object({
|
|
1327
|
-
addressId: z.string(),
|
|
1341
|
+
addressId: z.string().min(25).max(25),
|
|
1328
1342
|
displayName: z.string().optional(),
|
|
1329
1343
|
normalizedEmail: z.string(),
|
|
1330
1344
|
addressRole: AddressRoleSchema,
|
|
@@ -1332,7 +1346,7 @@ export const EnvelopeAddressResponseSchema = z.object({
|
|
|
1332
1346
|
flags: AddressFlagsSchema.optional()
|
|
1333
1347
|
});
|
|
1334
1348
|
export const EnvelopeResponseSchema = z.object({
|
|
1335
|
-
messageId: z.string(),
|
|
1349
|
+
messageId: z.string().min(25).max(25),
|
|
1336
1350
|
date: z.number(),
|
|
1337
1351
|
subject: z.string().optional(),
|
|
1338
1352
|
messageIdValue: z.string().optional(),
|
|
@@ -1345,11 +1359,12 @@ export const EnvelopeResponseSchema = z.object({
|
|
|
1345
1359
|
senderTrust: SenderTrustSchema
|
|
1346
1360
|
});
|
|
1347
1361
|
export const BodyPartResponseSchema = z.object({
|
|
1348
|
-
bodyPartId: z.string(),
|
|
1362
|
+
bodyPartId: z.string().min(25).max(25),
|
|
1363
|
+
partPath: z.string().min(1),
|
|
1349
1364
|
mediaType: MediaTypeSchema,
|
|
1350
|
-
mediaSubtype: z.string(),
|
|
1365
|
+
mediaSubtype: z.string().min(1),
|
|
1351
1366
|
contentId: z.string().optional(),
|
|
1352
|
-
sizeOctets: z.number(),
|
|
1367
|
+
sizeOctets: z.number().min(0),
|
|
1353
1368
|
disposition: ContentDispositionSchema.optional(),
|
|
1354
1369
|
dispositionFilename: z.string().optional(),
|
|
1355
1370
|
isMultipart: z.boolean(),
|
|
@@ -1358,7 +1373,7 @@ export const BodyPartResponseSchema = z.object({
|
|
|
1358
1373
|
export const MessageReferenceResponseSchema = z.object({
|
|
1359
1374
|
messageIdValue: z.string(),
|
|
1360
1375
|
referenceType: ReferenceTypeSchema,
|
|
1361
|
-
referenceOrder: z.number()
|
|
1376
|
+
referenceOrder: z.number().min(0)
|
|
1362
1377
|
});
|
|
1363
1378
|
export const DescribeMessageResponseSchema = z.object({
|
|
1364
1379
|
message: MessageSummaryResponseSchema,
|
|
@@ -1386,26 +1401,25 @@ export const MessagePlacementVerdictSchema = z.object({
|
|
|
1386
1401
|
decidedAt: z.number()
|
|
1387
1402
|
});
|
|
1388
1403
|
export const MessageFilterMoveSchema = z.object({
|
|
1389
|
-
filterId: z.string(),
|
|
1390
|
-
sourceMailboxId: z.string(),
|
|
1391
|
-
destinationMailboxId: z.string(),
|
|
1404
|
+
filterId: z.string().min(25).max(25),
|
|
1405
|
+
sourceMailboxId: z.string().min(25).max(25),
|
|
1406
|
+
destinationMailboxId: z.string().min(25).max(25),
|
|
1392
1407
|
decidedAt: z.number()
|
|
1393
1408
|
});
|
|
1394
|
-
export const
|
|
1395
|
-
messageId: z.string(),
|
|
1396
|
-
mailboxId: z.string(),
|
|
1397
|
-
uid: z.number(),
|
|
1398
|
-
sequenceNumber: z.number(),
|
|
1399
|
-
rfc822Size: z.number(),
|
|
1409
|
+
export const MessageRecordSchema = z.object({
|
|
1410
|
+
messageId: z.string().min(25).max(25),
|
|
1411
|
+
mailboxId: z.string().min(25).max(25),
|
|
1412
|
+
uid: z.number().min(1),
|
|
1413
|
+
sequenceNumber: z.number().min(1),
|
|
1414
|
+
rfc822Size: z.number().min(0),
|
|
1400
1415
|
internalDate: z.number(),
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
rootBodyPartId: z.string(),
|
|
1416
|
+
envelopeId: z.string().min(25).max(25),
|
|
1417
|
+
rootBodyPartId: z.string().min(25).max(25),
|
|
1404
1418
|
bodyStorageKey: z.string().optional(),
|
|
1405
1419
|
status: MessageStatusSchema,
|
|
1406
1420
|
syncStatus: MessageSyncStatusSchema,
|
|
1407
1421
|
abandonedMutation: MessageMutationSchema,
|
|
1408
|
-
originalMailboxId: z.string().optional(),
|
|
1422
|
+
originalMailboxId: z.string().min(25).max(25).optional(),
|
|
1409
1423
|
originalUid: z.number().optional(),
|
|
1410
1424
|
category: MessageCategorySchema,
|
|
1411
1425
|
classificationState: MessageClassificationStateSchema,
|
|
@@ -1422,17 +1436,48 @@ export const MessageSchema = z.object({
|
|
|
1422
1436
|
createdAt: z.number(),
|
|
1423
1437
|
updatedAt: z.number()
|
|
1424
1438
|
});
|
|
1439
|
+
export const MessageSchema = z.object({
|
|
1440
|
+
messageId: z.string().min(25).max(25),
|
|
1441
|
+
mailboxId: z.string().min(25).max(25),
|
|
1442
|
+
uid: z.number().min(1),
|
|
1443
|
+
sequenceNumber: z.number().min(1),
|
|
1444
|
+
rfc822Size: z.number().min(0),
|
|
1445
|
+
internalDate: z.number(),
|
|
1446
|
+
envelopeId: z.string().min(25).max(25),
|
|
1447
|
+
rootBodyPartId: z.string().min(25).max(25),
|
|
1448
|
+
bodyStorageKey: z.string().optional(),
|
|
1449
|
+
status: MessageStatusSchema,
|
|
1450
|
+
syncStatus: MessageSyncStatusSchema,
|
|
1451
|
+
abandonedMutation: MessageMutationSchema,
|
|
1452
|
+
originalMailboxId: z.string().min(25).max(25).optional(),
|
|
1453
|
+
originalUid: z.number().optional(),
|
|
1454
|
+
category: MessageCategorySchema,
|
|
1455
|
+
classificationState: MessageClassificationStateSchema,
|
|
1456
|
+
authenticity: MessageAuthenticitySchema.optional(),
|
|
1457
|
+
authenticityVerdict: AuthenticityVerdictSchema,
|
|
1458
|
+
authResult: MessageAuthResultSchema.optional(),
|
|
1459
|
+
providerSpam: MessageProviderSpamSchema.optional(),
|
|
1460
|
+
hasListUnsubscribe: z.boolean(),
|
|
1461
|
+
movedByRemit: z.boolean(),
|
|
1462
|
+
placementVerdict: MessagePlacementVerdictSchema.optional(),
|
|
1463
|
+
filterMove: MessageFilterMoveSchema.optional(),
|
|
1464
|
+
placementDecidedAt: z.number().optional(),
|
|
1465
|
+
spamReport: MessageSpamReportSchema.optional(),
|
|
1466
|
+
createdAt: z.number(),
|
|
1467
|
+
updatedAt: z.number(),
|
|
1468
|
+
messageIdHeader: z.string().optional()
|
|
1469
|
+
});
|
|
1425
1470
|
export const BodyPartSchema = z.object({
|
|
1426
|
-
bodyPartId: z.string(),
|
|
1427
|
-
messageId: z.string(),
|
|
1428
|
-
parentBodyPartId: z.string().optional(),
|
|
1429
|
-
partPath: z.string(),
|
|
1471
|
+
bodyPartId: z.string().min(25).max(25),
|
|
1472
|
+
messageId: z.string().min(25).max(25),
|
|
1473
|
+
parentBodyPartId: z.string().min(25).max(25).optional(),
|
|
1474
|
+
partPath: z.string().min(1),
|
|
1430
1475
|
mediaType: MediaTypeSchema,
|
|
1431
|
-
mediaSubtype: z.string(),
|
|
1476
|
+
mediaSubtype: z.string().min(1),
|
|
1432
1477
|
contentId: z.string().optional(),
|
|
1433
1478
|
contentDescription: z.string().optional(),
|
|
1434
1479
|
transferEncoding: TransferEncodingSchema,
|
|
1435
|
-
sizeOctets: z.number(),
|
|
1480
|
+
sizeOctets: z.number().min(0),
|
|
1436
1481
|
lineCount: z.number().optional(),
|
|
1437
1482
|
md5Hash: z.string().optional(),
|
|
1438
1483
|
disposition: ContentDispositionSchema.optional(),
|
|
@@ -1445,12 +1490,12 @@ export const BodyPartSchema = z.object({
|
|
|
1445
1490
|
updatedAt: z.number()
|
|
1446
1491
|
});
|
|
1447
1492
|
export const MessageReferenceSchema = z.object({
|
|
1448
|
-
messageReferenceId: z.string(),
|
|
1449
|
-
messageId: z.string(),
|
|
1450
|
-
envelopeId: z.string(),
|
|
1493
|
+
messageReferenceId: z.string().min(25).max(25),
|
|
1494
|
+
messageId: z.string().min(25).max(25),
|
|
1495
|
+
envelopeId: z.string().min(25).max(25),
|
|
1451
1496
|
messageIdValue: z.string(),
|
|
1452
1497
|
referenceType: ReferenceTypeSchema,
|
|
1453
|
-
referenceOrder: z.number(),
|
|
1498
|
+
referenceOrder: z.number().min(0),
|
|
1454
1499
|
createdAt: z.number(),
|
|
1455
1500
|
updatedAt: z.number()
|
|
1456
1501
|
});
|
|
@@ -1463,7 +1508,7 @@ export const UpdateFlagsInputSchema = z.object({
|
|
|
1463
1508
|
starColor: StarColorSchema.optional()
|
|
1464
1509
|
});
|
|
1465
1510
|
export const BulkUpdateFlagsInputSchema = z.object({
|
|
1466
|
-
messageIds: z.array(z.string()),
|
|
1511
|
+
messageIds: z.array(z.string().min(25).max(25)).min(1).max(100),
|
|
1467
1512
|
isRead: z.boolean().optional(),
|
|
1468
1513
|
isStarred: z.boolean().optional(),
|
|
1469
1514
|
starColor: StarColorSchema.optional()
|
|
@@ -1473,27 +1518,27 @@ export const MessageBulkOperationResultSchema = z.object({
|
|
|
1473
1518
|
failureCount: z.number()
|
|
1474
1519
|
});
|
|
1475
1520
|
export const DeleteMessagesInputSchema = z.object({
|
|
1476
|
-
messageIds: z.array(z.string()),
|
|
1521
|
+
messageIds: z.array(z.string().min(25).max(25)).min(1).max(100),
|
|
1477
1522
|
permanent: z.boolean().optional()
|
|
1478
1523
|
});
|
|
1479
1524
|
export const BulkMessageInputSchema = z.object({
|
|
1480
|
-
messageIds: z.array(z.string())
|
|
1525
|
+
messageIds: z.array(z.string().min(25).max(25)).min(1).max(100)
|
|
1481
1526
|
});
|
|
1482
1527
|
export const MoveMessagesInputSchema = z.object({
|
|
1483
|
-
messageIds: z.array(z.string()),
|
|
1484
|
-
destinationMailboxId: z.string()
|
|
1528
|
+
messageIds: z.array(z.string().min(25).max(25)).min(1).max(100),
|
|
1529
|
+
destinationMailboxId: z.string().min(25).max(25)
|
|
1485
1530
|
});
|
|
1486
1531
|
export const CopyMessagesInputSchema = z.object({
|
|
1487
|
-
messageIds: z.array(z.string()),
|
|
1488
|
-
destinationMailboxId: z.string()
|
|
1532
|
+
messageIds: z.array(z.string().min(25).max(25)).min(1).max(100),
|
|
1533
|
+
destinationMailboxId: z.string().min(25).max(25)
|
|
1489
1534
|
});
|
|
1490
1535
|
export const UpdateMessageLabelsInputSchema = z.object({
|
|
1491
|
-
messageIds: z.array(z.string()),
|
|
1492
|
-
labelId: z.string(),
|
|
1536
|
+
messageIds: z.array(z.string().min(25).max(25)).min(1).max(100),
|
|
1537
|
+
labelId: z.string().min(25).max(25),
|
|
1493
1538
|
action: LabelActionSchema
|
|
1494
1539
|
});
|
|
1495
1540
|
export const SpamReportFailureSchema = z.object({
|
|
1496
|
-
messageId: z.string(),
|
|
1541
|
+
messageId: z.string().min(25).max(25),
|
|
1497
1542
|
reason: z.string()
|
|
1498
1543
|
});
|
|
1499
1544
|
export const SpamReportBulkResultSchema = z.object({
|
|
@@ -1502,22 +1547,22 @@ export const SpamReportBulkResultSchema = z.object({
|
|
|
1502
1547
|
failures: z.array(SpamReportFailureSchema).optional()
|
|
1503
1548
|
});
|
|
1504
1549
|
export const CalendarSuggestionSchema = z.object({
|
|
1505
|
-
suggestionId: z.string(),
|
|
1506
|
-
accountConfigId: z.string(),
|
|
1507
|
-
messageId: z.string(),
|
|
1508
|
-
bodyPartId: z.string(),
|
|
1509
|
-
icalUid: z.string(),
|
|
1550
|
+
suggestionId: z.string().min(25).max(25),
|
|
1551
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1552
|
+
messageId: z.string().min(25).max(25),
|
|
1553
|
+
bodyPartId: z.string().min(25).max(25),
|
|
1554
|
+
icalUid: z.string().max(512),
|
|
1510
1555
|
sequence: z.number(),
|
|
1511
1556
|
method: CalendarInviteMethodSchema,
|
|
1512
1557
|
source: CalendarSuggestionSourceSchema,
|
|
1513
1558
|
state: CalendarSuggestionStateSchema,
|
|
1514
|
-
summary: z.string(),
|
|
1515
|
-
dtStart: z.string(),
|
|
1516
|
-
dtEnd: z.string(),
|
|
1517
|
-
endsAtUtc: z.string(),
|
|
1559
|
+
summary: z.string().max(512),
|
|
1560
|
+
dtStart: z.string().max(64),
|
|
1561
|
+
dtEnd: z.string().max(64),
|
|
1562
|
+
endsAtUtc: z.string().max(64),
|
|
1518
1563
|
allDay: z.boolean(),
|
|
1519
|
-
location: z.string(),
|
|
1520
|
-
organizer: z.string(),
|
|
1564
|
+
location: z.string().max(512),
|
|
1565
|
+
organizer: z.string().max(256),
|
|
1521
1566
|
zoneCertainty: ZoneCertaintySchema,
|
|
1522
1567
|
icalData: z.string(),
|
|
1523
1568
|
acceptedCalendarObjectId: z.string(),
|
|
@@ -1526,22 +1571,22 @@ export const CalendarSuggestionSchema = z.object({
|
|
|
1526
1571
|
updatedAt: z.number()
|
|
1527
1572
|
});
|
|
1528
1573
|
export const CalendarSuggestionResponseSchema = z.object({
|
|
1529
|
-
suggestionId: z.string(),
|
|
1530
|
-
accountConfigId: z.string(),
|
|
1531
|
-
messageId: z.string(),
|
|
1532
|
-
bodyPartId: z.string(),
|
|
1533
|
-
icalUid: z.string(),
|
|
1574
|
+
suggestionId: z.string().min(25).max(25),
|
|
1575
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1576
|
+
messageId: z.string().min(25).max(25),
|
|
1577
|
+
bodyPartId: z.string().min(25).max(25),
|
|
1578
|
+
icalUid: z.string().max(512),
|
|
1534
1579
|
sequence: z.number(),
|
|
1535
1580
|
method: CalendarInviteMethodSchema,
|
|
1536
1581
|
source: CalendarSuggestionSourceSchema,
|
|
1537
1582
|
state: CalendarSuggestionStateSchema,
|
|
1538
|
-
summary: z.string(),
|
|
1539
|
-
dtStart: z.string(),
|
|
1540
|
-
dtEnd: z.string(),
|
|
1541
|
-
endsAtUtc: z.string(),
|
|
1583
|
+
summary: z.string().max(512),
|
|
1584
|
+
dtStart: z.string().max(64),
|
|
1585
|
+
dtEnd: z.string().max(64),
|
|
1586
|
+
endsAtUtc: z.string().max(64),
|
|
1542
1587
|
allDay: z.boolean(),
|
|
1543
|
-
location: z.string(),
|
|
1544
|
-
organizer: z.string(),
|
|
1588
|
+
location: z.string().max(512),
|
|
1589
|
+
organizer: z.string().max(256),
|
|
1545
1590
|
zoneCertainty: ZoneCertaintySchema,
|
|
1546
1591
|
acceptedCalendarObjectId: z.string(),
|
|
1547
1592
|
supersededByMessageId: z.string(),
|
|
@@ -1551,7 +1596,7 @@ export const CalendarSuggestionResponseSchema = z.object({
|
|
|
1551
1596
|
answerOvertakenBy: CalendarAnswerOvertakenSchema
|
|
1552
1597
|
});
|
|
1553
1598
|
export const AcceptCalendarSuggestionInputSchema = z.object({
|
|
1554
|
-
calendarId: z.string(),
|
|
1599
|
+
calendarId: z.string().min(25).max(25),
|
|
1555
1600
|
answer: CalendarInviteAnswerSchema.optional(),
|
|
1556
1601
|
event: UpdateCalendarEventInputSchema.optional()
|
|
1557
1602
|
});
|
|
@@ -1559,26 +1604,26 @@ export const DismissCalendarSuggestionInputSchema = z.object({
|
|
|
1559
1604
|
muteSender: z.boolean()
|
|
1560
1605
|
});
|
|
1561
1606
|
export const EnvelopeAddressSchema = z.object({
|
|
1562
|
-
envelopeAddressId: z.string(),
|
|
1563
|
-
messageId: z.string(),
|
|
1564
|
-
addressId: z.string(),
|
|
1607
|
+
envelopeAddressId: z.string().min(25).max(25),
|
|
1608
|
+
messageId: z.string().min(25).max(25),
|
|
1609
|
+
addressId: z.string().min(25).max(25),
|
|
1565
1610
|
displayName: z.string().optional(),
|
|
1566
1611
|
normalizedEmail: z.string(),
|
|
1567
1612
|
addressRole: AddressRoleSchema,
|
|
1568
|
-
addressOrder: z.number(),
|
|
1613
|
+
addressOrder: z.number().min(0),
|
|
1569
1614
|
createdAt: z.number(),
|
|
1570
1615
|
updatedAt: z.number()
|
|
1571
1616
|
});
|
|
1572
1617
|
export const ConfigImportUnresolvedRefSchema = z.object({
|
|
1573
1618
|
kind: ConfigImportRefKindSchema,
|
|
1574
|
-
accountId: z.string(),
|
|
1575
|
-
folderPath: z.string(),
|
|
1576
|
-
target: z.string(),
|
|
1619
|
+
accountId: z.string().min(25).max(25),
|
|
1620
|
+
folderPath: z.string().max(512),
|
|
1621
|
+
target: z.string().max(256),
|
|
1577
1622
|
mailboxId: z.string()
|
|
1578
1623
|
});
|
|
1579
1624
|
export const ConfigImportSchema = z.object({
|
|
1580
|
-
importId: z.string(),
|
|
1581
|
-
accountConfigId: z.string(),
|
|
1625
|
+
importId: z.string().min(25).max(25),
|
|
1626
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1582
1627
|
schemaVersion: z.number(),
|
|
1583
1628
|
state: ConfigImportStateSchema,
|
|
1584
1629
|
document: z.record(z.string(), z.unknown()),
|
|
@@ -1615,70 +1660,70 @@ export const MutedFlagSettingSchema = z.object({
|
|
|
1615
1660
|
value: MutedFlagSchema
|
|
1616
1661
|
});
|
|
1617
1662
|
export const AccountSettingSchema = z.object({
|
|
1618
|
-
accountSettingId: z.string(),
|
|
1619
|
-
accountConfigId: z.string(),
|
|
1663
|
+
accountSettingId: z.string().min(25).max(25),
|
|
1664
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1620
1665
|
name: z.string(),
|
|
1621
1666
|
value: z.union([BooleanSettingSchema, StringSettingSchema, NumberSettingSchema, StringListSettingSchema, MapSettingSchema, MutedFlagSettingSchema]),
|
|
1622
1667
|
createdAt: z.number(),
|
|
1623
1668
|
updatedAt: z.number()
|
|
1624
1669
|
});
|
|
1625
1670
|
export const MailboxAttributeEntrySchema = z.object({
|
|
1626
|
-
mailboxAttributeId: z.string(),
|
|
1627
|
-
mailboxId: z.string(),
|
|
1671
|
+
mailboxAttributeId: z.string().min(25).max(25),
|
|
1672
|
+
mailboxId: z.string().min(25).max(25),
|
|
1628
1673
|
attributeName: MailboxAttributeSchema
|
|
1629
1674
|
});
|
|
1630
1675
|
export const MailboxSpecialUseEntrySchema = z.object({
|
|
1631
|
-
mailboxSpecialUseId: z.string(),
|
|
1632
|
-
mailboxId: z.string(),
|
|
1676
|
+
mailboxSpecialUseId: z.string().min(25).max(25),
|
|
1677
|
+
mailboxId: z.string().min(25).max(25),
|
|
1633
1678
|
specialUse: MailboxSpecialUseSchema
|
|
1634
1679
|
});
|
|
1635
1680
|
export const MailboxFlagSchema = z.object({
|
|
1636
|
-
mailboxFlagId: z.string(),
|
|
1637
|
-
mailboxId: z.string(),
|
|
1681
|
+
mailboxFlagId: z.string().min(25).max(25),
|
|
1682
|
+
mailboxId: z.string().min(25).max(25),
|
|
1638
1683
|
flagName: z.union([MessageSystemFlagSchema, MessageKeywordFlagSchema, z.string()]),
|
|
1639
1684
|
isPermanent: z.boolean()
|
|
1640
1685
|
});
|
|
1641
1686
|
export const MailboxLockSchema = z.object({
|
|
1642
|
-
mailboxId: z.string(),
|
|
1687
|
+
mailboxId: z.string().min(25).max(25),
|
|
1643
1688
|
eventName: z.string(),
|
|
1644
|
-
accountId: z.string(),
|
|
1645
|
-
lockId: z.string(),
|
|
1689
|
+
accountId: z.string().min(25).max(25),
|
|
1690
|
+
lockId: z.string().min(25).max(25),
|
|
1646
1691
|
acquiredAt: z.number(),
|
|
1647
1692
|
lockedBy: z.string(),
|
|
1648
1693
|
ttl: z.number()
|
|
1649
1694
|
});
|
|
1650
1695
|
export const MessageFlagSchema = z.object({
|
|
1651
|
-
messageFlagId: z.string(),
|
|
1652
|
-
messageId: z.string(),
|
|
1696
|
+
messageFlagId: z.string().min(25).max(25),
|
|
1697
|
+
messageId: z.string().min(25).max(25),
|
|
1653
1698
|
flagName: z.union([MessageSystemFlagSchema, MessageKeywordFlagSchema, z.string()]),
|
|
1654
1699
|
setAt: z.number(),
|
|
1655
1700
|
createdAt: z.number(),
|
|
1656
1701
|
updatedAt: z.number()
|
|
1657
1702
|
});
|
|
1658
1703
|
export const MessagePlacementMoveSchema = z.object({
|
|
1659
|
-
messageId: z.string(),
|
|
1660
|
-
accountId: z.string(),
|
|
1661
|
-
accountConfigId: z.string(),
|
|
1662
|
-
sourceMailboxId: z.string(),
|
|
1663
|
-
destinationMailboxId: z.string(),
|
|
1704
|
+
messageId: z.string().min(25).max(25),
|
|
1705
|
+
accountId: z.string().min(25).max(25),
|
|
1706
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1707
|
+
sourceMailboxId: z.string().min(25).max(25),
|
|
1708
|
+
destinationMailboxId: z.string().min(25).max(25),
|
|
1664
1709
|
state: MessagePlacementMoveStateSchema,
|
|
1665
1710
|
createdAt: z.number(),
|
|
1666
1711
|
updatedAt: z.number()
|
|
1667
1712
|
});
|
|
1668
1713
|
export const MessageFlagPushSchema = z.object({
|
|
1669
|
-
messageId: z.string(),
|
|
1714
|
+
messageId: z.string().min(25).max(25),
|
|
1670
1715
|
flagName: z.string(),
|
|
1671
|
-
accountId: z.string(),
|
|
1672
|
-
accountConfigId: z.string(),
|
|
1673
|
-
mailboxId: z.string(),
|
|
1716
|
+
accountId: z.string().min(25).max(25),
|
|
1717
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1718
|
+
mailboxId: z.string().min(25).max(25),
|
|
1674
1719
|
operation: FlagPushOperationSchema,
|
|
1675
1720
|
state: MessageFlagPushStateSchema,
|
|
1676
1721
|
createdAt: z.number(),
|
|
1677
1722
|
updatedAt: z.number()
|
|
1678
1723
|
});
|
|
1679
1724
|
export const EnvelopeSchema = z.object({
|
|
1680
|
-
envelopeId: z.string(),
|
|
1681
|
-
messageId: z.string(),
|
|
1725
|
+
envelopeId: z.string().min(25).max(25),
|
|
1726
|
+
messageId: z.string().min(25).max(25),
|
|
1682
1727
|
dateValue: z.number(),
|
|
1683
1728
|
dateRaw: z.string(),
|
|
1684
1729
|
subject: z.string().optional(),
|
|
@@ -1687,9 +1732,9 @@ export const EnvelopeSchema = z.object({
|
|
|
1687
1732
|
updatedAt: z.number()
|
|
1688
1733
|
});
|
|
1689
1734
|
export const SenderSignerStandingSchema = z.object({
|
|
1690
|
-
accountConfigId: z.string(),
|
|
1691
|
-
senderKey: z.string(),
|
|
1692
|
-
signerDomain: z.string(),
|
|
1735
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1736
|
+
senderKey: z.string().max(256),
|
|
1737
|
+
signerDomain: z.string().max(256),
|
|
1693
1738
|
messageCount: z.number(),
|
|
1694
1739
|
firstSeenAt: z.number(),
|
|
1695
1740
|
lastSeenAt: z.number(),
|
|
@@ -1698,22 +1743,33 @@ export const SenderSignerStandingSchema = z.object({
|
|
|
1698
1743
|
updatedAt: z.number()
|
|
1699
1744
|
});
|
|
1700
1745
|
export const BodyPartParameterSchema = z.object({
|
|
1701
|
-
bodyPartParameterId: z.string(),
|
|
1702
|
-
messageId: z.string(),
|
|
1703
|
-
bodyPartId: z.string(),
|
|
1704
|
-
parameterName: z.string(),
|
|
1746
|
+
bodyPartParameterId: z.string().min(25).max(25),
|
|
1747
|
+
messageId: z.string().min(25).max(25),
|
|
1748
|
+
bodyPartId: z.string().min(25).max(25),
|
|
1749
|
+
parameterName: z.string().min(1),
|
|
1705
1750
|
parameterValue: z.string(),
|
|
1706
1751
|
createdAt: z.number(),
|
|
1707
1752
|
updatedAt: z.number()
|
|
1708
1753
|
});
|
|
1754
|
+
export const BodyStructureRefetchSchema = z.object({
|
|
1755
|
+
messageId: z.string().min(25).max(25),
|
|
1756
|
+
createdAt: z.number(),
|
|
1757
|
+
updatedAt: z.number()
|
|
1758
|
+
});
|
|
1759
|
+
export const MessageSearchTextSchema = z.object({
|
|
1760
|
+
messageId: z.string().min(25).max(25),
|
|
1761
|
+
text: z.string(),
|
|
1762
|
+
createdAt: z.number(),
|
|
1763
|
+
updatedAt: z.number()
|
|
1764
|
+
});
|
|
1709
1765
|
export const RawMessageStorageSchema = z.object({
|
|
1710
|
-
rawStorageId: z.string(),
|
|
1711
|
-
messageId: z.string(),
|
|
1766
|
+
rawStorageId: z.string().min(25).max(25),
|
|
1767
|
+
messageId: z.string().min(25).max(25),
|
|
1712
1768
|
storageType: StorageTypeSchema,
|
|
1713
1769
|
storageLocation: z.string(),
|
|
1714
1770
|
storageKey: z.string(),
|
|
1715
|
-
sizeBytes: z.number(),
|
|
1716
|
-
checksumSha256: z.string(),
|
|
1771
|
+
sizeBytes: z.number().min(0),
|
|
1772
|
+
checksumSha256: z.string().min(64).max(64),
|
|
1717
1773
|
contentEncoding: ContentEncodingSchema,
|
|
1718
1774
|
storedAt: z.number(),
|
|
1719
1775
|
expiresAt: z.number().optional(),
|
|
@@ -1721,14 +1777,14 @@ export const RawMessageStorageSchema = z.object({
|
|
|
1721
1777
|
updatedAt: z.number()
|
|
1722
1778
|
});
|
|
1723
1779
|
export const BodyPartStorageSchema = z.object({
|
|
1724
|
-
bodyPartStorageId: z.string(),
|
|
1725
|
-
messageId: z.string(),
|
|
1726
|
-
bodyPartId: z.string(),
|
|
1780
|
+
bodyPartStorageId: z.string().min(25).max(25),
|
|
1781
|
+
messageId: z.string().min(25).max(25),
|
|
1782
|
+
bodyPartId: z.string().min(25).max(25),
|
|
1727
1783
|
storageType: StorageTypeSchema,
|
|
1728
1784
|
storageLocation: z.string(),
|
|
1729
1785
|
storageKey: z.string(),
|
|
1730
|
-
decodedSizeBytes: z.number(),
|
|
1731
|
-
checksumSha256: z.string(),
|
|
1786
|
+
decodedSizeBytes: z.number().min(0),
|
|
1787
|
+
checksumSha256: z.string().min(64).max(64),
|
|
1732
1788
|
contentEncoding: ContentEncodingSchema,
|
|
1733
1789
|
isDeduped: z.boolean(),
|
|
1734
1790
|
dedupHash: z.string().optional(),
|
|
@@ -1736,59 +1792,40 @@ export const BodyPartStorageSchema = z.object({
|
|
|
1736
1792
|
createdAt: z.number(),
|
|
1737
1793
|
updatedAt: z.number()
|
|
1738
1794
|
});
|
|
1739
|
-
export const BodyPartContentSchema = z.object({
|
|
1740
|
-
bodyPartContentId: z.string(),
|
|
1741
|
-
messageId: z.string(),
|
|
1742
|
-
bodyPartId: z.string(),
|
|
1743
|
-
content: z.string(),
|
|
1744
|
-
contentLength: z.number(),
|
|
1745
|
-
createdAt: z.number(),
|
|
1746
|
-
updatedAt: z.number()
|
|
1747
|
-
});
|
|
1748
1795
|
export const CalendarEventIndexSchema = z.object({
|
|
1749
|
-
calendarId: z.string(),
|
|
1750
|
-
calendarObjectId: z.string(),
|
|
1751
|
-
recurrenceId: z.string(),
|
|
1752
|
-
startAt: z.string(),
|
|
1753
|
-
endAt: z.string(),
|
|
1796
|
+
calendarId: z.string().min(25).max(25),
|
|
1797
|
+
calendarObjectId: z.string().min(25).max(25),
|
|
1798
|
+
recurrenceId: z.string().max(64),
|
|
1799
|
+
startAt: z.string().max(64),
|
|
1800
|
+
endAt: z.string().max(64),
|
|
1754
1801
|
allDay: z.boolean(),
|
|
1755
|
-
summary: z.string(),
|
|
1802
|
+
summary: z.string().max(512),
|
|
1756
1803
|
status: CalendarEventStatusSchema,
|
|
1757
1804
|
transparency: CalendarTransparencySchema,
|
|
1758
1805
|
createdAt: z.number(),
|
|
1759
1806
|
updatedAt: z.number()
|
|
1760
1807
|
});
|
|
1761
1808
|
export const CalendarFeedTokenSchema = z.object({
|
|
1762
|
-
feedTokenId: z.string(),
|
|
1763
|
-
accountConfigId: z.string(),
|
|
1764
|
-
calendarId: z.string(),
|
|
1765
|
-
tokenHash: z.string(),
|
|
1809
|
+
feedTokenId: z.string().min(25).max(25),
|
|
1810
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1811
|
+
calendarId: z.string().min(25).max(25),
|
|
1812
|
+
tokenHash: z.string().max(64),
|
|
1766
1813
|
createdAt: z.number(),
|
|
1767
1814
|
rotatedAt: z.number(),
|
|
1768
1815
|
updatedAt: z.number()
|
|
1769
1816
|
});
|
|
1770
1817
|
export const MessageLabelSchema = z.object({
|
|
1771
|
-
messageLabelId: z.string(),
|
|
1772
|
-
messageId: z.string(),
|
|
1773
|
-
labelId: z.string(),
|
|
1774
|
-
accountConfigId: z.string(),
|
|
1775
|
-
appliedByFilterId: z.string().optional(),
|
|
1776
|
-
createdAt: z.number(),
|
|
1777
|
-
updatedAt: z.number()
|
|
1778
|
-
});
|
|
1779
|
-
export const FilterAnchorSchema = z.object({
|
|
1780
|
-
accountConfigId: z.string(),
|
|
1781
|
-
filterId: z.string(),
|
|
1782
|
-
anchorEmbedding: z.array(z.number()),
|
|
1783
|
-
anchorEmbeddingId: z.string(),
|
|
1784
|
-
anchorSourceText: z.string(),
|
|
1785
|
-
anchorMessageId: z.string(),
|
|
1818
|
+
messageLabelId: z.string().min(25).max(25),
|
|
1819
|
+
messageId: z.string().min(25).max(25),
|
|
1820
|
+
labelId: z.string().min(25).max(25),
|
|
1821
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1822
|
+
appliedByFilterId: z.string().min(25).max(25).optional(),
|
|
1786
1823
|
createdAt: z.number(),
|
|
1787
1824
|
updatedAt: z.number()
|
|
1788
1825
|
});
|
|
1789
1826
|
export const MicrosoftOAuthStartRequestSchema = z.object({
|
|
1790
1827
|
email: z.string().optional(),
|
|
1791
|
-
services: z.array(AccountServiceSchema).optional()
|
|
1828
|
+
services: z.array(AccountServiceSchema).min(1).optional()
|
|
1792
1829
|
});
|
|
1793
1830
|
export const MicrosoftOAuthStartResponseSchema = z.object({
|
|
1794
1831
|
authorizationUrl: z.string()
|