export declare namespace Models { type ISOString = string; enum PlaySegmentType { NEWEST = "new", TRENDING = "hot", BEST = "best", } interface IStreamSegmentQueryParams { segment: PlaySegmentType; releasedAfter?: ISOString; releasedBefore?: ISOString; limit?: number; } enum StreamTypes { Mainstream = "Mainstream", Channel = "Channel", Player = "Player", PlayType = "PlayType", Event = "Event", College = "College", } enum NotificationTypes { NewPlaysInStream = "NewPlaysInStream", NewReplyToMyComment = "NewReplyToMyComment", NewLikeOnMyComment = "NewLikeOnMyComment", NewFollowerOfStream = "NewFollowerOfStream", MyPlayReleased = "MyPlayReleased", NewCommentOnPlay = "NewCommentOnPlay", NewRatingOnPlay = "NewRatingOnPlay", } enum UserRoles { Admin = "Admin", Partner = "Partner", User = "User", } interface IUserCredentials { email: string; password: string; } interface IUserRegistration { user_name: string; email: string; password: string; } interface IIdTime { id: string; time: ISOString; } interface IUser { _id: string; role: UserRoles; user_name: string; email: string; hashed_password: string; join_date: ISOString; saved_plays: IIdTime[]; streams_following: IIdTime[]; player_stream?: string; channel_stream?: string; device_ids: string[]; } interface IDeviceIdDTO { device_id: string; } interface IUserToken { user: IUser; auth_token: string; } type StreamFollowingCounts = { [streamId: string]: number; }; interface IAuthDTOData { user: IUser; saved_plays: IStreamPlaysDTO; streams_following: IStream[]; user_ratings: Models.IRating[]; player_stream?: Models.IStream; channel_stream?: Models.IStream; } interface IAuthDTO { auth_token?: string; data: IAuthDTOData; } interface IRating { _id: string; time: ISOString; play_id: string; user_id: string; value: number; } interface IChannelInfo { description: string; youtube_link: string; owner: string; } interface IEventInfo { description: string; city: string; state: string; start_date: ISOString; end_date: ISOString; } interface IPlayerInfo { height: number; weight: number; position: string; grad_year: number; school_name: string; city: string; state: string; } interface IInputPlayDTO extends IPlayVideoUploadResponse { caption: string; streams: string[]; released_at?: ISOString; related_url?: string; } interface IPlay extends IInputPlayDTO { _id: string; uploader_id: string; released_at: string; } interface IPlayDTO extends IPlay { num_comments: number; avg_comm_rating: number; num_ratings: number; } interface IInputStream { type: StreamTypes; name: string; photo_url: string; player_info?: IPlayerInfo; channel_info?: IChannelInfo; event_info?: IEventInfo; is_suggestion?: boolean; } interface IStream extends IInputStream { _id: string; is_suggestion: boolean; } interface IEmailAvailabilityDTO { is_email_available: boolean; } interface ICreatePlayerStreamResponse { user?: IUser; stream: Models.IStream; } interface IInputComment { user_rating: number; user_name: string; user_photo?: string; text: string; parent?: string; } interface IInputFeedback { email?: string; message: string; time: string; } interface IFeedback extends IInputFeedback { _id: string; } interface IComment extends IInputComment { _id: string; user_id: string; play_id: string; time: ISOString; likes: IIdTime[]; } interface IInputStreamCollection { title: string; description: string; display_rank: number; streams: string[]; } interface IStreamCollection extends IInputStreamCollection { _id: string; } interface IPlayScreenDTO { play: IPlayDTO; streams: Models.IStream[]; } interface IStreamCollectionsDTO { collections: IStreamCollection[]; streams: IStream[]; } interface INotification { type: NotificationTypes; time: ISOString; } interface INewPlaysInStream extends INotification { type: NotificationTypes.NewPlaysInStream; stream: IStream; plays: IPlayDTO[]; } interface INewReplyToMyComment extends INotification { type: NotificationTypes.NewReplyToMyComment; play: IPlayDTO; comment: IComment; reply: IComment; } interface INewLikeOnMyComment extends INotification { type: NotificationTypes.NewLikeOnMyComment; comment: IComment; userWhoLiked: IUser; } interface INewFollowerOfMyStream extends INotification { type: NotificationTypes.NewFollowerOfStream; streamId: string; follower: IUser; } interface IMyPlayReleased extends INotification { type: NotificationTypes.MyPlayReleased; play: IPlayDTO; } interface INewCommentOnPlay extends INotification { type: NotificationTypes.NewCommentOnPlay; play: IPlayDTO; comment: IComment; } interface INewRatingOnPlay extends INotification { type: NotificationTypes.NewRatingOnPlay; play: IPlayDTO; rating: IRating; user: IUser; } interface IStreamPlaysDTO { streams: IStream[]; plays: IPlayDTO[]; } interface IPhotoUploadResponse { source_photo_url: string; encoded_photo_url: string; } interface IPlayVideoUploadResponse { source_video_url: string; encoded_video_url: string; thumbnail_url: string; blurred_thumbnail_url: string; } }