aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/videos/channel-sync
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models/videos/channel-sync')
-rw-r--r--shared/models/videos/channel-sync/index.ts3
-rw-r--r--shared/models/videos/channel-sync/video-channel-sync-create.model.ts4
-rw-r--r--shared/models/videos/channel-sync/video-channel-sync-state.enum.ts6
-rw-r--r--shared/models/videos/channel-sync/video-channel-sync.model.ts14
4 files changed, 27 insertions, 0 deletions
diff --git a/shared/models/videos/channel-sync/index.ts b/shared/models/videos/channel-sync/index.ts
new file mode 100644
index 000000000..7d25aaac3
--- /dev/null
+++ b/shared/models/videos/channel-sync/index.ts
@@ -0,0 +1,3 @@
1export * from './video-channel-sync-state.enum'
2export * from './video-channel-sync.model'
3export * from './video-channel-sync-create.model'
diff --git a/shared/models/videos/channel-sync/video-channel-sync-create.model.ts b/shared/models/videos/channel-sync/video-channel-sync-create.model.ts
new file mode 100644
index 000000000..753a8ee4c
--- /dev/null
+++ b/shared/models/videos/channel-sync/video-channel-sync-create.model.ts
@@ -0,0 +1,4 @@
1export interface VideoChannelSyncCreate {
2 externalChannelUrl: string
3 videoChannelId: number
4}
diff --git a/shared/models/videos/channel-sync/video-channel-sync-state.enum.ts b/shared/models/videos/channel-sync/video-channel-sync-state.enum.ts
new file mode 100644
index 000000000..3e9f5ddc2
--- /dev/null
+++ b/shared/models/videos/channel-sync/video-channel-sync-state.enum.ts
@@ -0,0 +1,6 @@
1export const enum VideoChannelSyncState {
2 WAITING_FIRST_RUN = 1,
3 PROCESSING = 2,
4 SYNCED = 3,
5 FAILED = 4
6}
diff --git a/shared/models/videos/channel-sync/video-channel-sync.model.ts b/shared/models/videos/channel-sync/video-channel-sync.model.ts
new file mode 100644
index 000000000..73ac0615b
--- /dev/null
+++ b/shared/models/videos/channel-sync/video-channel-sync.model.ts
@@ -0,0 +1,14 @@
1import { VideoChannelSummary } from '../channel/video-channel.model'
2import { VideoConstant } from '../video-constant.model'
3import { VideoChannelSyncState } from './video-channel-sync-state.enum'
4
5export interface VideoChannelSync {
6 id: number
7
8 externalChannelUrl: string
9
10 createdAt: string
11 channel: VideoChannelSummary
12 state: VideoConstant<VideoChannelSyncState>
13 lastSyncAt: string
14}