import { API_BASE_URL } from "helpers/common.helper";
// services
import { APIService } from "services/api.service";
// types
import { IProjectPublishSettings } from "store/project/project-publish.store";
export class ProjectPublishService extends APIService {
constructor() {
super(API_BASE_URL);
}
async getProjectSettingsAsync(workspace_slug: string, project_slug: string): Promise<any> {
return this.get(`/api/workspaces/${workspace_slug}/projects/${project_slug}/project-deploy-boards/`)
.then((response) => response?.data)
.catch((error) => {
throw error?.response;
});
async createProjectSettingsAsync(
workspace_slug: string,
project_slug: string,
data: IProjectPublishSettings
): Promise<any> {
return this.post(`/api/workspaces/${workspace_slug}/projects/${project_slug}/project-deploy-boards/`, data)
async updateProjectSettingsAsync(
project_publish_id: string,
return this.patch(
`/api/workspaces/${workspace_slug}/projects/${project_slug}/project-deploy-boards/${project_publish_id}/`,
data
)
async deleteProjectSettingsAsync(
project_publish_id: string
return this.delete(
`/api/workspaces/${workspace_slug}/projects/${project_slug}/project-deploy-boards/${project_publish_id}/`