Phase 1: Backend scaffold with Fastify, Prisma, Docker

This commit is contained in:
2026-02-23 15:26:50 +01:00
commit 8ea3279c3b
17 changed files with 3345 additions and 0 deletions

91
src/types/api.ts Normal file
View File

@@ -0,0 +1,91 @@
// ── Auth ──────────────────────────────────────────────────
export interface MetaCallbackBody {
code: string;
deviceInfo?: string;
}
export interface RefreshBody {
refreshToken: string;
}
export interface AuthTokensResponse {
accessToken: string;
refreshToken: string;
expiresIn: number;
}
export interface UserProfileResponse {
id: string;
displayName: string;
email: string | null;
avatarUrl: string | null;
}
// ── Providers ────────────────────────────────────────────
export interface AuthUrlResponse {
url: string;
state: string;
}
export interface ProviderCallbackBody {
code: string;
state: string;
}
export interface LinkedAccountResponse {
id: string;
serviceId: string;
displayName: string;
accountId: string;
avatarUrl: string | null;
}
// ── Streams ──────────────────────────────────────────────
export interface CreateStreamPlanBody {
name: string;
destinations: CreateDestinationBody[];
}
export interface CreateDestinationBody {
serviceId: string;
title: string;
description?: string;
privacyStatus?: string;
gameId?: string;
tags?: string;
}
export interface StreamPlanResponse {
id: string;
name: string;
status: string;
createdAt: string;
updatedAt: string;
destinations: StreamDestinationResponse[];
}
export interface StreamDestinationResponse {
id: string;
serviceId: string;
title: string;
description: string;
privacyStatus: string;
gameId: string;
tags: string;
rtmpUrl: string;
streamKey: string;
broadcastId: string;
status: string;
}
export interface PrepareResponse {
planId: string;
destinations: PreparedDestination[];
}
export interface PreparedDestination {
serviceId: string;
rtmpUrl: string;
streamKey: string;
broadcastId: string;
}