export type UserGroupId = 'Nothing' | 'Limited' | 'Regular' | 'Trusted' | 'Moderator' | 'Admin'; export type UserLanguageProficiency = 'Nothing' | 'Basics' | 'Intermediate' | 'Advanced' | 'Native'; export type UserKnownLanguageContract = {cultureCode?: (string | null) | undefined, proficiency?: UserLanguageProficiency | undefined}; export type EntryThumbForApiContract = {mime?: (string | null) | undefined, name?: (string | null) | undefined, urlOriginal?: (string | null) | undefined, urlSmallThumb?: (string | null) | undefined, urlThumb?: (string | null) | undefined, urlTinyThumb?: (string | null) | undefined}; export type OldUsernameContract = {date?: string | undefined, oldName?: (string | null) | undefined}; export type UserForApiContract = {active?: boolean | undefined, groupId?: UserGroupId | undefined, knownLanguages?: (Array | null) | undefined, mainPicture?: EntryThumbForApiContract | undefined, memberSince?: string | undefined, oldUsernames?: (Array | null) | undefined, verifiedArtist?: boolean | undefined, id?: number | undefined, name?: (string | null) | undefined}; export type ArtistType = 'Unknown' | 'Circle' | 'Label' | 'Producer' | 'Animator' | 'Illustrator' | 'Lyricist' | 'Vocaloid' | 'UTAU' | 'CeVIO' | 'OtherVoiceSynthesizer' | 'OtherVocalist' | 'OtherGroup' | 'OtherIndividual' | 'Utaite' | 'Band' | 'Vocalist' | 'Character' | 'SynthesizerV' | 'CoverArtist' | 'NEUTRINO' | 'VoiSona' | 'NewType' | 'Voiceroid' | 'Instrumentalist' | 'Designer' | 'VOICEVOX' | 'ACEVirtualSinger' | 'AIVOICE'; export type ContentLanguageSelection = 'Unspecified' | 'Japanese' | 'Romaji' | 'English'; export type DiscType = 'Unknown' | 'Album' | 'Single' | 'EP' | 'SplitAlbum' | 'Compilation' | 'Video' | 'Artbook' | 'Game' | 'Fanmade' | 'Instrumental' | 'Other' | 'Drama'; export type EntryType = 'Undefined' | 'Album' | 'Artist' | 'DiscussionTopic' | 'PV' | 'ReleaseEvent' | 'ReleaseEventSeries' | 'Song' | 'SongList' | 'Tag' | 'User' | 'Venue'; export type EventCategory = 'Unspecified' | 'AlbumRelease' | 'Anniversary' | 'Club' | 'Concert' | 'Contest' | 'Convention' | 'Other' | 'Festival'; export type LocalizedStringContract = {language?: ContentLanguageSelection | undefined, value?: (string | null) | undefined}; export type PVExtendedMetadata = {json?: (string | null) | undefined}; export type PVService = 'NicoNicoDouga' | 'Youtube' | 'SoundCloud' | 'Vimeo' | 'Piapro' | 'Bilibili' | 'File' | 'LocalFile' | 'Creofuga' | 'Bandcamp'; export type PVType = 'Original' | 'Reprint' | 'Other'; export type PVContract = {author?: (string | null) | undefined, createdBy?: (number | null) | undefined, description?: (string | null) | undefined, disabled?: boolean | undefined, extendedMetadata?: PVExtendedMetadata | undefined, id?: number | undefined, length?: number | undefined, name?: (string | null) | undefined, publishDate?: (string | null) | undefined, pvId?: (string | null) | undefined, service?: PVService | undefined, pvType?: PVType | undefined, thumbUrl?: (string | null) | undefined, url?: (string | null) | undefined}; export type SongListFeaturedCategory = 'Nothing' | 'Concerts' | 'VocaloidRanking' | 'Pools' | 'Other'; export type SongType = 'Unspecified' | 'Original' | 'Remaster' | 'Remix' | 'Cover' | 'Arrangement' | 'Instrumental' | 'Mashup' | 'MusicPV' | 'DramaPV' | 'Live' | 'Illustration' | 'Other' | 'Rearrangement' | 'ShortVersion'; export type EntryStatus = 'Draft' | 'Finished' | 'Approved' | 'Locked'; export type TagBaseContract = {additionalNames?: (string | null) | undefined, categoryName?: (string | null) | undefined, id?: number | undefined, name?: (string | null) | undefined, urlSlug?: (string | null) | undefined}; export type TagUsageForApiContract = {count?: number | undefined, tag?: TagBaseContract | undefined}; export type WebLinkCategory = 'Official' | 'Commercial' | 'Reference' | 'Other'; export type ArchivedWebLinkContract = {category?: WebLinkCategory | undefined, description?: (string | null) | undefined, disabled?: boolean | undefined, url?: (string | null) | undefined}; export type EntryForApiContract = {activityDate?: (string | null) | undefined, additionalNames?: (string | null) | undefined, artistString?: (string | null) | undefined, artistType?: ArtistType | undefined, createDate?: string | undefined, defaultName?: (string | null) | undefined, defaultNameLanguage?: ContentLanguageSelection | undefined, description?: (string | null) | undefined, discType?: DiscType | undefined, entryType?: EntryType | undefined, eventCategory?: EventCategory | undefined, id?: number | undefined, mainPicture?: EntryThumbForApiContract | undefined, name?: (string | null) | undefined, names?: (Array | null) | undefined, pvs?: (Array | null) | undefined, songListFeaturedCategory?: SongListFeaturedCategory | undefined, songType?: SongType | undefined, status?: EntryStatus | undefined, releaseEventSeriesName?: (string | null) | undefined, tagCategoryName?: (string | null) | undefined, tags?: (Array | null) | undefined, urlSlug?: (string | null) | undefined, version?: number | undefined, webLinks?: (Array | null) | undefined}; export type CommentForApiContract = {author?: UserForApiContract | undefined, authorName?: (string | null) | undefined, created?: string | undefined, entry?: EntryForApiContract | undefined, id?: number | undefined, message?: (string | null) | undefined}; export type CreateApiApiSongListsCommentsCommentIdArgs = {commentId: number, body: CommentForApiContract}; export type CreateApiApiSongListsCommentsCommentIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * POST /api/songLists/comments/{commentId} */ export const createApiApiSongListsCommentsCommentId = async (args: CreateApiApiSongListsCommentsCommentIdArgs, options: CreateApiApiSongListsCommentsCommentIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/api/songLists/comments/${encodeURIComponent(String(args.commentId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };