export type DeleteApiApiV1AppAppIdEndpointEndpointIdMtlsArgs = {app_id: string, endpoint_id: string}; export type DeleteApiApiV1AppAppIdEndpointEndpointIdMtlsOptions = {baseUrl?: string | undefined, HTTPBearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Endpoint Mtls Config * * DELETE /api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls */ export const deleteApiApiV1AppAppIdEndpointEndpointIdMtls = async (args: DeleteApiApiV1AppAppIdEndpointEndpointIdMtlsArgs, options?: DeleteApiApiV1AppAppIdEndpointEndpointIdMtlsOptions) => { const {baseUrl = "https://api.eu.svix.com", fetch: fetchFn = fetch, HTTPBearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (HTTPBearer !== undefined) headers.set('authorization', `Bearer ${HTTPBearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/app/${encodeURIComponent(String(args.app_id))}/endpoint/${encodeURIComponent(String(args.endpoint_id))}/mtls${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 };