export type DeleteApiPipelineGatewayRouteGatewayRouteIdAccessKeyIdArgs = {gateway_route_id: string, id: string}; export type DeleteApiPipelineGatewayRouteGatewayRouteIdAccessKeyIdOptions = {baseUrl?: string | undefined, PipelineServiceKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete access key * * DELETE /pipeline/gateway-route/{gateway_route_id}/access-key/{id} */ export const deleteApiPipelineGatewayRouteGatewayRouteIdAccessKeyId = async (args: DeleteApiPipelineGatewayRouteGatewayRouteIdAccessKeyIdArgs, options?: DeleteApiPipelineGatewayRouteGatewayRouteIdAccessKeyIdOptions) => { const {baseUrl = "https://api.mezmo.com/v3", fetch: fetchFn = fetch, PipelineServiceKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (PipelineServiceKey !== undefined) headers.set("Authorization", PipelineServiceKey) const url = `${baseUrl.replace(/\/+$/, '')}/pipeline/gateway-route/${encodeURIComponent(String(args.gateway_route_id))}/access-key/${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 };