mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: workspace view services and types
This commit is contained in:
parent
6af2aa666a
commit
a3a2fb84a3
@ -15,6 +15,7 @@ import {
|
|||||||
IWorkspaceBulkInviteFormData,
|
IWorkspaceBulkInviteFormData,
|
||||||
IWorkspaceViewProps,
|
IWorkspaceViewProps,
|
||||||
IView,
|
IView,
|
||||||
|
WorkspaceViewIssueParams,
|
||||||
} from "types";
|
} from "types";
|
||||||
|
|
||||||
class WorkspaceService extends APIService {
|
class WorkspaceService extends APIService {
|
||||||
@ -303,8 +304,10 @@ class WorkspaceService extends APIService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async getViewIssues(workspaceSlug: string, params: any): Promise<any> {
|
async getViewIssues(workspaceSlug: string, params: WorkspaceViewIssueParams): Promise<any> {
|
||||||
return this.get(`/api/workspaces/${workspaceSlug}/issues/`, { params })
|
return this.get(`/api/workspaces/${workspaceSlug}/issues/`, {
|
||||||
|
params,
|
||||||
|
})
|
||||||
.then((response) => response?.data)
|
.then((response) => response?.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
throw error?.response?.data;
|
throw error?.response?.data;
|
||||||
|
26
web/types/workspace.d.ts
vendored
26
web/types/workspace.d.ts
vendored
@ -1,13 +1,4 @@
|
|||||||
import type {
|
import type { IProjectMember, IUser, IUserMemberLite, IWorkspaceViewProps } from "types";
|
||||||
IIssueFilterOptions,
|
|
||||||
IProjectMember,
|
|
||||||
IUser,
|
|
||||||
IUserMemberLite,
|
|
||||||
IWorkspaceViewProps,
|
|
||||||
TIssueGroupByOptions,
|
|
||||||
TIssueOrderByOptions,
|
|
||||||
TIssueViewOptions,
|
|
||||||
} from "types";
|
|
||||||
|
|
||||||
export interface IWorkspace {
|
export interface IWorkspace {
|
||||||
readonly id: string;
|
readonly id: string;
|
||||||
@ -123,6 +114,21 @@ export interface IWorkspaceSearchResults {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface WorkspaceViewIssueParams {
|
||||||
|
assignees: string | undefined;
|
||||||
|
created_by: string | undefined;
|
||||||
|
estimate_point: string | undefined;
|
||||||
|
labels: string | undefined;
|
||||||
|
priority: string | undefined;
|
||||||
|
state: string | undefined;
|
||||||
|
state_group: string | undefined;
|
||||||
|
start_date: string | undefined;
|
||||||
|
target_date: string | undefined;
|
||||||
|
type: "active" | "backlog" | undefined;
|
||||||
|
project: string | undefined;
|
||||||
|
sub_issue: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export interface IProductUpdateResponse {
|
export interface IProductUpdateResponse {
|
||||||
url: string;
|
url: string;
|
||||||
assets_url: string;
|
assets_url: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user