Types & Enums
This page documents the public enums and union types you use when building payloads for Core SDK service calls.
All types are exported from @alviere/core:
import {
BusinessType,
Country,
Profession,
UsState,
EmploymentStatus,
AccountPurpose,
SourceOfFunds,
DossierType,
DossierStatus,
} from '@alviere/core';
Account enums
BusinessType
The legal structure of a business account.
| Value |
|---|
SOLE_PROPRIETORSHIP |
LLC |
LLP |
CORPORATION_C |
CORPORATION_S |
GENERAL_PARTNERSHIP |
GOVERNMENT_ENTITY |
NON_PROFIT_CORPORATION |
Country
Supported country codes (ISO 3166-1 alpha-3).
| Value | Country |
|---|---|
USA |
United States |
CAN |
Canada |
MEX |
Mexico |
GBR |
United Kingdom |
UsState
All 50 US states, Washington D.C., and the five territories (AS, GU, MP, PR, VI). Values use standard two-letter postal abbreviations (AL through WY, plus DC, AS, GU, MP, PR, VI).
Profession
An enum of approximately 95 professional titles, from ACCOUNTANT to WRITER. Used in individual account creation forms that collect occupation data.
Account request types
EmploymentStatus
| Value |
|---|
FULL_TIME |
PART_TIME |
SELF_EMPLOYED |
FREELANCER |
UNEMPLOYED |
STUDENT |
RETIRED |
AccountPurpose
Intended use of the account.
| Value |
|---|
GENERAL_USE |
PAYROLL |
TAXES |
MERCHANT_SERVICES |
OTHER |
SourceOfFunds
Origin of the funds flowing through the account.
| Value |
|---|
SERVICES_PRODUCTS |
ESTATE |
HOLDING_COMPANY |
INVESTMENTS |
LOANS |
PARNET_COMPANY |
SUBSIDIARY |
TRUST |
PARNET_COMPANY is a known typo in the current SDK version (should be PARENT_COMPANY). Use the literal string 'PARNET_COMPANY' when submitting this value until the SDK is updated.
Dossier types
DossierType
Type of KYC/AML document bundle.
Refer to the Hive API docs for the full list of supported dossier types and the document requirements for each.
DossierStatus
Lifecycle status of a submitted dossier, as returned by the API.
Refer to the Hive API docs for status values and transition rules.
Request factory functions
The SDK exports New* factory functions for constructing typed request payloads. These are thin helpers that apply the correct shape and defaults.
| Function | Use case |
|---|---|
NewDossierRequest({ external_id, documents, metadata? }) |
Build a DossierRequest for createDossier |
NewDossierReplaceRequest({ external_id, documents, metadata? }) |
Build a DossierReplaceRequest for replaceDossier |
DossierDocument structure
Documents within a dossier request follow this shape:
interface DossierDocument {
document_type: string;
document_number?: string;
issuing_country?: string;
issuing_authority?: string;
issue_date?: string; // ISO 8601
expiry_date?: string; // ISO 8601
file_content: string; // Base64-encoded file bytes
file_name: string;
mime_type: string;
}
Example
import { NewDossierRequest } from '@alviere/core';
const dossier = NewDossierRequest({
external_id: 'kyc-2024-001',
documents: [
{
document_type: 'PASSPORT',
issuing_country: 'USA',
expiry_date: '2030-01-01',
file_content: btoa(rawFileBytes),
file_name: 'passport.jpg',
mime_type: 'image/jpeg',
},
],
});
await accounts.createDossier(accountUuid, dossier);

