export type UUIDSchema = string; export type DeleteApiImagesImageUUIDTagArgs = {imageUUID: UUIDSchema, tag?: string | undefined}; export type DeleteApiImagesImageUUIDTagOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove tags from an image * * DELETE /images/{imageUUID}/tag */ export const deleteApiImagesImageUUIDTag = async (args: DeleteApiImagesImageUUIDTagArgs, options?: DeleteApiImagesImageUUIDTagOptions) => { const {baseUrl = "https://api.tokenfactory.nebius.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.tag != null) query.append("tag", String(args.tag)) const url = `${baseUrl.replace(/\/+$/, '')}/images/${encodeURIComponent(String(args.imageUUID))}/tag${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 };