import { ApiPromise } from "@polkadot/api"; import { CuratorGroup, CuratorGroupId, Channel, ChannelCategory, ChannelCategoryId, Video, VideoId, } from "@joystream/types/content"; import { ChannelId } from "@joystream/types/storage"; import { Hash } from "@polkadot/types/interfaces"; export const getCuratorGroup = ( api: ApiPromise, id: CuratorGroupId | number ): Promise => api.query.content.curatorGroupById(id) as Promise; export const getChannel = ( api: ApiPromise, id: ChannelId | number ): Promise => api.query.content.channelById(id) as Promise; export const getChannelCategory = ( api: ApiPromise, id: ChannelCategoryId | number ): Promise => api.query.content.channelCategoryById(id) as Promise; export const getVideo = ( api: ApiPromise, id: VideoId | number ): Promise