ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: web-доступ к внешним контурам и исправление модалки запроса
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user