Phase 1: Backend scaffold with Fastify, Prisma, Docker
This commit is contained in:
91
src/types/api.ts
Normal file
91
src/types/api.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user