All files / src/features/Minibuilders/Conversations types.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106                                                                                                                                                                                                                   
export type Tabs_Types = "Internal" | "Activity";
 
type ThreadType = {
  threadId?: number;
  title?: string;
};
 
type PATHS_TYPE = Array<{
  pathName: string;
  avatars: string[];
  pathID?: number | "new";
  hideInputs?: string[];
  isConversation?: boolean;
  topicName?: string;
  isRejection?: boolean;
  moduleID?: number;
}>;
 
export type TQueryObject = {
  id: number | undefined;
  name: string;
  paths: PATHS_TYPE | [];
  defaultMessage?: string;
  challengeId?: number;
  challengeID?: number;
  escalationIds?: number[];
  factorId?: number;
  merchantId?: number;
  shouldHideMentionIcon?: boolean;
  tabs?: Tabs_Types;
  challengeTypeName?: "enhanced_due_diligence" | "customer_due_diligence";
  onMessageSubmit?: (...props: any[]) => void;
  closeOnPost?: boolean;
  originalThreadID?: number | null;
};
 
export type ConversationsTopics = {
  isOpen: boolean;
  isOpenedFromSidePanel?: boolean;
  disableGlobalLauncher?: boolean;
  numberOfUnreadMessages: number;
  queryString: string;
  queryObject: TQueryObject;
  isOnlyPathName?: boolean;
  threadId?: ThreadType;
};
 
export type Screen = "Topics" | "Threads" | "Replies" | "";
 
export type Replies = {
  isRepliesOpen: boolean;
  threadId: number | undefined;
  commentId: number | undefined;
  index: number | undefined;
};
 
export type OriginalThread = {
  authorAccID: number;
  authorAvatarImageURL: string;
  authorFirstName: string;
  authorLastName: string;
  createdAt: number;
  id: number;
  messageBody: string;
  subjectAccID: number;
  subjectAccName: string;
  title: string;
};
 
export type TThreadInfo = {
  originalThread?: OriginalThread;
  authorAccID: number;
  authorAvatarImageURL: string;
  authorFirstName: string;
  authorLastName: string;
  createdAt: number;
  id: number;
  lastMessageAt: number | null;
  messageCount: number;
  messages: TComment[];
  ownerAccID: number;
  subjectAccID: number;
  topicID: number;
  topicName: string;
  updatedAt: number;
  isSending?: boolean;
  isError?: boolean;
};
 
export type TComment = {
  authorAvatarImageURL: string;
  authorFirstName: string;
  authorLastName: string;
  body: string;
  createdAt: number;
  id: number;
  mentionedMembers: any[];
  threadID: number;
  updatedAt: string | null;
};
 
export type TGlobalTopic = {
  ID: number;
  Name: string;
};