From d6886027109af42be2e3ec5d14ad166199add11d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 29 Jul 2021 11:54:38 +0200 Subject: Refactor search query options --- shared/models/search/video-channels-search-query.model.ts | 6 ++++++ shared/models/search/video-playlists-search-query.model.ts | 8 ++++++++ shared/models/search/videos-common-query.model.ts | 6 ++++++ shared/models/search/videos-search-query.model.ts | 8 +++++++- 4 files changed, 27 insertions(+), 1 deletion(-) (limited to 'shared/models/search') diff --git a/shared/models/search/video-channels-search-query.model.ts b/shared/models/search/video-channels-search-query.model.ts index 77cea4a59..b68a1e80b 100644 --- a/shared/models/search/video-channels-search-query.model.ts +++ b/shared/models/search/video-channels-search-query.model.ts @@ -10,3 +10,9 @@ export interface VideoChannelsSearchQuery extends SearchTargetQuery { host?: string handles?: string[] } + +export interface VideoChannelsSearchQueryAfterSanitize extends VideoChannelsSearchQuery { + start: number + count: number + sort: string +} diff --git a/shared/models/search/video-playlists-search-query.model.ts b/shared/models/search/video-playlists-search-query.model.ts index 55393c92a..d9027eb5b 100644 --- a/shared/models/search/video-playlists-search-query.model.ts +++ b/shared/models/search/video-playlists-search-query.model.ts @@ -8,5 +8,13 @@ export interface VideoPlaylistsSearchQuery extends SearchTargetQuery { sort?: string host?: string + + // UUIDs or short UUIDs uuids?: string[] } + +export interface VideoPlaylistsSearchQueryAfterSanitize extends VideoPlaylistsSearchQuery { + start: number + count: number + sort: string +} diff --git a/shared/models/search/videos-common-query.model.ts b/shared/models/search/videos-common-query.model.ts index 179266338..2f2e9a934 100644 --- a/shared/models/search/videos-common-query.model.ts +++ b/shared/models/search/videos-common-query.model.ts @@ -25,6 +25,12 @@ export interface VideosCommonQuery { skipCount?: boolean } +export interface VideosCommonQueryAfterSanitize extends VideosCommonQuery { + start: number + count: number + sort: string +} + export interface VideosWithSearchCommonQuery extends VideosCommonQuery { search?: string } diff --git a/shared/models/search/videos-search-query.model.ts b/shared/models/search/videos-search-query.model.ts index 736d89577..a5436879d 100644 --- a/shared/models/search/videos-search-query.model.ts +++ b/shared/models/search/videos-search-query.model.ts @@ -15,6 +15,12 @@ export interface VideosSearchQuery extends SearchTargetQuery, VideosCommonQuery durationMin?: number // seconds durationMax?: number // seconds - // UUIDs or short + // UUIDs or short UUIDs uuids?: string[] } + +export interface VideosSearchQueryAfterSanitize extends VideosSearchQuery { + start: number + count: number + sort: string +} -- cgit v1.2.3