import { APIResource } from "../../core/resource.js"; import * as RepoAPI from "./repo.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class File extends APIResource { /** * Delete a file from a repository. * * Automatically commits the change and returns the repo info with the updated * head. * * @example * ```ts * const repoInfo = await client.repo.file.delete( * 'file_path', * { repo_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }, * ); * ``` */ delete(filePath: string, params: FileDeleteParams, options?: RequestOptions): APIPromise; /** * Read a file from a repository. * * @example * ```ts * const response = await client.repo.file.download( * 'file_path', * { repo_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }, * ); * ``` */ download(filePath: string, params: FileDownloadParams, options?: RequestOptions): APIPromise; /** * Write a file to a repository. * * Automatically commits the change and returns the repo info with the updated * head. * * @example * ```ts * const repoInfo = await client.repo.file.upload( * 'file_path', * fs.createReadStream('path/to/file'), * { repo_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }, * ); * ``` */ upload(filePath: string, body: string | ArrayBuffer | ArrayBufferView | Blob | DataView, params: FileUploadParams, options?: RequestOptions): APIPromise; } export type FileDownloadResponse = unknown; export interface FileDeleteParams { repo_id: string; } export interface FileDownloadParams { repo_id: string; } export interface FileUploadParams { /** * Path param: */ repo_id: string; } export declare namespace File { export { type FileDownloadResponse as FileDownloadResponse, type FileDeleteParams as FileDeleteParams, type FileDownloadParams as FileDownloadParams, type FileUploadParams as FileUploadParams, }; } //# sourceMappingURL=file.d.ts.map