feat: half-way bulk upload support.
This commit is contained in:
@@ -15,6 +15,7 @@ const { GetSessionResponseSchema, GetSessionRequestPathSchema } =
|
||||
const { GetSessionsRequestQuerySchema, GetSessionsResponseSchema } =
|
||||
exportGetSessionsSchema(z);
|
||||
const {
|
||||
LogEntrySchema,
|
||||
PostLogRequestBodySchema,
|
||||
PostLogRequestParamsSchema,
|
||||
SingleMetadataSchema,
|
||||
@@ -112,3 +113,4 @@ export const contract = c.router(
|
||||
export type SingleMetadata = z.infer<typeof SingleMetadataSchema>;
|
||||
export type GetSessionsResponse = z.infer<typeof GetSessionsResponseSchema>;
|
||||
export type GetSessionResponse = z.infer<typeof GetSessionResponseSchema>;
|
||||
export type LogEntry = z.infer<typeof LogEntrySchema>;
|
||||
@@ -38,7 +38,7 @@ export function exportPostLogSchema(z: Z) {
|
||||
}),
|
||||
});
|
||||
|
||||
const PostLogRequestBodySchema = z.object({
|
||||
const LogEntrySchema = z.object({
|
||||
message: z.string().openapi({
|
||||
title: "Message",
|
||||
description: "A human readable message that describes the log line",
|
||||
@@ -55,7 +55,10 @@ export function exportPostLogSchema(z: Z) {
|
||||
}),
|
||||
});
|
||||
|
||||
const PostLogRequestBodySchema = LogEntrySchema.or(LogEntrySchema.array());
|
||||
|
||||
return {
|
||||
LogEntrySchema,
|
||||
SingleMetadataSchema,
|
||||
PostLogRequestParamsSchema,
|
||||
PostLogRequestBodySchema,
|
||||
|
||||
Reference in New Issue
Block a user