@remit/api-zod-schemas 0.0.59 → 0.0.61
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 +35 -6
- 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 +1757 -435
- package/schemas.d.ts.map +1 -1
- package/schemas.js +496 -459
- package/schemas.js.map +1 -1
- package/schemas.ts +506 -463
package/schemas.ts
CHANGED
|
@@ -13,6 +13,8 @@ export const QuarantineFailureStageSchema = z.enum(["BodyParse"]);
|
|
|
13
13
|
|
|
14
14
|
export const QuarantineFailureCodeSchema = z.enum(["UnknownCharset", "UnreadableBody"]);
|
|
15
15
|
|
|
16
|
+
export const SyncWarningStageSchema = z.enum(["Header", "Body"]);
|
|
17
|
+
|
|
16
18
|
export const AccountConfigStateSchema = z.enum(["active", "deleting"]);
|
|
17
19
|
|
|
18
20
|
export const AccountAuthTypeSchema = z.enum(["password", "oauthMicrosoft"]);
|
|
@@ -89,8 +91,6 @@ export const MessageMutationSchema = z.enum(["none", "move", "delete", "copy"]);
|
|
|
89
91
|
|
|
90
92
|
export const PlacementActionSchema = z.enum(["MoveToInbox", "MoveToJunk"]);
|
|
91
93
|
|
|
92
|
-
export const SemanticSearchChunkTypeSchema = z.enum(["sender", "recipient", "subject", "attachment", "body", "entities"]);
|
|
93
|
-
|
|
94
94
|
export const OutboxMessageStatusSchema = z.enum(["draft", "queued", "sending", "sent", "unfiled", "failed", "blocked"]);
|
|
95
95
|
|
|
96
96
|
export const OutboxAttachmentStateSchema = z.enum(["Pending", "Stored"]);
|
|
@@ -149,6 +149,8 @@ export const ConfigImportStateSchema = z.enum(["Pending", "Complete"]);
|
|
|
149
149
|
|
|
150
150
|
export const ConfigImportRefKindSchema = z.enum(["FolderRole", "MailboxOverride", "FilterAction"]);
|
|
151
151
|
|
|
152
|
+
export const SyncWarningStateSchema = z.enum(["Retrying", "GaveUp"]);
|
|
153
|
+
|
|
152
154
|
export const MessagePlacementMoveStateSchema = z.enum(["pending", "queued", "processing", "processed"]);
|
|
153
155
|
|
|
154
156
|
export const FlagPushOperationSchema = z.enum(["add", "remove"]);
|
|
@@ -156,8 +158,8 @@ export const FlagPushOperationSchema = z.enum(["add", "remove"]);
|
|
|
156
158
|
export const MessageFlagPushStateSchema = z.enum(["pending", "queued", "processing", "processed"]);
|
|
157
159
|
|
|
158
160
|
export const CognitoAuthorizerSchema = z.object({
|
|
159
|
-
type: z.
|
|
160
|
-
"in": z.
|
|
161
|
+
type: z.literal("apiKey"),
|
|
162
|
+
"in": z.literal("header"),
|
|
161
163
|
name: z.literal("Authorization")
|
|
162
164
|
});
|
|
163
165
|
|
|
@@ -248,8 +250,8 @@ export const PreconditionFailedErrorSchema = z.object({
|
|
|
248
250
|
details: z.record(z.string(), z.string()).optional()
|
|
249
251
|
});
|
|
250
252
|
|
|
251
|
-
export const
|
|
252
|
-
statusCode: z.literal(
|
|
253
|
+
export const MessageNotFoundErrorSchema = z.object({
|
|
254
|
+
statusCode: z.literal(404),
|
|
253
255
|
code: z.string(),
|
|
254
256
|
message: z.string(),
|
|
255
257
|
details: z.record(z.string(), z.string()).optional()
|
|
@@ -262,6 +264,13 @@ export const MessagePlacementConflictSchema = z.object({
|
|
|
262
264
|
details: z.record(z.string(), z.string()).optional()
|
|
263
265
|
});
|
|
264
266
|
|
|
267
|
+
export const DeleteMessagesConflictSchema = z.object({
|
|
268
|
+
statusCode: z.literal(409),
|
|
269
|
+
code: z.string(),
|
|
270
|
+
message: z.string(),
|
|
271
|
+
details: z.record(z.string(), z.string()).optional()
|
|
272
|
+
});
|
|
273
|
+
|
|
265
274
|
export const AmazonApiGatewayIntegrationSchema = z.object({
|
|
266
275
|
type: z.literal("aws_proxy"),
|
|
267
276
|
httpMethod: z.literal("POST"),
|
|
@@ -286,7 +295,7 @@ export const DeleteAccountConfigResponseSchema = z.object({
|
|
|
286
295
|
});
|
|
287
296
|
|
|
288
297
|
export const VipSuggestionEntrySchema = z.object({
|
|
289
|
-
addressId: z.string(),
|
|
298
|
+
addressId: z.string().min(25).max(25),
|
|
290
299
|
displayName: z.string().optional(),
|
|
291
300
|
normalizedEmail: z.string(),
|
|
292
301
|
inboundCount: z.number(),
|
|
@@ -306,8 +315,8 @@ export const CreateExportResponseSchema = z.object({
|
|
|
306
315
|
});
|
|
307
316
|
|
|
308
317
|
export const AccountExportRequestSchema = z.object({
|
|
309
|
-
accountExportRequestId: z.string(),
|
|
310
|
-
accountConfigId: z.string(),
|
|
318
|
+
accountExportRequestId: z.string().min(25).max(25),
|
|
319
|
+
accountConfigId: z.string().min(25).max(25),
|
|
311
320
|
userId: z.string(),
|
|
312
321
|
state: AccountExportStateSchema,
|
|
313
322
|
createdAt: z.number(),
|
|
@@ -319,8 +328,8 @@ export const AccountExportRequestSchema = z.object({
|
|
|
319
328
|
});
|
|
320
329
|
|
|
321
330
|
export const AccountExportRequestResponseSchema = z.object({
|
|
322
|
-
accountExportRequestId: z.string(),
|
|
323
|
-
accountConfigId: z.string(),
|
|
331
|
+
accountExportRequestId: z.string().min(25).max(25),
|
|
332
|
+
accountConfigId: z.string().min(25).max(25),
|
|
324
333
|
userId: z.string(),
|
|
325
334
|
state: AccountExportStateSchema,
|
|
326
335
|
createdAt: z.number(),
|
|
@@ -333,68 +342,94 @@ export const AccountExportRequestResponseSchema = z.object({
|
|
|
333
342
|
|
|
334
343
|
export const QuarantineMimeNodeSchema = z.object({
|
|
335
344
|
depth: z.number(),
|
|
336
|
-
contentType: z.string()
|
|
345
|
+
contentType: z.string().max(140)
|
|
337
346
|
});
|
|
338
347
|
|
|
339
348
|
export const QuarantineResponseSchema = z.object({
|
|
340
|
-
quarantineId: z.string(),
|
|
341
|
-
accountConfigId: z.string(),
|
|
342
|
-
accountId: z.string(),
|
|
343
|
-
mailboxId: z.string(),
|
|
349
|
+
quarantineId: z.string().min(25).max(25),
|
|
350
|
+
accountConfigId: z.string().min(25).max(25),
|
|
351
|
+
accountId: z.string().min(25).max(25),
|
|
352
|
+
mailboxId: z.string().min(25).max(25),
|
|
344
353
|
uidValidity: z.number(),
|
|
345
354
|
uid: z.number(),
|
|
346
355
|
mailboxRole: CanonicalMailboxRoleSchema.optional(),
|
|
347
|
-
mailboxPath: z.string(),
|
|
356
|
+
mailboxPath: z.string().max(512),
|
|
348
357
|
quarantinedAt: z.number(),
|
|
349
358
|
attempts: z.number(),
|
|
350
359
|
failureStage: QuarantineFailureStageSchema,
|
|
351
360
|
failureCode: QuarantineFailureCodeSchema,
|
|
352
|
-
failureMessage: z.string(),
|
|
353
|
-
failurePartPath: z.string().optional(),
|
|
354
|
-
workerVersion: z.string(),
|
|
355
|
-
contentType: z.string().optional(),
|
|
356
|
-
transferEncoding: z.string().optional(),
|
|
357
|
-
charset: z.string().optional(),
|
|
361
|
+
failureMessage: z.string().max(512),
|
|
362
|
+
failurePartPath: z.string().max(140).optional(),
|
|
363
|
+
workerVersion: z.string().max(64),
|
|
364
|
+
contentType: z.string().max(140).optional(),
|
|
365
|
+
transferEncoding: z.string().max(64).optional(),
|
|
366
|
+
charset: z.string().max(64).optional(),
|
|
358
367
|
sizeBytes: z.number().optional(),
|
|
359
368
|
structure: z.array(QuarantineMimeNodeSchema),
|
|
360
|
-
messageIdHash: z.string().optional(),
|
|
369
|
+
messageIdHash: z.string().max(140).optional(),
|
|
361
370
|
createdAt: z.number(),
|
|
362
371
|
updatedAt: z.number()
|
|
363
372
|
});
|
|
364
373
|
|
|
374
|
+
export const SyncWarningResponseSchema = z.object({
|
|
375
|
+
syncWarningId: z.string().min(25).max(25),
|
|
376
|
+
accountConfigId: z.string().min(25).max(25),
|
|
377
|
+
accountId: z.string().min(25).max(25),
|
|
378
|
+
mailboxId: z.string().min(25).max(25),
|
|
379
|
+
uidValidity: z.number(),
|
|
380
|
+
uid: z.number(),
|
|
381
|
+
stage: SyncWarningStageSchema,
|
|
382
|
+
attempts: z.number(),
|
|
383
|
+
createdAt: z.number()
|
|
384
|
+
});
|
|
385
|
+
|
|
365
386
|
export const QuarantineListResponseSchema = z.object({
|
|
366
|
-
entries: z.array(QuarantineResponseSchema)
|
|
387
|
+
entries: z.array(QuarantineResponseSchema),
|
|
388
|
+
warnings: z.array(SyncWarningResponseSchema),
|
|
389
|
+
warningsTotal: z.number()
|
|
367
390
|
});
|
|
368
391
|
|
|
369
392
|
export const QuarantineSchema = z.object({
|
|
370
|
-
quarantineId: z.string(),
|
|
371
|
-
accountConfigId: z.string(),
|
|
372
|
-
accountId: z.string(),
|
|
373
|
-
mailboxId: z.string(),
|
|
393
|
+
quarantineId: z.string().min(25).max(25),
|
|
394
|
+
accountConfigId: z.string().min(25).max(25),
|
|
395
|
+
accountId: z.string().min(25).max(25),
|
|
396
|
+
mailboxId: z.string().min(25).max(25),
|
|
374
397
|
uidValidity: z.number(),
|
|
375
398
|
uid: z.number(),
|
|
376
399
|
mailboxRole: CanonicalMailboxRoleSchema.optional(),
|
|
377
|
-
mailboxPath: z.string(),
|
|
400
|
+
mailboxPath: z.string().max(512),
|
|
378
401
|
quarantinedAt: z.number(),
|
|
379
402
|
attempts: z.number(),
|
|
380
403
|
failureStage: QuarantineFailureStageSchema,
|
|
381
404
|
failureCode: QuarantineFailureCodeSchema,
|
|
382
|
-
failureMessage: z.string(),
|
|
383
|
-
failurePartPath: z.string().optional(),
|
|
384
|
-
workerVersion: z.string(),
|
|
385
|
-
contentType: z.string().optional(),
|
|
386
|
-
transferEncoding: z.string().optional(),
|
|
387
|
-
charset: z.string().optional(),
|
|
405
|
+
failureMessage: z.string().max(512),
|
|
406
|
+
failurePartPath: z.string().max(140).optional(),
|
|
407
|
+
workerVersion: z.string().max(64),
|
|
408
|
+
contentType: z.string().max(140).optional(),
|
|
409
|
+
transferEncoding: z.string().max(64).optional(),
|
|
410
|
+
charset: z.string().max(64).optional(),
|
|
388
411
|
sizeBytes: z.number().optional(),
|
|
389
412
|
structure: z.array(QuarantineMimeNodeSchema),
|
|
390
|
-
messageIdHash: z.string().optional(),
|
|
413
|
+
messageIdHash: z.string().max(140).optional(),
|
|
391
414
|
createdAt: z.number(),
|
|
392
415
|
updatedAt: z.number()
|
|
393
416
|
});
|
|
394
417
|
|
|
418
|
+
export const SyncWarningSchema = z.object({
|
|
419
|
+
syncWarningId: z.string().min(25).max(25),
|
|
420
|
+
accountConfigId: z.string().min(25).max(25),
|
|
421
|
+
accountId: z.string().min(25).max(25),
|
|
422
|
+
mailboxId: z.string().min(25).max(25),
|
|
423
|
+
uidValidity: z.number(),
|
|
424
|
+
uid: z.number(),
|
|
425
|
+
stage: SyncWarningStageSchema,
|
|
426
|
+
attempts: z.number(),
|
|
427
|
+
createdAt: z.number()
|
|
428
|
+
});
|
|
429
|
+
|
|
395
430
|
export const AccountConfigResponseSchema = z.object({
|
|
396
|
-
accountConfigId: z.string(),
|
|
397
|
-
userId: z.string(),
|
|
431
|
+
accountConfigId: z.string().min(25).max(25),
|
|
432
|
+
userId: z.string().min(25).max(25),
|
|
398
433
|
name: z.string().optional(),
|
|
399
434
|
state: AccountConfigStateSchema,
|
|
400
435
|
deletedAt: z.number().optional(),
|
|
@@ -414,26 +449,26 @@ export const MutedFlagSchema = z.object({
|
|
|
414
449
|
export const FolderAppointmentSchema = z.object({
|
|
415
450
|
role: CanonicalMailboxRoleSchema,
|
|
416
451
|
source: FolderAppointmentSourceSchema,
|
|
417
|
-
mailboxId: z.string().optional(),
|
|
418
|
-
staleAppointmentMailboxId: z.string().optional(),
|
|
419
|
-
staleAppointmentPath: z.string().optional()
|
|
452
|
+
mailboxId: z.string().min(25).max(25).optional(),
|
|
453
|
+
staleAppointmentMailboxId: z.string().min(25).max(25).optional(),
|
|
454
|
+
staleAppointmentPath: z.string().max(512).optional()
|
|
420
455
|
});
|
|
421
456
|
|
|
422
457
|
export const AccountResponseSchema = z.object({
|
|
423
|
-
accountId: z.string(),
|
|
424
|
-
accountConfigId: z.string(),
|
|
425
|
-
username: z.string(),
|
|
458
|
+
accountId: z.string().min(25).max(25),
|
|
459
|
+
accountConfigId: z.string().min(25).max(25),
|
|
460
|
+
username: z.string().min(1),
|
|
426
461
|
email: z.string(),
|
|
427
462
|
authType: AccountAuthTypeSchema,
|
|
428
463
|
syncedServices: z.array(AccountServiceSchema),
|
|
429
464
|
grantedScopes: z.array(z.string()),
|
|
430
|
-
imapHost: z.string(),
|
|
431
|
-
imapPort: z.number(),
|
|
465
|
+
imapHost: z.string().min(1),
|
|
466
|
+
imapPort: z.number().min(1).max(65535),
|
|
432
467
|
imapTls: z.boolean(),
|
|
433
468
|
imapStartTls: z.boolean(),
|
|
434
469
|
smtpEnabled: z.boolean(),
|
|
435
470
|
smtpHost: z.string(),
|
|
436
|
-
smtpPort: z.number(),
|
|
471
|
+
smtpPort: z.number().min(1).max(65535),
|
|
437
472
|
smtpTls: z.boolean(),
|
|
438
473
|
smtpStartTls: z.boolean(),
|
|
439
474
|
smtpUsername: z.string(),
|
|
@@ -443,8 +478,8 @@ export const AccountResponseSchema = z.object({
|
|
|
443
478
|
lastSyncAt: z.number().optional(),
|
|
444
479
|
lastError: z.string().optional(),
|
|
445
480
|
syncPhase: SyncPhaseSchema.optional(),
|
|
446
|
-
mailboxCountTotal: z.number().optional(),
|
|
447
|
-
mailboxCountSynced: z.number().optional(),
|
|
481
|
+
mailboxCountTotal: z.number().min(0).optional(),
|
|
482
|
+
mailboxCountSynced: z.number().min(0).optional(),
|
|
448
483
|
createdAt: z.number(),
|
|
449
484
|
updatedAt: z.number(),
|
|
450
485
|
displayName: z.string().optional(),
|
|
@@ -456,20 +491,20 @@ export const AccountResponseSchema = z.object({
|
|
|
456
491
|
});
|
|
457
492
|
|
|
458
493
|
export const PendingConfigImportSchema = z.object({
|
|
459
|
-
importId: z.string(),
|
|
494
|
+
importId: z.string().min(25).max(25),
|
|
460
495
|
folderPaths: z.array(z.string())
|
|
461
496
|
});
|
|
462
497
|
|
|
463
498
|
export const ConfigDescriptionResponseSchema = z.object({
|
|
464
499
|
accountConfig: AccountConfigResponseSchema,
|
|
465
500
|
accounts: z.array(AccountResponseSchema),
|
|
466
|
-
|
|
467
|
-
|
|
501
|
+
buildCommit: z.string(),
|
|
502
|
+
pendingImport: PendingConfigImportSchema.optional()
|
|
468
503
|
});
|
|
469
504
|
|
|
470
505
|
export const AccountConfigSchema = z.object({
|
|
471
|
-
accountConfigId: z.string(),
|
|
472
|
-
userId: z.string(),
|
|
506
|
+
accountConfigId: z.string().min(25).max(25),
|
|
507
|
+
userId: z.string().min(25).max(25),
|
|
473
508
|
name: z.string().optional(),
|
|
474
509
|
state: AccountConfigStateSchema,
|
|
475
510
|
deletedAt: z.number().optional(),
|
|
@@ -479,9 +514,9 @@ export const AccountConfigSchema = z.object({
|
|
|
479
514
|
});
|
|
480
515
|
|
|
481
516
|
export const AccountSchema = z.object({
|
|
482
|
-
accountId: z.string(),
|
|
483
|
-
accountConfigId: z.string(),
|
|
484
|
-
username: z.string(),
|
|
517
|
+
accountId: z.string().min(25).max(25),
|
|
518
|
+
accountConfigId: z.string().min(25).max(25),
|
|
519
|
+
username: z.string().min(1),
|
|
485
520
|
email: z.string(),
|
|
486
521
|
authType: AccountAuthTypeSchema,
|
|
487
522
|
syncedServices: z.array(AccountServiceSchema),
|
|
@@ -489,13 +524,13 @@ export const AccountSchema = z.object({
|
|
|
489
524
|
passwordHash: z.string().optional(),
|
|
490
525
|
oauthRefreshTokenHash: z.string().optional(),
|
|
491
526
|
oauthTokenUpdatedAt: z.number().optional(),
|
|
492
|
-
imapHost: z.string(),
|
|
493
|
-
imapPort: z.number(),
|
|
527
|
+
imapHost: z.string().min(1),
|
|
528
|
+
imapPort: z.number().min(1).max(65535),
|
|
494
529
|
imapTls: z.boolean(),
|
|
495
530
|
imapStartTls: z.boolean(),
|
|
496
531
|
smtpEnabled: z.boolean(),
|
|
497
532
|
smtpHost: z.string(),
|
|
498
|
-
smtpPort: z.number(),
|
|
533
|
+
smtpPort: z.number().min(1).max(65535),
|
|
499
534
|
smtpTls: z.boolean(),
|
|
500
535
|
smtpStartTls: z.boolean(),
|
|
501
536
|
smtpUsername: z.string(),
|
|
@@ -506,8 +541,8 @@ export const AccountSchema = z.object({
|
|
|
506
541
|
lastSyncAt: z.number().optional(),
|
|
507
542
|
lastError: z.string().optional(),
|
|
508
543
|
syncPhase: SyncPhaseSchema.optional(),
|
|
509
|
-
mailboxCountTotal: z.number().optional(),
|
|
510
|
-
mailboxCountSynced: z.number().optional(),
|
|
544
|
+
mailboxCountTotal: z.number().min(0).optional(),
|
|
545
|
+
mailboxCountSynced: z.number().min(0).optional(),
|
|
511
546
|
createdAt: z.number(),
|
|
512
547
|
updatedAt: z.number(),
|
|
513
548
|
deletedAt: z.number().optional()
|
|
@@ -539,14 +574,14 @@ export const ConfigImportItemReportSchema = z.object({
|
|
|
539
574
|
});
|
|
540
575
|
|
|
541
576
|
export const ConfigImportReportSchema = z.object({
|
|
542
|
-
importId: z.string().optional(),
|
|
577
|
+
importId: z.string().min(25).max(25).optional(),
|
|
543
578
|
valid: z.boolean(),
|
|
544
579
|
schemaVersion: z.number(),
|
|
545
580
|
applied: z.boolean(),
|
|
546
581
|
items: z.array(ConfigImportItemReportSchema),
|
|
547
582
|
errors: z.array(ApiErrorSchema),
|
|
548
583
|
warnings: z.array(ApiErrorSchema),
|
|
549
|
-
accountsNeedingCredentials: z.array(z.string())
|
|
584
|
+
accountsNeedingCredentials: z.array(z.string().min(25).max(25))
|
|
550
585
|
});
|
|
551
586
|
|
|
552
587
|
export const ConfigImportConflictSchema = z.object({
|
|
@@ -573,7 +608,7 @@ export const SystemUpdateRunSchema = z.object({
|
|
|
573
608
|
fromVersion: z.string(),
|
|
574
609
|
targetVersion: z.string(),
|
|
575
610
|
phase: SystemUpdatePhaseSchema,
|
|
576
|
-
outcome: z.union([SystemUpdateOutcomeSchema, z.
|
|
611
|
+
outcome: z.union([SystemUpdateOutcomeSchema, z.null()]),
|
|
577
612
|
startedAt: z.string(),
|
|
578
613
|
updatedAt: z.string(),
|
|
579
614
|
message: z.string(),
|
|
@@ -584,7 +619,7 @@ export const SystemUpdateResponseSchema = z.object({
|
|
|
584
619
|
currentVersion: z.string(),
|
|
585
620
|
currentSchemaVersion: z.number().optional(),
|
|
586
621
|
check: SystemUpdateCheckSchema,
|
|
587
|
-
run: z.union([SystemUpdateRunSchema, z.
|
|
622
|
+
run: z.union([SystemUpdateRunSchema, z.null()])
|
|
588
623
|
});
|
|
589
624
|
|
|
590
625
|
export const ApplyUpdateInputSchema = z.object({
|
|
@@ -592,26 +627,26 @@ export const ApplyUpdateInputSchema = z.object({
|
|
|
592
627
|
});
|
|
593
628
|
|
|
594
629
|
export const MailboxSchema = z.object({
|
|
595
|
-
mailboxId: z.string(),
|
|
596
|
-
accountId: z.string(),
|
|
630
|
+
mailboxId: z.string().min(25).max(25),
|
|
631
|
+
accountId: z.string().min(25).max(25),
|
|
597
632
|
namespaceType: NamespaceTypeSchema,
|
|
598
633
|
namespacePrefix: z.string(),
|
|
599
|
-
hierarchyDelimiter: z.string(),
|
|
600
|
-
fullPath: z.string(),
|
|
601
|
-
uidValidity: z.number(),
|
|
602
|
-
uidNext: z.number(),
|
|
603
|
-
highestModseq: z.string(),
|
|
604
|
-
messageCount: z.number(),
|
|
605
|
-
unseenCount: z.number(),
|
|
606
|
-
deletedCount: z.number(),
|
|
607
|
-
totalSize: z.number(),
|
|
634
|
+
hierarchyDelimiter: z.string().min(1).max(1),
|
|
635
|
+
fullPath: z.string().min(1).max(512),
|
|
636
|
+
uidValidity: z.number().min(1),
|
|
637
|
+
uidNext: z.number().min(1),
|
|
638
|
+
highestModseq: z.string().max(32),
|
|
639
|
+
messageCount: z.number().min(0),
|
|
640
|
+
unseenCount: z.number().min(0),
|
|
641
|
+
deletedCount: z.number().min(0),
|
|
642
|
+
totalSize: z.number().min(0),
|
|
608
643
|
lastSyncUid: z.number(),
|
|
609
644
|
highWaterMarkUid: z.number(),
|
|
610
645
|
lastMessageSyncAt: z.number(),
|
|
611
646
|
initialSyncCompletedAt: z.number().optional(),
|
|
612
647
|
parentMailboxId: z.string(),
|
|
613
648
|
syncStatus: MailboxSyncStatusSchema,
|
|
614
|
-
pendingPath: z.string().optional(),
|
|
649
|
+
pendingPath: z.string().max(512).optional(),
|
|
615
650
|
syncFailureReason: z.string(),
|
|
616
651
|
cursorState: MailboxCursorStateSchema,
|
|
617
652
|
specialUse: z.array(MailboxSpecialUseSchema).optional(),
|
|
@@ -620,62 +655,66 @@ export const MailboxSchema = z.object({
|
|
|
620
655
|
});
|
|
621
656
|
|
|
622
657
|
export const MailboxResponseSchema = z.object({
|
|
623
|
-
mailboxId: z.string(),
|
|
624
|
-
accountId: z.string(),
|
|
658
|
+
mailboxId: z.string().min(25).max(25),
|
|
659
|
+
accountId: z.string().min(25).max(25),
|
|
625
660
|
namespaceType: NamespaceTypeSchema,
|
|
626
661
|
namespacePrefix: z.string(),
|
|
627
|
-
hierarchyDelimiter: z.string(),
|
|
628
|
-
fullPath: z.string(),
|
|
629
|
-
messageCount: z.number(),
|
|
630
|
-
unseenCount: z.number(),
|
|
631
|
-
deletedCount: z.number(),
|
|
662
|
+
hierarchyDelimiter: z.string().min(1).max(1),
|
|
663
|
+
fullPath: z.string().min(1).max(512),
|
|
664
|
+
messageCount: z.number().min(0),
|
|
665
|
+
unseenCount: z.number().min(0),
|
|
666
|
+
deletedCount: z.number().min(0),
|
|
632
667
|
lastSyncUid: z.number(),
|
|
633
668
|
highWaterMarkUid: z.number(),
|
|
634
669
|
lastMessageSyncAt: z.number(),
|
|
635
670
|
syncStatus: MailboxSyncStatusSchema,
|
|
636
|
-
pendingPath: z.string().optional(),
|
|
671
|
+
pendingPath: z.string().max(512).optional(),
|
|
637
672
|
syncFailureReason: z.string(),
|
|
638
673
|
specialUse: z.array(MailboxSpecialUseSchema).optional(),
|
|
639
674
|
createdAt: z.number(),
|
|
640
675
|
updatedAt: z.number(),
|
|
641
676
|
muted: MutedFlagSchema.optional(),
|
|
642
|
-
displayNameOverride: z.string().optional()
|
|
677
|
+
displayNameOverride: z.string().max(256).optional()
|
|
678
|
+
});
|
|
679
|
+
|
|
680
|
+
export const MailboxListResponseSchema = z.object({
|
|
681
|
+
continuationToken: z.string().max(800).optional(),
|
|
682
|
+
items: z.array(MailboxResponseSchema)
|
|
643
683
|
});
|
|
644
684
|
|
|
645
685
|
export const CreateMailboxInputSchema = z.object({
|
|
646
686
|
namespaceType: NamespaceTypeSchema,
|
|
647
|
-
fullPath: z.string()
|
|
687
|
+
fullPath: z.string().min(1).max(512)
|
|
648
688
|
});
|
|
649
689
|
|
|
650
690
|
export const RenameMailboxInputSchema = z.object({
|
|
651
|
-
fullPath: z.string().optional(),
|
|
652
|
-
muted: z.union([MutedFlagSchema, z.
|
|
653
|
-
displayNameOverride: z.union([z.string(), z.
|
|
691
|
+
fullPath: z.string().max(512).optional(),
|
|
692
|
+
muted: z.union([MutedFlagSchema, z.null()]).optional(),
|
|
693
|
+
displayNameOverride: z.union([z.string(), z.null()]).optional()
|
|
654
694
|
});
|
|
655
695
|
|
|
656
696
|
export const AppointFolderRoleInputSchema = z.object({
|
|
657
|
-
mailboxId: z.union([z.string(), z.
|
|
697
|
+
mailboxId: z.union([z.string(), z.null()])
|
|
658
698
|
});
|
|
659
699
|
|
|
660
700
|
export const FilterClauseSchema = z.object({
|
|
661
701
|
field: FilterClauseFieldSchema,
|
|
662
|
-
value: z.string()
|
|
702
|
+
value: z.string().max(256)
|
|
663
703
|
});
|
|
664
704
|
|
|
665
705
|
export const FilterSchema = z.object({
|
|
666
|
-
filterId: z.string(),
|
|
667
|
-
accountConfigId: z.string(),
|
|
668
|
-
name: z.string(),
|
|
706
|
+
filterId: z.string().min(25).max(25),
|
|
707
|
+
accountConfigId: z.string().min(25).max(25),
|
|
708
|
+
name: z.string().max(256),
|
|
669
709
|
scope: FilterScopeSchema,
|
|
670
710
|
expiresAt: z.string().optional(),
|
|
671
711
|
ttl: z.number().optional(),
|
|
672
712
|
state: FilterStateSchema,
|
|
673
713
|
disabledReason: FilterDisabledReasonSchema,
|
|
674
|
-
hasAnchor: z.boolean(),
|
|
675
714
|
ruleChangedAt: z.number(),
|
|
676
715
|
actionChangedAt: z.number(),
|
|
677
716
|
matchOperator: FilterMatchOperatorSchema,
|
|
678
|
-
literalClauses: z.array(FilterClauseSchema),
|
|
717
|
+
literalClauses: z.array(FilterClauseSchema).min(1),
|
|
679
718
|
actionLabelId: z.string(),
|
|
680
719
|
actionMailboxId: z.string(),
|
|
681
720
|
createdAt: z.number(),
|
|
@@ -683,18 +722,17 @@ export const FilterSchema = z.object({
|
|
|
683
722
|
});
|
|
684
723
|
|
|
685
724
|
export const FilterResponseSchema = z.object({
|
|
686
|
-
filterId: z.string(),
|
|
687
|
-
accountConfigId: z.string(),
|
|
688
|
-
name: z.string(),
|
|
725
|
+
filterId: z.string().min(25).max(25),
|
|
726
|
+
accountConfigId: z.string().min(25).max(25),
|
|
727
|
+
name: z.string().max(256),
|
|
689
728
|
scope: FilterScopeSchema,
|
|
690
729
|
expiresAt: z.string().optional(),
|
|
691
730
|
state: FilterStateSchema,
|
|
692
731
|
disabledReason: FilterDisabledReasonSchema,
|
|
693
|
-
hasAnchor: z.boolean(),
|
|
694
732
|
ruleChangedAt: z.number(),
|
|
695
733
|
actionChangedAt: z.number(),
|
|
696
734
|
matchOperator: FilterMatchOperatorSchema,
|
|
697
|
-
literalClauses: z.array(FilterClauseSchema),
|
|
735
|
+
literalClauses: z.array(FilterClauseSchema).min(1),
|
|
698
736
|
actionLabelId: z.string(),
|
|
699
737
|
actionMailboxId: z.string(),
|
|
700
738
|
createdAt: z.number(),
|
|
@@ -702,29 +740,27 @@ export const FilterResponseSchema = z.object({
|
|
|
702
740
|
});
|
|
703
741
|
|
|
704
742
|
export const CreateFilterInputSchema = z.object({
|
|
705
|
-
name: z.string(),
|
|
743
|
+
name: z.string().max(256),
|
|
706
744
|
scope: FilterScopeSchema,
|
|
707
745
|
expiresAt: z.string().optional(),
|
|
708
746
|
matchOperator: FilterMatchOperatorSchema,
|
|
709
|
-
literalClauses: z.array(FilterClauseSchema),
|
|
747
|
+
literalClauses: z.array(FilterClauseSchema).min(1),
|
|
710
748
|
actionLabelId: z.string(),
|
|
711
|
-
actionMailboxId: z.string()
|
|
712
|
-
anchorMessageId: z.string().optional()
|
|
749
|
+
actionMailboxId: z.string()
|
|
713
750
|
});
|
|
714
751
|
|
|
715
752
|
export const CreateFilterResponseSchema = z.object({
|
|
716
|
-
filterId: z.string(),
|
|
717
|
-
accountConfigId: z.string(),
|
|
718
|
-
name: z.string(),
|
|
753
|
+
filterId: z.string().min(25).max(25),
|
|
754
|
+
accountConfigId: z.string().min(25).max(25),
|
|
755
|
+
name: z.string().max(256),
|
|
719
756
|
scope: FilterScopeSchema,
|
|
720
757
|
expiresAt: z.string().optional(),
|
|
721
758
|
state: FilterStateSchema,
|
|
722
759
|
disabledReason: FilterDisabledReasonSchema,
|
|
723
|
-
hasAnchor: z.boolean(),
|
|
724
760
|
ruleChangedAt: z.number(),
|
|
725
761
|
actionChangedAt: z.number(),
|
|
726
762
|
matchOperator: FilterMatchOperatorSchema,
|
|
727
|
-
literalClauses: z.array(FilterClauseSchema),
|
|
763
|
+
literalClauses: z.array(FilterClauseSchema).min(1),
|
|
728
764
|
actionLabelId: z.string(),
|
|
729
765
|
actionMailboxId: z.string(),
|
|
730
766
|
createdAt: z.number(),
|
|
@@ -733,30 +769,30 @@ export const CreateFilterResponseSchema = z.object({
|
|
|
733
769
|
});
|
|
734
770
|
|
|
735
771
|
export const UpdateFilterInputSchema = z.object({
|
|
736
|
-
name: z.string(),
|
|
772
|
+
name: z.string().max(256),
|
|
737
773
|
scope: FilterScopeSchema,
|
|
738
774
|
expiresAt: z.string().optional(),
|
|
739
775
|
state: FilterStateSchema,
|
|
740
776
|
matchOperator: FilterMatchOperatorSchema,
|
|
741
|
-
literalClauses: z.array(FilterClauseSchema),
|
|
777
|
+
literalClauses: z.array(FilterClauseSchema).min(1),
|
|
742
778
|
actionLabelId: z.string(),
|
|
743
779
|
actionMailboxId: z.string()
|
|
744
780
|
});
|
|
745
781
|
|
|
746
782
|
export const LabelSchema = z.object({
|
|
747
|
-
labelId: z.string(),
|
|
748
|
-
accountConfigId: z.string(),
|
|
749
|
-
name: z.string(),
|
|
750
|
-
normalizedName: z.string(),
|
|
783
|
+
labelId: z.string().min(25).max(25),
|
|
784
|
+
accountConfigId: z.string().min(25).max(25),
|
|
785
|
+
name: z.string().max(140),
|
|
786
|
+
normalizedName: z.string().max(140),
|
|
751
787
|
color: LabelColorSchema,
|
|
752
788
|
createdAt: z.number(),
|
|
753
789
|
updatedAt: z.number()
|
|
754
790
|
});
|
|
755
791
|
|
|
756
792
|
export const LabelResponseSchema = z.object({
|
|
757
|
-
labelId: z.string(),
|
|
758
|
-
accountConfigId: z.string(),
|
|
759
|
-
name: z.string(),
|
|
793
|
+
labelId: z.string().min(25).max(25),
|
|
794
|
+
accountConfigId: z.string().min(25).max(25),
|
|
795
|
+
name: z.string().max(140),
|
|
760
796
|
color: LabelColorSchema,
|
|
761
797
|
createdAt: z.number(),
|
|
762
798
|
updatedAt: z.number(),
|
|
@@ -764,21 +800,19 @@ export const LabelResponseSchema = z.object({
|
|
|
764
800
|
});
|
|
765
801
|
|
|
766
802
|
export const CreateLabelInputSchema = z.object({
|
|
767
|
-
name: z.string(),
|
|
803
|
+
name: z.string().max(140),
|
|
768
804
|
color: LabelColorSchema
|
|
769
805
|
});
|
|
770
806
|
|
|
771
807
|
export const UpdateLabelInputSchema = z.object({
|
|
772
|
-
name: z.string(),
|
|
808
|
+
name: z.string().max(140),
|
|
773
809
|
color: LabelColorSchema
|
|
774
810
|
});
|
|
775
811
|
|
|
776
812
|
export const OrganizeInputSchema = z.object({
|
|
777
|
-
filterId: z.string().optional(),
|
|
778
|
-
anchorMessageId: z.string().optional(),
|
|
813
|
+
filterId: z.string().min(25).max(25).optional(),
|
|
779
814
|
matchOperator: FilterMatchOperatorSchema,
|
|
780
815
|
literalClauses: z.array(FilterClauseSchema),
|
|
781
|
-
similarityThreshold: z.number().optional(),
|
|
782
816
|
actionLabelId: z.string(),
|
|
783
817
|
actionMailboxId: z.string()
|
|
784
818
|
});
|
|
@@ -791,21 +825,17 @@ export const CreateOrganizeJobResponseSchema = z.object({
|
|
|
791
825
|
|
|
792
826
|
export const OrganizePreviewResponseSchema = z.object({
|
|
793
827
|
matchedCount: z.number(),
|
|
794
|
-
messageIds: z.array(z.string())
|
|
795
|
-
semanticUnavailable: z.boolean().optional(),
|
|
796
|
-
semanticIndexEmpty: z.boolean().optional()
|
|
828
|
+
messageIds: z.array(z.string())
|
|
797
829
|
});
|
|
798
830
|
|
|
799
831
|
export const OrganizeJobRequestSchema = z.object({
|
|
800
|
-
organizeJobId: z.string(),
|
|
801
|
-
accountConfigId: z.string(),
|
|
832
|
+
organizeJobId: z.string().min(25).max(25),
|
|
833
|
+
accountConfigId: z.string().min(25).max(25),
|
|
802
834
|
userId: z.string(),
|
|
803
835
|
state: OrganizeJobStateSchema,
|
|
804
836
|
filterId: z.string(),
|
|
805
|
-
anchorMessageId: z.string(),
|
|
806
837
|
matchOperator: FilterMatchOperatorSchema,
|
|
807
838
|
literalClauses: z.array(FilterClauseSchema),
|
|
808
|
-
similarityThreshold: z.number(),
|
|
809
839
|
actionLabelId: z.string(),
|
|
810
840
|
actionMailboxId: z.string(),
|
|
811
841
|
matchedCount: z.number(),
|
|
@@ -818,15 +848,13 @@ export const OrganizeJobRequestSchema = z.object({
|
|
|
818
848
|
});
|
|
819
849
|
|
|
820
850
|
export const OrganizeJobResponseSchema = z.object({
|
|
821
|
-
organizeJobId: z.string(),
|
|
822
|
-
accountConfigId: z.string(),
|
|
851
|
+
organizeJobId: z.string().min(25).max(25),
|
|
852
|
+
accountConfigId: z.string().min(25).max(25),
|
|
823
853
|
userId: z.string(),
|
|
824
854
|
state: OrganizeJobStateSchema,
|
|
825
855
|
filterId: z.string(),
|
|
826
|
-
anchorMessageId: z.string(),
|
|
827
856
|
matchOperator: FilterMatchOperatorSchema,
|
|
828
857
|
literalClauses: z.array(FilterClauseSchema),
|
|
829
|
-
similarityThreshold: z.number(),
|
|
830
858
|
actionLabelId: z.string(),
|
|
831
859
|
actionMailboxId: z.string(),
|
|
832
860
|
matchedCount: z.number(),
|
|
@@ -838,20 +866,20 @@ export const OrganizeJobResponseSchema = z.object({
|
|
|
838
866
|
});
|
|
839
867
|
|
|
840
868
|
export const CalendarResponseSchema = z.object({
|
|
841
|
-
calendarId: z.string(),
|
|
842
|
-
accountConfigId: z.string(),
|
|
843
|
-
urlSegment: z.string(),
|
|
844
|
-
displayName: z.string(),
|
|
869
|
+
calendarId: z.string().min(25).max(25),
|
|
870
|
+
accountConfigId: z.string().min(25).max(25),
|
|
871
|
+
urlSegment: z.string().max(64),
|
|
872
|
+
displayName: z.string().max(140),
|
|
845
873
|
color: CalendarColorSchema,
|
|
846
874
|
componentSet: CalendarComponentSetSchema,
|
|
847
875
|
source: CalendarSourceSchema,
|
|
848
|
-
timezone: z.string(),
|
|
876
|
+
timezone: z.string().max(64),
|
|
849
877
|
syncSequence: z.number(),
|
|
850
|
-
subscriptionUrl: z.string(),
|
|
878
|
+
subscriptionUrl: z.string().max(2048),
|
|
851
879
|
subscriptionEnabled: z.boolean(),
|
|
852
880
|
subscriptionCheckedAt: z.number(),
|
|
853
881
|
subscriptionFetchedAt: z.number(),
|
|
854
|
-
subscriptionError: z.string(),
|
|
882
|
+
subscriptionError: z.string().max(512),
|
|
855
883
|
createdAt: z.number(),
|
|
856
884
|
updatedAt: z.number()
|
|
857
885
|
});
|
|
@@ -861,36 +889,36 @@ export const CalendarListResponseSchema = z.object({
|
|
|
861
889
|
});
|
|
862
890
|
|
|
863
891
|
export const CalendarCollectionSchema = z.object({
|
|
864
|
-
calendarId: z.string(),
|
|
865
|
-
accountConfigId: z.string(),
|
|
866
|
-
urlSegment: z.string(),
|
|
867
|
-
displayName: z.string(),
|
|
892
|
+
calendarId: z.string().min(25).max(25),
|
|
893
|
+
accountConfigId: z.string().min(25).max(25),
|
|
894
|
+
urlSegment: z.string().max(64),
|
|
895
|
+
displayName: z.string().max(140),
|
|
868
896
|
color: CalendarColorSchema,
|
|
869
897
|
componentSet: CalendarComponentSetSchema,
|
|
870
898
|
source: CalendarSourceSchema,
|
|
871
|
-
timezone: z.string(),
|
|
899
|
+
timezone: z.string().max(64),
|
|
872
900
|
syncSequence: z.number(),
|
|
873
|
-
subscriptionUrl: z.string(),
|
|
901
|
+
subscriptionUrl: z.string().max(2048),
|
|
874
902
|
subscriptionEnabled: z.boolean(),
|
|
875
903
|
subscriptionCheckedAt: z.number(),
|
|
876
904
|
subscriptionFetchedAt: z.number(),
|
|
877
|
-
subscriptionError: z.string(),
|
|
905
|
+
subscriptionError: z.string().max(512),
|
|
878
906
|
createdAt: z.number(),
|
|
879
907
|
updatedAt: z.number()
|
|
880
908
|
});
|
|
881
909
|
|
|
882
910
|
export const CreateCalendarInputSchema = z.object({
|
|
883
|
-
displayName: z.string(),
|
|
884
|
-
urlSegment: z.string(),
|
|
911
|
+
displayName: z.string().max(140),
|
|
912
|
+
urlSegment: z.string().max(64),
|
|
885
913
|
color: CalendarColorSchema.optional(),
|
|
886
|
-
timezone: z.string().optional(),
|
|
887
|
-
subscriptionUrl: z.string().optional()
|
|
914
|
+
timezone: z.string().max(64).optional(),
|
|
915
|
+
subscriptionUrl: z.string().max(2048).optional()
|
|
888
916
|
});
|
|
889
917
|
|
|
890
918
|
export const UpdateCalendarInputSchema = z.object({
|
|
891
|
-
displayName: z.string(),
|
|
919
|
+
displayName: z.string().max(140),
|
|
892
920
|
color: CalendarColorSchema,
|
|
893
|
-
timezone: z.string(),
|
|
921
|
+
timezone: z.string().max(64),
|
|
894
922
|
subscriptionEnabled: z.boolean()
|
|
895
923
|
});
|
|
896
924
|
|
|
@@ -899,14 +927,14 @@ export const CalendarNoContentSchema = z.object({
|
|
|
899
927
|
});
|
|
900
928
|
|
|
901
929
|
export const CalendarFeedStateResponseSchema = z.object({
|
|
902
|
-
calendarId: z.string(),
|
|
930
|
+
calendarId: z.string().min(25).max(25),
|
|
903
931
|
createdAt: z.number(),
|
|
904
932
|
rotatedAt: z.number()
|
|
905
933
|
});
|
|
906
934
|
|
|
907
935
|
export const CalendarFeedResponseSchema = z.object({
|
|
908
|
-
calendarId: z.string(),
|
|
909
|
-
feedToken: z.string(),
|
|
936
|
+
calendarId: z.string().min(25).max(25),
|
|
937
|
+
feedToken: z.string().max(512),
|
|
910
938
|
createdAt: z.number(),
|
|
911
939
|
rotatedAt: z.number()
|
|
912
940
|
});
|
|
@@ -931,18 +959,18 @@ export const CalendarFeedNotFoundSchema = z.object({
|
|
|
931
959
|
});
|
|
932
960
|
|
|
933
961
|
export const CalendarEventInstanceSchema = z.object({
|
|
934
|
-
calendarId: z.string(),
|
|
935
|
-
calendarObjectId: z.string(),
|
|
936
|
-
recurrenceId: z.string(),
|
|
937
|
-
icalUid: z.string(),
|
|
938
|
-
summary: z.string(),
|
|
939
|
-
start: z.string(),
|
|
940
|
-
end: z.string(),
|
|
962
|
+
calendarId: z.string().min(25).max(25),
|
|
963
|
+
calendarObjectId: z.string().min(25).max(25),
|
|
964
|
+
recurrenceId: z.string().max(64),
|
|
965
|
+
icalUid: z.string().max(512),
|
|
966
|
+
summary: z.string().max(512),
|
|
967
|
+
start: z.string().max(64),
|
|
968
|
+
end: z.string().max(64),
|
|
941
969
|
allDay: z.boolean(),
|
|
942
970
|
status: CalendarEventStatusSchema,
|
|
943
971
|
transparency: CalendarTransparencySchema,
|
|
944
972
|
zoneCertainty: ZoneCertaintySchema,
|
|
945
|
-
etag: z.string(),
|
|
973
|
+
etag: z.string().max(64),
|
|
946
974
|
hasRecurrence: z.boolean()
|
|
947
975
|
});
|
|
948
976
|
|
|
@@ -951,79 +979,79 @@ export const CalendarEventListResponseSchema = z.object({
|
|
|
951
979
|
});
|
|
952
980
|
|
|
953
981
|
export const CreateCalendarEventInputSchema = z.object({
|
|
954
|
-
calendarId: z.string(),
|
|
955
|
-
summary: z.string(),
|
|
956
|
-
description: z.string().optional(),
|
|
957
|
-
location: z.string().optional(),
|
|
958
|
-
start: z.string(),
|
|
959
|
-
end: z.string(),
|
|
982
|
+
calendarId: z.string().min(25).max(25),
|
|
983
|
+
summary: z.string().max(512),
|
|
984
|
+
description: z.string().max(2048).optional(),
|
|
985
|
+
location: z.string().max(512).optional(),
|
|
986
|
+
start: z.string().max(64),
|
|
987
|
+
end: z.string().max(64),
|
|
960
988
|
allDay: z.boolean().optional(),
|
|
961
|
-
timeZone: z.string().optional(),
|
|
989
|
+
timeZone: z.string().max(64).optional(),
|
|
962
990
|
status: CalendarEventStatusSchema.optional(),
|
|
963
991
|
transparency: CalendarTransparencySchema.optional(),
|
|
964
|
-
recurrenceRule: z.string().optional()
|
|
992
|
+
recurrenceRule: z.string().max(512).optional()
|
|
965
993
|
});
|
|
966
994
|
|
|
967
995
|
export const CalendarObjectSchema = z.object({
|
|
968
|
-
calendarObjectId: z.string(),
|
|
969
|
-
calendarId: z.string(),
|
|
970
|
-
resourceName: z.string(),
|
|
971
|
-
icalUid: z.string(),
|
|
996
|
+
calendarObjectId: z.string().min(25).max(25),
|
|
997
|
+
calendarId: z.string().min(25).max(25),
|
|
998
|
+
resourceName: z.string().max(256),
|
|
999
|
+
icalUid: z.string().max(512),
|
|
972
1000
|
icalData: z.string(),
|
|
973
|
-
etag: z.string(),
|
|
1001
|
+
etag: z.string().max(64),
|
|
974
1002
|
sequence: z.number(),
|
|
975
1003
|
syncSequence: z.number(),
|
|
976
|
-
summary: z.string(),
|
|
977
|
-
dtStart: z.string(),
|
|
978
|
-
dtEnd: z.string(),
|
|
1004
|
+
summary: z.string().max(512),
|
|
1005
|
+
dtStart: z.string().max(64),
|
|
1006
|
+
dtEnd: z.string().max(64),
|
|
979
1007
|
allDay: z.boolean(),
|
|
980
1008
|
zoneCertainty: ZoneCertaintySchema,
|
|
981
1009
|
status: CalendarEventStatusSchema,
|
|
982
1010
|
transparency: CalendarTransparencySchema,
|
|
983
1011
|
hasRecurrence: z.boolean(),
|
|
984
|
-
expandedThrough: z.string(),
|
|
1012
|
+
expandedThrough: z.string().max(64),
|
|
985
1013
|
createdAt: z.number(),
|
|
986
1014
|
updatedAt: z.number()
|
|
987
1015
|
});
|
|
988
1016
|
|
|
989
1017
|
export const CalendarEventResponseSchema = z.object({
|
|
990
|
-
calendarObjectId: z.string(),
|
|
991
|
-
calendarId: z.string(),
|
|
992
|
-
resourceName: z.string(),
|
|
993
|
-
icalUid: z.string(),
|
|
1018
|
+
calendarObjectId: z.string().min(25).max(25),
|
|
1019
|
+
calendarId: z.string().min(25).max(25),
|
|
1020
|
+
resourceName: z.string().max(256),
|
|
1021
|
+
icalUid: z.string().max(512),
|
|
994
1022
|
icalData: z.string(),
|
|
995
|
-
etag: z.string(),
|
|
1023
|
+
etag: z.string().max(64),
|
|
996
1024
|
sequence: z.number(),
|
|
997
1025
|
syncSequence: z.number(),
|
|
998
|
-
summary: z.string(),
|
|
999
|
-
dtStart: z.string(),
|
|
1000
|
-
dtEnd: z.string(),
|
|
1026
|
+
summary: z.string().max(512),
|
|
1027
|
+
dtStart: z.string().max(64),
|
|
1028
|
+
dtEnd: z.string().max(64),
|
|
1001
1029
|
allDay: z.boolean(),
|
|
1002
1030
|
zoneCertainty: ZoneCertaintySchema,
|
|
1003
1031
|
status: CalendarEventStatusSchema,
|
|
1004
1032
|
transparency: CalendarTransparencySchema,
|
|
1005
1033
|
hasRecurrence: z.boolean(),
|
|
1006
|
-
expandedThrough: z.string(),
|
|
1034
|
+
expandedThrough: z.string().max(64),
|
|
1007
1035
|
createdAt: z.number(),
|
|
1008
1036
|
updatedAt: z.number()
|
|
1009
1037
|
});
|
|
1010
1038
|
|
|
1011
1039
|
export const UpdateCalendarEventInputSchema = z.object({
|
|
1012
|
-
summary: z.string().optional(),
|
|
1013
|
-
description: z.string().optional(),
|
|
1014
|
-
location: z.string().optional(),
|
|
1015
|
-
start: z.string().optional(),
|
|
1016
|
-
end: z.string().optional(),
|
|
1040
|
+
summary: z.string().max(512).optional(),
|
|
1041
|
+
description: z.string().max(2048).optional(),
|
|
1042
|
+
location: z.string().max(512).optional(),
|
|
1043
|
+
start: z.string().max(64).optional(),
|
|
1044
|
+
end: z.string().max(64).optional(),
|
|
1017
1045
|
allDay: z.boolean().optional(),
|
|
1018
|
-
timeZone: z.string().optional(),
|
|
1046
|
+
timeZone: z.string().max(64).optional(),
|
|
1019
1047
|
status: CalendarEventStatusSchema.optional(),
|
|
1020
1048
|
transparency: CalendarTransparencySchema.optional(),
|
|
1021
|
-
recurrenceRule: z.string().optional()
|
|
1049
|
+
recurrenceRule: z.string().max(512).optional()
|
|
1022
1050
|
});
|
|
1023
1051
|
|
|
1024
1052
|
export const CalendarFreeBusySpanSchema = z.object({
|
|
1025
|
-
start: z.string(),
|
|
1026
|
-
end: z.string()
|
|
1053
|
+
start: z.string().max(64),
|
|
1054
|
+
end: z.string().max(64)
|
|
1027
1055
|
});
|
|
1028
1056
|
|
|
1029
1057
|
export const CalendarFreeBusyResponseSchema = z.object({
|
|
@@ -1040,7 +1068,7 @@ export const SyncTriggerResponseSchema = z.object({
|
|
|
1040
1068
|
});
|
|
1041
1069
|
|
|
1042
1070
|
export const MailboxSyncProgressSchema = z.object({
|
|
1043
|
-
mailboxId: z.string(),
|
|
1071
|
+
mailboxId: z.string().min(25).max(25),
|
|
1044
1072
|
fullPath: z.string(),
|
|
1045
1073
|
phase: z.string(),
|
|
1046
1074
|
messagesTotal: z.number(),
|
|
@@ -1050,7 +1078,7 @@ export const MailboxSyncProgressSchema = z.object({
|
|
|
1050
1078
|
});
|
|
1051
1079
|
|
|
1052
1080
|
export const AccountSyncStatusResponseSchema = z.object({
|
|
1053
|
-
accountId: z.string(),
|
|
1081
|
+
accountId: z.string().min(25).max(25),
|
|
1054
1082
|
syncPhase: SyncPhaseSchema.optional(),
|
|
1055
1083
|
mailboxCountTotal: z.number().optional(),
|
|
1056
1084
|
mailboxCountSynced: z.number().optional(),
|
|
@@ -1059,19 +1087,19 @@ export const AccountSyncStatusResponseSchema = z.object({
|
|
|
1059
1087
|
});
|
|
1060
1088
|
|
|
1061
1089
|
export const CreateAccountInputSchema = z.object({
|
|
1062
|
-
email: z.string(),
|
|
1090
|
+
email: z.string().min(1),
|
|
1063
1091
|
displayName: z.string().optional(),
|
|
1064
1092
|
username: z.string().optional(),
|
|
1065
1093
|
authType: AccountAuthTypeSchema.optional(),
|
|
1066
1094
|
syncedServices: z.array(AccountServiceSchema).optional(),
|
|
1067
1095
|
password: z.string().optional(),
|
|
1068
|
-
imapHost: z.string(),
|
|
1069
|
-
imapPort: z.number(),
|
|
1096
|
+
imapHost: z.string().min(1),
|
|
1097
|
+
imapPort: z.number().min(1).max(65535),
|
|
1070
1098
|
imapTls: z.boolean(),
|
|
1071
1099
|
imapStartTls: z.boolean(),
|
|
1072
1100
|
smtpEnabled: z.boolean().optional(),
|
|
1073
1101
|
smtpHost: z.string().optional(),
|
|
1074
|
-
smtpPort: z.number().optional(),
|
|
1102
|
+
smtpPort: z.number().min(1).max(65535).optional(),
|
|
1075
1103
|
smtpTls: z.boolean().optional(),
|
|
1076
1104
|
smtpStartTls: z.boolean().optional(),
|
|
1077
1105
|
smtpUsername: z.string().optional(),
|
|
@@ -1079,15 +1107,15 @@ export const CreateAccountInputSchema = z.object({
|
|
|
1079
1107
|
});
|
|
1080
1108
|
|
|
1081
1109
|
export const TestConnectionInputSchema = z.object({
|
|
1082
|
-
accountId: z.string().optional(),
|
|
1083
|
-
username: z.string(),
|
|
1110
|
+
accountId: z.string().min(25).max(25).optional(),
|
|
1111
|
+
username: z.string().min(1),
|
|
1084
1112
|
password: z.string().optional(),
|
|
1085
|
-
imapHost: z.string(),
|
|
1086
|
-
imapPort: z.number(),
|
|
1113
|
+
imapHost: z.string().min(1),
|
|
1114
|
+
imapPort: z.number().min(1).max(65535),
|
|
1087
1115
|
imapTls: z.boolean(),
|
|
1088
1116
|
imapStartTls: z.boolean(),
|
|
1089
1117
|
smtpHost: z.string().optional(),
|
|
1090
|
-
smtpPort: z.number().optional(),
|
|
1118
|
+
smtpPort: z.number().min(1).max(65535).optional(),
|
|
1091
1119
|
smtpTls: z.boolean().optional(),
|
|
1092
1120
|
smtpStartTls: z.boolean().optional(),
|
|
1093
1121
|
smtpUsername: z.string().optional(),
|
|
@@ -1105,12 +1133,12 @@ export const UpdateAccountInputSchema = z.object({
|
|
|
1105
1133
|
displayName: z.string().optional(),
|
|
1106
1134
|
password: z.string().optional(),
|
|
1107
1135
|
imapHost: z.string().optional(),
|
|
1108
|
-
imapPort: z.number().optional(),
|
|
1136
|
+
imapPort: z.number().min(1).max(65535).optional(),
|
|
1109
1137
|
imapTls: z.boolean().optional(),
|
|
1110
1138
|
imapStartTls: z.boolean().optional(),
|
|
1111
1139
|
smtpEnabled: z.boolean().optional(),
|
|
1112
1140
|
smtpHost: z.string().optional(),
|
|
1113
|
-
smtpPort: z.number().optional(),
|
|
1141
|
+
smtpPort: z.number().min(1).max(65535).optional(),
|
|
1114
1142
|
smtpTls: z.boolean().optional(),
|
|
1115
1143
|
smtpStartTls: z.boolean().optional(),
|
|
1116
1144
|
smtpUsername: z.string().optional(),
|
|
@@ -1120,29 +1148,29 @@ export const UpdateAccountInputSchema = z.object({
|
|
|
1120
1148
|
signaturePlainText: z.string().optional(),
|
|
1121
1149
|
signatureHtml: z.string().optional(),
|
|
1122
1150
|
composeLanguages: z.array(z.string()).optional(),
|
|
1123
|
-
muted: z.union([MutedFlagSchema, z.
|
|
1151
|
+
muted: z.union([MutedFlagSchema, z.null()]).optional()
|
|
1124
1152
|
});
|
|
1125
1153
|
|
|
1126
1154
|
export const DeleteAccountResponseSchema = z.object({
|
|
1127
|
-
accountId: z.string(),
|
|
1155
|
+
accountId: z.string().min(25).max(25),
|
|
1128
1156
|
deletedAt: z.number(),
|
|
1129
1157
|
message: z.string()
|
|
1130
1158
|
});
|
|
1131
1159
|
|
|
1132
1160
|
export const ThreadMessageSchema = z.object({
|
|
1133
|
-
threadMessageId: z.string(),
|
|
1134
|
-
threadId: z.string(),
|
|
1135
|
-
messageId: z.string(),
|
|
1136
|
-
accountConfigId: z.string(),
|
|
1137
|
-
mailboxId: z.string(),
|
|
1138
|
-
uid: z.number(),
|
|
1161
|
+
threadMessageId: z.string().min(25).max(25),
|
|
1162
|
+
threadId: z.string().min(25).max(25),
|
|
1163
|
+
messageId: z.string().min(25).max(25),
|
|
1164
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1165
|
+
mailboxId: z.string().min(25).max(25),
|
|
1166
|
+
uid: z.number().min(1),
|
|
1139
1167
|
messageIdHeader: z.string().optional(),
|
|
1140
1168
|
inReplyTo: z.string().optional(),
|
|
1141
|
-
referenceOrder: z.number(),
|
|
1169
|
+
referenceOrder: z.number().min(0),
|
|
1142
1170
|
fromEmail: z.string().optional(),
|
|
1143
1171
|
fromName: z.string().optional(),
|
|
1144
1172
|
subject: z.string().optional(),
|
|
1145
|
-
listId: z.string().optional(),
|
|
1173
|
+
listId: z.string().max(256).optional(),
|
|
1146
1174
|
internalDate: z.number(),
|
|
1147
1175
|
sentDate: z.number(),
|
|
1148
1176
|
isRead: z.boolean(),
|
|
@@ -1150,7 +1178,7 @@ export const ThreadMessageSchema = z.object({
|
|
|
1150
1178
|
star: StarColorSchema,
|
|
1151
1179
|
hasStars: z.boolean(),
|
|
1152
1180
|
isDeleted: z.boolean(),
|
|
1153
|
-
snippet: z.string().optional(),
|
|
1181
|
+
snippet: z.string().max(256).optional(),
|
|
1154
1182
|
category: MessageCategorySchema,
|
|
1155
1183
|
createdAt: z.number(),
|
|
1156
1184
|
updatedAt: z.number()
|
|
@@ -1171,14 +1199,14 @@ export const MessageAuthenticitySchema = z.object({
|
|
|
1171
1199
|
export const AutoMovedInfoSchema = z.object({
|
|
1172
1200
|
action: PlacementActionSchema.optional(),
|
|
1173
1201
|
fromPlacement: z.string().optional(),
|
|
1174
|
-
fromMailboxId: z.string().optional(),
|
|
1175
|
-
destinationMailboxId: z.string().optional(),
|
|
1176
|
-
filterId: z.string().optional()
|
|
1202
|
+
fromMailboxId: z.string().min(25).max(25).optional(),
|
|
1203
|
+
destinationMailboxId: z.string().min(25).max(25).optional(),
|
|
1204
|
+
filterId: z.string().min(25).max(25).optional()
|
|
1177
1205
|
});
|
|
1178
1206
|
|
|
1179
1207
|
export const LabelSummaryResponseSchema = z.object({
|
|
1180
|
-
labelId: z.string(),
|
|
1181
|
-
name: z.string(),
|
|
1208
|
+
labelId: z.string().min(25).max(25),
|
|
1209
|
+
name: z.string().max(140),
|
|
1182
1210
|
color: LabelColorSchema
|
|
1183
1211
|
});
|
|
1184
1212
|
|
|
@@ -1187,11 +1215,11 @@ export const MessageSpamReportSchema = z.object({
|
|
|
1187
1215
|
});
|
|
1188
1216
|
|
|
1189
1217
|
export const ThreadMessageResponseSchema = z.object({
|
|
1190
|
-
threadMessageId: z.string(),
|
|
1191
|
-
threadId: z.string(),
|
|
1192
|
-
messageId: z.string(),
|
|
1193
|
-
accountConfigId: z.string(),
|
|
1194
|
-
mailboxId: z.string(),
|
|
1218
|
+
threadMessageId: z.string().min(25).max(25),
|
|
1219
|
+
threadId: z.string().min(25).max(25),
|
|
1220
|
+
messageId: z.string().min(25).max(25),
|
|
1221
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1222
|
+
mailboxId: z.string().min(25).max(25),
|
|
1195
1223
|
fromEmail: z.string().optional(),
|
|
1196
1224
|
fromName: z.string().optional(),
|
|
1197
1225
|
subject: z.string().optional(),
|
|
@@ -1201,7 +1229,7 @@ export const ThreadMessageResponseSchema = z.object({
|
|
|
1201
1229
|
star: StarColorSchema,
|
|
1202
1230
|
hasStars: z.boolean(),
|
|
1203
1231
|
isDeleted: z.boolean(),
|
|
1204
|
-
snippet: z.string().optional(),
|
|
1232
|
+
snippet: z.string().max(256).optional(),
|
|
1205
1233
|
createdAt: z.number(),
|
|
1206
1234
|
updatedAt: z.number(),
|
|
1207
1235
|
category: MessageCategorySchema,
|
|
@@ -1211,33 +1239,26 @@ export const ThreadMessageResponseSchema = z.object({
|
|
|
1211
1239
|
status: MessageStatusSchema,
|
|
1212
1240
|
syncStatus: MessageSyncStatusSchema,
|
|
1213
1241
|
abandonedMutation: MessageMutationSchema,
|
|
1214
|
-
accountId: z.string().optional(),
|
|
1242
|
+
accountId: z.string().min(25).max(25).optional(),
|
|
1215
1243
|
autoMoved: AutoMovedInfoSchema.optional(),
|
|
1216
1244
|
labels: z.array(LabelSummaryResponseSchema).optional(),
|
|
1217
1245
|
spamReport: MessageSpamReportSchema.optional()
|
|
1218
1246
|
});
|
|
1219
1247
|
|
|
1248
|
+
export const ThreadMessageListResponseSchema = z.object({
|
|
1249
|
+
continuationToken: z.string().max(800).optional(),
|
|
1250
|
+
items: z.array(ThreadMessageResponseSchema)
|
|
1251
|
+
});
|
|
1252
|
+
|
|
1220
1253
|
export const ThreadSearchResponseSchema = z.object({
|
|
1221
1254
|
items: z.array(ThreadMessageResponseSchema).optional(),
|
|
1222
|
-
continuationToken: z.string().optional(),
|
|
1255
|
+
continuationToken: z.string().max(800).optional(),
|
|
1223
1256
|
count: z.number().optional()
|
|
1224
1257
|
});
|
|
1225
1258
|
|
|
1226
|
-
export const SemanticSearchResultSchema = z.object({
|
|
1227
|
-
messageId: z.string(),
|
|
1228
|
-
threadId: z.string(),
|
|
1229
|
-
score: z.number(),
|
|
1230
|
-
matchedChunkType: SemanticSearchChunkTypeSchema,
|
|
1231
|
-
mailboxIds: z.array(z.string()),
|
|
1232
|
-
fromName: z.string().optional(),
|
|
1233
|
-
subject: z.string().optional(),
|
|
1234
|
-
sentDate: z.number().optional(),
|
|
1235
|
-
category: MessageCategorySchema.optional()
|
|
1236
|
-
});
|
|
1237
|
-
|
|
1238
1259
|
export const CreateOutboxMessageInputSchema = z.object({
|
|
1239
|
-
accountId: z.string(),
|
|
1240
|
-
toAddresses: z.array(z.string()),
|
|
1260
|
+
accountId: z.string().min(25).max(25),
|
|
1261
|
+
toAddresses: z.array(z.string()).min(1),
|
|
1241
1262
|
ccAddresses: z.array(z.string()).optional(),
|
|
1242
1263
|
bccAddresses: z.array(z.string()).optional(),
|
|
1243
1264
|
subject: z.string().optional(),
|
|
@@ -1249,9 +1270,9 @@ export const CreateOutboxMessageInputSchema = z.object({
|
|
|
1249
1270
|
});
|
|
1250
1271
|
|
|
1251
1272
|
export const OutboxMessageSchema = z.object({
|
|
1252
|
-
outboxMessageId: z.string(),
|
|
1253
|
-
accountId: z.string(),
|
|
1254
|
-
accountConfigId: z.string(),
|
|
1273
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
1274
|
+
accountId: z.string().min(25).max(25),
|
|
1275
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1255
1276
|
fromAddress: z.string(),
|
|
1256
1277
|
fromName: z.string().optional(),
|
|
1257
1278
|
toAddresses: z.array(z.string()),
|
|
@@ -1275,19 +1296,19 @@ export const OutboxMessageSchema = z.object({
|
|
|
1275
1296
|
});
|
|
1276
1297
|
|
|
1277
1298
|
export const OutboxAttachmentResponseSchema = z.object({
|
|
1278
|
-
outboxAttachmentId: z.string(),
|
|
1279
|
-
outboxMessageId: z.string(),
|
|
1280
|
-
filename: z.string(),
|
|
1281
|
-
contentType: z.string(),
|
|
1282
|
-
sizeBytes: z.number(),
|
|
1299
|
+
outboxAttachmentId: z.string().min(25).max(25),
|
|
1300
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
1301
|
+
filename: z.string().max(256),
|
|
1302
|
+
contentType: z.string().max(256),
|
|
1303
|
+
sizeBytes: z.number().min(0),
|
|
1283
1304
|
state: OutboxAttachmentStateSchema,
|
|
1284
|
-
contentId: z.string(),
|
|
1305
|
+
contentId: z.string().max(256),
|
|
1285
1306
|
contentUrl: z.string().url()
|
|
1286
1307
|
});
|
|
1287
1308
|
|
|
1288
1309
|
export const OutboxMessageResponseSchema = z.object({
|
|
1289
|
-
outboxMessageId: z.string(),
|
|
1290
|
-
accountId: z.string(),
|
|
1310
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
1311
|
+
accountId: z.string().min(25).max(25),
|
|
1291
1312
|
fromAddress: z.string(),
|
|
1292
1313
|
fromName: z.string().optional(),
|
|
1293
1314
|
toAddresses: z.array(z.string()),
|
|
@@ -1307,22 +1328,27 @@ export const OutboxMessageResponseSchema = z.object({
|
|
|
1307
1328
|
});
|
|
1308
1329
|
|
|
1309
1330
|
export const OutboxAttachmentSchema = z.object({
|
|
1310
|
-
outboxAttachmentId: z.string(),
|
|
1311
|
-
outboxMessageId: z.string(),
|
|
1312
|
-
accountId: z.string(),
|
|
1313
|
-
accountConfigId: z.string(),
|
|
1314
|
-
filename: z.string(),
|
|
1315
|
-
contentType: z.string(),
|
|
1316
|
-
sizeBytes: z.number(),
|
|
1331
|
+
outboxAttachmentId: z.string().min(25).max(25),
|
|
1332
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
1333
|
+
accountId: z.string().min(25).max(25),
|
|
1334
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1335
|
+
filename: z.string().max(256),
|
|
1336
|
+
contentType: z.string().max(256),
|
|
1337
|
+
sizeBytes: z.number().min(0),
|
|
1317
1338
|
state: OutboxAttachmentStateSchema,
|
|
1318
|
-
storageKey: z.string(),
|
|
1319
|
-
reservationExpiresAt: z.number(),
|
|
1339
|
+
storageKey: z.string().max(2048),
|
|
1340
|
+
reservationExpiresAt: z.number().min(0),
|
|
1320
1341
|
createdAt: z.number(),
|
|
1321
1342
|
updatedAt: z.number()
|
|
1322
1343
|
});
|
|
1323
1344
|
|
|
1345
|
+
export const OutboxMessageListResponseSchema = z.object({
|
|
1346
|
+
continuationToken: z.string().max(800).optional(),
|
|
1347
|
+
items: z.array(OutboxMessageResponseSchema)
|
|
1348
|
+
});
|
|
1349
|
+
|
|
1324
1350
|
export const UpdateOutboxMessageInputSchema = z.object({
|
|
1325
|
-
attachmentIds: z.array(z.string()).optional(),
|
|
1351
|
+
attachmentIds: z.array(z.string().min(25).max(25)).optional(),
|
|
1326
1352
|
toAddresses: z.array(z.string()).optional(),
|
|
1327
1353
|
ccAddresses: z.array(z.string()).optional(),
|
|
1328
1354
|
bccAddresses: z.array(z.string()).optional(),
|
|
@@ -1334,37 +1360,37 @@ export const UpdateOutboxMessageInputSchema = z.object({
|
|
|
1334
1360
|
});
|
|
1335
1361
|
|
|
1336
1362
|
export const MintOutboxAttachmentInputSchema = z.object({
|
|
1337
|
-
filename: z.string(),
|
|
1338
|
-
contentType: z.string(),
|
|
1339
|
-
sizeBytes: z.number()
|
|
1363
|
+
filename: z.string().max(256),
|
|
1364
|
+
contentType: z.string().max(256),
|
|
1365
|
+
sizeBytes: z.number().min(1)
|
|
1340
1366
|
});
|
|
1341
1367
|
|
|
1342
1368
|
export const MintOutboxAttachmentResponseSchema = z.object({
|
|
1343
|
-
outboxAttachmentId: z.string(),
|
|
1344
|
-
outboxMessageId: z.string(),
|
|
1345
|
-
filename: z.string(),
|
|
1346
|
-
contentType: z.string(),
|
|
1347
|
-
sizeBytes: z.number(),
|
|
1348
|
-
contentId: z.string(),
|
|
1349
|
-
uploadUrl: z.string(),
|
|
1369
|
+
outboxAttachmentId: z.string().min(25).max(25),
|
|
1370
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
1371
|
+
filename: z.string().max(256),
|
|
1372
|
+
contentType: z.string().max(256),
|
|
1373
|
+
sizeBytes: z.number().min(1),
|
|
1374
|
+
contentId: z.string().max(256),
|
|
1375
|
+
uploadUrl: z.string().max(2048),
|
|
1350
1376
|
uploadExpiresAt: z.number()
|
|
1351
1377
|
});
|
|
1352
1378
|
|
|
1353
1379
|
export const OutboxAttachmentRejectionSchema = z.object({
|
|
1354
1380
|
code: z.string(),
|
|
1355
1381
|
reason: OutboxAttachmentRejectionReasonSchema,
|
|
1356
|
-
message: z.string(),
|
|
1357
|
-
limitBytes: z.number(),
|
|
1358
|
-
usedBytes: z.number()
|
|
1382
|
+
message: z.string().max(512),
|
|
1383
|
+
limitBytes: z.number().min(0),
|
|
1384
|
+
usedBytes: z.number().min(0)
|
|
1359
1385
|
});
|
|
1360
1386
|
|
|
1361
1387
|
export const OutboxAttachmentRejectedSchema = z.object({
|
|
1362
1388
|
statusCode: z.union([z.literal(400), z.literal(413)]),
|
|
1363
1389
|
code: z.string(),
|
|
1364
1390
|
reason: OutboxAttachmentRejectionReasonSchema,
|
|
1365
|
-
message: z.string(),
|
|
1366
|
-
limitBytes: z.number(),
|
|
1367
|
-
usedBytes: z.number()
|
|
1391
|
+
message: z.string().max(512),
|
|
1392
|
+
limitBytes: z.number().min(0),
|
|
1393
|
+
usedBytes: z.number().min(0)
|
|
1368
1394
|
});
|
|
1369
1395
|
|
|
1370
1396
|
export const TrustedFlagSchema = z.object({
|
|
@@ -1453,11 +1479,11 @@ export const AddressFlagsSchema = z.object({
|
|
|
1453
1479
|
});
|
|
1454
1480
|
|
|
1455
1481
|
export const AddressSchema = z.object({
|
|
1456
|
-
addressId: z.string(),
|
|
1457
|
-
accountConfigId: z.string(),
|
|
1482
|
+
addressId: z.string().min(25).max(25),
|
|
1483
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1458
1484
|
displayName: z.string().optional(),
|
|
1459
|
-
localPart: z.string(),
|
|
1460
|
-
domain: z.string(),
|
|
1485
|
+
localPart: z.string().min(1),
|
|
1486
|
+
domain: z.string().min(1),
|
|
1461
1487
|
normalizedEmail: z.string(),
|
|
1462
1488
|
normalizedCompound: z.string(),
|
|
1463
1489
|
flags: AddressFlagsSchema,
|
|
@@ -1472,11 +1498,11 @@ export const AddressSchema = z.object({
|
|
|
1472
1498
|
});
|
|
1473
1499
|
|
|
1474
1500
|
export const AddressResponseSchema = z.object({
|
|
1475
|
-
addressId: z.string(),
|
|
1476
|
-
accountConfigId: z.string(),
|
|
1501
|
+
addressId: z.string().min(25).max(25),
|
|
1502
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1477
1503
|
displayName: z.string().optional(),
|
|
1478
|
-
localPart: z.string(),
|
|
1479
|
-
domain: z.string(),
|
|
1504
|
+
localPart: z.string().min(1),
|
|
1505
|
+
domain: z.string().min(1),
|
|
1480
1506
|
normalizedEmail: z.string(),
|
|
1481
1507
|
flags: AddressFlagsSchema,
|
|
1482
1508
|
inboundCount: z.number(),
|
|
@@ -1489,16 +1515,16 @@ export const AddressResponseSchema = z.object({
|
|
|
1489
1515
|
});
|
|
1490
1516
|
|
|
1491
1517
|
export const UpdateAddressFlagsInputSchema = z.object({
|
|
1492
|
-
trusted: z.union([TrustedFlagSchema, z.
|
|
1493
|
-
blocked: z.union([BlockedFlagSchema, z.
|
|
1494
|
-
neverSpam: z.union([NeverSpamFlagSchema, z.
|
|
1495
|
-
muted: z.union([MutedFlagSchema, z.
|
|
1496
|
-
vip: z.union([VipFlagSchema, z.
|
|
1497
|
-
wellknown: z.union([WellknownFlagSchema, z.
|
|
1498
|
-
junkOnly: z.union([JunkOnlyFlagSchema, z.
|
|
1499
|
-
category: z.union([CategoryFlagSchema, z.
|
|
1500
|
-
autoArchive: z.union([AutoArchiveFlagSchema, z.
|
|
1501
|
-
unsubscribed: z.union([UnsubscribedFlagSchema, z.
|
|
1518
|
+
trusted: z.union([TrustedFlagSchema, z.null()]).optional(),
|
|
1519
|
+
blocked: z.union([BlockedFlagSchema, z.null()]).optional(),
|
|
1520
|
+
neverSpam: z.union([NeverSpamFlagSchema, z.null()]).optional(),
|
|
1521
|
+
muted: z.union([MutedFlagSchema, z.null()]).optional(),
|
|
1522
|
+
vip: z.union([VipFlagSchema, z.null()]).optional(),
|
|
1523
|
+
wellknown: z.union([WellknownFlagSchema, z.null()]).optional(),
|
|
1524
|
+
junkOnly: z.union([JunkOnlyFlagSchema, z.null()]).optional(),
|
|
1525
|
+
category: z.union([CategoryFlagSchema, z.null()]).optional(),
|
|
1526
|
+
autoArchive: z.union([AutoArchiveFlagSchema, z.null()]).optional(),
|
|
1527
|
+
unsubscribed: z.union([UnsubscribedFlagSchema, z.null()]).optional()
|
|
1502
1528
|
});
|
|
1503
1529
|
|
|
1504
1530
|
export const UpdateAddressInputSchema = z.object({
|
|
@@ -1507,23 +1533,23 @@ export const UpdateAddressInputSchema = z.object({
|
|
|
1507
1533
|
});
|
|
1508
1534
|
|
|
1509
1535
|
export const MessageSummaryResponseSchema = z.object({
|
|
1510
|
-
messageId: z.string(),
|
|
1511
|
-
mailboxId: z.string(),
|
|
1512
|
-
uid: z.number(),
|
|
1513
|
-
rfc822Size: z.number(),
|
|
1536
|
+
messageId: z.string().min(25).max(25),
|
|
1537
|
+
mailboxId: z.string().min(25).max(25),
|
|
1538
|
+
uid: z.number().min(1),
|
|
1539
|
+
rfc822Size: z.number().min(0),
|
|
1514
1540
|
internalDate: z.number(),
|
|
1515
|
-
messageIdHeader: z.string().optional(),
|
|
1516
1541
|
status: MessageStatusSchema,
|
|
1517
1542
|
syncStatus: MessageSyncStatusSchema,
|
|
1518
1543
|
abandonedMutation: MessageMutationSchema,
|
|
1519
1544
|
authenticity: MessageAuthenticitySchema.optional(),
|
|
1545
|
+
messageIdHeader: z.string().optional(),
|
|
1520
1546
|
autoMoved: AutoMovedInfoSchema.optional(),
|
|
1521
1547
|
labels: z.array(LabelSummaryResponseSchema).optional(),
|
|
1522
1548
|
spamReport: MessageSpamReportSchema.optional()
|
|
1523
1549
|
});
|
|
1524
1550
|
|
|
1525
1551
|
export const EnvelopeAddressResponseSchema = z.object({
|
|
1526
|
-
addressId: z.string(),
|
|
1552
|
+
addressId: z.string().min(25).max(25),
|
|
1527
1553
|
displayName: z.string().optional(),
|
|
1528
1554
|
normalizedEmail: z.string(),
|
|
1529
1555
|
addressRole: AddressRoleSchema,
|
|
@@ -1532,7 +1558,7 @@ export const EnvelopeAddressResponseSchema = z.object({
|
|
|
1532
1558
|
});
|
|
1533
1559
|
|
|
1534
1560
|
export const EnvelopeResponseSchema = z.object({
|
|
1535
|
-
messageId: z.string(),
|
|
1561
|
+
messageId: z.string().min(25).max(25),
|
|
1536
1562
|
date: z.number(),
|
|
1537
1563
|
subject: z.string().optional(),
|
|
1538
1564
|
messageIdValue: z.string().optional(),
|
|
@@ -1546,11 +1572,12 @@ export const EnvelopeResponseSchema = z.object({
|
|
|
1546
1572
|
});
|
|
1547
1573
|
|
|
1548
1574
|
export const BodyPartResponseSchema = z.object({
|
|
1549
|
-
bodyPartId: z.string(),
|
|
1575
|
+
bodyPartId: z.string().min(25).max(25),
|
|
1576
|
+
partPath: z.string().min(1),
|
|
1550
1577
|
mediaType: MediaTypeSchema,
|
|
1551
|
-
mediaSubtype: z.string(),
|
|
1578
|
+
mediaSubtype: z.string().min(1),
|
|
1552
1579
|
contentId: z.string().optional(),
|
|
1553
|
-
sizeOctets: z.number(),
|
|
1580
|
+
sizeOctets: z.number().min(0),
|
|
1554
1581
|
disposition: ContentDispositionSchema.optional(),
|
|
1555
1582
|
dispositionFilename: z.string().optional(),
|
|
1556
1583
|
isMultipart: z.boolean(),
|
|
@@ -1560,7 +1587,7 @@ export const BodyPartResponseSchema = z.object({
|
|
|
1560
1587
|
export const MessageReferenceResponseSchema = z.object({
|
|
1561
1588
|
messageIdValue: z.string(),
|
|
1562
1589
|
referenceType: ReferenceTypeSchema,
|
|
1563
|
-
referenceOrder: z.number()
|
|
1590
|
+
referenceOrder: z.number().min(0)
|
|
1564
1591
|
});
|
|
1565
1592
|
|
|
1566
1593
|
export const DescribeMessageResponseSchema = z.object({
|
|
@@ -1593,27 +1620,26 @@ export const MessagePlacementVerdictSchema = z.object({
|
|
|
1593
1620
|
});
|
|
1594
1621
|
|
|
1595
1622
|
export const MessageFilterMoveSchema = z.object({
|
|
1596
|
-
filterId: z.string(),
|
|
1597
|
-
sourceMailboxId: z.string(),
|
|
1598
|
-
destinationMailboxId: z.string(),
|
|
1623
|
+
filterId: z.string().min(25).max(25),
|
|
1624
|
+
sourceMailboxId: z.string().min(25).max(25),
|
|
1625
|
+
destinationMailboxId: z.string().min(25).max(25),
|
|
1599
1626
|
decidedAt: z.number()
|
|
1600
1627
|
});
|
|
1601
1628
|
|
|
1602
|
-
export const
|
|
1603
|
-
messageId: z.string(),
|
|
1604
|
-
mailboxId: z.string(),
|
|
1605
|
-
uid: z.number(),
|
|
1606
|
-
sequenceNumber: z.number(),
|
|
1607
|
-
rfc822Size: z.number(),
|
|
1629
|
+
export const MessageRecordSchema = z.object({
|
|
1630
|
+
messageId: z.string().min(25).max(25),
|
|
1631
|
+
mailboxId: z.string().min(25).max(25),
|
|
1632
|
+
uid: z.number().min(1),
|
|
1633
|
+
sequenceNumber: z.number().min(1),
|
|
1634
|
+
rfc822Size: z.number().min(0),
|
|
1608
1635
|
internalDate: z.number(),
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
rootBodyPartId: z.string(),
|
|
1636
|
+
envelopeId: z.string().min(25).max(25),
|
|
1637
|
+
rootBodyPartId: z.string().min(25).max(25),
|
|
1612
1638
|
bodyStorageKey: z.string().optional(),
|
|
1613
1639
|
status: MessageStatusSchema,
|
|
1614
1640
|
syncStatus: MessageSyncStatusSchema,
|
|
1615
1641
|
abandonedMutation: MessageMutationSchema,
|
|
1616
|
-
originalMailboxId: z.string().optional(),
|
|
1642
|
+
originalMailboxId: z.string().min(25).max(25).optional(),
|
|
1617
1643
|
originalUid: z.number().optional(),
|
|
1618
1644
|
category: MessageCategorySchema,
|
|
1619
1645
|
classificationState: MessageClassificationStateSchema,
|
|
@@ -1631,17 +1657,49 @@ export const MessageSchema = z.object({
|
|
|
1631
1657
|
updatedAt: z.number()
|
|
1632
1658
|
});
|
|
1633
1659
|
|
|
1660
|
+
export const MessageSchema = z.object({
|
|
1661
|
+
messageId: z.string().min(25).max(25),
|
|
1662
|
+
mailboxId: z.string().min(25).max(25),
|
|
1663
|
+
uid: z.number().min(1),
|
|
1664
|
+
sequenceNumber: z.number().min(1),
|
|
1665
|
+
rfc822Size: z.number().min(0),
|
|
1666
|
+
internalDate: z.number(),
|
|
1667
|
+
envelopeId: z.string().min(25).max(25),
|
|
1668
|
+
rootBodyPartId: z.string().min(25).max(25),
|
|
1669
|
+
bodyStorageKey: z.string().optional(),
|
|
1670
|
+
status: MessageStatusSchema,
|
|
1671
|
+
syncStatus: MessageSyncStatusSchema,
|
|
1672
|
+
abandonedMutation: MessageMutationSchema,
|
|
1673
|
+
originalMailboxId: z.string().min(25).max(25).optional(),
|
|
1674
|
+
originalUid: z.number().optional(),
|
|
1675
|
+
category: MessageCategorySchema,
|
|
1676
|
+
classificationState: MessageClassificationStateSchema,
|
|
1677
|
+
authenticity: MessageAuthenticitySchema.optional(),
|
|
1678
|
+
authenticityVerdict: AuthenticityVerdictSchema,
|
|
1679
|
+
authResult: MessageAuthResultSchema.optional(),
|
|
1680
|
+
providerSpam: MessageProviderSpamSchema.optional(),
|
|
1681
|
+
hasListUnsubscribe: z.boolean(),
|
|
1682
|
+
movedByRemit: z.boolean(),
|
|
1683
|
+
placementVerdict: MessagePlacementVerdictSchema.optional(),
|
|
1684
|
+
filterMove: MessageFilterMoveSchema.optional(),
|
|
1685
|
+
placementDecidedAt: z.number().optional(),
|
|
1686
|
+
spamReport: MessageSpamReportSchema.optional(),
|
|
1687
|
+
createdAt: z.number(),
|
|
1688
|
+
updatedAt: z.number(),
|
|
1689
|
+
messageIdHeader: z.string().optional()
|
|
1690
|
+
});
|
|
1691
|
+
|
|
1634
1692
|
export const BodyPartSchema = z.object({
|
|
1635
|
-
bodyPartId: z.string(),
|
|
1636
|
-
messageId: z.string(),
|
|
1637
|
-
parentBodyPartId: z.string().optional(),
|
|
1638
|
-
partPath: z.string(),
|
|
1693
|
+
bodyPartId: z.string().min(25).max(25),
|
|
1694
|
+
messageId: z.string().min(25).max(25),
|
|
1695
|
+
parentBodyPartId: z.string().min(25).max(25).optional(),
|
|
1696
|
+
partPath: z.string().min(1),
|
|
1639
1697
|
mediaType: MediaTypeSchema,
|
|
1640
|
-
mediaSubtype: z.string(),
|
|
1698
|
+
mediaSubtype: z.string().min(1),
|
|
1641
1699
|
contentId: z.string().optional(),
|
|
1642
1700
|
contentDescription: z.string().optional(),
|
|
1643
1701
|
transferEncoding: TransferEncodingSchema,
|
|
1644
|
-
sizeOctets: z.number(),
|
|
1702
|
+
sizeOctets: z.number().min(0),
|
|
1645
1703
|
lineCount: z.number().optional(),
|
|
1646
1704
|
md5Hash: z.string().optional(),
|
|
1647
1705
|
disposition: ContentDispositionSchema.optional(),
|
|
@@ -1655,12 +1713,12 @@ export const BodyPartSchema = z.object({
|
|
|
1655
1713
|
});
|
|
1656
1714
|
|
|
1657
1715
|
export const MessageReferenceSchema = z.object({
|
|
1658
|
-
messageReferenceId: z.string(),
|
|
1659
|
-
messageId: z.string(),
|
|
1660
|
-
envelopeId: z.string(),
|
|
1716
|
+
messageReferenceId: z.string().min(25).max(25),
|
|
1717
|
+
messageId: z.string().min(25).max(25),
|
|
1718
|
+
envelopeId: z.string().min(25).max(25),
|
|
1661
1719
|
messageIdValue: z.string(),
|
|
1662
1720
|
referenceType: ReferenceTypeSchema,
|
|
1663
|
-
referenceOrder: z.number(),
|
|
1721
|
+
referenceOrder: z.number().min(0),
|
|
1664
1722
|
createdAt: z.number(),
|
|
1665
1723
|
updatedAt: z.number()
|
|
1666
1724
|
});
|
|
@@ -1676,7 +1734,7 @@ export const UpdateFlagsInputSchema = z.object({
|
|
|
1676
1734
|
});
|
|
1677
1735
|
|
|
1678
1736
|
export const BulkUpdateFlagsInputSchema = z.object({
|
|
1679
|
-
messageIds: z.array(z.string()),
|
|
1737
|
+
messageIds: z.array(z.string().min(25).max(25)).min(1).max(100),
|
|
1680
1738
|
isRead: z.boolean().optional(),
|
|
1681
1739
|
isStarred: z.boolean().optional(),
|
|
1682
1740
|
starColor: StarColorSchema.optional()
|
|
@@ -1688,32 +1746,32 @@ export const MessageBulkOperationResultSchema = z.object({
|
|
|
1688
1746
|
});
|
|
1689
1747
|
|
|
1690
1748
|
export const DeleteMessagesInputSchema = z.object({
|
|
1691
|
-
messageIds: z.array(z.string()),
|
|
1749
|
+
messageIds: z.array(z.string().min(25).max(25)).min(1).max(100),
|
|
1692
1750
|
permanent: z.boolean().optional()
|
|
1693
1751
|
});
|
|
1694
1752
|
|
|
1695
1753
|
export const BulkMessageInputSchema = z.object({
|
|
1696
|
-
messageIds: z.array(z.string())
|
|
1754
|
+
messageIds: z.array(z.string().min(25).max(25)).min(1).max(100)
|
|
1697
1755
|
});
|
|
1698
1756
|
|
|
1699
1757
|
export const MoveMessagesInputSchema = z.object({
|
|
1700
|
-
messageIds: z.array(z.string()),
|
|
1701
|
-
destinationMailboxId: z.string()
|
|
1758
|
+
messageIds: z.array(z.string().min(25).max(25)).min(1).max(100),
|
|
1759
|
+
destinationMailboxId: z.string().min(25).max(25)
|
|
1702
1760
|
});
|
|
1703
1761
|
|
|
1704
1762
|
export const CopyMessagesInputSchema = z.object({
|
|
1705
|
-
messageIds: z.array(z.string()),
|
|
1706
|
-
destinationMailboxId: z.string()
|
|
1763
|
+
messageIds: z.array(z.string().min(25).max(25)).min(1).max(100),
|
|
1764
|
+
destinationMailboxId: z.string().min(25).max(25)
|
|
1707
1765
|
});
|
|
1708
1766
|
|
|
1709
1767
|
export const UpdateMessageLabelsInputSchema = z.object({
|
|
1710
|
-
messageIds: z.array(z.string()),
|
|
1711
|
-
labelId: z.string(),
|
|
1768
|
+
messageIds: z.array(z.string().min(25).max(25)).min(1).max(100),
|
|
1769
|
+
labelId: z.string().min(25).max(25),
|
|
1712
1770
|
action: LabelActionSchema
|
|
1713
1771
|
});
|
|
1714
1772
|
|
|
1715
1773
|
export const SpamReportFailureSchema = z.object({
|
|
1716
|
-
messageId: z.string(),
|
|
1774
|
+
messageId: z.string().min(25).max(25),
|
|
1717
1775
|
reason: z.string()
|
|
1718
1776
|
});
|
|
1719
1777
|
|
|
@@ -1724,22 +1782,22 @@ export const SpamReportBulkResultSchema = z.object({
|
|
|
1724
1782
|
});
|
|
1725
1783
|
|
|
1726
1784
|
export const CalendarSuggestionSchema = z.object({
|
|
1727
|
-
suggestionId: z.string(),
|
|
1728
|
-
accountConfigId: z.string(),
|
|
1729
|
-
messageId: z.string(),
|
|
1730
|
-
bodyPartId: z.string(),
|
|
1731
|
-
icalUid: z.string(),
|
|
1785
|
+
suggestionId: z.string().min(25).max(25),
|
|
1786
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1787
|
+
messageId: z.string().min(25).max(25),
|
|
1788
|
+
bodyPartId: z.string().min(25).max(25),
|
|
1789
|
+
icalUid: z.string().max(512),
|
|
1732
1790
|
sequence: z.number(),
|
|
1733
1791
|
method: CalendarInviteMethodSchema,
|
|
1734
1792
|
source: CalendarSuggestionSourceSchema,
|
|
1735
1793
|
state: CalendarSuggestionStateSchema,
|
|
1736
|
-
summary: z.string(),
|
|
1737
|
-
dtStart: z.string(),
|
|
1738
|
-
dtEnd: z.string(),
|
|
1739
|
-
endsAtUtc: z.string(),
|
|
1794
|
+
summary: z.string().max(512),
|
|
1795
|
+
dtStart: z.string().max(64),
|
|
1796
|
+
dtEnd: z.string().max(64),
|
|
1797
|
+
endsAtUtc: z.string().max(64),
|
|
1740
1798
|
allDay: z.boolean(),
|
|
1741
|
-
location: z.string(),
|
|
1742
|
-
organizer: z.string(),
|
|
1799
|
+
location: z.string().max(512),
|
|
1800
|
+
organizer: z.string().max(256),
|
|
1743
1801
|
zoneCertainty: ZoneCertaintySchema,
|
|
1744
1802
|
icalData: z.string(),
|
|
1745
1803
|
acceptedCalendarObjectId: z.string(),
|
|
@@ -1749,22 +1807,22 @@ export const CalendarSuggestionSchema = z.object({
|
|
|
1749
1807
|
});
|
|
1750
1808
|
|
|
1751
1809
|
export const CalendarSuggestionResponseSchema = z.object({
|
|
1752
|
-
suggestionId: z.string(),
|
|
1753
|
-
accountConfigId: z.string(),
|
|
1754
|
-
messageId: z.string(),
|
|
1755
|
-
bodyPartId: z.string(),
|
|
1756
|
-
icalUid: z.string(),
|
|
1810
|
+
suggestionId: z.string().min(25).max(25),
|
|
1811
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1812
|
+
messageId: z.string().min(25).max(25),
|
|
1813
|
+
bodyPartId: z.string().min(25).max(25),
|
|
1814
|
+
icalUid: z.string().max(512),
|
|
1757
1815
|
sequence: z.number(),
|
|
1758
1816
|
method: CalendarInviteMethodSchema,
|
|
1759
1817
|
source: CalendarSuggestionSourceSchema,
|
|
1760
1818
|
state: CalendarSuggestionStateSchema,
|
|
1761
|
-
summary: z.string(),
|
|
1762
|
-
dtStart: z.string(),
|
|
1763
|
-
dtEnd: z.string(),
|
|
1764
|
-
endsAtUtc: z.string(),
|
|
1819
|
+
summary: z.string().max(512),
|
|
1820
|
+
dtStart: z.string().max(64),
|
|
1821
|
+
dtEnd: z.string().max(64),
|
|
1822
|
+
endsAtUtc: z.string().max(64),
|
|
1765
1823
|
allDay: z.boolean(),
|
|
1766
|
-
location: z.string(),
|
|
1767
|
-
organizer: z.string(),
|
|
1824
|
+
location: z.string().max(512),
|
|
1825
|
+
organizer: z.string().max(256),
|
|
1768
1826
|
zoneCertainty: ZoneCertaintySchema,
|
|
1769
1827
|
acceptedCalendarObjectId: z.string(),
|
|
1770
1828
|
supersededByMessageId: z.string(),
|
|
@@ -1775,7 +1833,7 @@ export const CalendarSuggestionResponseSchema = z.object({
|
|
|
1775
1833
|
});
|
|
1776
1834
|
|
|
1777
1835
|
export const AcceptCalendarSuggestionInputSchema = z.object({
|
|
1778
|
-
calendarId: z.string(),
|
|
1836
|
+
calendarId: z.string().min(25).max(25),
|
|
1779
1837
|
answer: CalendarInviteAnswerSchema.optional(),
|
|
1780
1838
|
event: UpdateCalendarEventInputSchema.optional()
|
|
1781
1839
|
});
|
|
@@ -1785,28 +1843,28 @@ export const DismissCalendarSuggestionInputSchema = z.object({
|
|
|
1785
1843
|
});
|
|
1786
1844
|
|
|
1787
1845
|
export const EnvelopeAddressSchema = z.object({
|
|
1788
|
-
envelopeAddressId: z.string(),
|
|
1789
|
-
messageId: z.string(),
|
|
1790
|
-
addressId: z.string(),
|
|
1846
|
+
envelopeAddressId: z.string().min(25).max(25),
|
|
1847
|
+
messageId: z.string().min(25).max(25),
|
|
1848
|
+
addressId: z.string().min(25).max(25),
|
|
1791
1849
|
displayName: z.string().optional(),
|
|
1792
1850
|
normalizedEmail: z.string(),
|
|
1793
1851
|
addressRole: AddressRoleSchema,
|
|
1794
|
-
addressOrder: z.number(),
|
|
1852
|
+
addressOrder: z.number().min(0),
|
|
1795
1853
|
createdAt: z.number(),
|
|
1796
1854
|
updatedAt: z.number()
|
|
1797
1855
|
});
|
|
1798
1856
|
|
|
1799
1857
|
export const ConfigImportUnresolvedRefSchema = z.object({
|
|
1800
1858
|
kind: ConfigImportRefKindSchema,
|
|
1801
|
-
accountId: z.string(),
|
|
1802
|
-
folderPath: z.string(),
|
|
1803
|
-
target: z.string(),
|
|
1859
|
+
accountId: z.string().min(25).max(25),
|
|
1860
|
+
folderPath: z.string().max(512),
|
|
1861
|
+
target: z.string().max(256),
|
|
1804
1862
|
mailboxId: z.string()
|
|
1805
1863
|
});
|
|
1806
1864
|
|
|
1807
1865
|
export const ConfigImportSchema = z.object({
|
|
1808
|
-
importId: z.string(),
|
|
1809
|
-
accountConfigId: z.string(),
|
|
1866
|
+
importId: z.string().min(25).max(25),
|
|
1867
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1810
1868
|
schemaVersion: z.number(),
|
|
1811
1869
|
state: ConfigImportStateSchema,
|
|
1812
1870
|
document: z.record(z.string(), z.unknown()),
|
|
@@ -1851,8 +1909,8 @@ export const MutedFlagSettingSchema = z.object({
|
|
|
1851
1909
|
});
|
|
1852
1910
|
|
|
1853
1911
|
export const AccountSettingSchema = z.object({
|
|
1854
|
-
accountSettingId: z.string(),
|
|
1855
|
-
accountConfigId: z.string(),
|
|
1912
|
+
accountSettingId: z.string().min(25).max(25),
|
|
1913
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1856
1914
|
name: z.string(),
|
|
1857
1915
|
value: z.union([BooleanSettingSchema, StringSettingSchema, NumberSettingSchema, StringListSettingSchema, MapSettingSchema, MutedFlagSettingSchema]),
|
|
1858
1916
|
createdAt: z.number(),
|
|
@@ -1860,37 +1918,37 @@ export const AccountSettingSchema = z.object({
|
|
|
1860
1918
|
});
|
|
1861
1919
|
|
|
1862
1920
|
export const MailboxAttributeEntrySchema = z.object({
|
|
1863
|
-
mailboxAttributeId: z.string(),
|
|
1864
|
-
mailboxId: z.string(),
|
|
1921
|
+
mailboxAttributeId: z.string().min(25).max(25),
|
|
1922
|
+
mailboxId: z.string().min(25).max(25),
|
|
1865
1923
|
attributeName: MailboxAttributeSchema
|
|
1866
1924
|
});
|
|
1867
1925
|
|
|
1868
1926
|
export const MailboxSpecialUseEntrySchema = z.object({
|
|
1869
|
-
mailboxSpecialUseId: z.string(),
|
|
1870
|
-
mailboxId: z.string(),
|
|
1927
|
+
mailboxSpecialUseId: z.string().min(25).max(25),
|
|
1928
|
+
mailboxId: z.string().min(25).max(25),
|
|
1871
1929
|
specialUse: MailboxSpecialUseSchema
|
|
1872
1930
|
});
|
|
1873
1931
|
|
|
1874
1932
|
export const MailboxFlagSchema = z.object({
|
|
1875
|
-
mailboxFlagId: z.string(),
|
|
1876
|
-
mailboxId: z.string(),
|
|
1933
|
+
mailboxFlagId: z.string().min(25).max(25),
|
|
1934
|
+
mailboxId: z.string().min(25).max(25),
|
|
1877
1935
|
flagName: z.union([MessageSystemFlagSchema, MessageKeywordFlagSchema, z.string()]),
|
|
1878
1936
|
isPermanent: z.boolean()
|
|
1879
1937
|
});
|
|
1880
1938
|
|
|
1881
1939
|
export const MailboxLockSchema = z.object({
|
|
1882
|
-
mailboxId: z.string(),
|
|
1940
|
+
mailboxId: z.string().min(25).max(25),
|
|
1883
1941
|
eventName: z.string(),
|
|
1884
|
-
accountId: z.string(),
|
|
1885
|
-
lockId: z.string(),
|
|
1942
|
+
accountId: z.string().min(25).max(25),
|
|
1943
|
+
lockId: z.string().min(25).max(25),
|
|
1886
1944
|
acquiredAt: z.number(),
|
|
1887
1945
|
lockedBy: z.string(),
|
|
1888
1946
|
ttl: z.number()
|
|
1889
1947
|
});
|
|
1890
1948
|
|
|
1891
1949
|
export const MessageFlagSchema = z.object({
|
|
1892
|
-
messageFlagId: z.string(),
|
|
1893
|
-
messageId: z.string(),
|
|
1950
|
+
messageFlagId: z.string().min(25).max(25),
|
|
1951
|
+
messageId: z.string().min(25).max(25),
|
|
1894
1952
|
flagName: z.union([MessageSystemFlagSchema, MessageKeywordFlagSchema, z.string()]),
|
|
1895
1953
|
setAt: z.number(),
|
|
1896
1954
|
createdAt: z.number(),
|
|
@@ -1898,22 +1956,22 @@ export const MessageFlagSchema = z.object({
|
|
|
1898
1956
|
});
|
|
1899
1957
|
|
|
1900
1958
|
export const MessagePlacementMoveSchema = z.object({
|
|
1901
|
-
messageId: z.string(),
|
|
1902
|
-
accountId: z.string(),
|
|
1903
|
-
accountConfigId: z.string(),
|
|
1904
|
-
sourceMailboxId: z.string(),
|
|
1905
|
-
destinationMailboxId: z.string(),
|
|
1959
|
+
messageId: z.string().min(25).max(25),
|
|
1960
|
+
accountId: z.string().min(25).max(25),
|
|
1961
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1962
|
+
sourceMailboxId: z.string().min(25).max(25),
|
|
1963
|
+
destinationMailboxId: z.string().min(25).max(25),
|
|
1906
1964
|
state: MessagePlacementMoveStateSchema,
|
|
1907
1965
|
createdAt: z.number(),
|
|
1908
1966
|
updatedAt: z.number()
|
|
1909
1967
|
});
|
|
1910
1968
|
|
|
1911
1969
|
export const MessageFlagPushSchema = z.object({
|
|
1912
|
-
messageId: z.string(),
|
|
1970
|
+
messageId: z.string().min(25).max(25),
|
|
1913
1971
|
flagName: z.string(),
|
|
1914
|
-
accountId: z.string(),
|
|
1915
|
-
accountConfigId: z.string(),
|
|
1916
|
-
mailboxId: z.string(),
|
|
1972
|
+
accountId: z.string().min(25).max(25),
|
|
1973
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1974
|
+
mailboxId: z.string().min(25).max(25),
|
|
1917
1975
|
operation: FlagPushOperationSchema,
|
|
1918
1976
|
state: MessageFlagPushStateSchema,
|
|
1919
1977
|
createdAt: z.number(),
|
|
@@ -1921,8 +1979,8 @@ export const MessageFlagPushSchema = z.object({
|
|
|
1921
1979
|
});
|
|
1922
1980
|
|
|
1923
1981
|
export const EnvelopeSchema = z.object({
|
|
1924
|
-
envelopeId: z.string(),
|
|
1925
|
-
messageId: z.string(),
|
|
1982
|
+
envelopeId: z.string().min(25).max(25),
|
|
1983
|
+
messageId: z.string().min(25).max(25),
|
|
1926
1984
|
dateValue: z.number(),
|
|
1927
1985
|
dateRaw: z.string(),
|
|
1928
1986
|
subject: z.string().optional(),
|
|
@@ -1932,9 +1990,9 @@ export const EnvelopeSchema = z.object({
|
|
|
1932
1990
|
});
|
|
1933
1991
|
|
|
1934
1992
|
export const SenderSignerStandingSchema = z.object({
|
|
1935
|
-
accountConfigId: z.string(),
|
|
1936
|
-
senderKey: z.string(),
|
|
1937
|
-
signerDomain: z.string(),
|
|
1993
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1994
|
+
senderKey: z.string().max(256),
|
|
1995
|
+
signerDomain: z.string().max(256),
|
|
1938
1996
|
messageCount: z.number(),
|
|
1939
1997
|
firstSeenAt: z.number(),
|
|
1940
1998
|
lastSeenAt: z.number(),
|
|
@@ -1944,23 +2002,29 @@ export const SenderSignerStandingSchema = z.object({
|
|
|
1944
2002
|
});
|
|
1945
2003
|
|
|
1946
2004
|
export const BodyPartParameterSchema = z.object({
|
|
1947
|
-
bodyPartParameterId: z.string(),
|
|
1948
|
-
messageId: z.string(),
|
|
1949
|
-
bodyPartId: z.string(),
|
|
1950
|
-
parameterName: z.string(),
|
|
2005
|
+
bodyPartParameterId: z.string().min(25).max(25),
|
|
2006
|
+
messageId: z.string().min(25).max(25),
|
|
2007
|
+
bodyPartId: z.string().min(25).max(25),
|
|
2008
|
+
parameterName: z.string().min(1),
|
|
1951
2009
|
parameterValue: z.string(),
|
|
1952
2010
|
createdAt: z.number(),
|
|
1953
2011
|
updatedAt: z.number()
|
|
1954
2012
|
});
|
|
1955
2013
|
|
|
2014
|
+
export const BodyStructureRefetchSchema = z.object({
|
|
2015
|
+
messageId: z.string().min(25).max(25),
|
|
2016
|
+
createdAt: z.number(),
|
|
2017
|
+
updatedAt: z.number()
|
|
2018
|
+
});
|
|
2019
|
+
|
|
1956
2020
|
export const RawMessageStorageSchema = z.object({
|
|
1957
|
-
rawStorageId: z.string(),
|
|
1958
|
-
messageId: z.string(),
|
|
2021
|
+
rawStorageId: z.string().min(25).max(25),
|
|
2022
|
+
messageId: z.string().min(25).max(25),
|
|
1959
2023
|
storageType: StorageTypeSchema,
|
|
1960
2024
|
storageLocation: z.string(),
|
|
1961
2025
|
storageKey: z.string(),
|
|
1962
|
-
sizeBytes: z.number(),
|
|
1963
|
-
checksumSha256: z.string(),
|
|
2026
|
+
sizeBytes: z.number().min(0),
|
|
2027
|
+
checksumSha256: z.string().min(64).max(64),
|
|
1964
2028
|
contentEncoding: ContentEncodingSchema,
|
|
1965
2029
|
storedAt: z.number(),
|
|
1966
2030
|
expiresAt: z.number().optional(),
|
|
@@ -1969,14 +2033,14 @@ export const RawMessageStorageSchema = z.object({
|
|
|
1969
2033
|
});
|
|
1970
2034
|
|
|
1971
2035
|
export const BodyPartStorageSchema = z.object({
|
|
1972
|
-
bodyPartStorageId: z.string(),
|
|
1973
|
-
messageId: z.string(),
|
|
1974
|
-
bodyPartId: z.string(),
|
|
2036
|
+
bodyPartStorageId: z.string().min(25).max(25),
|
|
2037
|
+
messageId: z.string().min(25).max(25),
|
|
2038
|
+
bodyPartId: z.string().min(25).max(25),
|
|
1975
2039
|
storageType: StorageTypeSchema,
|
|
1976
2040
|
storageLocation: z.string(),
|
|
1977
2041
|
storageKey: z.string(),
|
|
1978
|
-
decodedSizeBytes: z.number(),
|
|
1979
|
-
checksumSha256: z.string(),
|
|
2042
|
+
decodedSizeBytes: z.number().min(0),
|
|
2043
|
+
checksumSha256: z.string().min(64).max(64),
|
|
1980
2044
|
contentEncoding: ContentEncodingSchema,
|
|
1981
2045
|
isDeduped: z.boolean(),
|
|
1982
2046
|
dedupHash: z.string().optional(),
|
|
@@ -1985,24 +2049,14 @@ export const BodyPartStorageSchema = z.object({
|
|
|
1985
2049
|
updatedAt: z.number()
|
|
1986
2050
|
});
|
|
1987
2051
|
|
|
1988
|
-
export const BodyPartContentSchema = z.object({
|
|
1989
|
-
bodyPartContentId: z.string(),
|
|
1990
|
-
messageId: z.string(),
|
|
1991
|
-
bodyPartId: z.string(),
|
|
1992
|
-
content: z.string(),
|
|
1993
|
-
contentLength: z.number(),
|
|
1994
|
-
createdAt: z.number(),
|
|
1995
|
-
updatedAt: z.number()
|
|
1996
|
-
});
|
|
1997
|
-
|
|
1998
2052
|
export const CalendarEventIndexSchema = z.object({
|
|
1999
|
-
calendarId: z.string(),
|
|
2000
|
-
calendarObjectId: z.string(),
|
|
2001
|
-
recurrenceId: z.string(),
|
|
2002
|
-
startAt: z.string(),
|
|
2003
|
-
endAt: z.string(),
|
|
2053
|
+
calendarId: z.string().min(25).max(25),
|
|
2054
|
+
calendarObjectId: z.string().min(25).max(25),
|
|
2055
|
+
recurrenceId: z.string().max(64),
|
|
2056
|
+
startAt: z.string().max(64),
|
|
2057
|
+
endAt: z.string().max(64),
|
|
2004
2058
|
allDay: z.boolean(),
|
|
2005
|
-
summary: z.string(),
|
|
2059
|
+
summary: z.string().max(512),
|
|
2006
2060
|
status: CalendarEventStatusSchema,
|
|
2007
2061
|
transparency: CalendarTransparencySchema,
|
|
2008
2062
|
createdAt: z.number(),
|
|
@@ -2010,39 +2064,28 @@ export const CalendarEventIndexSchema = z.object({
|
|
|
2010
2064
|
});
|
|
2011
2065
|
|
|
2012
2066
|
export const CalendarFeedTokenSchema = z.object({
|
|
2013
|
-
feedTokenId: z.string(),
|
|
2014
|
-
accountConfigId: z.string(),
|
|
2015
|
-
calendarId: z.string(),
|
|
2016
|
-
tokenHash: z.string(),
|
|
2067
|
+
feedTokenId: z.string().min(25).max(25),
|
|
2068
|
+
accountConfigId: z.string().min(25).max(25),
|
|
2069
|
+
calendarId: z.string().min(25).max(25),
|
|
2070
|
+
tokenHash: z.string().max(64),
|
|
2017
2071
|
createdAt: z.number(),
|
|
2018
2072
|
rotatedAt: z.number(),
|
|
2019
2073
|
updatedAt: z.number()
|
|
2020
2074
|
});
|
|
2021
2075
|
|
|
2022
2076
|
export const MessageLabelSchema = z.object({
|
|
2023
|
-
messageLabelId: z.string(),
|
|
2024
|
-
messageId: z.string(),
|
|
2025
|
-
labelId: z.string(),
|
|
2026
|
-
accountConfigId: z.string(),
|
|
2027
|
-
appliedByFilterId: z.string().optional(),
|
|
2028
|
-
createdAt: z.number(),
|
|
2029
|
-
updatedAt: z.number()
|
|
2030
|
-
});
|
|
2031
|
-
|
|
2032
|
-
export const FilterAnchorSchema = z.object({
|
|
2033
|
-
accountConfigId: z.string(),
|
|
2034
|
-
filterId: z.string(),
|
|
2035
|
-
anchorEmbedding: z.array(z.number()),
|
|
2036
|
-
anchorEmbeddingId: z.string(),
|
|
2037
|
-
anchorSourceText: z.string(),
|
|
2038
|
-
anchorMessageId: z.string(),
|
|
2077
|
+
messageLabelId: z.string().min(25).max(25),
|
|
2078
|
+
messageId: z.string().min(25).max(25),
|
|
2079
|
+
labelId: z.string().min(25).max(25),
|
|
2080
|
+
accountConfigId: z.string().min(25).max(25),
|
|
2081
|
+
appliedByFilterId: z.string().min(25).max(25).optional(),
|
|
2039
2082
|
createdAt: z.number(),
|
|
2040
2083
|
updatedAt: z.number()
|
|
2041
2084
|
});
|
|
2042
2085
|
|
|
2043
2086
|
export const MicrosoftOAuthStartRequestSchema = z.object({
|
|
2044
2087
|
email: z.string().optional(),
|
|
2045
|
-
services: z.array(AccountServiceSchema).optional()
|
|
2088
|
+
services: z.array(AccountServiceSchema).min(1).optional()
|
|
2046
2089
|
});
|
|
2047
2090
|
|
|
2048
2091
|
export const MicrosoftOAuthStartResponseSchema = z.object({
|