Final commit
This commit is contained in:
parent
91fffb3294
commit
c35e0716af
372 changed files with 16591 additions and 1 deletions
47
backend/types/api.ts
Normal file
47
backend/types/api.ts
Normal file
|
@ -0,0 +1,47 @@
|
|||
import { SpotifyTrack } from "./spotify.ts";
|
||||
|
||||
export interface GetSongsTextParams {
|
||||
prompt: string;
|
||||
rules: string;
|
||||
}
|
||||
|
||||
export type GetSongsTextOutput = {
|
||||
type: "success";
|
||||
songs: SpotifyTrack[];
|
||||
} | {
|
||||
type: "error";
|
||||
error: string;
|
||||
};
|
||||
|
||||
export interface GetYoutubeInput {
|
||||
title: string;
|
||||
artist: string;
|
||||
}
|
||||
|
||||
export interface GetYoutubeOutput {
|
||||
videoId?: string;
|
||||
}
|
||||
|
||||
export interface GetTrackInput {
|
||||
trackId: string;
|
||||
}
|
||||
|
||||
export interface GetTrackOutput {
|
||||
track: SpotifyTrack;
|
||||
}
|
||||
|
||||
export type GetNewSuggestInput =
|
||||
& {
|
||||
rules: string;
|
||||
}
|
||||
& ({
|
||||
type: "scratch-suggestion";
|
||||
room_name: string;
|
||||
} | {
|
||||
type: "from-songs-suggestion";
|
||||
songs: { song: string }[];
|
||||
});
|
||||
|
||||
export type GetNewSuggestOutput = {
|
||||
songs: SpotifyTrack[];
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue