// This file is auto-generated by @hey-api/openapi-ts

export type AudioWaveform = {
  data: Array<number>;
};

export type Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post =
  {
    chunk: Blob | File;
  };

export type CreateParticipant = {
  speaker?: number | null;
  name: string;
};

export type CreateRoom = {
  name: string;
  zulip_auto_post: boolean;
  zulip_stream: string;
  zulip_topic: string;
  is_locked: boolean;
  room_mode: string;
  recording_type: string;
  recording_trigger: string;
};

export type CreateTranscript = {
  name: string;
  source_language?: string;
  target_language?: string;
};

export type DeletionStatus = {
  status: string;
};

export type GetTranscript = {
  id: string;
  user_id: string | null;
  name: string;
  status: string;
  locked: boolean;
  duration: number;
  title: string | null;
  short_summary: string | null;
  long_summary: string | null;
  created_at: string;
  share_mode?: string;
  source_language: string | null;
  target_language: string | null;
  participants: Array<TranscriptParticipant> | null;
  reviewed: boolean;
  meeting_id: string | null;
};

export type GetTranscriptSegmentTopic = {
  text: string;
  start: number;
  speaker: number;
};

export type GetTranscriptTopic = {
  id: string;
  title: string;
  summary: string;
  timestamp: number;
  duration: number | null;
  transcript: string;
  segments?: Array<GetTranscriptSegmentTopic>;
};

export type GetTranscriptTopicWithWords = {
  id: string;
  title: string;
  summary: string;
  timestamp: number;
  duration: number | null;
  transcript: string;
  segments?: Array<GetTranscriptSegmentTopic>;
  words?: Array<Word>;
};

export type GetTranscriptTopicWithWordsPerSpeaker = {
  id: string;
  title: string;
  summary: string;
  timestamp: number;
  duration: number | null;
  transcript: string;
  segments?: Array<GetTranscriptSegmentTopic>;
  words_per_speaker?: Array<SpeakerWords>;
};

export type HTTPValidationError = {
  detail?: Array<ValidationError>;
};

export type Meeting = {
  id: string;
  room_name: string;
  room_url: string;
  host_room_url: string;
  viewer_room_url: string;
  start_date: string;
  end_date: string;
};

export type Page_GetTranscript_ = {
  items: Array<GetTranscript>;
  total: number;
  page: number | null;
  size: number | null;
  pages?: number | null;
};

export type Page_Room_ = {
  items: Array<Room>;
  total: number;
  page: number | null;
  size: number | null;
  pages?: number | null;
};

export type Participant = {
  id: string;
  speaker: number | null;
  name: string;
};

export type Room = {
  id: string;
  name: string;
  user_id: string;
  created_at: string;
  zulip_auto_post: boolean;
  zulip_stream: string;
  zulip_topic: string;
  is_locked: boolean;
  room_mode: string;
  recording_type: string;
  recording_trigger: string;
};

export type RtcOffer = {
  sdp: string;
  type: string;
};

export type SpeakerAssignment = {
  speaker?: number | null;
  participant?: string | null;
  timestamp_from: number;
  timestamp_to: number;
};

export type SpeakerAssignmentStatus = {
  status: string;
};

export type SpeakerMerge = {
  speaker_from: number;
  speaker_to: number;
};

export type SpeakerWords = {
  speaker: number;
  words: Array<Word>;
};

export type Stream = {
  stream_id: number;
  name: string;
};

export type Topic = {
  name: string;
};

export type TranscriptParticipant = {
  id?: string;
  speaker: number | null;
  name: string;
};

export type UpdateParticipant = {
  speaker?: number | null;
  name?: string | null;
};

export type UpdateRoom = {
  name: string;
  zulip_auto_post: boolean;
  zulip_stream: string;
  zulip_topic: string;
  is_locked: boolean;
  room_mode: string;
  recording_type: string;
  recording_trigger: string;
};

export type UpdateTranscript = {
  name?: string | null;
  locked?: boolean | null;
  title?: string | null;
  short_summary?: string | null;
  long_summary?: string | null;
  share_mode?: "public" | "semi-private" | "private" | null;
  participants?: Array<TranscriptParticipant> | null;
  reviewed?: boolean | null;
};

export type UserInfo = {
  sub: string;
  email: string | null;
  email_verified: boolean | null;
};

export type ValidationError = {
  loc: Array<string | number>;
  msg: string;
  type: string;
};

export type Word = {
  text: string;
  start: number;
  end: number;
  speaker?: number;
};

export type MetricsResponse = unknown;

export type V1RoomsListData = {
  /**
   * Page number
   */
  page?: number;
  /**
   * Page size
   */
  size?: number;
};

export type V1RoomsListResponse = Page_Room_;

export type V1RoomsCreateData = {
  requestBody: CreateRoom;
};

export type V1RoomsCreateResponse = Room;

export type V1RoomsUpdateData = {
  requestBody: UpdateRoom;
  roomId: string;
};

