From a15871560f80e07386c1dabb8370cd2664ecfd1f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 31 Jan 2020 16:56:52 +0100 Subject: Move to eslint --- .../activitypub/objects/cache-file-object.ts | 2 +- .../models/activitypub/objects/common-objects.ts | 32 ++++++++++++---------- .../activitypub/objects/video-abuse-object.ts | 2 +- .../activitypub/objects/video-torrent-object.ts | 4 +-- shared/models/activitypub/objects/view-object.ts | 2 +- 5 files changed, 22 insertions(+), 20 deletions(-) (limited to 'shared/models/activitypub/objects') diff --git a/shared/models/activitypub/objects/cache-file-object.ts b/shared/models/activitypub/objects/cache-file-object.ts index 4b0a3a724..19a817582 100644 --- a/shared/models/activitypub/objects/cache-file-object.ts +++ b/shared/models/activitypub/objects/cache-file-object.ts @@ -2,7 +2,7 @@ import { ActivityVideoUrlObject, ActivityPlaylistUrlObject } from './common-obje export interface CacheFileObject { id: string - type: 'CacheFile', + type: 'CacheFile' object: string expires: string url: ActivityVideoUrlObject | ActivityPlaylistUrlObject diff --git a/shared/models/activitypub/objects/common-objects.ts b/shared/models/activitypub/objects/common-objects.ts index bab3ce366..e94d05429 100644 --- a/shared/models/activitypub/objects/common-objects.ts +++ b/shared/models/activitypub/objects/common-objects.ts @@ -7,9 +7,9 @@ export interface ActivityIdentifierObject { export interface ActivityIconObject { type: 'Image' url: string - mediaType: 'image/jpeg' - width: number - height: number + mediaType: 'image/jpeg' | 'image/png' + width?: number + height?: number } export type ActivityVideoUrlObject = { @@ -72,19 +72,21 @@ export interface ActivityMentionObject { name: string } -export type ActivityTagObject = ActivityPlaylistSegmentHashesObject | - ActivityPlaylistInfohashesObject | - ActivityVideoUrlObject | - ActivityHashTagObject | - ActivityMentionObject | - ActivityBitTorrentUrlObject | - ActivityMagnetUrlObject +export type ActivityTagObject = + ActivityPlaylistSegmentHashesObject + | ActivityPlaylistInfohashesObject + | ActivityVideoUrlObject + | ActivityHashTagObject + | ActivityMentionObject + | ActivityBitTorrentUrlObject + | ActivityMagnetUrlObject -export type ActivityUrlObject = ActivityVideoUrlObject | - ActivityPlaylistUrlObject | - ActivityBitTorrentUrlObject | - ActivityMagnetUrlObject | - ActivityHtmlUrlObject +export type ActivityUrlObject = + ActivityVideoUrlObject + | ActivityPlaylistUrlObject + | ActivityBitTorrentUrlObject + | ActivityMagnetUrlObject + | ActivityHtmlUrlObject export interface ActivityPubAttributedTo { type: 'Group' | 'Person' diff --git a/shared/models/activitypub/objects/video-abuse-object.ts b/shared/models/activitypub/objects/video-abuse-object.ts index 5f1264a76..d9622b414 100644 --- a/shared/models/activitypub/objects/video-abuse-object.ts +++ b/shared/models/activitypub/objects/video-abuse-object.ts @@ -1,5 +1,5 @@ export interface VideoAbuseObject { - type: 'Flag', + type: 'Flag' content: string object: string | string[] } diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.ts index cadd0ea49..11de8fc56 100644 --- a/shared/models/activitypub/objects/video-torrent-object.ts +++ b/shared/models/activitypub/objects/video-torrent-object.ts @@ -20,8 +20,8 @@ export interface VideoTorrentObject { subtitleLanguage: ActivityIdentifierObject[] views: number sensitive: boolean - commentsEnabled: boolean, - downloadEnabled: boolean, + commentsEnabled: boolean + downloadEnabled: boolean waitTranscoding: boolean state: VideoState published: string diff --git a/shared/models/activitypub/objects/view-object.ts b/shared/models/activitypub/objects/view-object.ts index 00348116a..4dd21ce8e 100644 --- a/shared/models/activitypub/objects/view-object.ts +++ b/shared/models/activitypub/objects/view-object.ts @@ -1,5 +1,5 @@ export interface ViewObject { - type: 'View', + type: 'View' actor: string object: string } -- cgit v1.2.3