@cfxlabsinc/b2b-services
    Preparing search index...

    Transport for the Zenus API: an OAuth2 client-credentials token, cached and refreshed shortly before it expires (and once on a 401), sent as a bearer on every call. A get of a missing resource is null; a fault throws a plain Error with the details in cause.

    Index
    instance: (...args: []) => ZenusClient = ...

    The process client, reading the zenus namespace at each call.

    • Adds private-person relationships to a legal person.

      Parameters

      • __namedParameters: {
            body: {
                relationships: {
                    additionalData?: string | null;
                    beneficiary?: boolean;
                    customFields?: { [key: string]: unknown } | null;
                    idCountryCode: string;
                    idNumber: string;
                    percentageOfShares?: number | null;
                    percentageOfSignature?: number | null;
                    relationTypeCode:
                        | "REPRESENTATIVE"
                        | "SHAREHOLDER"
                        | "DIRECTOR"
                        | "MEMBER_OF_BOARD"
                        | "SUPERVISORY_BOARD_MEMBER"
                        | "EXECUTIVE_OFFICER"
                        | "ACCOUNTANT";
                    representingRange: { endDate?: string
                    | null; startDate?: string | null };
                    role?: string | null;
                    source?: { sourceName: string; sourceRef: string };
                    statusCode: "ACTIVE" | "INACTIVE" | "CLOSED";
                }[];
            };
            personId: string;
            requestId: string;
        }

      Returns Promise<{ error: ZenusError; ok: false } | { ok: true; value: undefined }>

    • Creates a virtual child account under a person.

      Parameters

      • __namedParameters: {
            body: {
                accountClassCode:
                    | "PERSONAL_DDA"
                    | "BUSINESS_DDA"
                    | "CORPORATE_DDA"
                    | "FINANCIALINSTITUTION_OPS_DDA"
                    | "FI_CONCENTRATION_DDA";
                accountName?: string
                | null;
                currencyCode: "USD";
                masterAccountId: string;
            };
            personId: string;
            requestId: string;
        }

      Returns Promise<
          | { error: ZenusError; ok: false }
          | {
              ok: true;
              value: {
                  accessRestricted?: boolean | null;
                  accountClassCode?: string | null;
                  accountId?: string | null;
                  accountName?: string | null;
                  accountNumbers?:
                      | {
                          accountId?: string
                          | null;
                          accountNumber: {
                              type: "IBAN" | "BBAN" | "SWIFT" | "ALIAS";
                              value?: string;
                          };
                          accountNumberId?: string
                          | null;
                          accountNumberSubtype?: string | null;
                          countryCode?: string | null;
                          defaultCurrencyCode?: string | null;
                          externalSyncEnabled?: boolean | null;
                          financialInstitutionId?: {
                              type: "BIC" | "SORT_CODE" | "BANK_CODE" | "ABA_CODE";
                              value: string;
                          };
                          statusCode?: string
                          | null;
                          tenantCode?: string | null;
                          validityRange?: { endTime?: string | null; startTime?: string | null };
                      }[]
                      | null;
                  accountTypeCode?: | "CURRENCY"
                  | "INTERNAL"
                  | "SAVING"
                  | "SHADOW"
                  | "VIRTUAL";
                  accountTypeSetupCode?: string
                  | null;
                  activationDate?: string | null;
                  balances?:
                      | {
                          accountId: string;
                          availableBalanceAmount?: number
                          | null;
                          availableBalanceInDefaultCcy?: number | null;
                          balanceAmount?: number | null;
                          balanceId: string;
                          currencyCode: string;
                          defaultCurrencyCode?: string | null;
                          negativeBalanceStartDate?: string | null;
                          overdraftLimitAmount?: number | null;
                          reservedAmount?: number | null;
                          tenantCode?: string | null;
                      }[]
                      | null;
                  bic?: string
                  | null;
                  counterpartySectorCode?: string | null;
                  customerGroupCode?: string | null;
                  defaultCurrencyCode?: string | null;
                  iban?: string | null;
                  interestMethodAssignmentCode?: string | null;
                  intraOrgCode?: string | null;
                  jurisdictionCountryCode?: string | null;
                  masterAccountId?: string | null;
                  personId?: string | null;
                  personName?: string | null;
                  personTypeCode?: string | null;
                  productCode?: string | null;
                  residencyCode?: string | null;
                  serviceProviderCode?: string | null;
                  source?: { sourceName: string; sourceRef: string };
                  statusCode?:
                      | "ACTIVE"
                      | "INACTIVE"
                      | "CLOSED"
                      | "CREATED"
                      | "BLOCKED"
                      | "WAITING_FOR_CLOSURE_DECISION";
                  statusReasonCode?: string
                  | null;
                  taxResidencyCountryCode?: string | null;
                  tenantCode?: string | null;
              };
          },
      >

    • Creates a legal person; requestId is the idempotency key.

      Parameters

      • __namedParameters: {
            body: {
                addresses?:
                    | {
                        addressTypeCode: | "R"
                        | "C"
                        | "B"
                        | "D"
                        | "BILLING"
                        | "HQ_LOCATION"
                        | "PLACE_OF_BUSINESS"
                        | "SUBSIDIARY";
                        cityCounty: string;
                        countryCode: string;
                        stateRegion?: string
                        | null;
                        street1: string;
                        street2?: string | null;
                        zip: string;
                    }[]
                    | null;
                counterpartySectorCode?: string
                | null;
                identificationNumbers?:
                    | { idCountryCode: string; idNumber: string; primary?: boolean }[]
                    | null;
                name?: string | null;
                registrationDate?: string | null;
                taxNumbers?:
                    | {
                        primary?: boolean
                        | null;
                        taxCountryCode: string;
                        taxNumber: string;
                        taxNumberTypeCode?:
                            | "TAX_IDENTIFICATION_NUMBER"
                            | "VAT_NUMBER"
                            | "NATIONAL_INSURANCE_NUMBER";
                    }[]
                    | null;
                webAddress?: string
                | null;
            };
            requestId: string;
        }

      Returns Promise<
          | { error: ZenusError; ok: false }
          | {
              ok: true;
              value: {
                  accessRestricted?: boolean | null;
                  additionalContacts?:
                      | {
                          additionalContactId?: string
                          | null;
                          contactTypeCode?: string | null;
                          description?: string | null;
                          email?: string | null;
                          personId?: string | null;
                          phoneCountryCode?: string | null;
                          phoneNumber?: string | null;
                          preferredMethodOfContact?: boolean | null;
                          validityRange?: { endTime?: string | null; startTime?: string | null };
                      }[]
                      | null;
                  additionalInfo?: {
                      birthDate?: string
                      | null;
                      businessAreaCodes?: string[] | null;
                      businessModelDescription?: string | null;
                      counterpartySectorCode?: string | null;
                      countryOfBirth?: string | null;
                      customerTypeCode?: string | null;
                      deathDate?: string | null;
                      dependantPersons?: number | null;
                      educationCode?: string | null;
                      inactivationDate?: string | null;
                      intraOrgCode?: string | null;
                      language?: string | null;
                      liquidationDate?: string | null;
                      mainPersonId?: string | null;
                      maritalStatusCode?: string | null;
                      pep?: boolean | null;
                      pepExplanation?: string | null;
                      placeOfBirth?: string | null;
                      registrationDate?: string | null;
                      statusCodeReason?: string | null;
                      taxResidencyCountry?: string | null;
                      tradingName?: string | null;
                      usResident?: boolean | null;
                      webAddress?: string | null;
                  };
                  addresses?: | {
                      addressId?: string
                      | null;
                      addressTypeCode?: string | null;
                      apartmentNumber?: string | null;
                      buildingName?: string | null;
                      buildingNumber?: string | null;
                      cityCounty?: string | null;
                      countryCode?: string | null;
                      department?: string | null;
                      district?: string | null;
                      floor?: string | null;
                      moveInDate?: string | null;
                      personId?: string | null;
                      postBox?: string | null;
                      stateRegion?: string | null;
                      street1?: string | null;
                      street2?: string | null;
                      streetName?: string | null;
                      structured?: boolean | null;
                      subDepartment?: string | null;
                      townLocationName?: string | null;
                      validityRange?: { endTime?: string | null; startTime?: string | null };
                      zip?: string | null;
                  }[]
                  | null;
                  creationDate?: string
                  | null;
                  documents?:
                      | {
                          docuId?: string
                          | null;
                          documentTypeCode?: string | null;
                          expiryDate?: string | null;
                          issuingCountry?: string | null;
                          number?: string | null;
                          personId?: string | null;
                          validityRange?: { endTime?: string | null; startTime?: string | null };
                      }[]
                      | null;
                  forgotten?: boolean
                  | null;
                  fullName?: string | null;
                  home?: {
                      buildingTypeCode?: string | null;
                      housingTypeCode?: string | null;
                  };
                  identificationNumbers?: | {
                      idCountryCode?: string
                      | null;
                      idNumber?: string | null;
                      idNumberId?: string | null;
                      personId?: string | null;
                      primary?: boolean | null;
                      validityRange?: { endTime?: string | null; startTime?: string | null };
                  }[]
                  | null;
                  legalForm?: string
                  | null;
                  mainPersonId?: string | null;
                  personalInfo?: {
                      dependantPersons?: number | null;
                      email?: string | null;
                      givenName?: string | null;
                      legalForm?: string | null;
                      middleName?: string | null;
                      name?: string | null;
                      nationality?: string | null;
                      personTypeCode?: string | null;
                      phoneCountryCode?: string | null;
                      phoneNumber?: string | null;
                      residencyCountryCode?: string | null;
                      sex?: string | null;
                      surname?: string | null;
                  };
                  personGroupCodes?: | {
                      personGroupCode: string;
                      personGroupId?: string
                      | null;
                      personId?: string | null;
                      validityRange?: { endTime?: string | null; startTime?: string | null };
                  }[]
                  | null;
                  personId?: string
                  | null;
                  relationships?:
                      | {
                          additionalData?: string
                          | null;
                          beneficiary?: boolean | null;
                          parent?: {
                              accessRestricted?: boolean | null;
                              activityCode?: string | null;
                              birthDate?: string | null;
                              buildingTypeCode?: string | null;
                              businessAreaCodes?: (...)[] | null;
                              businessModelDescription?: string | null;
                              counterpartySectorCode?: string | null;
                              countryOfBirth?: string | null;
                              creationDate?: string | null;
                              customerTypeCode?: string | null;
                              deathDate?: string | null;
                              dependantPersons?: number | null;
                              educationCode?: string | null;
                              email?: string | null;
                              employmentTimeCode?: string | null;
                              fixedEmploymentLength?: number | null;
                              forgotten?: boolean | null;
                              fullName?: string | null;
                              givenName?: string | null;
                              housingTypeCode?: string | null;
                              idCountryCode?: string | null;
                              idNumber?: string | null;
                              inactivationDate?: string | null;
                              insertedDTime?: string | null;
                              intraOrgCode?: string | null;
                              language?: string | null;
                              legalForm?: string | null;
                              liquidationDate?: string | null;
                              mainPersonId?: string | null;
                              maritalStatusCode?: string | null;
                              middleName?: string | null;
                              name?: string | null;
                              nationality?: string | null;
                              pep?: boolean | null;
                              pepExplanation?: string | null;
                              personGroupCodes?: (...)[] | null;
                              personId?: string | null;
                              personTypeCode?: string | null;
                              phoneCountryCode?: string | null;
                              phoneNumber?: string | null;
                              placeOfBirth?: string | null;
                              registrationDate?: string | null;
                              residencyCountryCode?: string | null;
                              sex?: string | null;
                              source?: { sourceLink?: ...; sourceName: ...; sourceRef: ... };
                              statusCode?: string | null;
                              statusCodeReason?: string | null;
                              surname?: string | null;
                              taxResidencyCountry?: string | null;
                              tenantCode?: string | null;
                              tradingName?: string | null;
                              usResident?: boolean | null;
                              webAddress?: string | null;
                          };
                          parentPersonId?: string
                          | null;
                          percentageOfShares?: number | null;
                          percentageOfSignature?: number | null;
                          person?: {
                              accessRestricted?: boolean | null;
                              activityCode?: string | null;
                              birthDate?: string | null;
                              buildingTypeCode?: string | null;
                              businessAreaCodes?: (...)[] | null;
                              businessModelDescription?: string | null;
                              counterpartySectorCode?: string | null;
                              countryOfBirth?: string | null;
                              creationDate?: string | null;
                              customerTypeCode?: string | null;
                              deathDate?: string | null;
                              dependantPersons?: number | null;
                              educationCode?: string | null;
                              email?: string | null;
                              employmentTimeCode?: string | null;
                              fixedEmploymentLength?: number | null;
                              forgotten?: boolean | null;
                              fullName?: string | null;
                              givenName?: string | null;
                              housingTypeCode?: string | null;
                              idCountryCode?: string | null;
                              idNumber?: string | null;
                              inactivationDate?: string | null;
                              insertedDTime?: string | null;
                              intraOrgCode?: string | null;
                              language?: string | null;
                              legalForm?: string | null;
                              liquidationDate?: string | null;
                              mainPersonId?: string | null;
                              maritalStatusCode?: string | null;
                              middleName?: string | null;
                              name?: string | null;
                              nationality?: string | null;
                              pep?: boolean | null;
                              pepExplanation?: string | null;
                              personGroupCodes?: (...)[] | null;
                              personId?: string | null;
                              personTypeCode?: string | null;
                              phoneCountryCode?: string | null;
                              phoneNumber?: string | null;
                              placeOfBirth?: string | null;
                              registrationDate?: string | null;
                              residencyCountryCode?: string | null;
                              sex?: string | null;
                              source?: { sourceLink?: ...; sourceName: ...; sourceRef: ... };
                              statusCode?: string | null;
                              statusCodeReason?: string | null;
                              surname?: string | null;
                              taxResidencyCountry?: string | null;
                              tenantCode?: string | null;
                              tradingName?: string | null;
                              usResident?: boolean | null;
                              webAddress?: string | null;
                          };
                          personId?: string
                          | null;
                          personRelationshipId?: string | null;
                          relationTypeCode?: string | null;
                          representingRange?: {
                              endDate?: string | null;
                              startDate?: string | null;
                          };
                          role?: string
                          | null;
                          statusCode?: string | null;
                          validityRange?: { endTime?: string | null; startTime?: string | null };
                      }[]
                      | null;
                  source?: {
                      sourceLink?: string
                      | null;
                      sourceName: string;
                      sourceRef: string;
                  };
                  statusCode?: string
                  | null;
                  taxNumbers?:
                      | {
                          personId?: string
                          | null;
                          primary?: boolean | null;
                          taxCountryCode?: string | null;
                          taxNumber?: string | null;
                          taxNumberId?: string | null;
                          taxNumberTypeCode?: string | null;
                          validityRange?: { endTime?: string | null; startTime?: string | null };
                      }[]
                      | null;
                  tenantCode?: string
                  | null;
                  work?: {
                      activityCode?: string | null;
                      businessAreaCodes?: string[] | null;
                      employmentTimeCode?: string | null;
                      fixedEmploymentLength?: number | null;
                  };
              };
          },
      >

    • Creates a private person; requestId is the idempotency key.

      Parameters

      • __namedParameters: {
            body: {
                addresses: {
                    addressTypeCode:
                        | "R"
                        | "C"
                        | "B"
                        | "D"
                        | "BILLING"
                        | "HQ_LOCATION"
                        | "PLACE_OF_BUSINESS"
                        | "SUBSIDIARY";
                    cityCounty: string;
                    countryCode: string;
                    moveInDate?: string
                    | null;
                    stateRegion?: string | null;
                    street1: string;
                    street2?: string | null;
                    zip: string;
                }[];
                birthDate: string;
                countryOfBirth: string;
                email?: string
                | null;
                givenName: string;
                identificationNumbers: {
                    expiryDate: string;
                    idCountryCode: string;
                    idNumber: string;
                    idTypeCode: "PASSPORT" | "DRIVER_LICENCE" | "ID_CARD";
                    issuingDate?: string | null;
                    primary?: boolean;
                }[];
                middleName?: string
                | null;
                nationality: string;
                pep: boolean;
                pepExplanation?: string | null;
                phoneCountryCode?: string | null;
                phoneNumber?: string | null;
                placeOfBirth?: string | null;
                residencyCountryCode?: string | null;
                sex: "M" | "F" | "O";
                surname: string;
                taxNumbers?:
                    | {
                        primary: boolean;
                        taxCountryCode: string;
                        taxNumber: string;
                        taxNumberTypeCode: "NATIONAL_INSURANCE_NUMBER"
                        | "TAX_CODE"
                        | "SSN";
                    }[]
                    | null;
                usResident?: boolean
                | null;
            };
            requestId: string;
        }

      Returns Promise<
          | { error: ZenusError; ok: false }
          | {
              ok: true;
              value: {
                  accessRestricted?: boolean | null;
                  additionalContacts?:
                      | {
                          additionalContactId?: string
                          | null;
                          contactTypeCode?: string | null;
                          description?: string | null;
                          email?: string | null;
                          personId?: string | null;
                          phoneCountryCode?: string | null;
                          phoneNumber?: string | null;
                          preferredMethodOfContact?: boolean | null;
                          validityRange?: { endTime?: string | null; startTime?: string | null };
                      }[]
                      | null;
                  additionalInfo?: {
                      birthDate?: string
                      | null;
                      businessAreaCodes?: string[] | null;
                      businessModelDescription?: string | null;
                      counterpartySectorCode?: string | null;
                      countryOfBirth?: string | null;
                      customerTypeCode?: string | null;
                      deathDate?: string | null;
                      dependantPersons?: number | null;
                      educationCode?: string | null;
                      inactivationDate?: string | null;
                      intraOrgCode?: string | null;
                      language?: string | null;
                      liquidationDate?: string | null;
                      mainPersonId?: string | null;
                      maritalStatusCode?: string | null;
                      pep?: boolean | null;
                      pepExplanation?: string | null;
                      placeOfBirth?: string | null;
                      registrationDate?: string | null;
                      statusCodeReason?: string | null;
                      taxResidencyCountry?: string | null;
                      tradingName?: string | null;
                      usResident?: boolean | null;
                      webAddress?: string | null;
                  };
                  addresses?: | {
                      addressId?: string
                      | null;
                      addressTypeCode?: string | null;
                      apartmentNumber?: string | null;
                      buildingName?: string | null;
                      buildingNumber?: string | null;
                      cityCounty?: string | null;
                      countryCode?: string | null;
                      department?: string | null;
                      district?: string | null;
                      floor?: string | null;
                      moveInDate?: string | null;
                      personId?: string | null;
                      postBox?: string | null;
                      stateRegion?: string | null;
                      street1?: string | null;
                      street2?: string | null;
                      streetName?: string | null;
                      structured?: boolean | null;
                      subDepartment?: string | null;
                      townLocationName?: string | null;
                      validityRange?: { endTime?: string | null; startTime?: string | null };
                      zip?: string | null;
                  }[]
                  | null;
                  creationDate?: string
                  | null;
                  documents?:
                      | {
                          docuId?: string
                          | null;
                          documentTypeCode?: string | null;
                          expiryDate?: string | null;
                          issuingCountry?: string | null;
                          number?: string | null;
                          personId?: string | null;
                          validityRange?: { endTime?: string | null; startTime?: string | null };
                      }[]
                      | null;
                  forgotten?: boolean
                  | null;
                  fullName?: string | null;
                  home?: {
                      buildingTypeCode?: string | null;
                      housingTypeCode?: string | null;
                  };
                  identificationNumbers?: | {
                      idCountryCode?: string
                      | null;
                      idNumber?: string | null;
                      idNumberId?: string | null;
                      personId?: string | null;
                      primary?: boolean | null;
                      validityRange?: { endTime?: string | null; startTime?: string | null };
                  }[]
                  | null;
                  legalForm?: string
                  | null;
                  mainPersonId?: string | null;
                  personalInfo?: {
                      dependantPersons?: number | null;
                      email?: string | null;
                      givenName?: string | null;
                      legalForm?: string | null;
                      middleName?: string | null;
                      name?: string | null;
                      nationality?: string | null;
                      personTypeCode?: string | null;
                      phoneCountryCode?: string | null;
                      phoneNumber?: string | null;
                      residencyCountryCode?: string | null;
                      sex?: string | null;
                      surname?: string | null;
                  };
                  personGroupCodes?: | {
                      personGroupCode: string;
                      personGroupId?: string
                      | null;
                      personId?: string | null;
                      validityRange?: { endTime?: string | null; startTime?: string | null };
                  }[]
                  | null;
                  personId?: string
                  | null;
                  relationships?:
                      | {
                          additionalData?: string
                          | null;
                          beneficiary?: boolean | null;
                          parent?: {
                              accessRestricted?: boolean | null;
                              activityCode?: string | null;
                              birthDate?: string | null;
                              buildingTypeCode?: string | null;
                              businessAreaCodes?: (...)[] | null;
                              businessModelDescription?: string | null;
                              counterpartySectorCode?: string | null;
                              countryOfBirth?: string | null;
                              creationDate?: string | null;
                              customerTypeCode?: string | null;
                              deathDate?: string | null;
                              dependantPersons?: number | null;
                              educationCode?: string | null;
                              email?: string | null;
                              employmentTimeCode?: string | null;
                              fixedEmploymentLength?: number | null;
                              forgotten?: boolean | null;
                              fullName?: string | null;
                              givenName?: string | null;
                              housingTypeCode?: string | null;
                              idCountryCode?: string | null;
                              idNumber?: string | null;
                              inactivationDate?: string | null;
                              insertedDTime?: string | null;
                              intraOrgCode?: string | null;
                              language?: string | null;
                              legalForm?: string | null;
                              liquidationDate?: string | null;
                              mainPersonId?: string | null;
                              maritalStatusCode?: string | null;
                              middleName?: string | null;
                              name?: string | null;
                              nationality?: string | null;
                              pep?: boolean | null;
                              pepExplanation?: string | null;
                              personGroupCodes?: (...)[] | null;
                              personId?: string | null;
                              personTypeCode?: string | null;
                              phoneCountryCode?: string | null;
                              phoneNumber?: string | null;
                              placeOfBirth?: string | null;
                              registrationDate?: string | null;
                              residencyCountryCode?: string | null;
                              sex?: string | null;
                              source?: { sourceLink?: ...; sourceName: ...; sourceRef: ... };
                              statusCode?: string | null;
                              statusCodeReason?: string | null;
                              surname?: string | null;
                              taxResidencyCountry?: string | null;
                              tenantCode?: string | null;
                              tradingName?: string | null;
                              usResident?: boolean | null;
                              webAddress?: string | null;
                          };
                          parentPersonId?: string
                          | null;
                          percentageOfShares?: number | null;
                          percentageOfSignature?: number | null;
                          person?: {
                              accessRestricted?: boolean | null;
                              activityCode?: string | null;
                              birthDate?: string | null;
                              buildingTypeCode?: string | null;
                              businessAreaCodes?: (...)[] | null;
                              businessModelDescription?: string | null;
                              counterpartySectorCode?: string | null;
                              countryOfBirth?: string | null;
                              creationDate?: string | null;
                              customerTypeCode?: string | null;
                              deathDate?: string | null;
                              dependantPersons?: number | null;
                              educationCode?: string | null;
                              email?: string | null;
                              employmentTimeCode?: string | null;
                              fixedEmploymentLength?: number | null;
                              forgotten?: boolean | null;
                              fullName?: string | null;
                              givenName?: string | null;
                              housingTypeCode?: string | null;
                              idCountryCode?: string | null;
                              idNumber?: string | null;
                              inactivationDate?: string | null;
                              insertedDTime?: string | null;
                              intraOrgCode?: string | null;
                              language?: string | null;
                              legalForm?: string | null;
                              liquidationDate?: string | null;
                              mainPersonId?: string | null;
                              maritalStatusCode?: string | null;
                              middleName?: string | null;
                              name?: string | null;
                              nationality?: string | null;
                              pep?: boolean | null;
                              pepExplanation?: string | null;
                              personGroupCodes?: (...)[] | null;
                              personId?: string | null;
                              personTypeCode?: string | null;
                              phoneCountryCode?: string | null;
                              phoneNumber?: string | null;
                              placeOfBirth?: string | null;
                              registrationDate?: string | null;
                              residencyCountryCode?: string | null;
                              sex?: string | null;
                              source?: { sourceLink?: ...; sourceName: ...; sourceRef: ... };
                              statusCode?: string | null;
                              statusCodeReason?: string | null;
                              surname?: string | null;
                              taxResidencyCountry?: string | null;
                              tenantCode?: string | null;
                              tradingName?: string | null;
                              usResident?: boolean | null;
                              webAddress?: string | null;
                          };
                          personId?: string
                          | null;
                          personRelationshipId?: string | null;
                          relationTypeCode?: string | null;
                          representingRange?: {
                              endDate?: string | null;
                              startDate?: string | null;
                          };
                          role?: string
                          | null;
                          statusCode?: string | null;
                          validityRange?: { endTime?: string | null; startTime?: string | null };
                      }[]
                      | null;
                  source?: {
                      sourceLink?: string
                      | null;
                      sourceName: string;
                      sourceRef: string;
                  };
                  statusCode?: string
                  | null;
                  taxNumbers?:
                      | {
                          personId?: string
                          | null;
                          primary?: boolean | null;
                          taxCountryCode?: string | null;
                          taxNumber?: string | null;
                          taxNumberId?: string | null;
                          taxNumberTypeCode?: string | null;
                          validityRange?: { endTime?: string | null; startTime?: string | null };
                      }[]
                      | null;
                  tenantCode?: string
                  | null;
                  work?: {
                      activityCode?: string | null;
                      businessAreaCodes?: string[] | null;
                      employmentTimeCode?: string | null;
                      fixedEmploymentLength?: number | null;
                  };
              };
          },
      >

    • The account, or null when Zenus has no such account.

      Parameters

      • accountId: string

      Returns Promise<
          | {
              accessRestricted?: boolean
              | null;
              accountClassCode?: string | null;
              accountId?: string | null;
              accountName?: string | null;
              accountNumbers?:
                  | {
                      accountId?: string
                      | null;
                      accountNumber: {
                          type: "IBAN" | "BBAN" | "SWIFT" | "ALIAS";
                          value?: string;
                      };
                      accountNumberId?: string
                      | null;
                      accountNumberSubtype?: string | null;
                      countryCode?: string | null;
                      defaultCurrencyCode?: string | null;
                      externalSyncEnabled?: boolean | null;
                      financialInstitutionId?: {
                          type: "BIC" | "SORT_CODE" | "BANK_CODE" | "ABA_CODE";
                          value: string;
                      };
                      statusCode?: string
                      | null;
                      tenantCode?: string | null;
                      validityRange?: { endTime?: string | null; startTime?: string | null };
                  }[]
                  | null;
              accountTypeCode?: | "CURRENCY"
              | "INTERNAL"
              | "SAVING"
              | "SHADOW"
              | "VIRTUAL";
              accountTypeSetupCode?: string
              | null;
              activationDate?: string | null;
              balances?:
                  | {
                      accountId: string;
                      availableBalanceAmount?: number
                      | null;
                      availableBalanceInDefaultCcy?: number | null;
                      balanceAmount?: number | null;
                      balanceId: string;
                      currencyCode: string;
                      defaultCurrencyCode?: string | null;
                      negativeBalanceStartDate?: string | null;
                      overdraftLimitAmount?: number | null;
                      reservedAmount?: number | null;
                      tenantCode?: string | null;
                  }[]
                  | null;
              bic?: string
              | null;
              counterpartySectorCode?: string | null;
              customerGroupCode?: string | null;
              defaultCurrencyCode?: string | null;
              iban?: string | null;
              interestMethodAssignmentCode?: string | null;
              intraOrgCode?: string | null;
              jurisdictionCountryCode?: string | null;
              masterAccountId?: string | null;
              personId?: string | null;
              personName?: string | null;
              personTypeCode?: string | null;
              productCode?: string | null;
              residencyCode?: string | null;
              serviceProviderCode?: string | null;
              source?: { sourceName: string; sourceRef: string };
              statusCode?:
                  | "ACTIVE"
                  | "INACTIVE"
                  | "CLOSED"
                  | "CREATED"
                  | "BLOCKED"
                  | "WAITING_FOR_CLOSURE_DECISION";
              statusReasonCode?: string
              | null;
              taxResidencyCountryCode?: string | null;
              tenantCode?: string | null;
          }
          | null,
      >

    • The person, or null when Zenus has no such person.

      Parameters

      • personId: string

      Returns Promise<
          | {
              accessRestricted?: boolean
              | null;
              activityCode?: string | null;
              birthDate?: string | null;
              buildingTypeCode?: string | null;
              businessAreaCodes?: string[] | null;
              businessModelDescription?: string | null;
              counterpartySectorCode?: string | null;
              countryOfBirth?: string | null;
              creationDate?: string | null;
              customerTypeCode?: string | null;
              deathDate?: string | null;
              dependantPersons?: number | null;
              educationCode?: string | null;
              email?: string | null;
              employmentTimeCode?: string | null;
              fixedEmploymentLength?: number | null;
              forgotten?: boolean | null;
              fullName?: string | null;
              givenName?: string | null;
              housingTypeCode?: string | null;
              idCountryCode?: string | null;
              idNumber?: string | null;
              inactivationDate?: string | null;
              insertedDTime?: string | null;
              intraOrgCode?: string | null;
              language?: string | null;
              legalForm?: string | null;
              liquidationDate?: string | null;
              mainPersonId?: string | null;
              maritalStatusCode?: string | null;
              middleName?: string | null;
              name?: string | null;
              nationality?: string | null;
              pep?: boolean | null;
              pepExplanation?: string | null;
              personGroupCodes?: string[] | null;
              personId?: string | null;
              personTypeCode?: string | null;
              phoneCountryCode?: string | null;
              phoneNumber?: string | null;
              placeOfBirth?: string | null;
              registrationDate?: string | null;
              residencyCountryCode?: string | null;
              sex?: string | null;
              source?: {
                  sourceLink?: string | null;
                  sourceName: string;
                  sourceRef: string;
              };
              statusCode?: string
              | null;
              statusCodeReason?: string | null;
              surname?: string | null;
              taxResidencyCountry?: string | null;
              tenantCode?: string | null;
              tradingName?: string | null;
              usResident?: boolean | null;
              webAddress?: string | null;
          }
          | null,
      >

    • Inserts or updates a person's custom field values.

      Parameters

      • __namedParameters: {
            body: { fieldValues: { fieldId: string; fieldValue: string }[] };
            personId: string;
            requestId: string;
        }

      Returns Promise<{ error: ZenusError; ok: false } | { ok: true; value: undefined }>

    • Uploads a person's KYC files; the caller reads nothing back.

      Parameters

      • __namedParameters: {
            body: {
                files: {
                    externalId?: string | null;
                    fileBytes: string;
                    fileName: string;
                    fileType: "PDF" | "JSON" | "JPEG" | "PNG";
                    fileTypeCode:
                        | "PASSPORT"
                        | "DRIVER_LICENCE"
                        | "ID_CARD"
                        | "BIOMETRIC_REPORT"
                        | "PROOF_OF_ADDRESS"
                        | "FATCA"
                        | "SOURCE_OF_FUNDS"
                        | "EMPLOYMENT_VERIFICATION_LETTER"
                        | "CRYPTO_WALLET_ADDRESS"
                        | "DOCUMENT_COPY"
                        | "ARTICLES_OF_ASSOCIATION"
                        | "AML_CFT_SANCTIONS_IND_AUDIT"
                        | "AML_CTF_SANCTIONS_POLICY"
                        | "AML_CTF_TRAINING_PROGRAM"
                        | "AUTHORIZED_SIGNATURE_FORM"
                        | "BANKING_LICENSE"
                        | "BANKING_REFERENCE"
                        | "CERTIF_INCORPORATION_REG"
                        | "COMPANY_FISCAL_REG_CERTIF"
                        | "COMPLIANCE_DEPARTMENT"
                        | "COMPLIANCE_OFFICER_RESUME"
                        | "CORPORATE_RESOLUTION"
                        | "FI_CORPORATE_STAMP"
                        | "FI_LICENSE"
                        | "FINANCIAL_STATEMENTS"
                        | "FINCEN_CERTIF_CORRESP_ACC_FI"
                        | "GOOD_STANDING_CERTIFICATION"
                        | "GOV_COMPANY_REG_NUMBER"
                        | "MEM_OF_ASSOCIATION"
                        | "ML_TF_RISK_ASSESSMENT"
                        | "SHARE_CERTIFICATE"
                        | "SOURCE_OF_FUNDS_CERTIFICATION"
                        | "TAX_ID_NUMBER"
                        | "RFI"
                        | "CORPORATE_RECORDS"
                        | "WOLFSBERG_GCBDDQ"
                        | "KYB_REVIEW"
                        | "EDD_CONCENTRATION_FORM";
                }[];
            };
            personId: string;
            requestId: string;
        }

      Returns Promise<{ error: ZenusError; ok: false } | { ok: true; value: undefined }>