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,
|
||||
IWorkspaceViewProps,
|
||||
IView,
|
||||
WorkspaceViewIssueParams,
|
||||
} from "types";
|
||||
|
||||
class WorkspaceService extends APIService {
|
||||
@ -303,8 +304,10 @@ class WorkspaceService extends APIService {
|
||||
});
|
||||
}
|
||||
|
||||
async getViewIssues(workspaceSlug: string, params: any): Promise<any> {
|
||||
return this.get(`/api/workspaces/${workspaceSlug}/issues/`, { params })
|
||||
async getViewIssues(workspaceSlug: string, params: WorkspaceViewIssueParams): Promise<any> {
|
||||
return this.get(`/api/workspaces/${workspaceSlug}/issues/`, {
|
||||
params,
|
||||
})
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
throw error?.response?.data;
|
||||
|
26
web/types/workspace.d.ts
vendored
26
web/types/workspace.d.ts
vendored
@ -1,13 +1,4 @@
|
||||
import type {
|
||||
IIssueFilterOptions,
|
||||
IProjectMember,
|
||||
IUser,
|
||||
IUserMemberLite,
|
||||
IWorkspaceViewProps,
|
||||
TIssueGroupByOptions,
|
||||
TIssueOrderByOptions,
|
||||
TIssueViewOptions,
|
||||
} from "types";
|
||||
import type { IProjectMember, IUser, IUserMemberLite, IWorkspaceViewProps } from "types";
|
||||
|
||||
export interface IWorkspace {
|
||||
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 {
|
||||
url: string;
|
||||
assets_url: string;
|
||||
|
Loading…
Reference in New Issue
Block a user