1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add shared itemDto type

This commit is contained in:
grafixeyehero 2024-01-31 01:19:35 +03:00
parent f6d63c2b84
commit 22bce0cd94

26
src/types/itemDto.ts Normal file
View file

@ -0,0 +1,26 @@
import type { BaseItemDto, BaseItemKind, CollectionTypeOptions, RecordingStatus, SearchHint, SeriesTimerInfoDto, TimerInfoDto, UserItemDataDto, VirtualFolderInfo } from '@jellyfin/sdk/lib/generated-client';
type BaseItem = Omit<BaseItemDto, 'ChannelId' | 'EndDate' | 'Id' | 'StartDate' | 'Status' | 'Type' | 'Artists' | 'MediaType' | 'Name' | 'CollectionType'>;
type TimerInfo = Omit<TimerInfoDto, 'ChannelId' | 'EndDate' | 'Id' | 'StartDate' | 'Status' | 'Type' | 'Name'>;
type SeriesTimerInfo = Omit<SeriesTimerInfoDto, 'ChannelId' | 'EndDate' | 'Id' | 'StartDate' | 'Type' | 'Name'>;
type SearchHintItem = Omit<SearchHint, 'ItemId' |'Artists' | 'Id' | 'MediaType' | 'Name' | 'StartDate' | 'Type'>;
type UserItem = Omit<UserItemDataDto, 'ItemId'>;
type VirtualFolder = Omit<VirtualFolderInfo, 'CollectionType'>;
export interface ItemDto extends BaseItem, TimerInfo, SeriesTimerInfo, SearchHintItem, UserItem, VirtualFolder {
'ChannelId'?: string | null;
'EndDate'?: string | null;
'Id'?: string | null;
'StartDate'?: string | null;
'Type'?: BaseItemKind | string | null;
'Status'?: RecordingStatus | string | null;
'CollectionType'?: CollectionTypeOptions | string | null;
'Artists'?: Array<string> | null;
'MediaType'?: string | null;
'Name'?: string | null;
'ItemId'?: string | null;
}
export type NullableString = string | null | undefined;
export type NullableNumber = number | null | undefined;
export type NullableBoolean = boolean | null | undefined;