feat: refactor whole bunch of stuff
This commit is contained in:
20
lib/types.ts
20
lib/types.ts
@@ -1,4 +1,4 @@
|
||||
import { resources } from "@lib/resources.ts";
|
||||
import { GenericResource, GenericResourceSchema } from "./marka/schema.ts";
|
||||
|
||||
export interface TMDBMovie {
|
||||
adult: boolean;
|
||||
@@ -33,22 +33,6 @@ export interface TMDBSeries {
|
||||
vote_count: number;
|
||||
}
|
||||
|
||||
export type GenericResource = {
|
||||
name: string;
|
||||
id: string;
|
||||
tags?: string[];
|
||||
type: keyof typeof resources;
|
||||
content?: string;
|
||||
meta?: {
|
||||
image?: string;
|
||||
author?: string;
|
||||
rating?: number;
|
||||
average?: string;
|
||||
date?: Date | string;
|
||||
thumbnail?: string;
|
||||
};
|
||||
};
|
||||
|
||||
export interface GiteaOauthUser {
|
||||
sub: string;
|
||||
name: string;
|
||||
@@ -61,7 +45,7 @@ export interface GiteaOauthUser {
|
||||
export type SearchResult = {
|
||||
id: string;
|
||||
name: string;
|
||||
type: keyof typeof resources;
|
||||
type: GenericResource["content"]["_type"];
|
||||
date?: string;
|
||||
rating: number;
|
||||
tags: string[];
|
||||
|
||||
Reference in New Issue
Block a user