2022-04-22 16:56:41 -04:00
|
|
|
namespace Boxcast
|
|
|
|
{
|
|
|
|
type Broadcast =
|
|
|
|
{
|
|
|
|
account_id:string
|
|
|
|
channel_id:string
|
|
|
|
description:string
|
|
|
|
id:string
|
|
|
|
name:string
|
|
|
|
poster:string
|
|
|
|
preview:string
|
|
|
|
starts_at:string
|
|
|
|
stops_at:string
|
|
|
|
tags:Array<string>
|
|
|
|
timeframe: "future" | "preroll" | "current" | "past"
|
|
|
|
start?: Date
|
|
|
|
stop?: Date
|
|
|
|
}
|
|
|
|
|
|
|
|
type Date =
|
|
|
|
{
|
|
|
|
Zone: string | RegExpMatchArray
|
|
|
|
Day: "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | string
|
|
|
|
Month: "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December" | string
|
|
|
|
Date: number
|
|
|
|
Hours: number
|
|
|
|
Minutes: string | number
|
2022-04-26 10:39:25 -04:00
|
|
|
M?: "AM" | "PM",
|
|
|
|
Epoch: number
|
2022-04-22 16:56:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
type StateBinding<T> = [T, (item:T)=>void];
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Store
|
|
|
|
{
|
|
|
|
type State =
|
|
|
|
{
|
|
|
|
Channel:string,
|
|
|
|
List:Array<Boxcast.Broadcast>,
|
|
|
|
Active:false | Boxcast.Broadcast
|
|
|
|
}
|
|
|
|
|
|
|
|
type Action = ["ping-out"] | ["ping-back", Array<Boxcast.Broadcast>] | ["select", Boxcast.Broadcast]
|
|
|
|
|
|
|
|
type Reducer = (inState:State, inAction:Action) => inState
|
|
|
|
}
|