46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
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
|
|
M?: "AM" | "PM"
|
|
}
|
|
|
|
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
|
|
} |