UNPKG

reshuffle-moviesanywhere-connector

Version:
81 lines (80 loc) 1.98 kB
import { BaseConnector, Reshuffle } from 'reshuffle-base-connector'; declare type Obj = Record<string, any>; export interface TitleCredit { name: string; creditType: 'Cast' | 'Writers' | 'Directors' | 'Producers'; } export interface TrailerAsset { id: string; type: string; url: string; tags: string[]; } export interface TitleTrailer { id: string; title: string; window: string; assets: TrailerAsset[]; } export interface Studio { name: string; } export interface TitleData { title: string; id: string; eidr: string; adamid: string; profile: 'SD' | 'HD' | ' UHD'; rating: string; runtime: string; genres: string[]; slug: string; releaseDate: string; boxart: string; heroImage: string; hasPromoContent: boolean; hasBonusContent: boolean; description: string; credits: TitleCredit[]; trailers?: TitleTrailer[]; studios: Studio[]; } export interface TitleResponse { total: number; results: TitleData[]; } export interface Transaction { titleName: string; assetType: string; assetId: string; transactionDate: string; transactionId: string; originalTransactionId: string | null; sourceType: string; transactionType: string; profile: string; } export declare class MoviesAnywhereConnector extends BaseConnector { private kcurl; private maurl; private clientId; private clientSecret; private bearerToken?; constructor(app: Reshuffle, options?: Obj, id?: string); private authenticate; private request; private kcRequest; private maRequest; getAllTitles(): Promise<{ count: any; results: any; }>; getTitleById(id: string): Promise<any>; getTitleByEIDR(eidr: string): Promise<any>; getTitlesByStudio(studio: string): Promise<{ count: any; results: any; }>; getTransactionsByUser(userId: string): Promise<any>; } export {};