All files / src/features/Merchants/MerchantSidePanel/ApprovalFlowPanel 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                                                                                                                                                                   
import { TCategoryStats } from "../WithRepository/Challenges/types";
import { UNDERWRITING_TASKS } from "./hooks/tasks";
 
export enum MerchantRiskTabEnum {
  OVERVIEW = "Overview",
  ACTIVITY = "Activity",
  TRIGGERS = "Triggers",
  TRANSACTIONS = "Transactions",
}
 
export type TTaskStatus =
  | "open" // ready_for_kyb
  | "in_progress"
  | "ready_for_underwriting"
  | "completed";
 
export type TUnderwritingTasksStats = {
  merchantAccID: number;
  openTasksCount: number;
  inProgressTasksCount: number;
  readyForUnderwritingTasksCount: number;
  completedTasksCount: number;
};
 
export type TTaskRepositories = {
  all_tasks: TUnderwritingTask;
  tasks_stats: TUnderwritingTasksStats;
};
 
export type TTaskTypeName = "enhanced_due_diligence" | "customer_due_diligence";
 
export type TUnderwritingTaskSlug = keyof typeof UNDERWRITING_TASKS;
 
export type TUnderwritingTask = {
  didMerchantreply: any;
  id: number;
  accID: number;
  taskID: number;
  status: TTaskStatus;
  slug: TUnderwritingTaskSlug;
  name: string;
  merchantTaskName: string;
  globalTaskName: string;
  createdAt: number;
  updatedAt: number;
  statusUpdatedAt: number;
  statusUpdatedBy: number;
  statusUpdatedByFirstName: string;
  statusUpdatedByLastName: string;
  threadID: number;
  internalThreadID: number;
  totalUsersCommentedInThread: number;
  userAvatarsInThread:
    | {
        accID: number;
        avatarURL: string;
      }[]
    | null;
  isForSubmerchant: boolean;
  isForEnterprise: boolean;
  type: TTaskTypeName;
  requestAttention: boolean;
  didMerchantReply: boolean;
  notifyBy: number;
  notifyByFirstName: string;
  notifyByLastName: string;
  notifyByEmail: string;
  notifyByImageUrl: string;
  notificationMessage: string;
  notifiedAt: number | null;
  hasUnreadMessages: boolean;
  reason: string;
  description?: string;
  unreadMessagesCount?: number;
  isMentioned?: boolean;
  hasMerchantReplied?: boolean;
};
 
export interface RefundPolicyHandle {
  getValue: () => string;
}