export type DeleteApiApiV3TeamsTeamIdExternalRecipientsRecipientIdArgs = {recipient_id: string, team_id: string}; export type DeleteApiApiV3TeamsTeamIdExternalRecipientsRecipientIdOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove an external build notification recipient * * DELETE /api/v3/teams/{team_id}/external-recipients/{recipient_id} */ export const deleteApiApiV3TeamsTeamIdExternalRecipientsRecipientId = async (args: DeleteApiApiV3TeamsTeamIdExternalRecipientsRecipientIdArgs, options?: DeleteApiApiV3TeamsTeamIdExternalRecipientsRecipientIdOptions) => { const {baseUrl = "https://codemagic.io", fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apiKey !== undefined) headers.set("x-auth-token", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/api/v3/teams/${encodeURIComponent(String(args.team_id))}/external-recipients/${encodeURIComponent(String(args.recipient_id))}${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 };