@remit/api-zod-schemas 0.0.65 → 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.ts
CHANGED
|
@@ -61,7 +61,7 @@ export const OrganizeJobStateSchema = z.enum(["Pending", "Running", "Complete",
|
|
|
61
61
|
|
|
62
62
|
export const CalendarColorSchema = z.enum(["Cal1", "Cal2", "Cal3", "Cal4", "Cal5", "Cal6"]);
|
|
63
63
|
|
|
64
|
-
export const CalendarComponentSetSchema = z.enum(["VeventOnly"]);
|
|
64
|
+
export const CalendarComponentSetSchema = z.enum(["VeventOnly", "VtodoOnly"]);
|
|
65
65
|
|
|
66
66
|
export const CalendarSourceSchema = z.enum(["Default", "UserCreated", "MailDerived", "Subscribed"]);
|
|
67
67
|
|
|
@@ -71,8 +71,20 @@ export const CalendarTransparencySchema = z.enum(["Opaque", "Transparent"]);
|
|
|
71
71
|
|
|
72
72
|
export const ZoneCertaintySchema = z.enum(["Local", "Explicit", "Ambiguous"]);
|
|
73
73
|
|
|
74
|
+
export const CalendarParticipationSchema = z.enum(["Unscheduled", "Organizer", "NeedsAction", "Accepted", "Tentative", "Declined"]);
|
|
75
|
+
|
|
76
|
+
export const CalendarAttendeeRoleSchema = z.enum(["Organizer", "Guest"]);
|
|
77
|
+
|
|
78
|
+
export const CalendarAttendeeStatusSchema = z.enum(["NeedsAction", "Accepted", "Tentative", "Declined"]);
|
|
79
|
+
|
|
80
|
+
export const CalendarInviteMethodSchema = z.enum(["Request", "Reply", "Cancel", "Counter", "Publish", "None"]);
|
|
81
|
+
|
|
82
|
+
export const OutboxMessageStatusSchema = z.enum(["draft", "queued", "sending", "sent", "unfiled", "failed", "blocked"]);
|
|
83
|
+
|
|
74
84
|
export const RecurrenceScopeSchema = z.enum(["This", "Following", "All"]);
|
|
75
85
|
|
|
86
|
+
export const CalendarInviteAnswerSchema = z.enum(["Accepted", "Tentative", "Declined"]);
|
|
87
|
+
|
|
76
88
|
export const SortOrderSchema = z.enum(["asc", "desc"]);
|
|
77
89
|
|
|
78
90
|
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"]);
|
|
@@ -91,8 +103,6 @@ export const MessageMutationSchema = z.enum(["none", "move", "delete", "copy"]);
|
|
|
91
103
|
|
|
92
104
|
export const PlacementActionSchema = z.enum(["MoveToInbox", "MoveToJunk"]);
|
|
93
105
|
|
|
94
|
-
export const OutboxMessageStatusSchema = z.enum(["draft", "queued", "sending", "sent", "unfiled", "failed", "blocked"]);
|
|
95
|
-
|
|
96
106
|
export const OutboxAttachmentStateSchema = z.enum(["Pending", "Stored"]);
|
|
97
107
|
|
|
98
108
|
export const OutboxAttachmentRejectionReasonSchema = z.enum(["EmptyFile", "UnusableFilename", "FileTooLarge", "MessageTooLarge", "TooManyAttachments", "ReservationExpired", "UploadMissing", "SizeMismatch"]);
|
|
@@ -123,14 +133,10 @@ export const LabelActionSchema = z.enum(["Apply", "Remove"]);
|
|
|
123
133
|
|
|
124
134
|
export const CalendarSuggestionStateSchema = z.enum(["Pending", "Accepted", "Declined", "Tentative", "Dismissed", "Superseded"]);
|
|
125
135
|
|
|
126
|
-
export const CalendarInviteMethodSchema = z.enum(["Request", "Reply", "Cancel", "Counter", "Publish", "None"]);
|
|
127
|
-
|
|
128
136
|
export const CalendarSuggestionSourceSchema = z.enum(["IcalendarPart", "IcalendarAttachment", "TextHeuristic"]);
|
|
129
137
|
|
|
130
138
|
export const CalendarAnswerOvertakenSchema = z.enum(["None", "Cancellation"]);
|
|
131
139
|
|
|
132
|
-
export const CalendarInviteAnswerSchema = z.enum(["Accepted", "Tentative"]);
|
|
133
|
-
|
|
134
140
|
export const MessageSystemFlagSchema = z.enum(["\\Seen", "\\Answered", "\\Flagged", "\\Deleted", "\\Draft"]);
|
|
135
141
|
|
|
136
142
|
export const MessageKeywordFlagSchema = z.enum(["$Forwarded", "$MDNSent", "$Junk", "$NotJunk", "$Phishing"]);
|
|
@@ -143,7 +149,7 @@ export const ContentEncodingSchema = z.enum(["none", "gzip", "zstd"]);
|
|
|
143
149
|
|
|
144
150
|
export const SenderOverrideSchema = z.enum(["none", "blocked", "neverSpam"]);
|
|
145
151
|
|
|
146
|
-
export const AccountSettingNameSchema = z.enum(["Theme", "Density", "DefaultComposerFormat", "PinnedFolders", "AccountSignaturePlainText", "AccountSignatureHtml", "AccountDisplayName", "AccountMuted", "AccountComposeLanguages", "MailboxDisplayName", "MailboxMuted", "FolderRoleAppointment", "FolderRoleAppointmentLabel", "MailboxRole"]);
|
|
152
|
+
export const AccountSettingNameSchema = z.enum(["Theme", "Density", "DefaultComposerFormat", "PinnedFolders", "AccountSignaturePlainText", "AccountSignatureHtml", "AccountDisplayName", "AccountMuted", "AccountComposeLanguages", "MailboxDisplayName", "MailboxMuted", "FolderRoleAppointment", "FolderRoleAppointmentLabel", "MailboxRole", "DefaultInvitationSenderAccountId"]);
|
|
147
153
|
|
|
148
154
|
export const ConfigImportStateSchema = z.enum(["Pending", "Complete"]);
|
|
149
155
|
|
|
@@ -971,13 +977,19 @@ export const CalendarEventInstanceSchema = z.object({
|
|
|
971
977
|
transparency: CalendarTransparencySchema,
|
|
972
978
|
zoneCertainty: ZoneCertaintySchema,
|
|
973
979
|
etag: z.string().max(64),
|
|
974
|
-
hasRecurrence: z.boolean()
|
|
980
|
+
hasRecurrence: z.boolean(),
|
|
981
|
+
participation: CalendarParticipationSchema
|
|
975
982
|
});
|
|
976
983
|
|
|
977
984
|
export const CalendarEventListResponseSchema = z.object({
|
|
978
985
|
items: z.array(CalendarEventInstanceSchema)
|
|
979
986
|
});
|
|
980
987
|
|
|
988
|
+
export const CalendarAttendeeInputSchema = z.object({
|
|
989
|
+
email: z.string().max(512),
|
|
990
|
+
displayName: z.string().max(512)
|
|
991
|
+
});
|
|
992
|
+
|
|
981
993
|
export const CreateCalendarEventInputSchema = z.object({
|
|
982
994
|
calendarId: z.string().min(25).max(25),
|
|
983
995
|
summary: z.string().max(512),
|
|
@@ -989,7 +1001,9 @@ export const CreateCalendarEventInputSchema = z.object({
|
|
|
989
1001
|
timeZone: z.string().max(64).optional(),
|
|
990
1002
|
status: CalendarEventStatusSchema.optional(),
|
|
991
1003
|
transparency: CalendarTransparencySchema.optional(),
|
|
992
|
-
recurrenceRule: z.string().max(512).optional()
|
|
1004
|
+
recurrenceRule: z.string().max(512).optional(),
|
|
1005
|
+
attendees: z.array(CalendarAttendeeInputSchema).optional(),
|
|
1006
|
+
organizerAccountId: z.string().min(25).max(25).optional()
|
|
993
1007
|
});
|
|
994
1008
|
|
|
995
1009
|
export const CalendarObjectSchema = z.object({
|
|
@@ -1014,6 +1028,27 @@ export const CalendarObjectSchema = z.object({
|
|
|
1014
1028
|
updatedAt: z.number()
|
|
1015
1029
|
});
|
|
1016
1030
|
|
|
1031
|
+
export const CalendarAttendeeSchema = z.object({
|
|
1032
|
+
email: z.string().max(512),
|
|
1033
|
+
displayName: z.string().max(512),
|
|
1034
|
+
role: CalendarAttendeeRoleSchema,
|
|
1035
|
+
status: CalendarAttendeeStatusSchema
|
|
1036
|
+
});
|
|
1037
|
+
|
|
1038
|
+
export const CalendarAttendeeCountsSchema = z.object({
|
|
1039
|
+
accepted: z.number(),
|
|
1040
|
+
declined: z.number(),
|
|
1041
|
+
tentative: z.number(),
|
|
1042
|
+
needsAction: z.number()
|
|
1043
|
+
});
|
|
1044
|
+
|
|
1045
|
+
export const CalendarSchedulingSendSchema = z.object({
|
|
1046
|
+
email: z.string().max(512),
|
|
1047
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
1048
|
+
method: CalendarInviteMethodSchema,
|
|
1049
|
+
status: OutboxMessageStatusSchema
|
|
1050
|
+
});
|
|
1051
|
+
|
|
1017
1052
|
export const CalendarEventResponseSchema = z.object({
|
|
1018
1053
|
calendarObjectId: z.string().min(25).max(25),
|
|
1019
1054
|
calendarId: z.string().min(25).max(25),
|
|
@@ -1033,7 +1068,12 @@ export const CalendarEventResponseSchema = z.object({
|
|
|
1033
1068
|
hasRecurrence: z.boolean(),
|
|
1034
1069
|
expandedThrough: z.string().max(64),
|
|
1035
1070
|
createdAt: z.number(),
|
|
1036
|
-
updatedAt: z.number()
|
|
1071
|
+
updatedAt: z.number(),
|
|
1072
|
+
participation: CalendarParticipationSchema,
|
|
1073
|
+
organizer: z.string().max(512),
|
|
1074
|
+
attendees: z.array(CalendarAttendeeSchema),
|
|
1075
|
+
attendeeCounts: CalendarAttendeeCountsSchema,
|
|
1076
|
+
sends: z.array(CalendarSchedulingSendSchema)
|
|
1037
1077
|
});
|
|
1038
1078
|
|
|
1039
1079
|
export const UpdateCalendarEventInputSchema = z.object({
|
|
@@ -1046,7 +1086,15 @@ export const UpdateCalendarEventInputSchema = z.object({
|
|
|
1046
1086
|
timeZone: z.string().max(64).optional(),
|
|
1047
1087
|
status: CalendarEventStatusSchema.optional(),
|
|
1048
1088
|
transparency: CalendarTransparencySchema.optional(),
|
|
1049
|
-
recurrenceRule: z.string().max(512).optional()
|
|
1089
|
+
recurrenceRule: z.string().max(512).optional(),
|
|
1090
|
+
attendees: z.array(CalendarAttendeeInputSchema).optional(),
|
|
1091
|
+
organizerAccountId: z.string().min(25).max(25).optional(),
|
|
1092
|
+
answer: CalendarInviteAnswerSchema.optional()
|
|
1093
|
+
});
|
|
1094
|
+
|
|
1095
|
+
export const CalendarEventDeleteResponseSchema = z.object({
|
|
1096
|
+
statusCode: z.literal(200),
|
|
1097
|
+
sends: z.array(CalendarSchedulingSendSchema)
|
|
1050
1098
|
});
|
|
1051
1099
|
|
|
1052
1100
|
export const CalendarFreeBusySpanSchema = z.object({
|
|
@@ -1058,6 +1106,71 @@ export const CalendarFreeBusyResponseSchema = z.object({
|
|
|
1058
1106
|
items: z.array(CalendarFreeBusySpanSchema)
|
|
1059
1107
|
});
|
|
1060
1108
|
|
|
1109
|
+
export const UserSettingsResponseSchema = z.object({
|
|
1110
|
+
defaultInvitationSenderAccountId: z.string().min(25).max(25).optional(),
|
|
1111
|
+
defaultInvitationSenderChosen: z.boolean()
|
|
1112
|
+
});
|
|
1113
|
+
|
|
1114
|
+
export const UpdateUserSettingsInputSchema = z.object({
|
|
1115
|
+
defaultInvitationSenderAccountId: z.string().min(25).max(25).optional()
|
|
1116
|
+
});
|
|
1117
|
+
|
|
1118
|
+
export const CalendarTaskResponseSchema = z.object({
|
|
1119
|
+
calendarTaskId: z.string().min(25).max(25),
|
|
1120
|
+
calendarId: z.string().min(25).max(25),
|
|
1121
|
+
resourceName: z.string().max(256),
|
|
1122
|
+
icalUid: z.string().max(512),
|
|
1123
|
+
icalData: z.string(),
|
|
1124
|
+
etag: z.string().max(64),
|
|
1125
|
+
summary: z.string().max(512),
|
|
1126
|
+
description: z.string().max(2048),
|
|
1127
|
+
due: z.string().max(64),
|
|
1128
|
+
dueAt: z.string().max(64),
|
|
1129
|
+
allDay: z.boolean(),
|
|
1130
|
+
completed: z.boolean(),
|
|
1131
|
+
createdAt: z.number(),
|
|
1132
|
+
updatedAt: z.number()
|
|
1133
|
+
});
|
|
1134
|
+
|
|
1135
|
+
export const CalendarTaskListResponseSchema = z.object({
|
|
1136
|
+
items: z.array(CalendarTaskResponseSchema)
|
|
1137
|
+
});
|
|
1138
|
+
|
|
1139
|
+
export const CalendarTaskSchema = z.object({
|
|
1140
|
+
calendarTaskId: z.string().min(25).max(25),
|
|
1141
|
+
calendarId: z.string().min(25).max(25),
|
|
1142
|
+
resourceName: z.string().max(256),
|
|
1143
|
+
icalUid: z.string().max(512),
|
|
1144
|
+
icalData: z.string(),
|
|
1145
|
+
etag: z.string().max(64),
|
|
1146
|
+
summary: z.string().max(512),
|
|
1147
|
+
description: z.string().max(2048),
|
|
1148
|
+
due: z.string().max(64),
|
|
1149
|
+
dueAt: z.string().max(64),
|
|
1150
|
+
allDay: z.boolean(),
|
|
1151
|
+
completed: z.boolean(),
|
|
1152
|
+
createdAt: z.number(),
|
|
1153
|
+
updatedAt: z.number()
|
|
1154
|
+
});
|
|
1155
|
+
|
|
1156
|
+
export const CreateCalendarTaskInputSchema = z.object({
|
|
1157
|
+
calendarId: z.string().min(25).max(25).optional(),
|
|
1158
|
+
summary: z.string().max(512),
|
|
1159
|
+
description: z.string().max(2048).optional(),
|
|
1160
|
+
due: z.string().max(64),
|
|
1161
|
+
allDay: z.boolean().optional(),
|
|
1162
|
+
timeZone: z.string().max(64).optional()
|
|
1163
|
+
});
|
|
1164
|
+
|
|
1165
|
+
export const UpdateCalendarTaskInputSchema = z.object({
|
|
1166
|
+
summary: z.string().max(512).optional(),
|
|
1167
|
+
description: z.string().max(2048).optional(),
|
|
1168
|
+
due: z.string().max(64).optional(),
|
|
1169
|
+
allDay: z.boolean().optional(),
|
|
1170
|
+
timeZone: z.string().max(64).optional(),
|
|
1171
|
+
completed: z.boolean().optional()
|
|
1172
|
+
});
|
|
1173
|
+
|
|
1061
1174
|
export const EmptyTrashResponseSchema = z.object({
|
|
1062
1175
|
deletedCount: z.number()
|
|
1063
1176
|
});
|
|
@@ -2039,6 +2152,18 @@ export const RawMessageStorageSchema = z.object({
|
|
|
2039
2152
|
updatedAt: z.number()
|
|
2040
2153
|
});
|
|
2041
2154
|
|
|
2155
|
+
export const OutboxSchedulingPartSchema = z.object({
|
|
2156
|
+
outboxMessageId: z.string().min(25).max(25),
|
|
2157
|
+
accountConfigId: z.string().min(25).max(25),
|
|
2158
|
+
calendarObjectId: z.string().min(25).max(25),
|
|
2159
|
+
recipient: z.string().max(512),
|
|
2160
|
+
method: CalendarInviteMethodSchema,
|
|
2161
|
+
sequence: z.number(),
|
|
2162
|
+
icalData: z.string(),
|
|
2163
|
+
createdAt: z.number(),
|
|
2164
|
+
updatedAt: z.number()
|
|
2165
|
+
});
|
|
2166
|
+
|
|
2042
2167
|
export const CalendarEventIndexSchema = z.object({
|
|
2043
2168
|
calendarId: z.string().min(25).max(25),
|
|
2044
2169
|
calendarObjectId: z.string().min(25).max(25),
|