import { type ProfessionalEmployeeCredentialInput, type ProfessionalSmartVpPayloadInput } from 'gdc-common-utils-ts'; import { type NodeRuntimeClient, type PollOptions, type SubmitAndPollResult, type SubmitPayload } from './client-port.js'; import type { RouteContext } from '../individual-onboarding.js'; import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js'; import type { BlockchainArtifactRegistrationInput, CommunicationIngestionInput, CommunicationParticipantRuntimeSearchInput, ClinicalBundleSearchInput, ClinicalSectionUpdateInput, SubjectSectionUpdateInput, ClinicalSummaryReadResult, ClinicalSummaryRequestInput, ClinicalSummaryUpdateInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, ProfessionalAccessRequestInput, ProfessionalAccessRequestResult, ProfessionalAccessRequestSearchInput, VitalSignBatchCommunicationFromSearchResponseInput } from '../resource-operations.js'; /** * Professional-oriented facade for runtime actions that belong to the * professional actor itself after tenant and employee provisioning have already * happened through the organization-scoped facades. * * Keep this boundary strict: * - professional runtime actions belong here * - organization activation and employee provisioning do not */ export declare class ProfessionalSdk { private readonly client; /** * @param client Runtime client implementation used to submit and poll GW flows. */ constructor(client: NodeRuntimeClient); /** * Requests a SMART token suitable for subsequent clinical/document calls. * * In the canonical flow the caller normally provides: * - `actorDid` * - `subjectDid` * - requested `scopes` * * The actor DID must be the same identifier used by the consent grant and * the professional VP. High-level callers omit `audience`; the runtime * resolves the subject provider's SMART endpoint or uses the exact endpoint * of its configured GW route. * * Tenant route context can be inherited from the configured * `NodeHttpClient({ ctx })` instead of being repeated on every call. */ requestSmartToken(input: SmartTokenRequestInput): Promise; /** * Returns the normalized public continuity aliases that would be embedded in * the professional identity VC for SMART/OpenID4VP flows. */ getIdentitySameAs(input: ProfessionalEmployeeCredentialInput): string[]; /** * Builds the canonical professional identity VC used by the shared SMART VP * helpers. */ getIdentityVC(input: ProfessionalEmployeeCredentialInput): Record; /** * Builds the canonical professional identity VP payload used by the shared * SMART/OpenID4VP helpers. */ buildIdentityVpPayload(input: ProfessionalSmartVpPayloadInput): Record; /** * Builds one unsigned compact VP JWT for the canonical professional * identity payload. */ buildUnsignedIdentityVpJwt(input: ProfessionalSmartVpPayloadInput, options?: Readonly<{ nowSeconds?: number; ttlSeconds?: number; nonce?: string; }>): string; /** * Executes one clinical `Bundle/_search` using the professional actor * session and tenant route context. */ searchClinicalBundle(ctx: RouteContext, input: ClinicalBundleSearchInput): Promise; /** Reads the consent-authorized clinical `$summary` document without ingestion. */ requestClinicalSummary(ctx: RouteContext, input: ClinicalSummaryRequestInput): Promise; /** * Reads the latest IPS-oriented document projection available to the * professional actor for one subject. */ getLatestIps(ctx: RouteContext, input: Omit): Promise; /** * Ingests a FHIR `Communication` and waits for indexing. */ ingestCommunicationAndUpdateIndex(ctx: RouteContext, input: CommunicationIngestionInput): Promise; /** * Requests subject-controlled access without requiring a SMART token. The * runtime persists one canonical permission-request Communication carrying * a draft Consent Bundle. The draft is auditable but never authorizes access. */ requestProfessionalAccess(ctx: RouteContext, input: ProfessionalAccessRequestInput): Promise; /** Lists permission requests sent by or involving this professional. */ listProfessionalAccessRequests(ctx: RouteContext, input: ProfessionalAccessRequestSearchInput): Promise; /** Updates one consent-authorized clinical section through a scoped batch/collection. */ updateClinicalSection(ctx: RouteContext, input: ClinicalSectionUpdateInput): Promise; /** Updates one consent-authorized subject section with its profile attester. */ updateSubjectSection(ctx: RouteContext, input: SubjectSectionUpdateInput): Promise; /** Updates a consent-authorized multi-section summary document. */ updateClinicalSummary(ctx: RouteContext, input: ClinicalSummaryUpdateInput): Promise; /** * Registers one FHIR resource or raw document artifact on blockchain before * the artifact is attached to a Communication. */ registerBlockchainArtifactAndUpdateIndex(ctx: RouteContext, input: BlockchainArtifactRegistrationInput): Promise; /** * Converts a paginated vital-sign search response into one Communication * carrying the selected day-batch artifacts and submits it. */ submitVitalSignBatchCommunicationFromSearchResponse(ctx: RouteContext, input: VitalSignBatchCommunicationFromSearchResponseInput): Promise; /** * Searches indexed communication channel records by subject and participant * identifiers. */ searchCommunicationParticipants(ctx: RouteContext, input: CommunicationParticipantRuntimeSearchInput): Promise; /** * Grants access to a professional through a consent flow. */ grantProfessionalAccess(ctx: RouteContext, input: GrantProfessionalAccessInput): Promise; /** * Low-level escape hatch for direct submit/poll flows. */ submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise; }