mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 19:31:46 +00:00
22 lines
542 B
TypeScript
22 lines
542 B
TypeScript
import * as z from 'zod';
|
|
|
|
import type { LyricResult } from '../types';
|
|
|
|
export enum ProviderNames {
|
|
YTMusic = 'YTMusic',
|
|
LRCLib = 'LRCLib',
|
|
MusixMatch = 'MusixMatch',
|
|
LyricsGenius = 'LyricsGenius',
|
|
// Megalobiz = 'Megalobiz',
|
|
}
|
|
|
|
export const ProviderNameSchema = z.enum(ProviderNames);
|
|
export type ProviderName = z.infer<typeof ProviderNameSchema>;
|
|
export const providerNames = ProviderNameSchema.options;
|
|
|
|
export type ProviderState = {
|
|
state: 'fetching' | 'done' | 'error';
|
|
data: LyricResult | null;
|
|
error: Error | null;
|
|
};
|