export type DeleteApiCreatorsCreatorUserUuidMediaUuidArgs = {'X-Fanvue-API-Version': string, creatorUserUuid: string, uuid: string}; export type DeleteApiCreatorsCreatorUserUuidMediaUuidOptions = {baseUrl?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a creator's media from the vault * * DELETE /creators/{creatorUserUuid}/media/{uuid} */ export const deleteApiCreatorsCreatorUserUuidMediaUuid = async (args: DeleteApiCreatorsCreatorUserUuidMediaUuidArgs, options?: DeleteApiCreatorsCreatorUserUuidMediaUuidOptions) => { const {baseUrl = "https://api.fanvue.com", fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['X-Fanvue-API-Version'] != null) headers.set("X-Fanvue-API-Version", String(args['X-Fanvue-API-Version'])) if (BearerAuth !== undefined) headers.set('authorization', `Bearer ${BearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/creators/${encodeURIComponent(String(args.creatorUserUuid))}/media/${encodeURIComponent(String(args.uuid))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };