export type DeleteApiV3PortalsPortalIdIpAllowListIdOptions = {baseUrl?: string | undefined, personalAccessToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete an IP allow list from a portal * * DELETE /v3/portals/{portalId}/ip-allow-list/{id} * * Also accepts auth: systemAccountAccessToken, konnectAccessToken, serviceAccessToken */ export const deleteApiV3PortalsPortalIdIpAllowListId = async (options?: DeleteApiV3PortalsPortalIdIpAllowListIdOptions) => { const {baseUrl = "https://global.api.konghq.com", fetch: fetchFn = fetch, personalAccessToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (personalAccessToken !== undefined) headers.set('authorization', `Bearer ${personalAccessToken}`) const url = `${baseUrl.replace(/\/+$/, '')}/v3/portals/${encodeURIComponent(String(args.portalId))}/ip-allow-list/${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 };