webstreamr/src/types.ts
2025-05-29 19:17:21 +00:00

31 lines
688 B
TypeScript

import { Manifest, ManifestConfig } from 'stremio-addon-sdk';
export interface Context {
id: string;
ip: string;
config: Config;
referer?: URL;
}
export type ManifestWithConfig = Manifest & { config: ManifestConfig[] };
export type Config = Partial<Record<CountryCode | 'excludeExternalUrls', string>>;
export type CountryCode = 'de' | 'en' | 'es' | 'fr' | 'it' | 'mx';
export interface Meta {
bytes?: number;
countryCode: CountryCode;
height?: number;
title?: string;
}
export interface UrlResult {
url: URL;
isExternal?: boolean;
cloudflareChallenge?: boolean;
label: string;
sourceId?: string;
meta: Meta;
requestHeaders?: Record<string, string>;
}