Registration fixes
@ -2742,7 +2742,7 @@ components:
error:
type: string
schedule:
type: object
$ref: '#/components/schemas/Schedule'
options:
Schedule:
@ -2877,6 +2877,7 @@ components:
- sharing
- advanced_download
- downloads_manager
- tasks_manager
YesNo:
enum:
@ -68,15 +68,7 @@ exports.initialize = function () {
const setupRoles = async () => {
const required_roles = {
admin: {
permissions: [
'filemanager',
'settings',
'subscriptions',
'sharing',
'advanced_download',
'downloads_manager',
'tasks_manager'
]
permissions: consts.AVAILABLE_PERMISSIONS
},
user: {
@ -5,4 +5,4 @@
export type AddFileToPlaylistRequest = {
file_uid: string;
playlist_id: string;
};
@ -13,4 +13,4 @@ export type Archive = {
sub_id?: string;
timestamp: number;
uid: string;
@ -8,4 +8,4 @@ import type { YesNo } from './YesNo';
export type BaseChangePermissionsRequest = {
permission: UserPermission;
new_value: YesNo;
@ -12,4 +12,4 @@ export type Category = {
* Overrides file output for downloaded files in category
*/
custom_output?: string;
@ -22,4 +22,4 @@ export namespace CategoryRule {
}
@ -6,4 +6,4 @@ import type { BaseChangePermissionsRequest } from './BaseChangePermissionsReques
export type ChangeRolePermissionsRequest = (BaseChangePermissionsRequest & {
role: string;
});
export type ChangeUserPermissionsRequest = (BaseChangePermissionsRequest & {
user_uid: string;
@ -7,4 +7,4 @@ export type CheckConcurrentStreamRequest = {
* UID of the concurrent stream
@ -6,4 +6,4 @@ import type { ConcurrentStream } from './ConcurrentStream';
export type CheckConcurrentStreamResponse = {
stream: ConcurrentStream;
@ -6,4 +6,4 @@ export type ClearDownloadsRequest = {
clear_finished?: boolean;
clear_paused?: boolean;
clear_errors?: boolean;
@ -6,4 +6,4 @@ export type ConcurrentStream = {
playback_timestamp?: number;
unix_timestamp?: number;
playing?: boolean;
@ -3,5 +3,5 @@
/* eslint-disable */
export type Config = {
YoutubeDLMaterial: any;
YoutubeDLMaterial: Record<string, any>;
@ -7,4 +7,4 @@ import type { Config } from './Config';
export type ConfigResponse = {
config_file: Config;
success: boolean;
@ -4,4 +4,4 @@
export type CreateCategoryRequest = {
name: string;
@ -7,4 +7,4 @@ import type { Category } from './Category';
export type CreateCategoryResponse = {
new_category?: Category;
success?: boolean;
@ -6,4 +6,4 @@ export type CreatePlaylistRequest = {
playlistName: string;
uids: Array<string>;
thumbnailURL: string;
@ -7,4 +7,4 @@ import type { Playlist } from './Playlist';
export type CreatePlaylistResponse = {
new_playlist: Playlist;
export type CropFileSettings = {
cropFileStart: number;
cropFileEnd: number;
@ -17,4 +17,4 @@ export namespace DBBackup {
@ -16,4 +16,4 @@ roles?: TableInfo;
download_queue?: TableInfo;
archives?: TableInfo;
@ -42,4 +42,4 @@ export type DatabaseFile = {
abr?: number;
favorite: boolean;
@ -11,4 +11,4 @@ export type DeleteAllFilesResponse = {
* Number of files removed
delete_count?: number;
@ -6,4 +6,4 @@ import type { Archive } from './Archive';
export type DeleteArchiveItemsRequest = {
archives: Array<Archive>;
export type DeleteCategoryRequest = {
category_uid: string;
export type DeleteMp3Mp4Request = {
blacklistMode?: boolean;
export type DeleteNotificationRequest = {
export type DeletePlaylistRequest = {
@ -8,4 +8,4 @@ export type DeleteSubscriptionFileRequest = {
* If true, does not remove id from archive. Only valid if youtube-dl archive is enabled in settings.
deleteForever?: boolean;
export type DeleteUserRequest = {
@ -26,5 +26,5 @@ export type Download = {
user_uid?: string;
sub_name?: string;
prefetched_info?: any;
prefetched_info?: Record<string, any>;
@ -7,4 +7,4 @@ import type { FileType } from './FileType';
export type DownloadArchiveRequest = {
type?: FileType;
@ -11,4 +11,4 @@ export type DownloadFileRequest = {
playlist_id?: string;
url?: string;
@ -49,4 +49,4 @@ export type DownloadRequest = {
* If using youtube-dl archive, download will ignore it
ignoreArchive?: boolean;
@ -6,4 +6,4 @@ import type { Download } from './Download';
export type DownloadResponse = {
download?: Download;
@ -20,4 +20,4 @@ export type DownloadTwitchChatByVODIDRequest = {
uuid?: string;
sub?: Subscription;
@ -6,4 +6,4 @@ import type { TwitchChatMessage } from './TwitchChatMessage';
export type DownloadTwitchChatByVODIDResponse = {
chat: Array<TwitchChatMessage>;
export type DownloadVideosForSubscriptionRequest = {
subID: string;
export enum FileType {
AUDIO = 'audio',
VIDEO = 'video',
@ -6,4 +6,4 @@ export enum FileTypeFilter {
AUDIO_ONLY = 'audio_only',
VIDEO_ONLY = 'video_only',
BOTH = 'both',
export type GenerateArgsResponse = {
args?: Array<string>;
export type GenerateNewApiKeyResponse = {
new_api_key: string;
@ -6,4 +6,4 @@ import type { Category } from './Category';
export type GetAllCategoriesResponse = {
categories: Array<Category>;
@ -7,4 +7,4 @@ export type GetAllDownloadsRequest = {
* Filters downloads with the array
uids?: Array<string> | null;
export type GetAllDownloadsResponse = {
downloads?: Array<Download>;
@ -21,4 +21,4 @@ export type GetAllFilesRequest = {
* Include if you want to filter by subscription
@ -11,4 +11,4 @@ export type GetAllFilesResponse = {
* All video playlists
playlists: Array<Playlist>;
@ -6,4 +6,4 @@ import type { Subscription } from './Subscription';
export type GetAllSubscriptionsResponse = {
subscriptions: Array<Subscription>;
@ -6,4 +6,4 @@ import type { Task } from './Task';
export type GetAllTasksResponse = {
tasks?: Array<Task>;
export type GetArchivesRequest = {
export type GetArchivesResponse = {
@ -6,4 +6,4 @@ import type { DBBackup } from './DBBackup';
export type GetDBBackupsResponse = {
tasks?: Array<DBBackup>;
export type GetDownloadRequest = {
download_uid: string;
export type GetDownloadResponse = {
export type GetFileFormatsRequest = {
@ -5,6 +5,6 @@
export type GetFileFormatsResponse = {
result: {
formats?: Array<any>;
formats?: Array<Record<string, any>>;
@ -14,4 +14,4 @@ export type GetFileRequest = {
* User UID
@ -7,4 +7,4 @@ import type { DatabaseFile } from './DatabaseFile';
export type GetFileResponse = {
file?: DatabaseFile;
@ -16,4 +16,4 @@ export type GetFullTwitchChatRequest = {
export type GetFullTwitchChatResponse = {
error?: string;
export type GetLogsRequest = {
lines?: number;
@ -8,4 +8,4 @@ export type GetLogsResponse = {
logs?: string;
@ -11,4 +11,4 @@ export type GetMp3sResponse = {
* All audio playlists
@ -11,4 +11,4 @@ export type GetMp4sResponse = {
@ -6,4 +6,4 @@ import type { Notification } from './Notification';
export type GetNotificationsResponse = {
notifications?: Array<Notification>;
@ -9,4 +9,4 @@ export type GetPlaylistRequest = {
include_file_metadata?: boolean;
@ -12,4 +12,4 @@ export type GetPlaylistResponse = {
* File objects for every uid in the playlist's uids property, in the same order
file_objs?: Array<DatabaseFile>;
export type GetPlaylistsRequest = {
include_categories?: boolean;
@ -6,4 +6,4 @@ import type { Playlist } from './Playlist';
export type GetPlaylistsResponse = {
@ -13,4 +13,4 @@ user?: {
permissions?: Array<UserPermission>;
@ -11,4 +11,4 @@ export type GetSubscriptionRequest = {
* Subscription name
name?: string;
@ -6,5 +6,5 @@ import type { Subscription } from './Subscription';
export type GetSubscriptionResponse = {
subscription: Subscription;
files: Array<any>;
files: Array<Record<string, any>>;
export type GetTaskRequest = {
task_key: string;
export type GetTaskResponse = {
task?: Task;
@ -6,4 +6,4 @@ import type { User } from './User';
export type GetUsersResponse = {
users: Array<User>;
@ -8,4 +8,4 @@ export type ImportArchiveRequest = {
archive: string;
type: FileType;
@ -9,4 +9,4 @@ export type IncrementViewCountRequest = {
export type LoginRequest = {
username: string;
password: string;
@ -10,4 +10,4 @@ export type LoginResponse = {
token?: string;
available_permissions?: Array<UserPermission>;
@ -11,6 +11,6 @@ export type Notification = {
action?: Array<NotificationAction>;
read: boolean;
data?: any;
data?: Record<string, any>;
@ -7,4 +7,4 @@ export enum NotificationAction {
RETRY_DOWNLOAD = 'retry_download',
VIEW_DOWNLOAD_ERROR = 'view_download_error',
VIEW_TASKS = 'view_tasks',
@ -6,4 +6,4 @@ export enum NotificationType {
DOWNLOAD_COMPLETE = 'download_complete',
DOWNLOAD_ERROR = 'download_error',
TASK_FINISHED = 'task_finished',
@ -15,4 +15,4 @@ export type Playlist = {
auto?: boolean;
sharingEnabled?: boolean;
@ -6,4 +6,4 @@ export type RegisterRequest = {
userid: string;
export type RegisterResponse = {
user?: User;
@ -6,4 +6,4 @@ import type { SuccessObject } from './SuccessObject';
export type RestartDownloadResponse = (SuccessObject & {
new_download_uid?: string;
export type RestoreDBBackupRequest = {
file_name: string;
@ -21,4 +21,4 @@ export namespace Schedule {
@ -6,4 +6,4 @@ import type { Config } from './Config';
export type SetConfigRequest = {
new_config_file: Config;
export type SetNotificationsToReadRequest = {
export type SharingToggle = {
is_playlist?: boolean;
@ -11,4 +11,4 @@ export type Sort = {
* 1 for ascending, -1 for descending
order?: number;
@ -10,4 +10,4 @@ export type SubscribeRequest = {
customArgs?: string;
customFileOutput?: string;
maxQuality?: string;
@ -7,4 +7,4 @@ import type { Subscription } from './Subscription';
export type SubscribeResponse = {
new_sub: Subscription;
@ -15,5 +15,5 @@ export type Subscription = {
timerange?: string;
custom_args?: string;
videos: Array<any>;
videos: Array<Record<string, any>>;
@ -10,4 +10,4 @@ export type SubscriptionRequestData = {
isPlaylist?: boolean;
archive?: string;
export type SuccessObject = {
export type TableInfo = {
records_count?: number;
@ -2,6 +2,8 @@
/* tslint:disable */
import type { Schedule } from './Schedule';
export type Task = {
key: string;
title?: string;
@ -9,8 +11,8 @@ export type Task = {
last_confirmed: number;
running: boolean;
confirming: boolean;
data: any;
data: Record<string, any>;
error: string;
schedule: any;
options?: any;
schedule: Schedule;
options?: Record<string, any>;