@remit/api-zod-schemas 0.0.65 → 0.0.67

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/schemas.ts CHANGED
@@ -37,6 +37,10 @@ export const SystemUpdatePhaseSchema = z.enum(["checking", "pulling", "snapshott
37
37
 
38
38
  export const SystemUpdateOutcomeSchema = z.enum(["succeeded", "rolledBack", "rollbackFailed", "abandoned"]);
39
39
 
40
+ export const PersonStatusSchema = z.enum(["Active", "Disabled"]);
41
+
42
+ export const StepUpActionSchema = z.enum(["SignOut", "Disable", "Enable", "ResetPassword"]);
43
+
40
44
  export const NamespaceTypeSchema = z.enum(["personal", "other_users", "shared"]);
41
45
 
42
46
  export const MailboxSyncStatusSchema = z.enum(["synced", "pending", "failed", "deleting"]);
@@ -61,7 +65,7 @@ export const OrganizeJobStateSchema = z.enum(["Pending", "Running", "Complete",
61
65
 
62
66
  export const CalendarColorSchema = z.enum(["Cal1", "Cal2", "Cal3", "Cal4", "Cal5", "Cal6"]);
63
67
 
64
- export const CalendarComponentSetSchema = z.enum(["VeventOnly"]);
68
+ export const CalendarComponentSetSchema = z.enum(["VeventOnly", "VtodoOnly"]);
65
69
 
66
70
  export const CalendarSourceSchema = z.enum(["Default", "UserCreated", "MailDerived", "Subscribed"]);
67
71
 
@@ -71,8 +75,20 @@ export const CalendarTransparencySchema = z.enum(["Opaque", "Transparent"]);
71
75
 
72
76
  export const ZoneCertaintySchema = z.enum(["Local", "Explicit", "Ambiguous"]);
73
77
 
78
+ export const CalendarParticipationSchema = z.enum(["Unscheduled", "Organizer", "NeedsAction", "Accepted", "Tentative", "Declined"]);
79
+
80
+ export const CalendarAttendeeRoleSchema = z.enum(["Organizer", "Guest"]);
81
+
82
+ export const CalendarAttendeeStatusSchema = z.enum(["NeedsAction", "Accepted", "Tentative", "Declined"]);
83
+
84
+ export const CalendarInviteMethodSchema = z.enum(["Request", "Reply", "Cancel", "Counter", "Publish", "None"]);
85
+
86
+ export const OutboxMessageStatusSchema = z.enum(["draft", "queued", "sending", "sent", "unfiled", "failed", "blocked"]);
87
+
74
88
  export const RecurrenceScopeSchema = z.enum(["This", "Following", "All"]);
75
89
 
90
+ export const CalendarInviteAnswerSchema = z.enum(["Accepted", "Tentative", "Declined"]);
91
+
76
92
  export const SortOrderSchema = z.enum(["asc", "desc"]);
77
93
 
78
94
  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 +107,6 @@ export const MessageMutationSchema = z.enum(["none", "move", "delete", "copy"]);
91
107
 
92
108
  export const PlacementActionSchema = z.enum(["MoveToInbox", "MoveToJunk"]);
93
109
 
94
- export const OutboxMessageStatusSchema = z.enum(["draft", "queued", "sending", "sent", "unfiled", "failed", "blocked"]);
95
-
96
110
  export const OutboxAttachmentStateSchema = z.enum(["Pending", "Stored"]);
97
111
 
98
112
  export const OutboxAttachmentRejectionReasonSchema = z.enum(["EmptyFile", "UnusableFilename", "FileTooLarge", "MessageTooLarge", "TooManyAttachments", "ReservationExpired", "UploadMissing", "SizeMismatch"]);
@@ -123,14 +137,10 @@ export const LabelActionSchema = z.enum(["Apply", "Remove"]);
123
137
 
124
138
  export const CalendarSuggestionStateSchema = z.enum(["Pending", "Accepted", "Declined", "Tentative", "Dismissed", "Superseded"]);
125
139
 
126
- export const CalendarInviteMethodSchema = z.enum(["Request", "Reply", "Cancel", "Counter", "Publish", "None"]);
127
-
128
140
  export const CalendarSuggestionSourceSchema = z.enum(["IcalendarPart", "IcalendarAttachment", "TextHeuristic"]);
129
141
 
130
142
  export const CalendarAnswerOvertakenSchema = z.enum(["None", "Cancellation"]);
131
143
 
132
- export const CalendarInviteAnswerSchema = z.enum(["Accepted", "Tentative"]);
133
-
134
144
  export const MessageSystemFlagSchema = z.enum(["\\Seen", "\\Answered", "\\Flagged", "\\Deleted", "\\Draft"]);
135
145
 
136
146
  export const MessageKeywordFlagSchema = z.enum(["$Forwarded", "$MDNSent", "$Junk", "$NotJunk", "$Phishing"]);
@@ -143,7 +153,7 @@ export const ContentEncodingSchema = z.enum(["none", "gzip", "zstd"]);
143
153
 
144
154
  export const SenderOverrideSchema = z.enum(["none", "blocked", "neverSpam"]);
145
155
 
146
- export const AccountSettingNameSchema = z.enum(["Theme", "Density", "DefaultComposerFormat", "PinnedFolders", "AccountSignaturePlainText", "AccountSignatureHtml", "AccountDisplayName", "AccountMuted", "AccountComposeLanguages", "MailboxDisplayName", "MailboxMuted", "FolderRoleAppointment", "FolderRoleAppointmentLabel", "MailboxRole"]);
156
+ export const AccountSettingNameSchema = z.enum(["Theme", "Density", "DefaultComposerFormat", "PinnedFolders", "AccountSignaturePlainText", "AccountSignatureHtml", "AccountDisplayName", "AccountMuted", "AccountComposeLanguages", "MailboxDisplayName", "MailboxMuted", "FolderRoleAppointment", "FolderRoleAppointmentLabel", "MailboxRole", "DefaultInvitationSenderAccountId"]);
147
157
 
148
158
  export const ConfigImportStateSchema = z.enum(["Pending", "Complete"]);
149
159
 
@@ -626,6 +636,71 @@ export const ApplyUpdateInputSchema = z.object({
626
636
  targetVersion: z.string()
627
637
  });
628
638
 
639
+ export const PersonSchema = z.object({
640
+ userId: z.string(),
641
+ email: z.string(),
642
+ createdAt: z.number(),
643
+ lastSignInAt: z.number(),
644
+ sessionCount: z.number(),
645
+ status: PersonStatusSchema,
646
+ isCaller: z.boolean()
647
+ });
648
+
649
+ export const PeopleListResponseSchema = z.object({
650
+ people: z.array(PersonSchema)
651
+ });
652
+
653
+ export const PeopleForbiddenErrorSchema = z.object({
654
+ statusCode: z.literal(403),
655
+ code: z.string(),
656
+ message: z.string(),
657
+ details: z.record(z.string(), z.string()).optional()
658
+ });
659
+
660
+ export const StepUpInputSchema = z.object({
661
+ password: z.string(),
662
+ action: StepUpActionSchema,
663
+ userId: z.string()
664
+ });
665
+
666
+ export const StepUpResponseSchema = z.object({
667
+ stepUpToken: z.string(),
668
+ expiresAt: z.number()
669
+ });
670
+
671
+ export const StepUpLockedErrorSchema = z.object({
672
+ statusCode: z.literal(429),
673
+ code: z.string(),
674
+ message: z.string(),
675
+ details: z.record(z.string(), z.string()).optional()
676
+ });
677
+
678
+ export const SignOutPersonInputSchema = z.object({
679
+ stepUpToken: z.string()
680
+ });
681
+
682
+ export const UpdatePersonInputSchema = z.object({
683
+ status: PersonStatusSchema,
684
+ stepUpToken: z.string()
685
+ });
686
+
687
+ export const CannotDisableSelfErrorSchema = z.object({
688
+ statusCode: z.literal(409),
689
+ code: z.string(),
690
+ message: z.string(),
691
+ details: z.record(z.string(), z.string()).optional()
692
+ });
693
+
694
+ export const CreatePasswordResetInputSchema = z.object({
695
+ stepUpToken: z.string()
696
+ });
697
+
698
+ export const PasswordResetResponseSchema = z.object({
699
+ person: PersonSchema,
700
+ resetUrl: z.string(),
701
+ expiresAt: z.number()
702
+ });
703
+
629
704
  export const MailboxSchema = z.object({
630
705
  mailboxId: z.string().min(25).max(25),
631
706
  accountId: z.string().min(25).max(25),
@@ -971,13 +1046,19 @@ export const CalendarEventInstanceSchema = z.object({
971
1046
  transparency: CalendarTransparencySchema,
972
1047
  zoneCertainty: ZoneCertaintySchema,
973
1048
  etag: z.string().max(64),
974
- hasRecurrence: z.boolean()
1049
+ hasRecurrence: z.boolean(),
1050
+ participation: CalendarParticipationSchema
975
1051
  });
976
1052
 
977
1053
  export const CalendarEventListResponseSchema = z.object({
978
1054
  items: z.array(CalendarEventInstanceSchema)
979
1055
  });
980
1056
 
1057
+ export const CalendarAttendeeInputSchema = z.object({
1058
+ email: z.string().max(512),
1059
+ displayName: z.string().max(512)
1060
+ });
1061
+
981
1062
  export const CreateCalendarEventInputSchema = z.object({
982
1063
  calendarId: z.string().min(25).max(25),
983
1064
  summary: z.string().max(512),
@@ -989,7 +1070,9 @@ export const CreateCalendarEventInputSchema = z.object({
989
1070
  timeZone: z.string().max(64).optional(),
990
1071
  status: CalendarEventStatusSchema.optional(),
991
1072
  transparency: CalendarTransparencySchema.optional(),
992
- recurrenceRule: z.string().max(512).optional()
1073
+ recurrenceRule: z.string().max(512).optional(),
1074
+ attendees: z.array(CalendarAttendeeInputSchema).optional(),
1075
+ organizerAccountId: z.string().min(25).max(25).optional()
993
1076
  });
994
1077
 
995
1078
  export const CalendarObjectSchema = z.object({
@@ -1014,6 +1097,27 @@ export const CalendarObjectSchema = z.object({
1014
1097
  updatedAt: z.number()
1015
1098
  });
1016
1099
 
1100
+ export const CalendarAttendeeSchema = z.object({
1101
+ email: z.string().max(512),
1102
+ displayName: z.string().max(512),
1103
+ role: CalendarAttendeeRoleSchema,
1104
+ status: CalendarAttendeeStatusSchema
1105
+ });
1106
+
1107
+ export const CalendarAttendeeCountsSchema = z.object({
1108
+ accepted: z.number(),
1109
+ declined: z.number(),
1110
+ tentative: z.number(),
1111
+ needsAction: z.number()
1112
+ });
1113
+
1114
+ export const CalendarSchedulingSendSchema = z.object({
1115
+ email: z.string().max(512),
1116
+ outboxMessageId: z.string().min(25).max(25),
1117
+ method: CalendarInviteMethodSchema,
1118
+ status: OutboxMessageStatusSchema
1119
+ });
1120
+
1017
1121
  export const CalendarEventResponseSchema = z.object({
1018
1122
  calendarObjectId: z.string().min(25).max(25),
1019
1123
  calendarId: z.string().min(25).max(25),
@@ -1033,7 +1137,12 @@ export const CalendarEventResponseSchema = z.object({
1033
1137
  hasRecurrence: z.boolean(),
1034
1138
  expandedThrough: z.string().max(64),
1035
1139
  createdAt: z.number(),
1036
- updatedAt: z.number()
1140
+ updatedAt: z.number(),
1141
+ participation: CalendarParticipationSchema,
1142
+ organizer: z.string().max(512),
1143
+ attendees: z.array(CalendarAttendeeSchema),
1144
+ attendeeCounts: CalendarAttendeeCountsSchema,
1145
+ sends: z.array(CalendarSchedulingSendSchema)
1037
1146
  });
1038
1147
 
1039
1148
  export const UpdateCalendarEventInputSchema = z.object({
@@ -1046,7 +1155,15 @@ export const UpdateCalendarEventInputSchema = z.object({
1046
1155
  timeZone: z.string().max(64).optional(),
1047
1156
  status: CalendarEventStatusSchema.optional(),
1048
1157
  transparency: CalendarTransparencySchema.optional(),
1049
- recurrenceRule: z.string().max(512).optional()
1158
+ recurrenceRule: z.string().max(512).optional(),
1159
+ attendees: z.array(CalendarAttendeeInputSchema).optional(),
1160
+ organizerAccountId: z.string().min(25).max(25).optional(),
1161
+ answer: CalendarInviteAnswerSchema.optional()
1162
+ });
1163
+
1164
+ export const CalendarEventDeleteResponseSchema = z.object({
1165
+ statusCode: z.literal(200),
1166
+ sends: z.array(CalendarSchedulingSendSchema)
1050
1167
  });
1051
1168
 
1052
1169
  export const CalendarFreeBusySpanSchema = z.object({
@@ -1058,6 +1175,71 @@ export const CalendarFreeBusyResponseSchema = z.object({
1058
1175
  items: z.array(CalendarFreeBusySpanSchema)
1059
1176
  });
1060
1177
 
1178
+ export const UserSettingsResponseSchema = z.object({
1179
+ defaultInvitationSenderAccountId: z.string().min(25).max(25).optional(),
1180
+ defaultInvitationSenderChosen: z.boolean()
1181
+ });
1182
+
1183
+ export const UpdateUserSettingsInputSchema = z.object({
1184
+ defaultInvitationSenderAccountId: z.string().min(25).max(25).optional()
1185
+ });
1186
+
1187
+ export const CalendarTaskResponseSchema = z.object({
1188
+ calendarTaskId: z.string().min(25).max(25),
1189
+ calendarId: z.string().min(25).max(25),
1190
+ resourceName: z.string().max(256),
1191
+ icalUid: z.string().max(512),
1192
+ icalData: z.string(),
1193
+ etag: z.string().max(64),
1194
+ summary: z.string().max(512),
1195
+ description: z.string().max(2048),
1196
+ due: z.string().max(64),
1197
+ dueAt: z.string().max(64),
1198
+ allDay: z.boolean(),
1199
+ completed: z.boolean(),
1200
+ createdAt: z.number(),
1201
+ updatedAt: z.number()
1202
+ });
1203
+
1204
+ export const CalendarTaskListResponseSchema = z.object({
1205
+ items: z.array(CalendarTaskResponseSchema)
1206
+ });
1207
+
1208
+ export const CalendarTaskSchema = z.object({
1209
+ calendarTaskId: z.string().min(25).max(25),
1210
+ calendarId: z.string().min(25).max(25),
1211
+ resourceName: z.string().max(256),
1212
+ icalUid: z.string().max(512),
1213
+ icalData: z.string(),
1214
+ etag: z.string().max(64),
1215
+ summary: z.string().max(512),
1216
+ description: z.string().max(2048),
1217
+ due: z.string().max(64),
1218
+ dueAt: z.string().max(64),
1219
+ allDay: z.boolean(),
1220
+ completed: z.boolean(),
1221
+ createdAt: z.number(),
1222
+ updatedAt: z.number()
1223
+ });
1224
+
1225
+ export const CreateCalendarTaskInputSchema = z.object({
1226
+ calendarId: z.string().min(25).max(25).optional(),
1227
+ summary: z.string().max(512),
1228
+ description: z.string().max(2048).optional(),
1229
+ due: z.string().max(64),
1230
+ allDay: z.boolean().optional(),
1231
+ timeZone: z.string().max(64).optional()
1232
+ });
1233
+
1234
+ export const UpdateCalendarTaskInputSchema = z.object({
1235
+ summary: z.string().max(512).optional(),
1236
+ description: z.string().max(2048).optional(),
1237
+ due: z.string().max(64).optional(),
1238
+ allDay: z.boolean().optional(),
1239
+ timeZone: z.string().max(64).optional(),
1240
+ completed: z.boolean().optional()
1241
+ });
1242
+
1061
1243
  export const EmptyTrashResponseSchema = z.object({
1062
1244
  deletedCount: z.number()
1063
1245
  });
@@ -2039,6 +2221,18 @@ export const RawMessageStorageSchema = z.object({
2039
2221
  updatedAt: z.number()
2040
2222
  });
2041
2223
 
2224
+ export const OutboxSchedulingPartSchema = z.object({
2225
+ outboxMessageId: z.string().min(25).max(25),
2226
+ accountConfigId: z.string().min(25).max(25),
2227
+ calendarObjectId: z.string().min(25).max(25),
2228
+ recipient: z.string().max(512),
2229
+ method: CalendarInviteMethodSchema,
2230
+ sequence: z.number(),
2231
+ icalData: z.string(),
2232
+ createdAt: z.number(),
2233
+ updatedAt: z.number()
2234
+ });
2235
+
2042
2236
  export const CalendarEventIndexSchema = z.object({
2043
2237
  calendarId: z.string().min(25).max(25),
2044
2238
  calendarObjectId: z.string().min(25).max(25),