export type DeleteApiV1OrganisationsOrganisationIdOptions = {baseUrl?: string | undefined, tokenAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete organisation * * DELETE /v1/organisations/{organisationId} */ export const deleteApiV1OrganisationsOrganisationId = async (options?: DeleteApiV1OrganisationsOrganisationIdOptions) => { const {baseUrl = "https://wmc.wiremockapi.cloud", fetch: fetchFn = fetch, tokenAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (tokenAuth !== undefined) headers.set("Authorization", tokenAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1/organisations/${encodeURIComponent(String(args.organisationId))}${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 };