import {EventEmitter} from 'events'; import Listing, { ListingOptions } from './Listing'; import RedditContent from './RedditContent'; import RedditUser from './RedditUser'; import Submission from './Submission'; export default class LiveThread extends RedditContent { description_html: string; description: string; nsfw: boolean; resources_html: string; resources: string; state: string; stream: EventEmitter; title: string; viewer_count_fuzzed: number | null; viewer_count: number | null; websocket_url: string | null; acceptContributorInvite(): Promise; addUpdate(body: string): Promise; closeStream(): void; closeThread(): Promise; deleteUpdate(options: { id: string; }): Promise; editSettings(options: LiveThreadSettings): Promise; getContributors(): Promise; getDiscussions(options?: ListingOptions): Promise>; getRecentUpdates(options?: ListingOptions): Promise>; inviteContributor(options: { name: string; permissions: Permissions[]}): Promise; leaveContributor(): Promise; removeContributor(options: { name: string; }): Promise; report(options: { reason: ReportReason; }): Promise; revokeContributorInvite(options: { name: string; }): Promise; setContributorPermissions(options: { name: string; permissions: Permissions[]; }): Promise; strikeUpdate(options: { id: string; }): Promise; } type Permissions = 'update' | 'edit' | 'manage'; type ReportReason = 'spam' | 'vote-manipulation' | 'personal-information' | 'sexualizing-minors' | 'site-breaking'; export interface LiveThreadSettings { title: string; description?: string; resources?: string; nsfw?: boolean; } interface LiveUpdate { body: string; name: string; embeds: Embed[]; mobile_embeds: MobileEmbed[]; author: RedditUser; created: number; created_utc: number; body_html: string; stricken: boolean; id: string; } interface Embed { url: string; width: number; height: number; } interface MobileEmbed extends Embed { provider_url: string; original_url: string; version: string; provider_name: string; type: string; thumbnail_url: string; thumbnail_height: number; thumbnail_width: number; }