Add board thread interventions
This commit is contained in:
1 parent
28007b3691
commit
78dbcbe7ce
14 files changed
+990
-370
No files matched your search
@@ -0,0 +1,41 @@
|
||||
export const CHAT_THREAD_BOARD_STATE = {
|
||||
OPEN: "open",
|
||||
FROZEN: "frozen",
|
||||
TAKEOVER: "takeover",
|
||||
} as const;
|
||||
|
||||
export const BOARD_INTERVENTION_MODE = {
|
||||
OBSERVE: "observe",
|
||||
INTERVENE: "intervene",
|
||||
TAKEOVER: "takeover",
|
||||
} as const;
|
||||
|
||||
export const BOARD_INTERVENTION_ACTION = {
|
||||
DECISION: "decision",
|
||||
FREEZE: "freeze",
|
||||
TAKEOVER: "takeover",
|
||||
ROLLBACK: "rollback",
|
||||
FORCE_APPROVAL: "force_approval",
|
||||
} as const;
|
||||
|
||||
type ValueOf<T> = T[keyof T];
|
||||
|
||||
export type ChatThreadBoardState = ValueOf<typeof CHAT_THREAD_BOARD_STATE>;
|
||||
export type BoardInterventionMode = ValueOf<typeof BOARD_INTERVENTION_MODE>;
|
||||
export type BoardInterventionAction = ValueOf<typeof BOARD_INTERVENTION_ACTION>;
|
||||
|
||||
export interface BoardInterventionRecord {
|
||||
id: string;
|
||||
orgId: string;
|
||||
threadId: string;
|
||||
messageId: string;
|
||||
mode: BoardInterventionMode;
|
||||
action: BoardInterventionAction;
|
||||
details: string;
|
||||
targetType: "employee" | "agent" | "board" | null;
|
||||
targetId: string | null;
|
||||
approvalId: string | null;
|
||||
createdByType: "employee" | "agent" | "board" | "system";
|
||||
createdById: string | null;
|
||||
createdAt: string;
|
||||
}
|
||||
@@ -1,3 +1,8 @@
|
||||
import type { BoardInterventionRecord as BoardInterventionRecordModel, ChatThreadBoardState as ChatThreadBoardStateModel } from "./board-domain";
|
||||
|
||||
export { BOARD_INTERVENTION_ACTION, BOARD_INTERVENTION_MODE, CHAT_THREAD_BOARD_STATE } from "./board-domain";
|
||||
export type { BoardInterventionAction, BoardInterventionMode, BoardInterventionRecord, ChatThreadBoardState } from "./board-domain";
|
||||
|
||||
export const TASK_STATUS = {
|
||||
BACKLOG: "backlog",
|
||||
IN_PROGRESS: "in_progress",
|
||||
@@ -210,6 +215,9 @@ export interface ChatThreadRecord {
|
||||
rootMessageId: string | null;
|
||||
title: string;
|
||||
state: string;
|
||||
boardState: ChatThreadBoardStateModel;
|
||||
controlledByType: "employee" | "agent" | "board" | null;
|
||||
controlledById: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
@@ -468,6 +476,7 @@ export interface AppSnapshot {
|
||||
chatAttachments: ChatAttachmentRecord[];
|
||||
chatMentions: ChatMentionRecord[];
|
||||
chatSlashInvocations: ChatSlashInvocationRecord[];
|
||||
boardInterventions: BoardInterventionRecordModel[];
|
||||
chatPresence: ChatPresenceRecord[];
|
||||
chatReadStates: ChatReadStateRecord[];
|
||||
files: FileObjectRecord[];
|
||||
|
||||
Reference in new issue
Block a user