import type { OrganizationDidBindingInput } from 'gdc-sdk-core-ts'; import type { AppInfo } from 'gdc-sdk-core-ts'; import type { IndividualOrganizationLifecycleInput } from 'gdc-sdk-core-ts'; import { type ResolvedAppInfo, type CommunicationClinicalFormatRenderers, type SecureDidcommTransportAdapter, type TransportProfile } from 'gdc-sdk-core-ts'; import { type HostRouteContext, type HostedTenantLifecycleInput } from './host-onboarding.js'; import type { HostedTenantDescendantKind } from './host-onboarding.js'; import type { NodeLegalOrganizationVerificationTransactionInput, NodeOrganizationDidBindingInput, NodeOrganizationActivationInput } from './orchestration/client-port.js'; import { type IndividualOrganizationConfirmOrderInput, type IndividualOrganizationOrderResult, type RouteContext } from './individual-onboarding.js'; import { type EnsureFamilyOrganizationRegistrationInput } from './family-organization-registration.js'; import { type FamilyOrganizationSearchInput, type OwnedFamilyOrganizationDirectoryInput } from './family-organization-search.js'; import { type SmartTokenRequestInput } from './smart-token.js'; import { type EmployeeDeviceActivationRequestInput, type EmployeeDeviceActivationResult, type EmployeeDeviceOtpRecoveryInput, type EmployeeDeviceOtpRecoveryResult, type EmployeeDeviceRevocationInput } from './device-activation.js'; import { type OrganizationLicenseOrderConfirmInput } from './organization-license-order.js'; import { type IndividualOrganizationRegistrationInput, type IndividualOrganizationRegistrationResult } from './individual-start.js'; import { type CommunicationIngestionInput, type BlockchainArtifactRegistrationInput, type VitalSignBatchCommunicationFromSearchResponseInput, type CommunicationParticipantRuntimeSearchInput, type ClinicalBundleSearchInput, type ClinicalSectionUpdateInput, type SubjectSectionUpdateInput, type ClinicalSummaryReadResult, type ClinicalSummaryRequestInput, type ClinicalSummaryUpdateInput, type GrantProfessionalAccessInput, type GrantProfessionalAccessResult, type DigitalTwinSecondaryUseConsentInput, type DigitalTwinSecondaryUseConsentResult, type DigitalTwinSubjectLinkPurgeInput, type DigitalTwinSubjectLinkPurgeResult, type SubjectConsentSearchInput, type IndividualMemberLifecycleInput, type IndividualMemberLicenseAddInput, type IndividualMemberLicenseInvitationInput, type IndividualMemberLicenseTransitionInput, type LicenseListRuntimeSearchInput, type LicenseOfferRuntimeSearchInput, type LicenseOrderRuntimeSearchInput, type OrganizationEmployeeCreationInput, type OrganizationEmployeeLicenseAddInput, type OrganizationEmployeeLicenseOfferInput, type OrganizationEmployeeLicenseInvitationInput, type OrganizationEmployeeLifecycleInput, type OrganizationEmployeeSearchInput, type ProfessionalAccessRequestInput, type ProfessionalAccessRequestResult, type RevokeProfessionalAccessInput, type RevokeProfessionalAccessResult, type RelatedPersonUpsertInput } from './resource-operations.js'; import type { LegalOrganizationOrderInput } from './host-onboarding.js'; import type { SmartTokenExchangeResult } from './smart-token.js'; import { type OrganizationEmployeeProvisioningInput, type OrganizationEmployeeProvisioningResult } from './organization-employee-lifecycle.js'; import type { OrganizationEmployeeLifecycleRecord } from 'gdc-common-utils-ts/models/organization-employee-lifecycle'; import type { NodeRuntimeClient, PollOptions, PollResult, SubmitAndPollResult, SubmitPayload, SubmitResponse } from './orchestration/client-port.js'; import { type FhirR5SubscriptionBatchInput } from './fhir-r5-subscription-runtime.js'; import type { FhirR5SubscriptionTopic } from 'gdc-common-utils-ts/models/fhir-r5-subscription'; import { type DigitalTwinMaterializationInput, type DigitalTwinSearchInput, type DigitalTwinSelectionInput } from './digital-twin.js'; import { type AuthorizedIndividualSubject, type AuthorizedIndividualSubjectDirectoryInput } from './authorized-subject-directory.js'; import { type FhirPatientMatchBundle, type MatchPatientAtIndexProviderInput } from './pdqm-patient-match.js'; export type HttpRuntimeClientOptions = { baseUrl: string; bearerToken?: string; /** * Optional ICA-issued runtime/software proof token reused as the default * HTTP Bearer credential in demo/compat profiles when no explicit * `bearerToken` is provided. * * This keeps the SDK wiring ready for a future ICA-authorized software * runtime contract without forcing callers to overload the semantic name * `bearerToken` in documentation or app code. * * Current `gwtemplate-node-ts` demo/bootstrap flows do not yet require a * registered software/runtime proof for this path, so callers may omit this * field or pass an empty string until the ICA runtime-registration contract * is finalized. */ runtimeVpToken?: string; /** * Host app identity required by GW CORE. * * `appId` is mandatory when you want the SDK to inject canonical `AppId` and * `AppVersion` headers automatically. `appVersion` is optional and defaults * to `v1.0`. */ appInfo?: AppInfo; /** * Optional default route context for the authenticated actor's home tenant. * A professional runtime should set this to the employer organization; a * selected subject's provider context is passed to each subject operation. */ ctx?: RouteContext; defaultHeaders?: Record; requestTimeoutMs?: number; /** Default wire profile for high-level clinical outbox submissions. */ transportProfile?: TransportProfile; /** Wallet-backed pack/unpack adapter required by the secure-form profile. */ secureTransportAdapter?: SecureDidcommTransportAdapter; /** Product-supplied clinical projections not owned by the generic runtime. */ communicationFormatRenderers?: CommunicationClinicalFormatRenderers; /** Injectable fetch implementation for BFF adapters and deterministic tests. */ fetchImpl?: typeof fetch; /** * Optional trusted provider-index/DID resolver for subject-scoped SMART * requests. The runtime uses the resolved endpoint for transport and JWT * audience; application-level callers do not need to pass `audience`. */ smartTokenEndpointResolver?: (subjectDid: string) => Promise; }; /** * @deprecated Prefer `HttpRuntimeClientOptions`. */ export type NodeHttpClientOptions = HttpRuntimeClientOptions; /** * Runtime-oriented HTTP client for Node backends, BFFs, and workers that need * to submit GDC gateway requests and poll asynchronous responses. * * This class is intentionally transport-focused. It does not try to be the * high-level editor of FHIR documents; that role belongs to the shared helpers * re-exported from `gdc-sdk-core-ts`. */ export declare class HttpRuntimeClient implements NodeRuntimeClient { private readonly baseUrl; private readonly bearerToken?; private activeSmartBearerToken?; private readonly runtimeVpToken?; private readonly resolvedAppInfo?; private readonly ctx?; private readonly defaultHeaders; private readonly requestTimeoutMs; private readonly transportProfile; private readonly secureTransportAdapter?; private readonly communicationFormatRenderers; private readonly fetchImpl?; private readonly smartTokenEndpointResolver?; private readonly httpTraceFile?; private readonly tokenCache; private readonly paths; private get transportConfig(); /** * @param options.baseUrl Gateway base URL without trailing slash. * @param options.interopMode Optional runtime interoperability mode from the SDK config layer (`demo`, `compat`, `strict`). * @param options.bearerToken Optional bearer token reused for direct HTTP calls. * @param options.runtimeVpToken Optional ICA-issued runtime/software proof token reused as Bearer when `bearerToken` is not set. Current `gwtemplate-node-ts` demo/bootstrap flows may omit it or pass an empty string because software/runtime registration is not enforced there yet. * @param options.appInfo Optional GW CORE app identity. When present, the * client injects `AppId` and `AppVersion` into all outgoing requests. * @param options.ctx Optional default route context. * @param options.defaultHeaders Optional static headers appended to every request. * @param options.requestTimeoutMs Optional per-request timeout in milliseconds. */ constructor(options: HttpRuntimeClientOptions); /** * Returns the canonical GW CORE app identity resolved by the Node client. */ getResolvedAppInfo(): ResolvedAppInfo | undefined; /** * Returns the standard GW CORE headers currently injected by the Node client. */ getAppHeaders(): Record<'AppId' | 'AppVersion', string> | undefined; /** * Returns the configured ICA-issued runtime/software proof token, when present. */ getRuntimeVpToken(): string | undefined; /** * Matches a known human identifier at the index provider resolved in Fabric. * * The BFF supplies the provider DID and its discovered FHIR base URL. This * method never forwards the Fabric lookup hash. It sends one IHE PDQm * `Parameters` request and returns the resulting FHIR search `Bundle`, while * applying the runtime's configured FHIR, DIDComm plain or strict profile. */ matchPatientAtIndexProvider(input: MatchPatientAtIndexProviderInput): Promise; /** * Builds a canonical GDC v1 resource/action path from a route context. */ v1Path(ctx: RouteContext | undefined, section: string, format: string, resourceType: string, action: string): string; /** * Submits a batch payload using the transport profile selected once when the * runtime client was constructed. Operations cannot downgrade or replace * that profile locally. */ submitBatch(path: string, payload: SubmitPayload): Promise; /** * Polls a batch-response endpoint until the GW reports a terminal state. */ pollUntilComplete(pollPath: string, request: { thid: string; }, pollOptions?: PollOptions): Promise; /** * Convenience wrapper that performs submit and poll in sequence. * * A terminal HTTP 200/201 means polling completed; it does not guarantee the * business operation succeeded. Consumers and E2E tests must inspect * `result.poll.body` with `BundleReader.getResponseAnalysis()` and reject * error OperationOutcomes. High-level product code must not manually traverse * DIDComm `body`, JSON-API `data[]`, FHIR `entry[]` or `issue[]` to decide * success. */ submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise; /** Registers one neutral FHIR R5 topic in the tenant-owned CORE catalog. */ submitFhirR5SubscriptionTopicBatch(ctx: RouteContext, topic: FhirR5SubscriptionTopic, pollOptions?: PollOptions): Promise; /** Registers one tenant or exact-subject FHIR R5 rest-hook Subscription. */ submitFhirR5SubscriptionBatch(ctx: RouteContext, input: FhirR5SubscriptionBatchInput, pollOptions?: PollOptions): Promise; private submitAndPollWithBearerToken; /** * Enforces the client-owned transport policy. Operation inputs retained for * source compatibility may repeat the configured profile, but can never * replace it or silently downgrade the wire protection selected at runtime * construction. */ private requireConfiguredTransportProfile; /** * Starts the host-side legal-organization verification transaction that GW * CORE forwards to ICA `_verify`. * * Runtime ownership: * - builds the canonical shared business bundle from `sdk-core/common-utils` * - keeps communication/runtime transport concerns at the outer message layer * - keeps the controller business key inside the submitted bundle payload * * Flow separation: * - `_transaction` is the new host onboarding step * - this runtime does not chain `_activate` after `_transaction` * - `_activate` remains available only for the older ICA `_verify` based flow * * Commercial contract: * - the final poll response is expected to mint * `resource.meta.claims['org.schema.Offer.identifier']` * - callers should then pass that exact value to * `confirmLegalOrganizationOrder(...)` */ submitLegalOrganizationVerificationTransaction(hostCtx: HostRouteContext, input: NodeLegalOrganizationVerificationTransactionInput, pollOptions?: PollOptions): Promise; /** * Starts the host-side existing-tenant legal-organization reissue flow that * GW CORE forwards to ICA `_verify`. * * Semantics: * - reuse the same signed evidence/controller binding contract as `_transaction` * - do not create a new Offer * - expect GW CORE to reissue one controller activation code in the response * - do not call `confirmLegalOrganizationOrder(...)` after this flow */ submitLegalOrganizationCredentialReissuance(hostCtx: HostRouteContext, input: NodeLegalOrganizationVerificationTransactionInput, pollOptions?: PollOptions): Promise; /** * @deprecated Use `submitLegalOrganizationCredentialReissuance`. * This alias remains for compatibility with clients named after the * underlying `Organization/_issue` HTTP action. */ submitLegalOrganizationIssue(hostCtx: HostRouteContext, input: NodeLegalOrganizationVerificationTransactionInput, pollOptions?: PollOptions): Promise; /** * Submits one tenant-scoped DID document binding request. * * Binding semantics: * - the tenant path identifies the existing organization * - `organization.url` carries the public alias/domain list * - `controller.sameAs` is optional corroborating identity material * - the flow does not rotate or replace organization public keys */ submitOrganizationDidBinding(ctx: RouteContext, input: NodeOrganizationDidBindingInput | OrganizationDidBindingInput, pollOptions?: PollOptions): Promise; /** * Activates a legal organization in the gateway host registry using an ICA * proof token already obtained by the caller. * * Plaintext transport note: * - this Node runtime currently submits `_activate` as * `application/didcomm-plain+json` * - because there is no real outer JWS/JWE envelope in that mode, the * runtime mirrors the technical communication metadata derived from * `controller.publicKeyJwk` / `controller.jwks` into `meta.jws.protected` * and `meta.jwe.header` * - secure JOSE transports should carry those values in the real protected * headers instead of plaintext `meta` * - this mirrored metadata is transport fallback only; the canonical * activation contract remains `body.vp_token` plus `body.controller.*` * * Credential compatibility: * - canonical VP: organization + legal-representative + organization-controller VCs * - legacy two-VC VP: accepted only when the old representative VC itself * carries both `RESPRSN` and matching `hasCredential` key material * - a representative VC containing only `ISCO-08|1120` is not controller * evidence and will be rejected * * Commercial contract: * - legacy `_activate` is still expected to mint * `resource.meta.claims['org.schema.Offer.identifier']` * - callers should then pass that exact value to * `confirmLegalOrganizationOrder(...)` */ activateOrganizationInGatewayFromIcaProof(hostCtx: HostRouteContext, input: NodeOrganizationActivationInput, pollOptions?: PollOptions): Promise; /** * Confirms a host-side legal organization order after the initial activation. * * Use this only when the previous flow actually returned one canonical Offer * identifier. `_transaction` and legacy `_activate` do; `_issue` does not. */ confirmLegalOrganizationOrder(hostCtx: HostRouteContext, input: LegalOrganizationOrderInput, pollOptions?: PollOptions): Promise; /** * Disables the host registration itself after every hosted tenant has * already been purged from the host registry. */ disableHost(hostCtx: HostRouteContext, input: HostedTenantLifecycleInput, pollOptions?: PollOptions): Promise; /** * Purges the disabled host registration after the hosted tenant registry has * become empty. */ purgeHost(hostCtx: HostRouteContext, input: HostedTenantLifecycleInput, pollOptions?: PollOptions): Promise; /** * Disables one hosted tenant through the host registry after its descendants * have already been disabled/purged. */ disableTenant(hostCtx: HostRouteContext, input: HostedTenantLifecycleInput, pollOptions?: PollOptions): Promise; /** Re-enables one suspended hosted tenant without changing its legal identity. */ enableTenant(hostCtx: HostRouteContext, input: HostedTenantLifecycleInput, pollOptions?: PollOptions): Promise; /** * Purges one already-disabled hosted tenant through the host registry. */ purgeTenant(hostCtx: HostRouteContext, input: HostedTenantLifecycleInput, pollOptions?: PollOptions): Promise; /** Reads authoritative tenant and descendant lifecycle state from the host registry. */ getTenantLifecycleStatus(hostCtx: HostRouteContext, input: HostedTenantLifecycleInput, pollOptions?: PollOptions): Promise; /** Explicitly disables one descendant group; tenant disable itself never cascades. */ disableTenantDescendants(hostCtx: HostRouteContext, input: HostedTenantLifecycleInput & { descendantKind: HostedTenantDescendantKind; }, pollOptions?: PollOptions): Promise; /** Explicitly purges one descendant group; tenant purge itself never cascades. */ purgeTenantDescendants(hostCtx: HostRouteContext, input: HostedTenantLifecycleInput & { descendantKind: HostedTenantDescendantKind; }, pollOptions?: PollOptions): Promise; private submitTenantDescendantLifecycle; /** * Creates an employee or professional entry under an existing organization tenant. */ createOrganizationEmployee(ctx: RouteContext, input: OrganizationEmployeeCreationInput, pollOptions?: PollOptions): Promise; /** Creates an employee and reserves its activation credential as one SDK workflow. */ provisionOrganizationEmployee(ctx: RouteContext, input: OrganizationEmployeeProvisioningInput): Promise; /** Revokes one selected employee installation without releasing its seat. */ revokeEmployeeDevice(ctx: RouteContext, input: EmployeeDeviceRevocationInput): Promise; /** Reserves an employee seat and issues its bounded multi-device activation credential. */ issueOrganizationEmployeeLicense(ctx: RouteContext, input: OrganizationEmployeeLicenseInvitationInput): Promise; /** * Disables an employee using the current GW CORE contract. * * Current live behavior still uses `Employee/_batch` with entry * `request.method = DELETE`. This intentionally does not release licenses. */ disableOrganizationEmployee(ctx: RouteContext, input: OrganizationEmployeeLifecycleInput, pollOptions?: PollOptions): Promise; /** * Preferred public alias for employee disable in the current SDK surface. */ disableEmployee(ctx: RouteContext, input: OrganizationEmployeeLifecycleInput, pollOptions?: PollOptions): Promise; /** * Purges an inactive employee using the current GW CORE explicit purge route. * * Purge preserves traceability and releases/disassociates licenses only after * the employee is already inactive. */ purgeOrganizationEmployee(ctx: RouteContext, input: OrganizationEmployeeLifecycleInput, pollOptions?: PollOptions): Promise; /** * Preferred public alias for employee purge in the current SDK surface. */ purgeEmployee(ctx: RouteContext, input: OrganizationEmployeeLifecycleInput, pollOptions?: PollOptions): Promise; /** * Searches employees/professionals under the selected organization tenant. */ searchOrganizationEmployees(ctx: RouteContext, input: OrganizationEmployeeSearchInput): Promise; /** Lists employees with their license and installation state. */ listOrganizationEmployeeLifecycle(ctx: RouteContext): Promise; /** * Searches organization-owned license seats through the canonical * `License/_search` route. */ searchOrganizationLicenses(ctx: RouteContext, input: LicenseListRuntimeSearchInput): Promise; /** * Lists organization-owned license seats using the same `License/_search` * route with optional filters. */ listOrganizationLicenses(ctx: RouteContext, input?: LicenseListRuntimeSearchInput): Promise; /** @deprecated Professional seats use Employee Offer and confirmed Order. */ addFreeOrganizationEmployeeLicenses(ctx: RouteContext, input: OrganizationEmployeeLicenseAddInput): Promise; /** Starts the commercial Offer flow for additional professional seats. */ requestOrganizationEmployeeLicenseOffer(ctx: RouteContext, input: OrganizationEmployeeLicenseOfferInput): Promise; searchOrganizationLicenseOffers(ctx: RouteContext, input: LicenseOfferRuntimeSearchInput): Promise; listOrganizationLicenseOffers(ctx: RouteContext, input?: LicenseOfferRuntimeSearchInput): Promise; searchOrganizationLicenseOrders(ctx: RouteContext, input: LicenseOrderRuntimeSearchInput): Promise; listOrganizationLicenseOrders(ctx: RouteContext, input?: LicenseOrderRuntimeSearchInput): Promise; /** * Confirms an already paid organization-side license order so additional * seats become usable once GW CORE exposes the public converged route. * * Current runtime note: * - search/list for organization license offers and orders already works * - the public/write post-payment seat activation route is not wired yet * - this method therefore fails explicitly instead of guessing a transport * contract that is not stable in GW CORE */ confirmOrganizationLicenseOrder(ctx: RouteContext, input: OrganizationLicenseOrderConfirmInput, pollOptions?: PollOptions): Promise; /** * Registers an individual-oriented personal organization/subject index. * * Commercial contract: * - this SDK method targets the family/individual commercial bootstrap flow * - the registration poll response is expected to return one Offer id * - callers should then confirm it through * `confirmIndividualOrganizationOrder(...)` * - this phase does not create a wallet, perform DCR, or open a profile * * This is distinct from embedded legacy individual registration helpers in * GW CORE that may persist an individual record without minting an Offer. */ registerIndividualOrganization(input: IndividualOrganizationRegistrationInput): Promise; /** @deprecated Use `registerIndividualOrganization`. */ startIndividualOrganization(input: IndividualOrganizationRegistrationInput): Promise; /** * Searches one existing family/individual registration by controller phone + * usualname, with optional birth-date disambiguation. */ searchFamilyOrganization(ctx: RouteContext, input: FamilyOrganizationSearchInput): Promise | null>; /** Lists all individual Organizations owned by one verified account contact. */ listOwnedFamilyOrganizations(ctx: RouteContext, input: OwnedFamilyOrganizationDirectoryInput): Promise>; }>[]>; /** * Searches one existing family/individual registration and starts the * bootstrap flow only when the registration does not already exist. */ ensureFamilyOrganizationRegistration(ctx: RouteContext, input: EnsureFamilyOrganizationRegistrationInput): Promise>; /** * Confirms the Offer returned by `registerIndividualOrganization(...)`, waits * for the terminal Order, and exposes its controller `activationCode`. * The caller passes that opaque value directly to * `ServerProfileSessionManager.enroll(...)`; it does not traverse claims or * call a separate licence reader. */ confirmIndividualOrganizationOrder(input: IndividualOrganizationConfirmOrderInput): Promise; /** * Disables a hosted individual/family organization without releasing licenses. * * This follows the current explicit GW CORE `_disable` route rather than the * future normalized `_batch + PATCH` target contract. */ disableIndividualOrganization(ctx: RouteContext, input: IndividualOrganizationLifecycleInput, pollOptions?: PollOptions): Promise; /** * Preferred public alias for hosted individual/family disable. */ disableIndividual(ctx: RouteContext, input: IndividualOrganizationLifecycleInput, pollOptions?: PollOptions): Promise; /** * Purges an inactive hosted individual/family organization. * * Purge preserves the record for traceability and releases/disassociates * licenses only after the registration is already inactive. */ purgeIndividualOrganization(ctx: RouteContext, input: IndividualOrganizationLifecycleInput, pollOptions?: PollOptions): Promise; /** * Preferred public alias for hosted individual/family purge. */ purgeIndividual(ctx: RouteContext, input: IndividualOrganizationLifecycleInput, pollOptions?: PollOptions): Promise; /** * Soft-disables a `RelatedPerson` membership/contact using the current * public batch-update path and `RelatedPerson.active = false`. */ disableIndividualMember(ctx: RouteContext, input: IndividualMemberLifecycleInput, pollOptions?: PollOptions): Promise; /** * Searches individual/family-side license seats through the canonical * `License/_search` route. */ searchIndividualLicenses(ctx: RouteContext, input: LicenseListRuntimeSearchInput): Promise; /** * Lists individual/family-side license seats using the same search route * with optional filters. */ listIndividualLicenses(ctx: RouteContext, input?: LicenseListRuntimeSearchInput): Promise; /** * Resolves the complete high-level directory of subjects already authorized * for a verified OpenID contact. The SDK owns both GW searches and polling; * the result itself grants no professional role or SMART capability. */ listAuthorizedIndividualSubjects(ctx: RouteContext, input: AuthorizedIndividualSubjectDirectoryInput): Promise; /** Adds zero-cost seats to one individual organization's member pool. */ addFreeIndividualMemberLicenses(ctx: RouteContext, input: IndividualMemberLicenseAddInput): Promise; /** Reserves one individual seat for an existing FHIR v3-role contact. */ issueIndividualMemberLicense(ctx: RouteContext, input: IndividualMemberLicenseInvitationInput): Promise; /** Accepts, deactivates or releases one individual-member seat. */ transitionIndividualMemberLicense(ctx: RouteContext, action: '_accept' | '_deactivate' | '_release', input: IndividualMemberLicenseTransitionInput): Promise; searchIndividualLicenseOffers(ctx: RouteContext, input: LicenseOfferRuntimeSearchInput): Promise; listIndividualLicenseOffers(ctx: RouteContext, input?: LicenseOfferRuntimeSearchInput): Promise; searchIndividualLicenseOrders(ctx: RouteContext, input: LicenseOrderRuntimeSearchInput): Promise; listIndividualLicenseOrders(ctx: RouteContext, input?: LicenseOrderRuntimeSearchInput): Promise; /** * Purges one previously disabled `RelatedPerson` membership/contact through * the explicit public purge path. */ purgeIndividualMember(ctx: RouteContext, input: IndividualMemberLifecycleInput, pollOptions?: PollOptions): Promise; /** * Creates and submits a consent-oriented access grant for a professional actor. */ grantProfessionalAccess(ctx: RouteContext, input: GrantProfessionalAccessInput): Promise; /** * Applies the subject's reversible secondary-use decision and lets GW * rebuild or pause the tenant-private digital-twin projection. */ setDigitalTwinSecondaryUseConsent(ctx: RouteContext, input: DigitalTwinSecondaryUseConsentInput): Promise; /** Offboards the subject from this index provider without deleting the anonymous twin. */ purgeDigitalTwinSubjectLink(ctx: RouteContext, input: DigitalTwinSubjectLinkPurgeInput): Promise; /** Reads the subject-owned Consent records through Communication -> Subject/_search. */ searchSubjectConsents(ctx: RouteContext, input: SubjectConsentSearchInput): Promise; /** * Closes an existing professional consent by setting its period end and * resubmitting the updated consent resource. */ revokeProfessionalAccess(ctx: RouteContext, input: RevokeProfessionalAccessInput): Promise; /** * Requests SMART/OpenID token material through the gateway. * * The business inputs are typically the actor DID plus requested scopes. * Route details are resolved either from `input` compatibility fields * (`tenantId` / `jurisdiction` / `sector`) or from * the default client route context configured in the constructor. * A fetched actor-scoped access token is retained by this runtime for later * clinical operations. Token acquisition and renewal continue to use the * original account bearer, so applications must not reconstruct the SDK or * manually replace its transport after this method returns. */ requestSmartToken(input: SmartTokenRequestInput): Promise; /** * Registers any actor profile device through activation-code exchange plus * GW DCR. The historical helper name says employee, but the transport is * actor-neutral and is used by portal and telephone profile runtimes. */ activateProfileDeviceWithActivationRequest(input: EmployeeDeviceActivationRequestInput): Promise; /** * Actor-facade name retained for organization controllers and employees. * The implementation is actor-neutral and shares the profile-device flow. */ activateEmployeeDeviceWithActivationRequest(input: EmployeeDeviceActivationRequestInput): Promise; /** Obtains a replacement activation credential after fresh OTP verification. */ recoverEmployeeDeviceWithOtp(input: EmployeeDeviceOtpRecoveryInput & Partial): Promise; /** * Creates or updates a `RelatedPerson` for non-employee family/caregiver * roles such as a grandfather, guardian, or external caregiver. */ upsertRelatedPersonAndPoll(ctx: RouteContext, input: RelatedPersonUpsertInput): Promise; /** * Submits a FHIR `Communication` ingestion request and polls until the * GW has persisted the audit record and related projections. * * @param ctx Route context containing tenant/jurisdiction/sector. * @param input Communication payload plus route/format options. */ ingestCommunicationAndUpdateIndex(ctx: RouteContext, input: CommunicationIngestionInput): Promise; /** * Records a subject-scoped permission-request Communication before SMART * authorization exists. The Communication carries a batch Bundle of * `Consent.status = draft`; that draft grants nothing. The configured bearer * authenticates HTTP and the configured secure transport adapter * signs/encrypts DIDComm when enabled. */ requestProfessionalAccess(ctx: RouteContext, input: ProfessionalAccessRequestInput): Promise; /** * Updates exactly one clinical section. * * The attached payload must be a `Bundle.type=batch|collection`, and the * exact section is carried on the outer Communication. This flow is suitable * for vital-sign or other explicitly section-scoped updates; it does not * replace a multi-section IPS document. The terminal result may include one * transaction receipt with per-resource CID/version evidence. Callers never * supply or configure ledger channel or smart-contract names. */ updateClinicalSection(ctx: RouteContext, input: ClinicalSectionUpdateInput): Promise; /** * Updates one generic subject section. The attached batch/collection may * contain clinical or non-clinical resources. It receives the exact * attester exposed by the unlocked profile. */ updateSubjectSection(ctx: RouteContext, input: SubjectSectionUpdateInput): Promise; /** * Updates several clinical sections as one Composition-first document. * * The attached payload must be `Bundle.type=document` with `Composition` in * `entry[0]`; its `section[].entry[]` references delimit the updated data. * Direct callers pass the authenticated profile `actorDid` as `sender` and * the real hosted provider-tenant DID as `recipient`. A stable multibase URN * or portal DID/alias is never the authenticated clinical actor. GW owns all * ledger routing; callers receive evidence but never select a channel or * smart contract. */ updateClinicalSummary(ctx: RouteContext, input: ClinicalSummaryUpdateInput): Promise; /** * Reads the authoritative clinical document currently available for one * subject through an auditable `Communication` carrying GW's internal * `Subject/$summary` operation reference. The runtime submits * `Communication/_batch`; callers do not invoke `$summary` directly. * * Unlike `ingestCommunicationAndUpdateIndex(...)`, this method does not * represent a write or projection lifecycle. It returns the GW document and * a `BundleReader` for section-by-section navigation. */ requestClinicalSummary(ctx: RouteContext, input: ClinicalSummaryRequestInput): Promise; /** * Renders and submits one canonical clinical outbox job without requiring * BFF, portal or assistant consumers to know GW wire envelopes. */ private submitCommunicationOutboxJobAndPoll; /** * Applies the configured wire profile to a direct subject-index search. * This is compatibility/specialized plumbing, not the primary summary read. */ private submitClinicalMessageAndPoll; /** * Registers one FHIR resource or raw artifact on blockchain and waits until * GW has indexed the resulting DocumentReference projection. */ registerBlockchainArtifactAndUpdateIndex(ctx: RouteContext, input: BlockchainArtifactRegistrationInput): Promise; /** * Builds and submits a Communication carrying the selected vital-sign day * batch artifacts from a paginated search response. */ submitVitalSignBatchCommunicationFromSearchResponse(ctx: RouteContext, input: VitalSignBatchCommunicationFromSearchResponseInput): Promise; /** * Searches communication channel records by subject and participant * identifiers through `Communication/_search`. */ searchCommunicationParticipants(ctx: RouteContext, input: CommunicationParticipantRuntimeSearchInput): Promise; /** * Alias for `ingestCommunicationAndUpdateIndex(...)`. * * @param ctx Route context containing tenant/jurisdiction/sector. * @param input Communication payload plus route/format options. */ submitCommunicationAndPoll(ctx: RouteContext, input: CommunicationIngestionInput): Promise; /** * Executes the compatibility/specialized direct `Bundle/_search` surface. * New summary viewers use `requestClinicalSummary(...)`, whose Communication * transport keeps the internal index operation hidden from application code. * * @param ctx Route context containing tenant/jurisdiction/sector. * @param input Search parameters such as subject, section, date and included resource types. */ searchClinicalBundle(ctx: RouteContext, input: ClinicalBundleSearchInput): Promise; /** Searches tenant digital twins using coded, pseudonymous research claims. */ searchDigitalTwins(ctx: RouteContext, input: DigitalTwinSearchInput): Promise; /** Saves one tagged researcher working copy without mutating the canonical twin. */ saveDigitalTwinSelection(ctx: RouteContext, input: DigitalTwinSelectionInput): Promise; /** Materializes one selected pseudonymous research subject as a summary Bundle. */ materializeDigitalTwin(ctx: RouteContext, input: DigitalTwinMaterializationInput): Promise; /** * Searches the latest IPS-oriented document view for a subject. * * Defaults the section to the IPS patient summary document and includes * `Composition` plus `DocumentReference`. * * @param ctx Route context containing tenant/jurisdiction/sector. * @param input Subject-scoped search parameters. */ searchLatestIps(ctx: RouteContext, input: Omit): Promise; /** * Preferred runtime alias for latest-IPS retrieval used by shared facades. */ getLatestIps(ctx: RouteContext, input: Omit): Promise; /** * Searches a communication/document thread using `thid` and returns the * indexed communication/document projections. */ listCommunicationThread(ctx: RouteContext, input: { subject: string; thid: string; pollOptions?: PollOptions; }): Promise; private buildConsentClaimsWithCid; private buildHeaders; private fetchWithTimeout; private parseResponseBody; /** * Reuses the shared bundle business contract while keeping attachment * transport fields at the DIDComm/plaintext message layer expected by GW. */ private wrapBundleAsGatewayTransactionMessage; hostRegistryOrganizationTransactionPath(ctx?: HostRouteContext): string; hostRegistryOrganizationTransactionPollPath(ctx?: HostRouteContext): string; hostRegistryOrganizationIssuePath(ctx?: HostRouteContext): string; hostRegistryOrganizationIssuePollPath(ctx?: HostRouteContext): string; hostRegistryOrganizationActivatePath(ctx?: HostRouteContext): string; hostRegistryOrganizationActivatePollPath(ctx?: HostRouteContext): string; hostRegistryOrganizationDisablePath(ctx?: HostRouteContext): string; hostRegistryOrganizationDisablePollPath(ctx?: HostRouteContext): string; hostRegistryOrganizationPurgePath(ctx?: HostRouteContext): string; hostRegistryOrganizationPurgePollPath(ctx?: HostRouteContext): string; hostRegistryOrderBatchPath(ctx?: HostRouteContext): string; hostRegistryOrderPollPath(ctx?: HostRouteContext): string; employeeBatchPath(ctx?: RouteContext): string; employeePollPath(ctx?: RouteContext): string; employeeSearchPath(ctx?: RouteContext): string; employeeSearchPollPath(ctx?: RouteContext): string; organizationLicenseSearchPath(ctx?: RouteContext): string; organizationLicenseSearchPollPath(ctx?: RouteContext): string; organizationDidBindingPath(ctx?: RouteContext): string; organizationDidBindingPollPath(ctx?: RouteContext): string; organizationLicenseOfferSearchPath(ctx?: RouteContext): string; organizationLicenseOfferSearchPollPath(ctx?: RouteContext): string; organizationLicenseOrderSearchPath(ctx?: RouteContext): string; organizationLicenseOrderSearchPollPath(ctx?: RouteContext): string; employeePurgePath(ctx?: RouteContext): string; employeePurgePollPath(ctx?: RouteContext): string; individualFamilyOrganizationBatchPath(ctx?: RouteContext): string; individualFamilyOrganizationPollPath(ctx?: RouteContext): string; individualFamilyOrganizationSearchPath(ctx?: RouteContext): string; individualFamilyOrganizationSearchPollPath(ctx?: RouteContext): string; individualFamilyOrganizationTransactionPath(ctx?: RouteContext): string; individualFamilyOrganizationTransactionPollPath(ctx?: RouteContext): string; individualFamilyOrganizationDisablePath(ctx?: RouteContext): string; individualFamilyOrganizationDisablePollPath(ctx?: RouteContext): string; individualFamilyOrganizationPurgePath(ctx?: RouteContext): string; individualFamilyOrganizationPurgePollPath(ctx?: RouteContext): string; individualLicenseSearchPath(ctx?: RouteContext): string; individualLicenseSearchPollPath(ctx?: RouteContext): string; individualLicenseActionPath(ctx: RouteContext | undefined, action: string): string; individualLicenseActionPollPath(ctx: RouteContext | undefined, action: string): string; individualLicenseOfferSearchPath(ctx?: RouteContext): string; individualLicenseOfferSearchPollPath(ctx?: RouteContext): string; individualLicenseOrderSearchPath(ctx?: RouteContext): string; individualLicenseOrderSearchPollPath(ctx?: RouteContext): string; individualFamilyOrderBatchPath(ctx?: RouteContext): string; individualFamilyOrderPollPath(ctx?: RouteContext): string; individualRelatedPersonBatchPath(ctx?: RouteContext): string; individualRelatedPersonPollPath(ctx?: RouteContext): string; individualRelatedPersonPurgePath(ctx?: RouteContext): string; individualRelatedPersonPurgePollPath(ctx?: RouteContext): string; individualConsentR4BatchPath(ctx: RouteContext): string; individualConsentR4PollPath(ctx: RouteContext): string; individualResearchSubjectPurgePath(ctx: RouteContext): string; individualResearchSubjectPurgePollPath(ctx: RouteContext): string; individualCommunicationBatchPath(ctx: RouteContext, format: string): string; individualCommunicationPollPath(ctx: RouteContext, format: string): string; individualCommunicationSearchPath(ctx: RouteContext): string; individualCommunicationSearchPollPath(ctx: RouteContext): string; individualDocumentReferenceBatchPath(ctx: RouteContext): string; individualDocumentReferencePollPath(ctx: RouteContext): string; individualBundleSearchPath(ctx: RouteContext): string; individualBundleSearchPollPath(ctx: RouteContext): string; identityTokenExchangePath(ctx: RouteContext): string; identityTokenExchangePollPath(ctx: RouteContext): string; identityDeviceDcrPath(ctx: RouteContext): string; identityDeviceDcrPollPath(ctx: RouteContext): string; identityOpenIdSmartTokenPath(ctx: RouteContext): string; identityOpenIdSmartTokenPollPath(ctx: RouteContext): string; } /** * @deprecated Prefer `HttpRuntimeClient`. */ export declare class NodeHttpClient extends HttpRuntimeClient { }