64 lines
1.3 KiB
TypeScript
64 lines
1.3 KiB
TypeScript
import { Privacy } from "@prisma/client";
|
|
|
|
export type ItemMetadata = {
|
|
title: string;
|
|
description: string;
|
|
tags: string;
|
|
privacy: Privacy;
|
|
categoryId: string;
|
|
resolution: string;
|
|
notifySubscribers: boolean;
|
|
madeForKids: boolean;
|
|
embeddable: boolean;
|
|
creativeCommons: boolean;
|
|
includeWatermark: boolean;
|
|
/** YouTube playlist ID (Pro only). Video is added after upload. */
|
|
playlistId?: string | null;
|
|
};
|
|
|
|
export type UploadedAudio = {
|
|
path: string;
|
|
filename: string;
|
|
metadata: ItemMetadata;
|
|
};
|
|
|
|
export type CreatePlaylistRequest = {
|
|
title: string;
|
|
description?: string;
|
|
privacy?: "public" | "unlisted" | "private";
|
|
};
|
|
|
|
export type CreateJobPayload = {
|
|
imagePath: string;
|
|
items: Array<{
|
|
audioPath: string;
|
|
audioFilename: string;
|
|
metadata: ItemMetadata;
|
|
}>;
|
|
/** Create a new playlist and attach its ID to every item (Pro). */
|
|
createPlaylist?: CreatePlaylistRequest | null;
|
|
};
|
|
|
|
export type JobItemResponse = {
|
|
id: string;
|
|
audioFilename: string;
|
|
title: string;
|
|
status: string;
|
|
youtubeVideoId: string | null;
|
|
error: string | null;
|
|
};
|
|
|
|
export type JobResponse = {
|
|
id: string;
|
|
status: string;
|
|
createdAt: string;
|
|
completedAt: string | null;
|
|
items: JobItemResponse[];
|
|
};
|
|
|
|
export type VideoJobData = {
|
|
jobItemId: string;
|
|
userId: string;
|
|
jobId: string;
|
|
};
|