All files / src/components/ProfilePage/BusinessProfileSetupNew 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                                                                                                                                       
import { TMerchantDocument } from "@components/Merchants/MerchantPreview/data.types";
import { IFileWithMeta, StatusValue } from "react-dropzone-uploader";
 
export type FormSectionName =
  | "businessDetails"
  | "businessAddress"
  | "businessOwners"
  | "merchantInfo"
  | "enterpriseInfo";
 
export type TOptions = {
  handleNext?: (param?: any) => void;
  makeApiCall?: boolean;
  dirtyFields?: Record<string, boolean | undefined>;
  onSuccess?: (data?: any) => void;
  // Extended options (not in original BusinessProfileSetup types):
  forbidRedirect?: boolean;
  allowEmpty?: Record<string, boolean | undefined>;
  param?: any;
  handleChangeTaxID?: (enabled?: boolean) => void;
};
 
export type TSetFormValues = (
  name: FormSectionName,
  values: any,
  options?: TOptions,
) => void;
 
export type TBusinessStepsCommons = {
  submitHandler: TSetFormValues;
  handleBack: () => void;
  statusBar: number;
  updateStatusBar: (v: number) => void;
  isSubmitting: boolean;
  // Extended options (not in original BusinessProfileSetup types):
  isChangeTaxID?: boolean;
  handleChangeTaxID?: (enabled?: boolean) => void;
};
 
export type TFormInputs = {
  firstName: string;
  lastName: string;
  email: string;
  ssn: string;
  ownership: string;
  useBusinessAddress: boolean;
  country: string;
  street: string;
  city: string;
  state: string;
  zip: string;
  DOB: string;
  id: string;
  pepStatusName: string;
  isUSResident: boolean;
  citizenship: string;
  isNotResidentInCitizenshipCountry: boolean;
  countryOfResidence: string;
  contactPhone?: string;
  files?: {
    fileWithMeta?: any;
    status?: StatusValue;
    allFiles: IFileWithMeta[] | TMerchantDocument[];
  };
};
 
export type IDocumentype = "passport_id" | "national_id";