530b31dc10
Deploy / Build Production Runtime Images (push) Successful in 9m19s
Deploy / Deploy Production (push) Failing after 18s
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
Deploy / Deploy Staging (push) Has been skipped
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import apiClient from './client';
|
|
|
|
export interface EditTemplateItem {
|
|
id: string;
|
|
workspace_id: string;
|
|
project_id: string;
|
|
name: string;
|
|
description: string;
|
|
target_duration: number;
|
|
clip_count: number;
|
|
is_active: boolean;
|
|
}
|
|
|
|
export interface EditPlanClipItem {
|
|
id: string;
|
|
asset_id: string;
|
|
asset_name: string;
|
|
sequence: number;
|
|
start_time: number;
|
|
duration: number;
|
|
reason: string;
|
|
}
|
|
|
|
export interface EditPlanItem {
|
|
id: string;
|
|
workspace_id: string;
|
|
project_id: string;
|
|
template_id: string;
|
|
asset_library_id: string;
|
|
title_id: string;
|
|
status: string;
|
|
summary: string;
|
|
clips: EditPlanClipItem[];
|
|
}
|
|
|
|
export const getEditTemplates = async (projectId: string, workspaceId: string): Promise<EditTemplateItem[]> => {
|
|
const response = await apiClient.get(`/projects/${projectId}/edit-plans/templates`, { params: { workspace_id: workspaceId } });
|
|
return response.data;
|
|
};
|
|
|
|
export const createEditPlan = async ({ projectId, data }: { projectId: string; data: {
|
|
workspace_id: string;
|
|
asset_library_id: string;
|
|
template_id?: string;
|
|
title_id?: string;
|
|
} }): Promise<EditPlanItem> => {
|
|
const response = await apiClient.post(`/projects/${projectId}/edit-plans`, data);
|
|
return response.data;
|
|
};
|