mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-12 22:42:13 +02:00
refactor podcast api calls
This commit is contained in:
parent
7223a7b04d
commit
5361290315
10 changed files with 288 additions and 377 deletions
|
|
@ -1,29 +1,27 @@
|
|||
import { z } from "zod";
|
||||
|
||||
export const podcast = z.object({
|
||||
id: z.number(),
|
||||
title: z.string(),
|
||||
created_at: z.string(),
|
||||
file_location: z.string(),
|
||||
podcast_transcript: z.array(z.any()),
|
||||
search_space_id: z.number(),
|
||||
chat_state_version: z.number().nullable(),
|
||||
id: z.number(),
|
||||
title: z.string(),
|
||||
created_at: z.string(),
|
||||
file_location: z.string(),
|
||||
podcast_transcript: z.array(z.any()),
|
||||
search_space_id: z.number(),
|
||||
chat_state_version: z.number().nullable(),
|
||||
});
|
||||
|
||||
export const generatePodcastRequest = z.object({
|
||||
type: z.enum(["CHAT", "DOCUMENT"]),
|
||||
ids: z.array(z.number()),
|
||||
search_space_id: z.number(),
|
||||
podcast_title: z.string().optional(),
|
||||
user_prompt: z.string().optional(),
|
||||
type: z.enum(["CHAT", "DOCUMENT"]),
|
||||
ids: z.array(z.number()),
|
||||
search_space_id: z.number(),
|
||||
podcast_title: z.string().optional(),
|
||||
user_prompt: z.string().optional(),
|
||||
});
|
||||
|
||||
export const getPodcastByChatIdRequest = z.object({
|
||||
chat_id: z.number(),
|
||||
chat_id: z.number(),
|
||||
});
|
||||
|
||||
export type GeneratePodcastRequest = z.infer<typeof generatePodcastRequest>;
|
||||
export type GetPodcastByChatIdRequest = z.infer<
|
||||
typeof getPodcastByChatIdRequest
|
||||
>;
|
||||
export type GetPodcastByChatIdRequest = z.infer<typeof getPodcastByChatIdRequest>;
|
||||
export type Podcast = z.infer<typeof podcast>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue