UNPKG

zenodo-utils

Version:
68 lines 1.87 kB
export interface Creator { name: string; affiliation?: string; orcid?: string; gnd?: string; } export declare enum UploadType { 'publication' = "publication", poster = "poster", presentation = "presentation", dataset = "dataset", image = "image", video = "video", software = "software", lesson = "lesson", physicalobject = "physicalobject", other = "other" } export declare enum AccessRight { open = "open", embargoed = "embargoed", restricted = "restricted", closed = "closed" } export interface DepositionMetadata { upload_type: UploadType; publication_date: string; title: string; creators: Creator[]; description: string; access_right?: AccessRight; license?: string; doi?: string; [key: string]: any; } export declare class ZenodoClient { private accessToken; private axiosInstance; private baseURL; constructor(accessToken: string | undefined, sandbox?: boolean); /** * Create a new deposition with the provided metadata. * @param metadata Deposition metadata */ createDeposition(metadata: DepositionMetadata): Promise<any>; /** * Upload a file to an existing deposition. * @param depositionId ID of the deposition * @param filePath Path to the file to upload */ uploadFile(depositionId: number, filePath: string): Promise<any>; /** * List all files in an unpublished deposition. * @param depositionId ID of the deposition */ listFiles(depositionId: number): Promise<any>; /** * Publish a deposition. * @param depositionId ID of the deposition */ publishDeposition(depositionId: number): Promise<any>; /** * Handle API errors. * @param error Error object */ private handleError; } //# sourceMappingURL=index.d.ts.map