All files / src/types team.member.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                                                                                                                                   
import { User } from "types/data.types";
import { OFACCheckStatusType } from "@components/Merchants/MerchantPreview/OFAC/hooks/useOFAC";
 
type InviteStatus =
  | "pending"
  | "sent"
  | "rejected"
  | "delivered"
  | "read"
  | "expired"
  | "accepted";
 
type Invite = {
  id: number;
  createdAt: number;
  updatedAt: number;
  status: InviteStatus;
  numSent: number | null;
  lastSentAt: number | null;
  expiresAt: number | null;
};
 
export type MemberRoleName =
  | "member"
  | "owner"
  | "admin"
  | "uw_associate"
  | "uw_executive"
  | "risk_manager"
  | "sponsor"
  | "sales_associate"
  | "customer_support"
  | "sales_executive"
  // The mobile-only Host role. `operator` is the wire identifier; every surface
  // labels it "Host". It is never offered by `/member-roles`, so it can be held
  // but not picked — see MemberDetails for what that means for the role label.
  | "operator";
 
export type MemberData = {
  ownerStatusName: string;
  createdAt: number;
  updatedAt: number;
  joinedAt: number;
  accID: number;
  roleName: MemberRoleName;
  roleDisplayName: string;
  title: string;
  user: User;
  userExists: boolean;
  memberStatus: "pending" | "joined" | "invited";
  invite?: Invite;
  hasCustomPermissions: boolean;
  lastOFACCheckStatusName?: OFACCheckStatusType;
  isPasswordGenerated: boolean;
};
 
export type MemberList = {
  id: number;
  name: string;
  title: string;
  since: string;
  email: string;
  phone: string;
  avatarUrl: string | File;
};