export type DeleteApiV4OrganizationsOrganizationIdProjectsProjectIdOptions = {baseUrl?: string | undefined, token?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Project * * DELETE /v4/organizations/{organizationId}/projects/{projectId} */ export const deleteApiV4OrganizationsOrganizationIdProjectsProjectId = async (options?: DeleteApiV4OrganizationsOrganizationIdProjectsProjectIdOptions) => { const {baseUrl = "https://cloudapi.cloud.couchbase.com", fetch: fetchFn = fetch, token} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (token !== undefined) headers.set('authorization', `Bearer ${token}`) const url = `${baseUrl.replace(/\/+$/, '')}/v4/organizations/${encodeURIComponent(String(args.organizationId))}/projects/${encodeURIComponent(String(args.projectId))}${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 };