mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-25 16:04:01 +00:00
35 lines
1.0 KiB
TypeScript
35 lines
1.0 KiB
TypeScript
import { BaseService, RequestHelper } from '../infrastructure';
|
|
import { RequestOptions } from '../infrastructure/RequestHelper';
|
|
|
|
class ProjectImportExport extends BaseService {
|
|
download(projectId: ProjectId) {
|
|
const pId = encodeURIComponent(projectId);
|
|
|
|
return RequestHelper.get(this, `projects/${pId}/export/download`);
|
|
}
|
|
|
|
exportStatus(projectId: ProjectId) {
|
|
const pId = encodeURIComponent(projectId);
|
|
|
|
return RequestHelper.get(this, `projects/${pId}/export`);
|
|
}
|
|
|
|
import(file: temporaryAny, path: string, options: RequestOptions) {
|
|
return RequestHelper.post(this, 'projects/import', { file, path, ...options });
|
|
}
|
|
|
|
importStatus(projectId: ProjectId) {
|
|
const pId = encodeURIComponent(projectId);
|
|
|
|
return RequestHelper.get(this, `projects/${pId}/import`);
|
|
}
|
|
|
|
schedule(projectId: ProjectId, options: RequestOptions) {
|
|
const pId = encodeURIComponent(projectId);
|
|
|
|
return RequestHelper.post(this, `projects/${pId}/export`, options);
|
|
}
|
|
}
|
|
|
|
export default ProjectImportExport;
|