From 72c7248b6fdcdb2175e726ff51b42e7555f2bd84 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 24 Oct 2017 19:41:09 +0200 Subject: Add video channels --- shared/models/pods/remote-video/index.ts | 5 +++++ .../remote-video-author-create-request.model.ts | 11 +++++++++++ .../remote-video-author-remove-request.model.ts | 10 ++++++++++ .../remote-video-channel-create-request.model.ts | 15 +++++++++++++++ .../remote-video-channel-remove-request.model.ts | 10 ++++++++++ .../remote-video-channel-update-request.model.ts | 15 +++++++++++++++ .../remote-video/remote-video-create-request.model.ts | 4 ++-- .../remote-video/remote-video-remove-request.model.ts | 2 +- .../pods/remote-video/remote-video-request.model.ts | 7 ++++++- .../remote-video/remote-video-update-request.model.ts | 6 ++++-- 10 files changed, 79 insertions(+), 6 deletions(-) create mode 100644 shared/models/pods/remote-video/remote-video-author-create-request.model.ts create mode 100644 shared/models/pods/remote-video/remote-video-author-remove-request.model.ts create mode 100644 shared/models/pods/remote-video/remote-video-channel-create-request.model.ts create mode 100644 shared/models/pods/remote-video/remote-video-channel-remove-request.model.ts create mode 100644 shared/models/pods/remote-video/remote-video-channel-update-request.model.ts (limited to 'shared/models/pods/remote-video') diff --git a/shared/models/pods/remote-video/index.ts b/shared/models/pods/remote-video/index.ts index c88116849..918b9e1f6 100644 --- a/shared/models/pods/remote-video/index.ts +++ b/shared/models/pods/remote-video/index.ts @@ -1,7 +1,12 @@ export * from './remote-qadu-video-request.model' +export * from './remote-video-author-create-request.model' +export * from './remote-video-author-remove-request.model' export * from './remote-video-event-request.model' export * from './remote-video-request.model' export * from './remote-video-create-request.model' export * from './remote-video-update-request.model' export * from './remote-video-remove-request.model' +export * from './remote-video-channel-create-request.model' +export * from './remote-video-channel-update-request.model' +export * from './remote-video-channel-remove-request.model' export * from './remote-video-report-abuse-request.model' diff --git a/shared/models/pods/remote-video/remote-video-author-create-request.model.ts b/shared/models/pods/remote-video/remote-video-author-create-request.model.ts new file mode 100644 index 000000000..ae364d177 --- /dev/null +++ b/shared/models/pods/remote-video/remote-video-author-create-request.model.ts @@ -0,0 +1,11 @@ +import { RemoteVideoRequest } from './remote-video-request.model' + +export interface RemoteVideoAuthorCreateData { + uuid: string + name: string +} + +export interface RemoteVideoAuthorCreateRequest extends RemoteVideoRequest { + type: 'add-author' + data: RemoteVideoAuthorCreateData +} diff --git a/shared/models/pods/remote-video/remote-video-author-remove-request.model.ts b/shared/models/pods/remote-video/remote-video-author-remove-request.model.ts new file mode 100644 index 000000000..8738e92f0 --- /dev/null +++ b/shared/models/pods/remote-video/remote-video-author-remove-request.model.ts @@ -0,0 +1,10 @@ +import { RemoteVideoRequest } from './remote-video-request.model' + +export interface RemoteVideoAuthorRemoveData { + uuid: string +} + +export interface RemoteVideoAuthorRemoveRequest extends RemoteVideoRequest { + type: 'remove-author' + data: RemoteVideoAuthorRemoveData +} diff --git a/shared/models/pods/remote-video/remote-video-channel-create-request.model.ts b/shared/models/pods/remote-video/remote-video-channel-create-request.model.ts new file mode 100644 index 000000000..54163a2db --- /dev/null +++ b/shared/models/pods/remote-video/remote-video-channel-create-request.model.ts @@ -0,0 +1,15 @@ +import { RemoteVideoRequest } from './remote-video-request.model' + +export interface RemoteVideoChannelCreateData { + uuid: string + name: string + description: string + createdAt: Date + updatedAt: Date + ownerUUID: string +} + +export interface RemoteVideoChannelCreateRequest extends RemoteVideoRequest { + type: 'add-channel' + data: RemoteVideoChannelCreateData +} diff --git a/shared/models/pods/remote-video/remote-video-channel-remove-request.model.ts b/shared/models/pods/remote-video/remote-video-channel-remove-request.model.ts new file mode 100644 index 000000000..7aa3fe112 --- /dev/null +++ b/shared/models/pods/remote-video/remote-video-channel-remove-request.model.ts @@ -0,0 +1,10 @@ +import { RemoteVideoRequest } from './remote-video-request.model' + +export interface RemoteVideoChannelRemoveData { + uuid: string +} + +export interface RemoteVideoChannelRemoveRequest extends RemoteVideoRequest { + type: 'remove-channel' + data: RemoteVideoChannelRemoveData +} diff --git a/shared/models/pods/remote-video/remote-video-channel-update-request.model.ts b/shared/models/pods/remote-video/remote-video-channel-update-request.model.ts new file mode 100644 index 000000000..70250d109 --- /dev/null +++ b/shared/models/pods/remote-video/remote-video-channel-update-request.model.ts @@ -0,0 +1,15 @@ +import { RemoteVideoRequest } from './remote-video-request.model' + +export interface RemoteVideoChannelUpdateData { + uuid: string + name: string + description: string + createdAt: Date + updatedAt: Date + ownerUUID: string +} + +export interface RemoteVideoChannelUpdateRequest extends RemoteVideoRequest { + type: 'update-channel' + data: RemoteVideoChannelUpdateData +} diff --git a/shared/models/pods/remote-video/remote-video-create-request.model.ts b/shared/models/pods/remote-video/remote-video-create-request.model.ts index 98425e4d9..e00e81214 100644 --- a/shared/models/pods/remote-video/remote-video-create-request.model.ts +++ b/shared/models/pods/remote-video/remote-video-create-request.model.ts @@ -2,7 +2,7 @@ import { RemoteVideoRequest } from './remote-video-request.model' export interface RemoteVideoCreateData { uuid: string - author: string + channelUUID: string tags: string[] name: string category: number @@ -26,6 +26,6 @@ export interface RemoteVideoCreateData { } export interface RemoteVideoCreateRequest extends RemoteVideoRequest { - type: 'add' + type: 'add-video' data: RemoteVideoCreateData } diff --git a/shared/models/pods/remote-video/remote-video-remove-request.model.ts b/shared/models/pods/remote-video/remote-video-remove-request.model.ts index 0686dc8ab..79a5e0a5f 100644 --- a/shared/models/pods/remote-video/remote-video-remove-request.model.ts +++ b/shared/models/pods/remote-video/remote-video-remove-request.model.ts @@ -5,6 +5,6 @@ export interface RemoteVideoRemoveData { } export interface RemoteVideoRemoveRequest extends RemoteVideoRequest { - type: 'remove' + type: 'remove-video' data: RemoteVideoRemoveData } diff --git a/shared/models/pods/remote-video/remote-video-request.model.ts b/shared/models/pods/remote-video/remote-video-request.model.ts index e5052a23d..56f8136c2 100644 --- a/shared/models/pods/remote-video/remote-video-request.model.ts +++ b/shared/models/pods/remote-video/remote-video-request.model.ts @@ -1,4 +1,9 @@ export interface RemoteVideoRequest { - type: 'add' | 'update' | 'remove' | 'report-abuse' + type: RemoteVideoRequestType data: any } + +export type RemoteVideoRequestType = 'add-video' | 'update-video' | 'remove-video' | + 'add-channel' | 'update-channel' | 'remove-channel' | + 'report-abuse' | + 'add-author' | 'remove-author' diff --git a/shared/models/pods/remote-video/remote-video-update-request.model.ts b/shared/models/pods/remote-video/remote-video-update-request.model.ts index 7f34a30ae..90c42fc28 100644 --- a/shared/models/pods/remote-video/remote-video-update-request.model.ts +++ b/shared/models/pods/remote-video/remote-video-update-request.model.ts @@ -1,3 +1,5 @@ +import { RemoteVideoRequest } from './remote-video-request.model' + export interface RemoteVideoUpdateData { uuid: string tags: string[] @@ -21,7 +23,7 @@ export interface RemoteVideoUpdateData { }[] } -export interface RemoteVideoUpdateRequest { - type: 'update' +export interface RemoteVideoUpdateRequest extends RemoteVideoRequest { + type: 'update-video' data: RemoteVideoUpdateData } -- cgit v1.2.3