@remit/api-zod-schemas 0.0.32 → 0.0.34
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 +24 -1
- package/package.json +1 -1
- package/schemas.d.ts +628 -32
- package/schemas.d.ts.map +1 -1
- package/schemas.js +163 -4
- package/schemas.js.map +1 -1
- package/schemas.ts +187 -5
package/schemas.ts
CHANGED
|
@@ -53,6 +53,20 @@ export const LabelColorSchema = z.enum(["Default", "Red", "Orange", "Yellow", "G
|
|
|
53
53
|
|
|
54
54
|
export const OrganizeJobStateSchema = z.enum(["Pending", "Running", "Complete", "Failed"]);
|
|
55
55
|
|
|
56
|
+
export const CalendarColorSchema = z.enum(["Cal1", "Cal2", "Cal3", "Cal4", "Cal5", "Cal6"]);
|
|
57
|
+
|
|
58
|
+
export const CalendarComponentSetSchema = z.enum(["VeventOnly"]);
|
|
59
|
+
|
|
60
|
+
export const CalendarSourceSchema = z.enum(["Default", "UserCreated", "MailDerived"]);
|
|
61
|
+
|
|
62
|
+
export const CalendarEventStatusSchema = z.enum(["Confirmed", "Tentative", "Cancelled"]);
|
|
63
|
+
|
|
64
|
+
export const CalendarTransparencySchema = z.enum(["Opaque", "Transparent"]);
|
|
65
|
+
|
|
66
|
+
export const ZoneCertaintySchema = z.enum(["Local", "Explicit", "Ambiguous"]);
|
|
67
|
+
|
|
68
|
+
export const RecurrenceScopeSchema = z.enum(["This", "Following", "All"]);
|
|
69
|
+
|
|
56
70
|
export const SortOrderSchema = z.enum(["asc", "desc"]);
|
|
57
71
|
|
|
58
72
|
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"]);
|
|
@@ -150,6 +164,16 @@ export const AppointFolderRoleConflictSchema = z.object({
|
|
|
150
164
|
details: z.record(z.string(), z.string()).optional()
|
|
151
165
|
});
|
|
152
166
|
|
|
167
|
+
export const NotFoundErrorSchema = z.object({
|
|
168
|
+
statusCode: z.literal(404),
|
|
169
|
+
error: ApiErrorSchema
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
export const PreconditionFailedErrorSchema = z.object({
|
|
173
|
+
statusCode: z.literal(412),
|
|
174
|
+
error: ApiErrorSchema
|
|
175
|
+
});
|
|
176
|
+
|
|
153
177
|
export const DeleteMessagesConflictSchema = z.object({
|
|
154
178
|
statusCode: z.literal(409),
|
|
155
179
|
code: z.string(),
|
|
@@ -171,11 +195,6 @@ export const AmazonApiGatewayIntegrationSchema = z.object({
|
|
|
171
195
|
uri: z.object({ "Fn::Sub": z.literal("arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:{{HandlerFunctionName}}/invocations") })
|
|
172
196
|
});
|
|
173
197
|
|
|
174
|
-
export const NotFoundErrorSchema = z.object({
|
|
175
|
-
statusCode: z.literal(404),
|
|
176
|
-
error: ApiErrorSchema
|
|
177
|
-
});
|
|
178
|
-
|
|
179
198
|
export const InternalServerErrorSchema = z.object({
|
|
180
199
|
statusCode: z.literal(500),
|
|
181
200
|
error: ApiErrorSchema
|
|
@@ -717,6 +736,155 @@ export const OrganizeJobResponseSchema = z.object({
|
|
|
717
736
|
updatedAt: z.number()
|
|
718
737
|
});
|
|
719
738
|
|
|
739
|
+
export const CalendarResponseSchema = z.object({
|
|
740
|
+
calendarId: z.string(),
|
|
741
|
+
accountConfigId: z.string(),
|
|
742
|
+
urlSegment: z.string(),
|
|
743
|
+
displayName: z.string(),
|
|
744
|
+
color: CalendarColorSchema,
|
|
745
|
+
componentSet: CalendarComponentSetSchema,
|
|
746
|
+
source: CalendarSourceSchema,
|
|
747
|
+
timezone: z.string(),
|
|
748
|
+
syncSequence: z.number(),
|
|
749
|
+
createdAt: z.number(),
|
|
750
|
+
updatedAt: z.number()
|
|
751
|
+
});
|
|
752
|
+
|
|
753
|
+
export const CalendarListResponseSchema = z.object({
|
|
754
|
+
items: z.array(CalendarResponseSchema)
|
|
755
|
+
});
|
|
756
|
+
|
|
757
|
+
export const CalendarCollectionSchema = z.object({
|
|
758
|
+
calendarId: z.string(),
|
|
759
|
+
accountConfigId: z.string(),
|
|
760
|
+
urlSegment: z.string(),
|
|
761
|
+
displayName: z.string(),
|
|
762
|
+
color: CalendarColorSchema,
|
|
763
|
+
componentSet: CalendarComponentSetSchema,
|
|
764
|
+
source: CalendarSourceSchema,
|
|
765
|
+
timezone: z.string(),
|
|
766
|
+
syncSequence: z.number(),
|
|
767
|
+
createdAt: z.number(),
|
|
768
|
+
updatedAt: z.number()
|
|
769
|
+
});
|
|
770
|
+
|
|
771
|
+
export const CreateCalendarInputSchema = z.object({
|
|
772
|
+
displayName: z.string(),
|
|
773
|
+
urlSegment: z.string(),
|
|
774
|
+
color: CalendarColorSchema.optional(),
|
|
775
|
+
timezone: z.string().optional()
|
|
776
|
+
});
|
|
777
|
+
|
|
778
|
+
export const UpdateCalendarInputSchema = z.object({
|
|
779
|
+
displayName: z.string(),
|
|
780
|
+
color: CalendarColorSchema,
|
|
781
|
+
timezone: z.string()
|
|
782
|
+
});
|
|
783
|
+
|
|
784
|
+
export const CalendarNoContentSchema = z.object({
|
|
785
|
+
statusCode: z.literal(204)
|
|
786
|
+
});
|
|
787
|
+
|
|
788
|
+
export const CalendarEventInstanceSchema = z.object({
|
|
789
|
+
calendarId: z.string(),
|
|
790
|
+
calendarObjectId: z.string(),
|
|
791
|
+
recurrenceId: z.string(),
|
|
792
|
+
icalUid: z.string(),
|
|
793
|
+
summary: z.string(),
|
|
794
|
+
start: z.string(),
|
|
795
|
+
end: z.string(),
|
|
796
|
+
allDay: z.boolean(),
|
|
797
|
+
status: CalendarEventStatusSchema,
|
|
798
|
+
transparency: CalendarTransparencySchema,
|
|
799
|
+
zoneCertainty: ZoneCertaintySchema,
|
|
800
|
+
etag: z.string(),
|
|
801
|
+
hasRecurrence: z.boolean()
|
|
802
|
+
});
|
|
803
|
+
|
|
804
|
+
export const CalendarEventListResponseSchema = z.object({
|
|
805
|
+
items: z.array(CalendarEventInstanceSchema)
|
|
806
|
+
});
|
|
807
|
+
|
|
808
|
+
export const CreateCalendarEventInputSchema = z.object({
|
|
809
|
+
calendarId: z.string(),
|
|
810
|
+
summary: z.string(),
|
|
811
|
+
description: z.string().optional(),
|
|
812
|
+
location: z.string().optional(),
|
|
813
|
+
start: z.string(),
|
|
814
|
+
end: z.string(),
|
|
815
|
+
allDay: z.boolean().optional(),
|
|
816
|
+
timeZone: z.string().optional(),
|
|
817
|
+
status: CalendarEventStatusSchema.optional(),
|
|
818
|
+
transparency: CalendarTransparencySchema.optional(),
|
|
819
|
+
recurrenceRule: z.string().optional()
|
|
820
|
+
});
|
|
821
|
+
|
|
822
|
+
export const CalendarObjectSchema = z.object({
|
|
823
|
+
calendarObjectId: z.string(),
|
|
824
|
+
calendarId: z.string(),
|
|
825
|
+
resourceName: z.string(),
|
|
826
|
+
icalUid: z.string(),
|
|
827
|
+
icalData: z.string(),
|
|
828
|
+
etag: z.string(),
|
|
829
|
+
sequence: z.number(),
|
|
830
|
+
syncSequence: z.number(),
|
|
831
|
+
summary: z.string(),
|
|
832
|
+
dtStart: z.string(),
|
|
833
|
+
dtEnd: z.string(),
|
|
834
|
+
allDay: z.boolean(),
|
|
835
|
+
zoneCertainty: ZoneCertaintySchema,
|
|
836
|
+
status: CalendarEventStatusSchema,
|
|
837
|
+
transparency: CalendarTransparencySchema,
|
|
838
|
+
hasRecurrence: z.boolean(),
|
|
839
|
+
expandedThrough: z.string(),
|
|
840
|
+
createdAt: z.number(),
|
|
841
|
+
updatedAt: z.number()
|
|
842
|
+
});
|
|
843
|
+
|
|
844
|
+
export const CalendarEventResponseSchema = z.object({
|
|
845
|
+
calendarObjectId: z.string(),
|
|
846
|
+
calendarId: z.string(),
|
|
847
|
+
resourceName: z.string(),
|
|
848
|
+
icalUid: z.string(),
|
|
849
|
+
icalData: z.string(),
|
|
850
|
+
etag: z.string(),
|
|
851
|
+
sequence: z.number(),
|
|
852
|
+
syncSequence: z.number(),
|
|
853
|
+
summary: z.string(),
|
|
854
|
+
dtStart: z.string(),
|
|
855
|
+
dtEnd: z.string(),
|
|
856
|
+
allDay: z.boolean(),
|
|
857
|
+
zoneCertainty: ZoneCertaintySchema,
|
|
858
|
+
status: CalendarEventStatusSchema,
|
|
859
|
+
transparency: CalendarTransparencySchema,
|
|
860
|
+
hasRecurrence: z.boolean(),
|
|
861
|
+
expandedThrough: z.string(),
|
|
862
|
+
createdAt: z.number(),
|
|
863
|
+
updatedAt: z.number()
|
|
864
|
+
});
|
|
865
|
+
|
|
866
|
+
export const UpdateCalendarEventInputSchema = z.object({
|
|
867
|
+
summary: z.string().optional(),
|
|
868
|
+
description: z.string().optional(),
|
|
869
|
+
location: z.string().optional(),
|
|
870
|
+
start: z.string().optional(),
|
|
871
|
+
end: z.string().optional(),
|
|
872
|
+
allDay: z.boolean().optional(),
|
|
873
|
+
timeZone: z.string().optional(),
|
|
874
|
+
status: CalendarEventStatusSchema.optional(),
|
|
875
|
+
transparency: CalendarTransparencySchema.optional(),
|
|
876
|
+
recurrenceRule: z.string().optional()
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
export const CalendarFreeBusySpanSchema = z.object({
|
|
880
|
+
start: z.string(),
|
|
881
|
+
end: z.string()
|
|
882
|
+
});
|
|
883
|
+
|
|
884
|
+
export const CalendarFreeBusyResponseSchema = z.object({
|
|
885
|
+
items: z.array(CalendarFreeBusySpanSchema)
|
|
886
|
+
});
|
|
887
|
+
|
|
720
888
|
export const EmptyTrashResponseSchema = z.object({
|
|
721
889
|
deletedCount: z.number()
|
|
722
890
|
});
|
|
@@ -1590,6 +1758,20 @@ export const BodyPartContentSchema = z.object({
|
|
|
1590
1758
|
updatedAt: z.number()
|
|
1591
1759
|
});
|
|
1592
1760
|
|
|
1761
|
+
export const CalendarEventIndexSchema = z.object({
|
|
1762
|
+
calendarId: z.string(),
|
|
1763
|
+
calendarObjectId: z.string(),
|
|
1764
|
+
recurrenceId: z.string(),
|
|
1765
|
+
startAt: z.string(),
|
|
1766
|
+
endAt: z.string(),
|
|
1767
|
+
allDay: z.boolean(),
|
|
1768
|
+
summary: z.string(),
|
|
1769
|
+
status: CalendarEventStatusSchema,
|
|
1770
|
+
transparency: CalendarTransparencySchema,
|
|
1771
|
+
createdAt: z.number(),
|
|
1772
|
+
updatedAt: z.number()
|
|
1773
|
+
});
|
|
1774
|
+
|
|
1593
1775
|
export const MessageLabelSchema = z.object({
|
|
1594
1776
|
messageLabelId: z.string(),
|
|
1595
1777
|
messageId: z.string(),
|