export type DeleteApiV1ProjectsIdOptions = {baseUrl?: string | undefined, APIKeyAuthentication?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Project * * DELETE /v1/projects/{id}/ */ export const deleteApiV1ProjectsId = async (options?: DeleteApiV1ProjectsIdOptions) => { const {baseUrl = "https://api.chainstack.com", fetch: fetchFn = fetch, APIKeyAuthentication} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (APIKeyAuthentication !== undefined) headers.set('authorization', `Bearer ${APIKeyAuthentication}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/projects/${encodeURIComponent(String(args.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 };