export type V1RoomsUpdateResponse = Room;

export type V1RoomsDeleteData = {
  roomId: string;
};

export type V1RoomsDeleteResponse = DeletionStatus;

export type V1RoomsCreateMeetingData = {
  roomName: string;
};

export type V1RoomsCreateMeetingResponse = Meeting;

export type V1TranscriptsListData = {
  /**
   * Page number
   */
  page?: number;
  /**
   * Page size
   */
  size?: number;
};

export type V1TranscriptsListResponse = Page_GetTranscript_;

export type V1TranscriptsCreateData = {
  requestBody: CreateTranscript;
};

export type V1TranscriptsCreateResponse = GetTranscript;

export type V1TranscriptGetData = {
  transcriptId: string;
};

export type V1TranscriptGetResponse = GetTranscript;

export type V1TranscriptUpdateData = {
  requestBody: UpdateTranscript;
  transcriptId: string;
};

export type V1TranscriptUpdateResponse = GetTranscript;

export type V1TranscriptDeleteData = {
  transcriptId: string;
};

export type V1TranscriptDeleteResponse = DeletionStatus;

export type V1TranscriptGetTopicsData = {
  transcriptId: string;
};

export type V1TranscriptGetTopicsResponse = Array<GetTranscriptTopic>;

export type V1TranscriptGetTopicsWithWordsData = {
  transcriptId: string;
};

export type V1TranscriptGetTopicsWithWordsResponse =
  Array<GetTranscriptTopicWithWords>;

export type V1TranscriptGetTopicsWithWordsPerSpeakerData = {
  topicId: string;
  transcriptId: string;
};

export type V1TranscriptGetTopicsWithWordsPerSpeakerResponse =
  GetTranscriptTopicWithWordsPerSpeaker;

export type V1TranscriptPostToZulipData = {
  includeTopics: boolean;
  stream: string;
  topic: string;
  transcriptId: string;
};

export type V1TranscriptPostToZulipResponse = unknown;

export type V1TranscriptHeadAudioMp3Data = {
  token?: string | null;
  transcriptId: string;
};

export type V1TranscriptHeadAudioMp3Response = unknown;

export type V1TranscriptGetAudioMp3Data = {
  token?: string | null;
  transcriptId: string;
};

export type V1TranscriptGetAudioMp3Response = unknown;

export type V1TranscriptGetAudioWaveformData = {
  transcriptId: string;
};

export type V1TranscriptGetAudioWaveformResponse = AudioWaveform;

export type V1TranscriptGetParticipantsData = {
  transcriptId: string;
};

export type V1TranscriptGetParticipantsResponse = Array<Participant>;

export type V1TranscriptAddParticipantData = {
  requestBody: CreateParticipant;
  transcriptId: string;
};

export type V1TranscriptAddParticipantResponse = Participant;

export type V1TranscriptGetParticipantData = {
  participantId: string;
  transcriptId: string;
};

export type V1TranscriptGetParticipantResponse = Participant;

export type V1TranscriptUpdateParticipantData = {
  participantId: string;
  requestBody: UpdateParticipant;
  transcriptId: string;
};

export type V1TranscriptUpdateParticipantResponse = Participant;

export type V1TranscriptDeleteParticipantData = {
  participantId: string;
  transcriptId: string;
};

export type V1TranscriptDeleteParticipantResponse = DeletionStatus;

export type V1TranscriptAssignSpeakerData = {
  requestBody: SpeakerAssignment;
  transcriptId: string;
};

export type V1TranscriptAssignSpeakerResponse = SpeakerAssignmentStatus;

export type V1TranscriptMergeSpeakerData = {
  requestBody: SpeakerMerge;
  transcriptId: string;
};

export type V1TranscriptMergeSpeakerResponse = SpeakerAssignmentStatus;

export type V1TranscriptRecordUploadData = {
  chunkNumber: number;
  formData: Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post;
  totalChunks: number;
  transcriptId: string;
};

export type V1TranscriptRecordUploadResponse = unknown;

export type V1TranscriptGetWebsocketEventsData = {
  transcriptId: string;
};

export type V1TranscriptGetWebsocketEventsResponse = unknown;

export type V1TranscriptRecordWebrtcData = {
  requestBody: RtcOffer;
  transcriptId: string;
};

export type V1TranscriptRecordWebrtcResponse = unknown;

export type V1TranscriptProcessData = {
  transcriptId: string;
};

export type V1TranscriptProcessResponse = unknown;

export type V1UserMeResponse = UserInfo | null;

export type V1ZulipGetStreamsResponse = Array<Stream>;

export type V1ZulipGetTopicsData = {
  streamId: number;
};

export type V1ZulipGetTopicsResponse = Array<Topic>;

