export type DeleteApiApplicationsUuidDestinationsDestinationUuidArgs = {uuid: string, destination_uuid: string}; export type DeleteApiApplicationsUuidDestinationsDestinationUuidOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove Destination * * DELETE /applications/{uuid}/destinations/{destination_uuid} */ export const deleteApiApplicationsUuidDestinationsDestinationUuid = async (args: DeleteApiApplicationsUuidDestinationsDestinationUuidArgs, options?: DeleteApiApplicationsUuidDestinationsDestinationUuidOptions) => { const {baseUrl = "https://app.coolify.io/api/v1", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/applications/${encodeURIComponent(String(args.uuid))}/destinations/${encodeURIComponent(String(args.destination_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 };