import type { SkipToken } from '@tanstack/preact-query'; import type { ExistingLegalEntity } from './legalEntity.types.d.ts'; import type { QueryOptions } from '../types'; /** * Variables: * * `legalEntityId` */ export type QueryKeyLegalEntity = ['legalEntity', string]; export declare const ROOT_LE: unique symbol; export declare const getLegalEntity: (rootLegalEntityId: string, baseUrl: string, legalEntityId: string) => Promise; /** * Supports querying a legal entity imperatively (`queryClient.query()`) with the same * key and fetcher as `useLegalEntity`/`useLegalEntities`, so all share the `['legalEntity', id]` cache. */ export declare const legalEntityQueryOptions: (rootLegalEntityId: string, baseUrl: string, legalEntityId: string) => import("@tanstack/preact-query").OmitKeyof, "queryFn"> & { queryFn?: import("@tanstack/preact-query").QueryFunction<{ readonly capabilities?: { [key: string]: import("./legalEntity.contract").components["schemas"]["LegalEntityCapabilityDto"]; } | undefined; readonly documentDetails?: import("./legalEntity.contract").components["schemas"]["DocumentReferenceResponse"][] | undefined; entityAssociations?: import("./legalEntity.contract").components["schemas"]["EntityAssociationDto"][] | undefined; readonly id: string; individual?: import("./legalEntity.contract").components["schemas"]["IndividualDto"] | undefined; organization?: import("./legalEntity.contract").components["schemas"]["OrganizationDto"] | undefined; readonly problems?: import("./legalEntity.contract").components["schemas"]["CapabilityProblemDto"][] | undefined; soleProprietorship?: import("./legalEntity.contract").components["schemas"]["SoleProprietorshipDto"] | undefined; readonly transferInstruments?: import("./legalEntity.contract").components["schemas"]["TransferInstrumentReferenceDto"][] | undefined; trust?: import("./legalEntity.contract").components["schemas"]["TrustDto"] | undefined; readonly trustedFields?: import("./legalEntity.contract").components["schemas"]["TrustedFieldsDto"][] | undefined; unincorporatedPartnership?: import("./legalEntity.contract").components["schemas"]["UnincorporatedPartnershipDto"] | undefined; type: import("./legalEntity.contract").components["schemas"]["LegalEntityType"]; }, ["legalEntity", string], never> | undefined; } & import("@tanstack/preact-query").QueryKeyWithDataTag<["legalEntity", string], { readonly capabilities?: { [key: string]: import("./legalEntity.contract").components["schemas"]["LegalEntityCapabilityDto"]; } | undefined; readonly documentDetails?: import("./legalEntity.contract").components["schemas"]["DocumentReferenceResponse"][] | undefined; entityAssociations?: import("./legalEntity.contract").components["schemas"]["EntityAssociationDto"][] | undefined; readonly id: string; individual?: import("./legalEntity.contract").components["schemas"]["IndividualDto"] | undefined; organization?: import("./legalEntity.contract").components["schemas"]["OrganizationDto"] | undefined; readonly problems?: import("./legalEntity.contract").components["schemas"]["CapabilityProblemDto"][] | undefined; soleProprietorship?: import("./legalEntity.contract").components["schemas"]["SoleProprietorshipDto"] | undefined; readonly transferInstruments?: import("./legalEntity.contract").components["schemas"]["TransferInstrumentReferenceDto"][] | undefined; trust?: import("./legalEntity.contract").components["schemas"]["TrustDto"] | undefined; readonly trustedFields?: import("./legalEntity.contract").components["schemas"]["TrustedFieldsDto"][] | undefined; unincorporatedPartnership?: import("./legalEntity.contract").components["schemas"]["UnincorporatedPartnershipDto"] | undefined; type: import("./legalEntity.contract").components["schemas"]["LegalEntityType"]; }, Error>; /** * Retrieves a given legal entity. * * @param id can be: * * a specific LE id * * or `ROOT_LE` if you want the root LE without knowing its ID * * or `skipToken` as a way to type-safely disable the query */ export declare const useLegalEntity: (id: string | typeof ROOT_LE | SkipToken, options?: Omit, "enabled">) => { refetch: (options?: import("@tanstack/preact-query").RefetchOptions) => Promise>; isLoading: boolean; isError: boolean; data: { readonly capabilities?: { [key: string]: import("./legalEntity.contract").components["schemas"]["LegalEntityCapabilityDto"]; } | undefined; readonly documentDetails?: import("./legalEntity.contract").components["schemas"]["DocumentReferenceResponse"][] | undefined; entityAssociations?: import("./legalEntity.contract").components["schemas"]["EntityAssociationDto"][] | undefined; readonly id: string; individual?: import("./legalEntity.contract").components["schemas"]["IndividualDto"] | undefined; organization?: import("./legalEntity.contract").components["schemas"]["OrganizationDto"] | undefined; readonly problems?: import("./legalEntity.contract").components["schemas"]["CapabilityProblemDto"][] | undefined; soleProprietorship?: import("./legalEntity.contract").components["schemas"]["SoleProprietorshipDto"] | undefined; readonly transferInstruments?: import("./legalEntity.contract").components["schemas"]["TransferInstrumentReferenceDto"][] | undefined; trust?: import("./legalEntity.contract").components["schemas"]["TrustDto"] | undefined; readonly trustedFields?: import("./legalEntity.contract").components["schemas"]["TrustedFieldsDto"][] | undefined; unincorporatedPartnership?: import("./legalEntity.contract").components["schemas"]["UnincorporatedPartnershipDto"] | undefined; type: import("./legalEntity.contract").components["schemas"]["LegalEntityType"]; } | undefined; }; export declare const useLegalEntities: (ids: string[], options?: QueryOptions) => (import("@tanstack/preact-query").QueryObserverLoadingErrorResult<{ readonly capabilities?: { [key: string]: import("./legalEntity.contract").components["schemas"]["LegalEntityCapabilityDto"]; } | undefined; readonly documentDetails?: import("./legalEntity.contract").components["schemas"]["DocumentReferenceResponse"][] | undefined; entityAssociations?: import("./legalEntity.contract").components["schemas"]["EntityAssociationDto"][] | undefined; readonly id: string; individual?: import("./legalEntity.contract").components["schemas"]["IndividualDto"] | undefined; organization?: import("./legalEntity.contract").components["schemas"]["OrganizationDto"] | undefined; readonly problems?: import("./legalEntity.contract").components["schemas"]["CapabilityProblemDto"][] | undefined; soleProprietorship?: import("./legalEntity.contract").components["schemas"]["SoleProprietorshipDto"] | undefined; readonly transferInstruments?: import("./legalEntity.contract").components["schemas"]["TransferInstrumentReferenceDto"][] | undefined; trust?: import("./legalEntity.contract").components["schemas"]["TrustDto"] | undefined; readonly trustedFields?: import("./legalEntity.contract").components["schemas"]["TrustedFieldsDto"][] | undefined; unincorporatedPartnership?: import("./legalEntity.contract").components["schemas"]["UnincorporatedPartnershipDto"] | undefined; type: import("./legalEntity.contract").components["schemas"]["LegalEntityType"]; }, Error> | import("@tanstack/preact-query").QueryObserverLoadingResult<{ readonly capabilities?: { [key: string]: import("./legalEntity.contract").components["schemas"]["LegalEntityCapabilityDto"]; } | undefined; readonly documentDetails?: import("./legalEntity.contract").components["schemas"]["DocumentReferenceResponse"][] | undefined; entityAssociations?: import("./legalEntity.contract").components["schemas"]["EntityAssociationDto"][] | undefined; readonly id: string; individual?: import("./legalEntity.contract").components["schemas"]["IndividualDto"] | undefined; organization?: import("./legalEntity.contract").components["schemas"]["OrganizationDto"] | undefined; readonly problems?: import("./legalEntity.contract").components["schemas"]["CapabilityProblemDto"][] | undefined; soleProprietorship?: import("./legalEntity.contract").components["schemas"]["SoleProprietorshipDto"] | undefined; readonly transferInstruments?: import("./legalEntity.contract").components["schemas"]["TransferInstrumentReferenceDto"][] | undefined; trust?: import("./legalEntity.contract").components["schemas"]["TrustDto"] | undefined; readonly trustedFields?: import("./legalEntity.contract").components["schemas"]["TrustedFieldsDto"][] | undefined; unincorporatedPartnership?: import("./legalEntity.contract").components["schemas"]["UnincorporatedPartnershipDto"] | undefined; type: import("./legalEntity.contract").components["schemas"]["LegalEntityType"]; }, Error> | import("@tanstack/preact-query").QueryObserverPendingResult<{ readonly capabilities?: { [key: string]: import("./legalEntity.contract").components["schemas"]["LegalEntityCapabilityDto"]; } | undefined; readonly documentDetails?: import("./legalEntity.contract").components["schemas"]["DocumentReferenceResponse"][] | undefined; entityAssociations?: import("./legalEntity.contract").components["schemas"]["EntityAssociationDto"][] | undefined; readonly id: string; individual?: import("./legalEntity.contract").components["schemas"]["IndividualDto"] | undefined; organization?: import("./legalEntity.contract").components["schemas"]["OrganizationDto"] | undefined; readonly problems?: import("./legalEntity.contract").components["schemas"]["CapabilityProblemDto"][] | undefined; soleProprietorship?: import("./legalEntity.contract").components["schemas"]["SoleProprietorshipDto"] | undefined; readonly transferInstruments?: import("./legalEntity.contract").components["schemas"]["TransferInstrumentReferenceDto"][] | undefined; trust?: import("./legalEntity.contract").components["schemas"]["TrustDto"] | undefined; readonly trustedFields?: import("./legalEntity.contract").components["schemas"]["TrustedFieldsDto"][] | undefined; unincorporatedPartnership?: import("./legalEntity.contract").components["schemas"]["UnincorporatedPartnershipDto"] | undefined; type: import("./legalEntity.contract").components["schemas"]["LegalEntityType"]; }, Error> | import("@tanstack/preact-query").QueryObserverPlaceholderResult<{ readonly capabilities?: { [key: string]: import("./legalEntity.contract").components["schemas"]["LegalEntityCapabilityDto"]; } | undefined; readonly documentDetails?: import("./legalEntity.contract").components["schemas"]["DocumentReferenceResponse"][] | undefined; entityAssociations?: import("./legalEntity.contract").components["schemas"]["EntityAssociationDto"][] | undefined; readonly id: string; individual?: import("./legalEntity.contract").components["schemas"]["IndividualDto"] | undefined; organization?: import("./legalEntity.contract").components["schemas"]["OrganizationDto"] | undefined; readonly problems?: import("./legalEntity.contract").components["schemas"]["CapabilityProblemDto"][] | undefined; soleProprietorship?: import("./legalEntity.contract").components["schemas"]["SoleProprietorshipDto"] | undefined; readonly transferInstruments?: import("./legalEntity.contract").components["schemas"]["TransferInstrumentReferenceDto"][] | undefined; trust?: import("./legalEntity.contract").components["schemas"]["TrustDto"] | undefined; readonly trustedFields?: import("./legalEntity.contract").components["schemas"]["TrustedFieldsDto"][] | undefined; unincorporatedPartnership?: import("./legalEntity.contract").components["schemas"]["UnincorporatedPartnershipDto"] | undefined; type: import("./legalEntity.contract").components["schemas"]["LegalEntityType"]; }, Error> | import("@tanstack/preact-query").DefinedUseQueryResult<{ readonly capabilities?: { [key: string]: import("./legalEntity.contract").components["schemas"]["LegalEntityCapabilityDto"]; } | undefined; readonly documentDetails?: import("./legalEntity.contract").components["schemas"]["DocumentReferenceResponse"][] | undefined; entityAssociations?: import("./legalEntity.contract").components["schemas"]["EntityAssociationDto"][] | undefined; readonly id: string; individual?: import("./legalEntity.contract").components["schemas"]["IndividualDto"] | undefined; organization?: import("./legalEntity.contract").components["schemas"]["OrganizationDto"] | undefined; readonly problems?: import("./legalEntity.contract").components["schemas"]["CapabilityProblemDto"][] | undefined; soleProprietorship?: import("./legalEntity.contract").components["schemas"]["SoleProprietorshipDto"] | undefined; readonly transferInstruments?: import("./legalEntity.contract").components["schemas"]["TransferInstrumentReferenceDto"][] | undefined; trust?: import("./legalEntity.contract").components["schemas"]["TrustDto"] | undefined; readonly trustedFields?: import("./legalEntity.contract").components["schemas"]["TrustedFieldsDto"][] | undefined; unincorporatedPartnership?: import("./legalEntity.contract").components["schemas"]["UnincorporatedPartnershipDto"] | undefined; type: import("./legalEntity.contract").components["schemas"]["LegalEntityType"]; }, Error>)[];