瀏覽代碼

add requested_restart in TTaskStatus add TTaskType

visuddhinanda 1 年之前
父節點
當前提交
e36f065c7d
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      dashboard-v4/dashboard/src/components/api/task.ts

+ 6 - 2
dashboard-v4/dashboard/src/components/api/task.ts

@@ -21,9 +21,11 @@ export type TTaskStatus =
   | "running"
   | "running"
   | "done"
   | "done"
   | "restarted"
   | "restarted"
+  | "requested_restart"
   | "closed"
   | "closed"
   | "canceled"
   | "canceled"
   | "expired";
   | "expired";
+export type TTaskType = "instance" | "workflow" | "group";
 
 
 export interface IProject {
 export interface IProject {
   id: string;
   id: string;
@@ -35,7 +37,7 @@ export interface ITaskData {
   title: string;
   title: string;
   description?: string | null;
   description?: string | null;
   html?: string | null;
   html?: string | null;
-  type?: "task" | "group";
+  type: TTaskType;
   order?: number;
   order?: number;
   assignees?: IUser[] | null;
   assignees?: IUser[] | null;
   assignees_id?: string[] | null;
   assignees_id?: string[] | null;
@@ -70,6 +72,7 @@ export interface ITaskUpdateRequest {
   studio_name: string;
   studio_name: string;
   title?: string;
   title?: string;
   description?: string | null;
   description?: string | null;
+  type?: TTaskType;
   assignees_id?: string[] | null;
   assignees_id?: string[] | null;
   parent_id?: string | null;
   parent_id?: string | null;
   project_id?: string | null;
   project_id?: string | null;
@@ -94,6 +97,7 @@ export interface ITaskListResponse {
 export interface ITaskCreateRequest {
 export interface ITaskCreateRequest {
   title: string;
   title: string;
   studio: string;
   studio: string;
+  type: TTaskType;
 }
 }
 
 
 export interface ITaskResponse {
 export interface ITaskResponse {
@@ -156,7 +160,7 @@ export interface IProjectResponse {
   message: string;
   message: string;
   ok: boolean;
   ok: boolean;
 }
 }
-export type TProjectType = "normal" | "workflow" | "endpoint";
+export type TProjectType = "instance" | "workflow" | "endpoint";
 export interface IProjectCreateRequest {
 export interface IProjectCreateRequest {
   title: string;
   title: string;
   type: TProjectType;
   type: TProjectType;