From 22bce0cd940452f35b3ff330ed64814122f3f54c Mon Sep 17 00:00:00 2001 From: grafixeyehero Date: Wed, 31 Jan 2024 01:19:35 +0300 Subject: [PATCH] Add shared itemDto type --- src/types/itemDto.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/types/itemDto.ts diff --git a/src/types/itemDto.ts b/src/types/itemDto.ts new file mode 100644 index 0000000000..37fc15fd8e --- /dev/null +++ b/src/types/itemDto.ts @@ -0,0 +1,26 @@ +import type { BaseItemDto, BaseItemKind, CollectionTypeOptions, RecordingStatus, SearchHint, SeriesTimerInfoDto, TimerInfoDto, UserItemDataDto, VirtualFolderInfo } from '@jellyfin/sdk/lib/generated-client'; + +type BaseItem = Omit; +type TimerInfo = Omit; +type SeriesTimerInfo = Omit; +type SearchHintItem = Omit; +type UserItem = Omit; +type VirtualFolder = Omit; + +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 | 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;