diff --git a/src/components/cardbuilder/Card/cardHelper.ts b/src/components/cardbuilder/Card/cardHelper.ts index 4ce3247379..ae4ef06f18 100644 --- a/src/components/cardbuilder/Card/cardHelper.ts +++ b/src/components/cardbuilder/Card/cardHelper.ts @@ -16,7 +16,8 @@ import datetime from 'scripts/datetime'; import { isUsingLiveTvNaming } from '../cardBuilderUtils'; -import type { ItemDto, NullableNumber, NullableString } from 'types/itemDto'; +import type { NullableNumber, NullableString } from 'types/base/common/shared/types'; +import type { ItemDto } from 'types/itemDto'; import type { CardOptions } from 'types/cardOptions'; import type { DataAttributes } from 'types/dataAttributes'; import { getDataAttributes } from 'utils/items'; diff --git a/src/components/cardbuilder/Card/useCardImageUrl.ts b/src/components/cardbuilder/Card/useCardImageUrl.ts index 1d1fca2dc7..8afec0cab3 100644 --- a/src/components/cardbuilder/Card/useCardImageUrl.ts +++ b/src/components/cardbuilder/Card/useCardImageUrl.ts @@ -4,7 +4,8 @@ import { getImageApi } from '@jellyfin/sdk/lib/utils/api/image-api'; import { useApi } from 'hooks/useApi'; import { getDesiredAspect } from '../cardBuilderUtils'; import { CardShape } from 'utils/card'; -import type { ItemDto, NullableNumber, NullableString } from 'types/itemDto'; +import type { NullableNumber, NullableString } from 'types/base/common/shared/types'; +import type { ItemDto } from 'types/itemDto'; import type { CardOptions } from 'types/cardOptions'; function getPreferThumbInfo(item: ItemDto, cardOptions: CardOptions) { diff --git a/src/components/cardbuilder/cardBuilderUtils.ts b/src/components/cardbuilder/cardBuilderUtils.ts index ecd1d375b5..489d6c8abd 100644 --- a/src/components/cardbuilder/cardBuilderUtils.ts +++ b/src/components/cardbuilder/cardBuilderUtils.ts @@ -1,4 +1,4 @@ -import { CardShape } from 'utils/card'; +import { CardShape } from '../../utils/card'; import { randomInt } from '../../utils/number'; import classNames from 'classnames'; diff --git a/src/components/indicators/useIndicator.tsx b/src/components/indicators/useIndicator.tsx index f54d76d9cd..da5ea537bf 100644 --- a/src/components/indicators/useIndicator.tsx +++ b/src/components/indicators/useIndicator.tsx @@ -16,7 +16,8 @@ import classNames from 'classnames'; import datetime from 'scripts/datetime'; import itemHelper from 'components/itemHelper'; import AutoTimeProgressBar from 'elements/emby-progressbar/AutoTimeProgressBar'; -import type { ItemDto, NullableString } from 'types/itemDto'; +import type { NullableString } from 'types/base/common/shared/types'; +import type { ItemDto } from 'types/itemDto'; import type { ProgressOptions } from 'types/progressOptions'; const TypeIcon = { diff --git a/src/components/mediainfo/usePrimaryMediaInfo.tsx b/src/components/mediainfo/usePrimaryMediaInfo.tsx index b702bc42ce..6c58609152 100644 --- a/src/components/mediainfo/usePrimaryMediaInfo.tsx +++ b/src/components/mediainfo/usePrimaryMediaInfo.tsx @@ -3,7 +3,8 @@ import * as userSettings from 'scripts/settings/userSettings'; import datetime from 'scripts/datetime'; import globalize from 'scripts/globalize'; import itemHelper from '../itemHelper'; -import type { ItemDto, NullableNumber, NullableString } from 'types/itemDto'; +import type { NullableNumber, NullableString } from 'types/base/common/shared/types'; +import type { ItemDto } from 'types/itemDto'; import type { MiscInfo } from 'types/mediaInfoItem'; function shouldShowFolderRuntime( diff --git a/src/types/base/common/shared/types.ts b/src/types/base/common/shared/types.ts new file mode 100644 index 0000000000..f89240dc23 --- /dev/null +++ b/src/types/base/common/shared/types.ts @@ -0,0 +1,3 @@ +export type NullableString = string | null | undefined; +export type NullableNumber = number | null | undefined; +export type NullableBoolean = boolean | null | undefined; diff --git a/src/types/cardOptions.ts b/src/types/cardOptions.ts index 19cea6a272..b18906c0c4 100644 --- a/src/types/cardOptions.ts +++ b/src/types/cardOptions.ts @@ -4,7 +4,8 @@ import type { UserItemDataDto } from '@jellyfin/sdk/lib/generated-client/models/ import type { BaseItemDtoImageBlurHashes } from '@jellyfin/sdk/lib/generated-client/models/base-item-dto-image-blur-hashes'; import type { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type'; import { CardShape } from 'utils/card'; -import type { ItemDto, NullableString } from './itemDto'; +import type { NullableString } from './base/common/shared/types'; +import type { ItemDto } from './itemDto'; import type { ParentId } from './library'; export interface CardOptions { diff --git a/src/types/dataAttributes.ts b/src/types/dataAttributes.ts index 1258d61cd4..b9ae880f7a 100644 --- a/src/types/dataAttributes.ts +++ b/src/types/dataAttributes.ts @@ -1,5 +1,6 @@ -import type { CollectionType, UserItemDataDto } from '@jellyfin/sdk/lib/generated-client'; -import type { NullableBoolean, NullableNumber, NullableString } from './itemDto'; +import type { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type'; +import type { UserItemDataDto } from '@jellyfin/sdk/lib/generated-client/models/user-item-data-dto'; +import type { NullableBoolean, NullableNumber, NullableString } from './base/common/shared/types'; export type AttributesOpts = { context?: CollectionType, diff --git a/src/types/itemDto.ts b/src/types/itemDto.ts index 37fc15fd8e..a3fcedeaee 100644 --- a/src/types/itemDto.ts +++ b/src/types/itemDto.ts @@ -20,7 +20,3 @@ export interface ItemDto extends BaseItem, TimerInfo, SeriesTimerInfo, SearchHin 'Name'?: string | null; 'ItemId'?: string | null; } - -export type NullableString = string | null | undefined; -export type NullableNumber = number | null | undefined; -export type NullableBoolean = boolean | null | undefined;