export type DeleteApiApiRegistryServiceRegistryNameMethodsArgs = {registryName: string, serviceName: string, method: string, methodType: string}; export type DeleteApiApiRegistryServiceRegistryNameMethodsOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE /api/registry/service/{registryName}/methods */ export const deleteApiApiRegistryServiceRegistryNameMethods = async (args: DeleteApiApiRegistryServiceRegistryNameMethodsArgs, options?: DeleteApiApiRegistryServiceRegistryNameMethodsOptions) => { const {baseUrl = "https://developer.orkescloud.com", fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.serviceName != null) query.append("serviceName", String(args.serviceName)) if (args.method != null) query.append("method", String(args.method)) if (args.methodType != null) query.append("methodType", String(args.methodType)) if (apiKey !== undefined) headers.set("X-Authorization", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/api/registry/service/${encodeURIComponent(String(args.registryName))}/methods${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 };