export type $OpenApiTs = {
  "/metrics": {
    get: {
      res: {
        /**
         * Successful Response
         */
        200: unknown;
      };
    };
  };
  "/v1/rooms": {
    get: {
      req: V1RoomsListData;
      res: {
        /**
         * Successful Response
         */
        200: Page_Room_;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
    post: {
      req: V1RoomsCreateData;
      res: {
        /**
         * Successful Response
         */
        200: Room;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/rooms/{room_id}": {
    patch: {
      req: V1RoomsUpdateData;
      res: {
        /**
         * Successful Response
         */
        200: Room;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
    delete: {
      req: V1RoomsDeleteData;
      res: {
        /**
         * Successful Response
         */
        200: DeletionStatus;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/rooms/{room_name}/meeting": {
    post: {
      req: V1RoomsCreateMeetingData;
      res: {
        /**
         * Successful Response
         */
        200: Meeting;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts": {
    get: {
      req: V1TranscriptsListData;
      res: {
        /**
         * Successful Response
         */
        200: Page_GetTranscript_;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
    post: {
      req: V1TranscriptsCreateData;
      res: {
        /**
         * Successful Response
         */
        200: GetTranscript;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}": {
    get: {
      req: V1TranscriptGetData;
      res: {
        /**
         * Successful Response
         */
        200: GetTranscript;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
    patch: {
      req: V1TranscriptUpdateData;
      res: {
        /**
         * Successful Response
         */
        200: GetTranscript;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
    delete: {
      req: V1TranscriptDeleteData;
      res: {
        /**
         * Successful Response
         */
        200: DeletionStatus;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/topics": {
    get: {
      req: V1TranscriptGetTopicsData;
      res: {
        /**
         * Successful Response
         */
        200: Array<GetTranscriptTopic>;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/topics/with-words": {
    get: {
      req: V1TranscriptGetTopicsWithWordsData;
      res: {
        /**
         * Successful Response
         */
        200: Array<GetTranscriptTopicWithWords>;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/topics/{topic_id}/words-per-speaker": {
    get: {
      req: V1TranscriptGetTopicsWithWordsPerSpeakerData;
      res: {
        /**
         * Successful Response
         */
        200: GetTranscriptTopicWithWordsPerSpeaker;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/zulip": {
    post: {
      req: V1TranscriptPostToZulipData;
      res: {
        /**
         * Successful Response
         */
        200: unknown;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/audio/mp3": {
    head: {
      req: V1TranscriptHeadAudioMp3Data;
      res: {
        /**
         * Successful Response
         */
        200: unknown;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
    get: {
      req: V1TranscriptGetAudioMp3Data;
      res: {
        /**
         * Successful Response
         */
        200: unknown;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/audio/waveform": {
    get: {
      req: V1TranscriptGetAudioWaveformData;
      res: {
        /**
         * Successful Response
         */
        200: AudioWaveform;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/participants": {
    get: {
      req: V1TranscriptGetParticipantsData;
      res: {
        /**
         * Successful Response
         */
        200: Array<Participant>;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
    post: {
      req: V1TranscriptAddParticipantData;
      res: {
        /**
         * Successful Response
         */
        200: Participant;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/participants/{participant_id}": {
    get: {
      req: V1TranscriptGetParticipantData;
      res: {
        /**
         * Successful Response
         */
        200: Participant;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
    patch: {
      req: V1TranscriptUpdateParticipantData;
      res: {
        /**
         * Successful Response
         */
        200: Participant;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
    delete: {
      req: V1TranscriptDeleteParticipantData;
      res: {
        /**
         * Successful Response
         */
        200: DeletionStatus;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/speaker/assign": {
    patch: {
      req: V1TranscriptAssignSpeakerData;
      res: {
        /**
         * Successful Response
         */
        200: SpeakerAssignmentStatus;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/speaker/merge": {
    patch: {
      req: V1TranscriptMergeSpeakerData;
      res: {
        /**
         * Successful Response
         */
        200: SpeakerAssignmentStatus;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/record/upload": {
    post: {
      req: V1TranscriptRecordUploadData;
      res: {
        /**
         * Successful Response
         */
        200: unknown;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/events": {
    get: {
      req: V1TranscriptGetWebsocketEventsData;
      res: {
        /**
         * Successful Response
         */
        200: unknown;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/record/webrtc": {
    post: {
      req: V1TranscriptRecordWebrtcData;
      res: {
        /**
         * Successful Response
         */
        200: unknown;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/transcripts/{transcript_id}/process": {
    post: {
      req: V1TranscriptProcessData;
      res: {
        /**
         * Successful Response
         */
        200: unknown;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
  "/v1/me": {
    get: {
      res: {
        /**
         * Successful Response
         */
        200: UserInfo | null;
      };
    };
  };
  "/v1/zulip/streams": {
    get: {
      res: {
        /**
         * Successful Response
         */
        200: Array<Stream>;
      };
    };
  };
  "/v1/zulip/streams/{stream_id}/topics": {
    get: {
      req: V1ZulipGetTopicsData;
      res: {
        /**
         * Successful Response
         */
        200: Array<Topic>;
        /**
         * Validation Error
         */
        422: HTTPValidationError;
      };
    };
  };
};
