Add project transfer controls
This commit is contained in:
@@ -229,6 +229,29 @@ export function updateProjectSettings(
|
||||
);
|
||||
}
|
||||
|
||||
export function exportProjectTransfer(projectId: string) {
|
||||
return request<unknown>(`/api/projects/${projectId}/export`);
|
||||
}
|
||||
|
||||
export function importProjectTransfer(
|
||||
projectId: string,
|
||||
mode: "replace" | "duplicate",
|
||||
expectedRevision: number,
|
||||
transfer: unknown
|
||||
) {
|
||||
return request<
|
||||
| { projectId: string; name: string }
|
||||
| ProjectSettingsCommandResultDto
|
||||
>(`/api/projects/${projectId}/import`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(
|
||||
mode === "replace"
|
||||
? { mode, expectedRevision, transfer }
|
||||
: { mode, transfer }
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
export function listDistributionBoards(projectId: string) {
|
||||
return request<DistributionBoardDto[]>(`/api/projects/${projectId}/distribution-boards`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user