export type DeleteApiV2FilesFileUuidArgs = {file_uuid: string}; export type DeleteApiV2FilesFileUuidOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete File * * DELETE /v2/files/{file_uuid} * * Also accepts auth: AuthBearer */ export const deleteApiV2FilesFileUuid = async (args: DeleteApiV2FilesFileUuidArgs, options?: DeleteApiV2FilesFileUuidOptions) => { const {baseUrl = "https://api.aymara.ai", fetch: fetchFn = fetch, ApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKey !== undefined) headers.set("x-api-key", ApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/v2/files/${encodeURIComponent(String(args.file_uuid))}${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 };