mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Create types for model enums
This commit is contained in:
@@ -28,10 +28,18 @@ import {
|
||||
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]
|
||||
|
||||
@@ -391,7 +399,7 @@ function makeRequestsToWinningPods (cert: string, podsList: PodInstance[], callb
|
||||
// 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
|
||||
|
||||
@@ -7,10 +7,11 @@ import {
|
||||
REQUESTS_LIMIT_PODS,
|
||||
REQUESTS_LIMIT_PER_POD
|
||||
} from '../../initializers'
|
||||
import { RequestEndpoint } from '../../../shared'
|
||||
|
||||
export type RequestSchedulerOptions = {
|
||||
type: string
|
||||
endpoint: string
|
||||
endpoint: RequestEndpoint
|
||||
data: Object
|
||||
toIds: number[]
|
||||
transaction: Sequelize.Transaction
|
||||
|
||||
@@ -7,9 +7,10 @@ import {
|
||||
REQUESTS_VIDEO_EVENT_LIMIT_PER_POD,
|
||||
REQUEST_VIDEO_EVENT_ENDPOINT
|
||||
} from '../../initializers'
|
||||
import { RequestVideoEventType } from '../../../shared'
|
||||
|
||||
export type RequestVideoEventSchedulerOptions = {
|
||||
type: string
|
||||
type: RequestVideoEventType
|
||||
videoId: string
|
||||
count?: number
|
||||
transaction?: Sequelize.Transaction
|
||||
|
||||
@@ -9,9 +9,10 @@ import {
|
||||
REQUEST_VIDEO_QADU_ENDPOINT,
|
||||
REQUEST_VIDEO_QADU_TYPES
|
||||
} from '../../initializers'
|
||||
import { RequestVideoQaduType } from '../../../shared'
|
||||
|
||||
export type RequestVideoQaduSchedulerOptions = {
|
||||
type: string
|
||||
type: RequestVideoQaduType
|
||||
videoId: string
|
||||
transaction?: Sequelize.Transaction
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user