export type DeleteApiEndpointsMicrosoftIntuneConnectorsConnectorUuidArgs = {connector_uuid: string}; export type DeleteApiEndpointsMicrosoftIntuneConnectorsConnectorUuidOptions = {baseUrl: string, authentik?: string | undefined, fetch?: typeof fetch | undefined}; /** * MicrosoftIntuneConnector Viewset * * DELETE /endpoints/microsoft_intune/connectors/{connector_uuid}/ */ export const deleteApiEndpointsMicrosoftIntuneConnectorsConnectorUuid = async (args: DeleteApiEndpointsMicrosoftIntuneConnectorsConnectorUuidArgs, options: DeleteApiEndpointsMicrosoftIntuneConnectorsConnectorUuidOptions) => { const {baseUrl, fetch: fetchFn = fetch, authentik} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (authentik !== undefined) headers.set('authorization', `Bearer ${authentik}`) const url = `${baseUrl.replace(/\/+$/, '')}/endpoints/microsoft_intune/connectors/${encodeURIComponent(String(args.connector_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 };