diff --git a/src/index.ts b/src/index.ts index 93e200c5..abf0520b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -120,7 +120,11 @@ export * from './enums/alignment.js'; */ export { type DiscriminatedItem, getMimetype } from './item/item.js'; export * from './item/itemSettings.js'; -export { type PackedItem } from './item/packedItem.js'; +export { + type PackedItem, + ThumbnailSizeInPackedItem, + type ThumbnailsBySize, +} from './item/packedItem.js'; export * from './item/itemType.js'; export * from './item/itemUtils.js'; export * from './item/events/itemFeedbackOperationEvent.js'; diff --git a/src/item/packedItem.ts b/src/item/packedItem.ts index a9009d45..5cf95c75 100644 --- a/src/item/packedItem.ts +++ b/src/item/packedItem.ts @@ -1,12 +1,23 @@ import { ItemMembership } from '../itemMembership/itemMembership.js'; import { DiscriminatedItem } from './item.js'; import { ItemSettings } from './itemSettings.js'; +import { ThumbnailSize } from '@/enums/thumbnailSizes.js'; import { ItemTag } from '@/itemTag/itemTag.js'; +import { UnionOfConst } from '@/typeUtils.js'; + +export const ThumbnailSizeInPackedItem = { + [ThumbnailSize.Small]: ThumbnailSize.Small, + [ThumbnailSize.Medium]: ThumbnailSize.Medium, +} as const; +export type ThumbnailsBySize = { + [thumbnailSize in UnionOfConst]: string; +}; export type PackedInformation = { permission: ItemMembership['permission'] | null; hidden?: ItemTag; public?: ItemTag; + thumbnails?: ThumbnailsBySize; }; /**