export type DeleteApiRcvideoV2BridgesBridgeIdArgs = {bridgeId: string}; export type DeleteApiRcvideoV2BridgesBridgeIdOptions = {baseUrl?: string | undefined, OAuth2?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Bridge * * DELETE /rcvideo/v2/bridges/{bridgeId} */ export const deleteApiRcvideoV2BridgesBridgeId = async (args: DeleteApiRcvideoV2BridgesBridgeIdArgs, options?: DeleteApiRcvideoV2BridgesBridgeIdOptions) => { const {baseUrl = "https://platform.ringcentral.com", fetch: fetchFn = fetch, OAuth2} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (OAuth2 !== undefined) headers.set('authorization', `Bearer ${OAuth2}`) const url = `${baseUrl.replace(/\/+$/, '')}/rcvideo/v2/bridges/${encodeURIComponent(String(args.bridgeId))}${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 };