@remit/api-zod-schemas 0.0.64 → 0.0.66
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 +19 -3
- package/middleware.d.ts.map +1 -1
- package/middleware.js +68 -1
- package/middleware.js.map +1 -1
- package/middleware.ts +70 -0
- package/package.json +1 -1
- package/schemas.d.ts +300 -24
- package/schemas.d.ts.map +1 -1
- package/schemas.js +118 -9
- package/schemas.js.map +1 -1
- package/schemas.ts +137 -12
package/schemas.js
CHANGED
|
@@ -31,12 +31,18 @@ export const FilterClauseFieldSchema = z.enum(["From", "Subject", "HasWords", "L
|
|
|
31
31
|
export const LabelColorSchema = z.enum(["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"]);
|
|
32
32
|
export const OrganizeJobStateSchema = z.enum(["Pending", "Running", "Complete", "Failed"]);
|
|
33
33
|
export const CalendarColorSchema = z.enum(["Cal1", "Cal2", "Cal3", "Cal4", "Cal5", "Cal6"]);
|
|
34
|
-
export const CalendarComponentSetSchema = z.enum(["VeventOnly"]);
|
|
34
|
+
export const CalendarComponentSetSchema = z.enum(["VeventOnly", "VtodoOnly"]);
|
|
35
35
|
export const CalendarSourceSchema = z.enum(["Default", "UserCreated", "MailDerived", "Subscribed"]);
|
|
36
36
|
export const CalendarEventStatusSchema = z.enum(["Confirmed", "Tentative", "Cancelled"]);
|
|
37
37
|
export const CalendarTransparencySchema = z.enum(["Opaque", "Transparent"]);
|
|
38
38
|
export const ZoneCertaintySchema = z.enum(["Local", "Explicit", "Ambiguous"]);
|
|
39
|
+
export const CalendarParticipationSchema = z.enum(["Unscheduled", "Organizer", "NeedsAction", "Accepted", "Tentative", "Declined"]);
|
|
40
|
+
export const CalendarAttendeeRoleSchema = z.enum(["Organizer", "Guest"]);
|
|
41
|
+
export const CalendarAttendeeStatusSchema = z.enum(["NeedsAction", "Accepted", "Tentative", "Declined"]);
|
|
42
|
+
export const CalendarInviteMethodSchema = z.enum(["Request", "Reply", "Cancel", "Counter", "Publish", "None"]);
|
|
43
|
+
export const OutboxMessageStatusSchema = z.enum(["draft", "queued", "sending", "sent", "unfiled", "failed", "blocked"]);
|
|
39
44
|
export const RecurrenceScopeSchema = z.enum(["This", "Following", "All"]);
|
|
45
|
+
export const CalendarInviteAnswerSchema = z.enum(["Accepted", "Tentative", "Declined"]);
|
|
40
46
|
export const SortOrderSchema = z.enum(["asc", "desc"]);
|
|
41
47
|
export const StarColorSchema = z.enum(["none", "yellow", "orange", "red", "purple", "blue", "teal", "green", "yellow_bang", "red_bang", "purple_question", "blue_info", "orange_guillemet", "green_check", "yellow_check", "blue_star"]);
|
|
42
48
|
export const MessageCategorySchema = z.enum(["uncategorized", "personal", "newsletter", "marketing", "automated", "transactional", "social"]);
|
|
@@ -46,7 +52,6 @@ export const MessageStatusSchema = z.enum(["active", "deleting", "deleted", "mov
|
|
|
46
52
|
export const MessageSyncStatusSchema = z.enum(["synced", "pending", "failed", "abandoned"]);
|
|
47
53
|
export const MessageMutationSchema = z.enum(["none", "move", "delete", "copy"]);
|
|
48
54
|
export const PlacementActionSchema = z.enum(["MoveToInbox", "MoveToJunk"]);
|
|
49
|
-
export const OutboxMessageStatusSchema = z.enum(["draft", "queued", "sending", "sent", "unfiled", "failed", "blocked"]);
|
|
50
55
|
export const OutboxAttachmentStateSchema = z.enum(["Pending", "Stored"]);
|
|
51
56
|
export const OutboxAttachmentRejectionReasonSchema = z.enum(["EmptyFile", "UnusableFilename", "FileTooLarge", "MessageTooLarge", "TooManyAttachments", "ReservationExpired", "UploadMissing", "SizeMismatch"]);
|
|
52
57
|
export const AddressFlagKeySchema = z.enum(["trusted", "blocked", "muted", "vip", "junkOnly", "category", "autoArchive", "unsubscribed", "neverSpam"]);
|
|
@@ -62,17 +67,15 @@ export const MultipartSubtypeSchema = z.enum(["mixed", "alternative", "digest",
|
|
|
62
67
|
export const ReferenceTypeSchema = z.enum(["in_reply_to", "references"]);
|
|
63
68
|
export const LabelActionSchema = z.enum(["Apply", "Remove"]);
|
|
64
69
|
export const CalendarSuggestionStateSchema = z.enum(["Pending", "Accepted", "Declined", "Tentative", "Dismissed", "Superseded"]);
|
|
65
|
-
export const CalendarInviteMethodSchema = z.enum(["Request", "Reply", "Cancel", "Counter", "Publish", "None"]);
|
|
66
70
|
export const CalendarSuggestionSourceSchema = z.enum(["IcalendarPart", "IcalendarAttachment", "TextHeuristic"]);
|
|
67
71
|
export const CalendarAnswerOvertakenSchema = z.enum(["None", "Cancellation"]);
|
|
68
|
-
export const CalendarInviteAnswerSchema = z.enum(["Accepted", "Tentative"]);
|
|
69
72
|
export const MessageSystemFlagSchema = z.enum(["\\Seen", "\\Answered", "\\Flagged", "\\Deleted", "\\Draft"]);
|
|
70
73
|
export const MessageKeywordFlagSchema = z.enum(["$Forwarded", "$MDNSent", "$Junk", "$NotJunk", "$Phishing"]);
|
|
71
74
|
export const MailboxAttributeSchema = z.enum(["\\NonExistent", "\\Noinferiors", "\\Noselect", "\\HasChildren", "\\HasNoChildren", "\\Marked", "\\Unmarked", "\\Subscribed", "\\Remote"]);
|
|
72
75
|
export const StorageTypeSchema = z.enum(["s3", "filesystem", "inline", "database"]);
|
|
73
76
|
export const ContentEncodingSchema = z.enum(["none", "gzip", "zstd"]);
|
|
74
77
|
export const SenderOverrideSchema = z.enum(["none", "blocked", "neverSpam"]);
|
|
75
|
-
export const AccountSettingNameSchema = z.enum(["Theme", "Density", "DefaultComposerFormat", "PinnedFolders", "AccountSignaturePlainText", "AccountSignatureHtml", "AccountDisplayName", "AccountMuted", "AccountComposeLanguages", "MailboxDisplayName", "MailboxMuted", "FolderRoleAppointment", "FolderRoleAppointmentLabel", "MailboxRole"]);
|
|
78
|
+
export const AccountSettingNameSchema = z.enum(["Theme", "Density", "DefaultComposerFormat", "PinnedFolders", "AccountSignaturePlainText", "AccountSignatureHtml", "AccountDisplayName", "AccountMuted", "AccountComposeLanguages", "MailboxDisplayName", "MailboxMuted", "FolderRoleAppointment", "FolderRoleAppointmentLabel", "MailboxRole", "DefaultInvitationSenderAccountId"]);
|
|
76
79
|
export const ConfigImportStateSchema = z.enum(["Pending", "Complete"]);
|
|
77
80
|
export const ConfigImportRefKindSchema = z.enum(["FolderRole", "MailboxOverride", "FilterAction"]);
|
|
78
81
|
export const SyncWarningStateSchema = z.enum(["Retrying", "GaveUp"]);
|
|
@@ -811,11 +814,16 @@ export const CalendarEventInstanceSchema = z.object({
|
|
|
811
814
|
transparency: CalendarTransparencySchema,
|
|
812
815
|
zoneCertainty: ZoneCertaintySchema,
|
|
813
816
|
etag: z.string().max(64),
|
|
814
|
-
hasRecurrence: z.boolean()
|
|
817
|
+
hasRecurrence: z.boolean(),
|
|
818
|
+
participation: CalendarParticipationSchema
|
|
815
819
|
});
|
|
816
820
|
export const CalendarEventListResponseSchema = z.object({
|
|
817
821
|
items: z.array(CalendarEventInstanceSchema)
|
|
818
822
|
});
|
|
823
|
+
export const CalendarAttendeeInputSchema = z.object({
|
|
824
|
+
email: z.string().max(512),
|
|
825
|
+
displayName: z.string().max(512)
|
|
826
|
+
});
|
|
819
827
|
export const CreateCalendarEventInputSchema = z.object({
|
|
820
828
|
calendarId: z.string().min(25).max(25),
|
|
821
829
|
summary: z.string().max(512),
|
|
@@ -827,7 +835,9 @@ export const CreateCalendarEventInputSchema = z.object({
|
|
|
827
835
|
timeZone: z.string().max(64).optional(),
|
|
828
836
|
status: CalendarEventStatusSchema.optional(),
|
|
829
837
|
transparency: CalendarTransparencySchema.optional(),
|
|
830
|
-
recurrenceRule: z.string().max(512).optional()
|
|
838
|
+
recurrenceRule: z.string().max(512).optional(),
|
|
839
|
+
attendees: z.array(CalendarAttendeeInputSchema).optional(),
|
|
840
|
+
organizerAccountId: z.string().min(25).max(25).optional()
|
|
831
841
|
});
|
|
832
842
|
export const CalendarObjectSchema = z.object({
|
|
833
843
|
calendarObjectId: z.string().min(25).max(25),
|
|
@@ -850,6 +860,24 @@ export const CalendarObjectSchema = z.object({
|
|
|
850
860
|
createdAt: z.number(),
|
|
851
861
|
updatedAt: z.number()
|
|
852
862
|
});
|
|
863
|
+
export const CalendarAttendeeSchema = z.object({
|
|
864
|
+
email: z.string().max(512),
|
|
865
|
+
displayName: z.string().max(512),
|
|
866
|
+
role: CalendarAttendeeRoleSchema,
|
|
867
|
+
status: CalendarAttendeeStatusSchema
|
|
868
|
+
});
|
|
869
|
+
export const CalendarAttendeeCountsSchema = z.object({
|
|
870
|
+
accepted: z.number(),
|
|
871
|
+
declined: z.number(),
|
|
872
|
+
tentative: z.number(),
|
|
873
|
+
needsAction: z.number()
|
|
874
|
+
});
|
|
875
|
+
export const CalendarSchedulingSendSchema = z.object({
|
|
876
|
+
email: z.string().max(512),
|
|
877
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
878
|
+
method: CalendarInviteMethodSchema,
|
|
879
|
+
status: OutboxMessageStatusSchema
|
|
880
|
+
});
|
|
853
881
|
export const CalendarEventResponseSchema = z.object({
|
|
854
882
|
calendarObjectId: z.string().min(25).max(25),
|
|
855
883
|
calendarId: z.string().min(25).max(25),
|
|
@@ -869,7 +897,12 @@ export const CalendarEventResponseSchema = z.object({
|
|
|
869
897
|
hasRecurrence: z.boolean(),
|
|
870
898
|
expandedThrough: z.string().max(64),
|
|
871
899
|
createdAt: z.number(),
|
|
872
|
-
updatedAt: z.number()
|
|
900
|
+
updatedAt: z.number(),
|
|
901
|
+
participation: CalendarParticipationSchema,
|
|
902
|
+
organizer: z.string().max(512),
|
|
903
|
+
attendees: z.array(CalendarAttendeeSchema),
|
|
904
|
+
attendeeCounts: CalendarAttendeeCountsSchema,
|
|
905
|
+
sends: z.array(CalendarSchedulingSendSchema)
|
|
873
906
|
});
|
|
874
907
|
export const UpdateCalendarEventInputSchema = z.object({
|
|
875
908
|
summary: z.string().max(512).optional(),
|
|
@@ -881,7 +914,14 @@ export const UpdateCalendarEventInputSchema = z.object({
|
|
|
881
914
|
timeZone: z.string().max(64).optional(),
|
|
882
915
|
status: CalendarEventStatusSchema.optional(),
|
|
883
916
|
transparency: CalendarTransparencySchema.optional(),
|
|
884
|
-
recurrenceRule: z.string().max(512).optional()
|
|
917
|
+
recurrenceRule: z.string().max(512).optional(),
|
|
918
|
+
attendees: z.array(CalendarAttendeeInputSchema).optional(),
|
|
919
|
+
organizerAccountId: z.string().min(25).max(25).optional(),
|
|
920
|
+
answer: CalendarInviteAnswerSchema.optional()
|
|
921
|
+
});
|
|
922
|
+
export const CalendarEventDeleteResponseSchema = z.object({
|
|
923
|
+
statusCode: z.literal(200),
|
|
924
|
+
sends: z.array(CalendarSchedulingSendSchema)
|
|
885
925
|
});
|
|
886
926
|
export const CalendarFreeBusySpanSchema = z.object({
|
|
887
927
|
start: z.string().max(64),
|
|
@@ -890,6 +930,64 @@ export const CalendarFreeBusySpanSchema = z.object({
|
|
|
890
930
|
export const CalendarFreeBusyResponseSchema = z.object({
|
|
891
931
|
items: z.array(CalendarFreeBusySpanSchema)
|
|
892
932
|
});
|
|
933
|
+
export const UserSettingsResponseSchema = z.object({
|
|
934
|
+
defaultInvitationSenderAccountId: z.string().min(25).max(25).optional(),
|
|
935
|
+
defaultInvitationSenderChosen: z.boolean()
|
|
936
|
+
});
|
|
937
|
+
export const UpdateUserSettingsInputSchema = z.object({
|
|
938
|
+
defaultInvitationSenderAccountId: z.string().min(25).max(25).optional()
|
|
939
|
+
});
|
|
940
|
+
export const CalendarTaskResponseSchema = z.object({
|
|
941
|
+
calendarTaskId: z.string().min(25).max(25),
|
|
942
|
+
calendarId: z.string().min(25).max(25),
|
|
943
|
+
resourceName: z.string().max(256),
|
|
944
|
+
icalUid: z.string().max(512),
|
|
945
|
+
icalData: z.string(),
|
|
946
|
+
etag: z.string().max(64),
|
|
947
|
+
summary: z.string().max(512),
|
|
948
|
+
description: z.string().max(2048),
|
|
949
|
+
due: z.string().max(64),
|
|
950
|
+
dueAt: z.string().max(64),
|
|
951
|
+
allDay: z.boolean(),
|
|
952
|
+
completed: z.boolean(),
|
|
953
|
+
createdAt: z.number(),
|
|
954
|
+
updatedAt: z.number()
|
|
955
|
+
});
|
|
956
|
+
export const CalendarTaskListResponseSchema = z.object({
|
|
957
|
+
items: z.array(CalendarTaskResponseSchema)
|
|
958
|
+
});
|
|
959
|
+
export const CalendarTaskSchema = z.object({
|
|
960
|
+
calendarTaskId: z.string().min(25).max(25),
|
|
961
|
+
calendarId: z.string().min(25).max(25),
|
|
962
|
+
resourceName: z.string().max(256),
|
|
963
|
+
icalUid: z.string().max(512),
|
|
964
|
+
icalData: z.string(),
|
|
965
|
+
etag: z.string().max(64),
|
|
966
|
+
summary: z.string().max(512),
|
|
967
|
+
description: z.string().max(2048),
|
|
968
|
+
due: z.string().max(64),
|
|
969
|
+
dueAt: z.string().max(64),
|
|
970
|
+
allDay: z.boolean(),
|
|
971
|
+
completed: z.boolean(),
|
|
972
|
+
createdAt: z.number(),
|
|
973
|
+
updatedAt: z.number()
|
|
974
|
+
});
|
|
975
|
+
export const CreateCalendarTaskInputSchema = z.object({
|
|
976
|
+
calendarId: z.string().min(25).max(25).optional(),
|
|
977
|
+
summary: z.string().max(512),
|
|
978
|
+
description: z.string().max(2048).optional(),
|
|
979
|
+
due: z.string().max(64),
|
|
980
|
+
allDay: z.boolean().optional(),
|
|
981
|
+
timeZone: z.string().max(64).optional()
|
|
982
|
+
});
|
|
983
|
+
export const UpdateCalendarTaskInputSchema = z.object({
|
|
984
|
+
summary: z.string().max(512).optional(),
|
|
985
|
+
description: z.string().max(2048).optional(),
|
|
986
|
+
due: z.string().max(64).optional(),
|
|
987
|
+
allDay: z.boolean().optional(),
|
|
988
|
+
timeZone: z.string().max(64).optional(),
|
|
989
|
+
completed: z.boolean().optional()
|
|
990
|
+
});
|
|
893
991
|
export const EmptyTrashResponseSchema = z.object({
|
|
894
992
|
deletedCount: z.number()
|
|
895
993
|
});
|
|
@@ -1776,6 +1874,17 @@ export const RawMessageStorageSchema = z.object({
|
|
|
1776
1874
|
createdAt: z.number(),
|
|
1777
1875
|
updatedAt: z.number()
|
|
1778
1876
|
});
|
|
1877
|
+
export const OutboxSchedulingPartSchema = z.object({
|
|
1878
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
1879
|
+
accountConfigId: z.string().min(25).max(25),
|
|
1880
|
+
calendarObjectId: z.string().min(25).max(25),
|
|
1881
|
+
recipient: z.string().max(512),
|
|
1882
|
+
method: CalendarInviteMethodSchema,
|
|
1883
|
+
sequence: z.number(),
|
|
1884
|
+
icalData: z.string(),
|
|
1885
|
+
createdAt: z.number(),
|
|
1886
|
+
updatedAt: z.number()
|
|
1887
|
+
});
|
|
1779
1888
|
export const CalendarEventIndexSchema = z.object({
|
|
1780
1889
|
calendarId: z.string().min(25).max(25),
|
|
1781
1890
|
calendarObjectId: z.string().min(25).max(25),
|