RequestVideoEventScheduler,
RequestVideoEventSchedulerOptions
} from './request'
-import { PodInstance, VideoInstance } from '../models'
+import {
+ PodInstance,
+ VideoInstance
+} from '../models'
+import {
+ RequestEndpoint,
+ RequestVideoEventType,
+ RequestVideoQaduType
+} from '../../shared'
-type QaduParam = { videoId: string, type: string }
-type EventParam = { videoId: string, type: string }
+type QaduParam = { videoId: string, type: RequestVideoQaduType }
+type EventParam = { videoId: string, type: RequestVideoEventType }
const ENDPOINT_ACTIONS = REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS]
return createVideoQaduRequest(options, callback)
}
-function quickAndDirtyUpdatesVideoToFriends (qadusParams: QaduParam[], transaction: Sequelize.Transaction, finalCallback: (err: Error) => void) {
+function quickAndDirtyUpdatesVideoToFriends (
+ qadusParams: QaduParam[],
+ transaction: Sequelize.Transaction,
+ finalCallback: (err: Error) => void
+) {
const tasks = []
qadusParams.forEach(function (qaduParams) {
// Wrapper that populate "toIds" argument with all our friends if it is not specified
type CreateRequestOptions = {
type: string
- endpoint: string
+ endpoint: RequestEndpoint
data: Object
toIds?: number[]
transaction: Sequelize.Transaction