import type { PartialDeep, SetRequired } from 'type-fest';
import type { Capability, CapabilityName } from './capability';
import type { DocumentDetail } from './document';
import type { Individual } from './individual';
import type { LegalEntityAssociation } from './legal-entity-association';
import type { LegalEntityType } from './legal-entity-type';
import type { Organization } from './organization';
import type { Problem } from './problem';
import type { SoleProprietor } from './sole-proprietor';
import type { TransferInstrumentOverview } from './transfer-instrument';
import type { Trust } from './trust';
import type { TrustedFieldsProvider } from './trusted-fields-provider';
import type { UnincorporatedPartnership } from './unincorporated-partnership';
export interface LegalEntity {
    id?: string;
    documentDetails?: DocumentDetail[];
    entityAssociations?: LegalEntityAssociation[];
    individual?: Individual;
    organization?: Organization;
    soleProprietorship?: SoleProprietor;
    trust?: Trust;
    unincorporatedPartnership?: UnincorporatedPartnership;
    type?: LegalEntityType;
    capabilities?: Partial<Record<CapabilityName, Capability>>;
    problems?: Problem[];
    transferInstruments?: TransferInstrumentOverview[];
    trustedFields?: LegalEntityTrustedFields[];
}
export interface LegalEntityTrustedFields {
    provider: TrustedFieldsProvider;
    fields: string[];
}
export type PatchLegalEntity = PartialDeep<LegalEntity, {
    recurseIntoArrays: true;
}> & {
    id: string;
};
export type ExistingLegalEntity = SetRequired<LegalEntity, 'id' | 'type'>;
/** Narrowed down type of LegalEntity, so that required fields are not optional */
export type ExistingOrganizationLegalEntity = SetRequired<ExistingLegalEntity, 'organization'>;
