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