ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: web-доступ к внешним контурам и исправление модалки запроса

This commit is contained in:
DCCONSTRUCTIONS
2026-04-19 00:07:10 +03:00
parent 6d67571b27
commit 3fe3539614
21 changed files with 707 additions and 42 deletions
@@ -5,7 +5,13 @@
*/
import { API_BASE_URL } from "@plane/constants";
import type { TExternalContourRequest, TExternalContourRequestResponse, TIssue } from "@plane/types";
import type {
TExternalContourRequest,
TExternalContourRequestResponse,
TExternalContourTargetOptions,
TExternalContourTargetProject,
TIssue,
} from "@plane/types";
import { APIService } from "@/services/api.service";
export class ExternalContourService extends APIService {
@@ -29,6 +35,26 @@ export class ExternalContourService extends APIService {
});
}
async listTargetProjects(workspaceSlug: string, projectId: string): Promise<TExternalContourTargetProject[]> {
return this.get(`/api/workspaces/${workspaceSlug}/projects/${projectId}/external-contours/targets/`)
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;
});
}
async retrieveTargetOptions(
workspaceSlug: string,
projectId: string,
targetProjectId: string
): Promise<TExternalContourTargetOptions> {
return this.get(`/api/workspaces/${workspaceSlug}/projects/${projectId}/external-contours/targets/${targetProjectId}/options/`)
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;
});
}
async create(
workspaceSlug: string,
projectId: string,