export type DeleteApiV1RoomsRoomSidArtifactsExternalAudioArgs = {room_sid: string}; export type DeleteApiV1RoomsRoomSidArtifactsExternalAudioOptions = {baseUrl?: string | undefined, apiKey?: {username: string, password: string} | undefined, fetch?: typeof fetch | undefined}; /** * Delete external audio * * DELETE /v1/rooms/{room_sid}/artifacts/external-audio * * Also accepts auth: bearer-auth */ export const deleteApiV1RoomsRoomSidArtifactsExternalAudio = async (args: DeleteApiV1RoomsRoomSidArtifactsExternalAudioArgs, options?: DeleteApiV1RoomsRoomSidArtifactsExternalAudioOptions) => { const {baseUrl = "https://api.prod-us.streem.cloud", fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apiKey !== undefined) headers.set('authorization', `Basic ${btoa(`${apiKey.username}:${apiKey.password}`)}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/rooms/${encodeURIComponent(String(args.room_sid))}/artifacts/external-audio${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 };