gdc-sdk-node-ts 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +166 -0
- package/dist/async-polling.d.ts +7 -0
- package/dist/async-polling.js +26 -0
- package/dist/device-activation.d.ts +44 -0
- package/dist/device-activation.js +44 -0
- package/dist/gdc-session-bridge.d.ts +11 -0
- package/dist/gdc-session-bridge.js +74 -0
- package/dist/host-onboarding.d.ts +38 -0
- package/dist/host-onboarding.js +39 -0
- package/dist/identity-bootstrap.d.ts +30 -0
- package/dist/identity-bootstrap.js +32 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +24 -0
- package/dist/individual-onboarding.d.ts +35 -0
- package/dist/individual-onboarding.js +38 -0
- package/dist/individual-start.d.ts +87 -0
- package/dist/individual-start.js +82 -0
- package/dist/legacy-compat.d.ts +22 -0
- package/dist/legacy-compat.js +18 -0
- package/dist/node-runtime-client.d.ts +195 -0
- package/dist/node-runtime-client.js +483 -0
- package/dist/orchestration/client-port.d.ts +47 -0
- package/dist/orchestration/client-port.js +31 -0
- package/dist/orchestration/host-onboarding-sdk.d.ts +14 -0
- package/dist/orchestration/host-onboarding-sdk.js +15 -0
- package/dist/orchestration/individual-controller-sdk.d.ts +54 -0
- package/dist/orchestration/individual-controller-sdk.js +70 -0
- package/dist/orchestration/individual-member-sdk.d.ts +17 -0
- package/dist/orchestration/individual-member-sdk.js +20 -0
- package/dist/orchestration/organization-controller-sdk.d.ts +46 -0
- package/dist/orchestration/organization-controller-sdk.js +56 -0
- package/dist/orchestration/organization-employee-sdk.d.ts +9 -0
- package/dist/orchestration/organization-employee-sdk.js +13 -0
- package/dist/orchestration/personal-sdk.d.ts +22 -0
- package/dist/orchestration/personal-sdk.js +34 -0
- package/dist/orchestration/professional-sdk.d.ts +58 -0
- package/dist/orchestration/professional-sdk.js +63 -0
- package/dist/poll-options.d.ts +1 -0
- package/dist/poll-options.js +2 -0
- package/dist/resource-operations.d.ts +225 -0
- package/dist/resource-operations.js +184 -0
- package/dist/runtime-contracts.d.ts +65 -0
- package/dist/runtime-contracts.js +7 -0
- package/dist/session.d.ts +64 -0
- package/dist/session.js +80 -0
- package/dist/simple-device-activation.d.ts +44 -0
- package/dist/simple-device-activation.js +44 -0
- package/dist/simple-host-onboarding.d.ts +27 -0
- package/dist/simple-host-onboarding.js +39 -0
- package/dist/simple-individual-onboarding.d.ts +27 -0
- package/dist/simple-individual-onboarding.js +38 -0
- package/dist/simple-individual-start.d.ts +45 -0
- package/dist/simple-individual-start.js +59 -0
- package/dist/simple-poll-options.d.ts +5 -0
- package/dist/simple-poll-options.js +17 -0
- package/dist/simple-smart-token.d.ts +58 -0
- package/dist/simple-smart-token.js +85 -0
- package/dist/smart-token.d.ts +135 -0
- package/dist/smart-token.js +100 -0
- package/package.json +26 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { PollOptions, SubmitAndPollResult } from './orchestration/client-port.js';
|
|
2
|
+
import type { RouteContext } from './individual-onboarding.js';
|
|
3
|
+
export type IndividualOrganizationBootstrapInput = {
|
|
4
|
+
/**
|
|
5
|
+
* Preferred route identifier for the selected personal indexing service provider.
|
|
6
|
+
*
|
|
7
|
+
* This is not the tax ID of a professional organization. In the individual
|
|
8
|
+
* indexing journey it should identify the selected service provider that will
|
|
9
|
+
* host or activate the individual's index.
|
|
10
|
+
*/
|
|
11
|
+
serviceProviderDid?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use `serviceProviderDid`.
|
|
14
|
+
*/
|
|
15
|
+
tenantId?: string;
|
|
16
|
+
jurisdiction?: string;
|
|
17
|
+
sector?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Friendly alias/nickname shown in the frontend for the individual profile.
|
|
20
|
+
*
|
|
21
|
+
* This is not the technical subject identifier. It is the nearby name the
|
|
22
|
+
* controller uses to refer to the person in the UI, for example `Charly`.
|
|
23
|
+
*/
|
|
24
|
+
alternateName: string;
|
|
25
|
+
/**
|
|
26
|
+
* CORE-canonical controller contact channel for individual bootstrap.
|
|
27
|
+
*
|
|
28
|
+
* In the individual/family bootstrap flow the contact channel is published
|
|
29
|
+
* as `org.schema.Organization.owner.email`, because the person is acting as
|
|
30
|
+
* owner/controller of a subject index organization.
|
|
31
|
+
*
|
|
32
|
+
* This differs from legal-organization activation, where the human
|
|
33
|
+
* representative is modeled as a `Person` member/representative of the legal
|
|
34
|
+
* organization and the VC/policy contract uses `credentialSubject.memberOf`
|
|
35
|
+
* plus `credentialSubject.hasOccupation`.
|
|
36
|
+
*
|
|
37
|
+
* Prefer email in shared examples and docs. It is stable as a general CORE
|
|
38
|
+
* GW identifier and does not assume a phone-notification extension.
|
|
39
|
+
*/
|
|
40
|
+
controllerEmail?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Compatibility/extension field.
|
|
43
|
+
*
|
|
44
|
+
* In the individual/family bootstrap flow this maps to
|
|
45
|
+
* `org.schema.Organization.owner.telephone`.
|
|
46
|
+
*
|
|
47
|
+
* Telephone-driven onboarding is not required by CORE GW. Keep this only for
|
|
48
|
+
* deployments that add phone-first notification or consent extensions such as
|
|
49
|
+
* UNID GW.
|
|
50
|
+
*/
|
|
51
|
+
controllerTelephone?: string;
|
|
52
|
+
controllerRole?: string;
|
|
53
|
+
additionalClaims?: Record<string, unknown>;
|
|
54
|
+
timeoutSeconds?: number;
|
|
55
|
+
intervalSeconds?: number;
|
|
56
|
+
};
|
|
57
|
+
export type OfferPreview = {
|
|
58
|
+
offerId?: string;
|
|
59
|
+
amount?: string;
|
|
60
|
+
currency?: string;
|
|
61
|
+
seats?: number | undefined;
|
|
62
|
+
planName?: string;
|
|
63
|
+
sku?: string;
|
|
64
|
+
paymentMethod?: string;
|
|
65
|
+
checkoutUrl?: string;
|
|
66
|
+
};
|
|
67
|
+
export type IndividualOrganizationStartResult = {
|
|
68
|
+
registration: SubmitAndPollResult;
|
|
69
|
+
offerId: string;
|
|
70
|
+
offerPreview: OfferPreview;
|
|
71
|
+
};
|
|
72
|
+
type StartIndividualOrganizationDeps = {
|
|
73
|
+
input: IndividualOrganizationBootstrapInput;
|
|
74
|
+
routeCtx: RouteContext;
|
|
75
|
+
defaultTimeoutMs?: number;
|
|
76
|
+
defaultIntervalMs?: number;
|
|
77
|
+
individualFamilyOrganizationBatchPath: (ctx: RouteContext) => string;
|
|
78
|
+
individualFamilyOrganizationPollPath: (ctx: RouteContext) => string;
|
|
79
|
+
submitAndPoll: (submitPath: string, pollPath: string, payload: {
|
|
80
|
+
thid?: string;
|
|
81
|
+
} & Record<string, unknown>, options?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
82
|
+
assertFirstDidcommEntrySuccess?: (result: SubmitAndPollResult, contextLabel: string) => void;
|
|
83
|
+
getOfferIdFromResponse: (result: SubmitAndPollResult) => string | undefined;
|
|
84
|
+
getOfferPreviewFromResponse: (result: SubmitAndPollResult) => OfferPreview;
|
|
85
|
+
};
|
|
86
|
+
export declare function startIndividualOrganizationWithDeps(deps: StartIndividualOrganizationDeps): Promise<IndividualOrganizationStartResult>;
|
|
87
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { ClaimsOrganizationSchemaorg, ClaimsPersonSchemaorg, ClaimsServiceSchemaorg, } from 'gdc-common-utils-ts/constants';
|
|
3
|
+
import { resolvePollOptionsFromSeconds } from './poll-options.js';
|
|
4
|
+
export async function startIndividualOrganizationWithDeps(deps) {
|
|
5
|
+
/**
|
|
6
|
+
* Important semantic split:
|
|
7
|
+
*
|
|
8
|
+
* - individual/family bootstrap uses `Organization.owner.*` claims because the
|
|
9
|
+
* human controller owns the subject-index organization
|
|
10
|
+
* - legal organization activation uses `Person.*` plus VC membership/role
|
|
11
|
+
* semantics for the legal representative of an existing organization
|
|
12
|
+
*
|
|
13
|
+
* The node SDK keeps both `Organization.owner.*` and `Person.*` contact claims
|
|
14
|
+
* in the payload for compatibility, but the owner claims are the live GW
|
|
15
|
+
* routing/indexing contract for this flow.
|
|
16
|
+
*/
|
|
17
|
+
const alternateName = String(deps.input.alternateName || '').trim();
|
|
18
|
+
if (!alternateName) {
|
|
19
|
+
throw new Error('bootstrapIndividualOrganization requires alternateName.');
|
|
20
|
+
}
|
|
21
|
+
const controllerEmail = String(deps.input.controllerEmail || '').trim();
|
|
22
|
+
const controllerTelephone = String(deps.input.controllerTelephone || '').trim();
|
|
23
|
+
if (!controllerEmail && !controllerTelephone) {
|
|
24
|
+
throw new Error('bootstrapIndividualOrganization requires controllerEmail, or controllerTelephone only for compatibility/extension flows.');
|
|
25
|
+
}
|
|
26
|
+
const controllerRole = String(deps.input.controllerRole || 'RESPRSN').trim();
|
|
27
|
+
const claims = {
|
|
28
|
+
'@context': 'org.schema',
|
|
29
|
+
[ClaimsOrganizationSchemaorg.alternateName]: alternateName,
|
|
30
|
+
[ClaimsServiceSchemaorg.category]: deps.routeCtx.sector,
|
|
31
|
+
[ClaimsPersonSchemaorg.hasOccupationalRoleValue]: controllerRole,
|
|
32
|
+
...(controllerEmail
|
|
33
|
+
? {
|
|
34
|
+
[ClaimsOrganizationSchemaorg.ownerEmail]: controllerEmail,
|
|
35
|
+
[ClaimsPersonSchemaorg.email]: controllerEmail,
|
|
36
|
+
}
|
|
37
|
+
: {}),
|
|
38
|
+
...(controllerTelephone
|
|
39
|
+
? {
|
|
40
|
+
[ClaimsOrganizationSchemaorg.ownerTelephone]: controllerTelephone,
|
|
41
|
+
[ClaimsPersonSchemaorg.telephone]: controllerTelephone,
|
|
42
|
+
}
|
|
43
|
+
: {}),
|
|
44
|
+
...(deps.input.additionalClaims || {}),
|
|
45
|
+
};
|
|
46
|
+
const registrationPayload = {
|
|
47
|
+
jti: `jti-${createRuntimeUuid()}`,
|
|
48
|
+
iss: deps.routeCtx.tenantId,
|
|
49
|
+
aud: deps.routeCtx.tenantId,
|
|
50
|
+
type: 'application/didcomm-plain+json',
|
|
51
|
+
thid: `family-org-${createRuntimeUuid()}`,
|
|
52
|
+
body: {
|
|
53
|
+
data: [{
|
|
54
|
+
type: 'SubjectOrg-registration-form-v1.0',
|
|
55
|
+
meta: { claims },
|
|
56
|
+
resource: { meta: { claims } },
|
|
57
|
+
}],
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
const pollOptions = resolvePollOptionsFromSeconds(deps.input.timeoutSeconds, deps.input.intervalSeconds, {
|
|
61
|
+
timeoutMs: deps.defaultTimeoutMs,
|
|
62
|
+
intervalMs: deps.defaultIntervalMs,
|
|
63
|
+
});
|
|
64
|
+
const registration = await deps.submitAndPoll(deps.individualFamilyOrganizationBatchPath(deps.routeCtx), deps.individualFamilyOrganizationPollPath(deps.routeCtx), registrationPayload, pollOptions);
|
|
65
|
+
deps.assertFirstDidcommEntrySuccess?.(registration, 'startIndividualOrganization.registration');
|
|
66
|
+
const offerId = deps.getOfferIdFromResponse(registration);
|
|
67
|
+
if (!offerId) {
|
|
68
|
+
throw new Error('startIndividualOrganization failed: missing offerId in registration response.');
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
registration,
|
|
72
|
+
offerId,
|
|
73
|
+
offerPreview: deps.getOfferPreviewFromResponse(registration),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function createRuntimeUuid() {
|
|
77
|
+
const fromCrypto = globalThis.crypto?.randomUUID?.();
|
|
78
|
+
if (fromCrypto) {
|
|
79
|
+
return fromCrypto;
|
|
80
|
+
}
|
|
81
|
+
return `fallback-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
82
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { activateEmployeeDeviceWithActivationRequestWithDeps as activateEmployeeDeviceWithActivationCodeSimpleWithDeps, } from './device-activation.js';
|
|
2
|
+
export { confirmLegalOrganizationOrderWithDeps as confirmLegalOrganizationOrderSimpleWithDeps, } from './host-onboarding.js';
|
|
3
|
+
export { confirmIndividualOrganizationOrderWithDeps as confirmIndividualOrganizationOrderSimpleWithDeps, } from './individual-onboarding.js';
|
|
4
|
+
export { requestSmartTokenWithDeps as requestSmartTokenSimpleWithDeps, } from './smart-token.js';
|
|
5
|
+
export { startIndividualOrganizationWithDeps as startIndividualOrganizationSimpleWithDeps, } from './individual-start.js';
|
|
6
|
+
export { grantProfessionalAccessWithDeps as grantProfessionalAccessSimpleWithDeps } from './resource-operations.js';
|
|
7
|
+
export { resolvePollOptionsFromSeconds as resolveSimplePollOptions } from './poll-options.js';
|
|
8
|
+
export type { EmployeeDeviceActivationRequestInput as EmployeeDeviceActivationSimpleInput, } from './device-activation.js';
|
|
9
|
+
export type { LegalOrganizationOrderInput as LegalOrganizationOrderSimpleInput, } from './host-onboarding.js';
|
|
10
|
+
export type { IndividualOrganizationConfirmOrderInput as IndividualOrganizationConfirmOrderSimpleInput, } from './individual-onboarding.js';
|
|
11
|
+
export type { IndividualOrganizationBootstrapInput as IndividualOrganizationBootstrapSimpleInput, IndividualOrganizationStartResult as IndividualOrganizationStartSimpleResult, } from './individual-start.js';
|
|
12
|
+
export type { SmartTokenRequestInput as SmartTokenRequestSimpleInput, } from './smart-token.js';
|
|
13
|
+
export type { GrantProfessionalAccessInput as GrantProfessionalAccessSimpleInput, GrantProfessionalAccessResult as GrantProfessionalAccessSimpleResult, } from './resource-operations.js';
|
|
14
|
+
export { HostOnboardingSdk as GdcHostOnboardingSdk, } from './orchestration/host-onboarding-sdk.js';
|
|
15
|
+
export { OrganizationControllerSdk as GdcOrganizationControllerSdk, } from './orchestration/organization-controller-sdk.js';
|
|
16
|
+
export { OrganizationEmployeeSdk as GdcOrganizationEmployeeSdk, } from './orchestration/organization-employee-sdk.js';
|
|
17
|
+
export { IndividualControllerSdk as GdcIndividualControllerSdk, } from './orchestration/individual-controller-sdk.js';
|
|
18
|
+
export { IndividualMemberSdk as GdcIndividualMemberSdk, } from './orchestration/individual-member-sdk.js';
|
|
19
|
+
export { PersonalSdk as GdcPersonalSdk, } from './orchestration/personal-sdk.js';
|
|
20
|
+
export { ProfessionalSdk as GdcProfessionalSdk, } from './orchestration/professional-sdk.js';
|
|
21
|
+
export { NodeActorSession as GdcNodeActorSession } from './session.js';
|
|
22
|
+
export { NodeHttpClient as GdcNodeHttpClient } from './node-runtime-client.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
// Temporary compatibility layer for downstream packages not yet migrated.
|
|
3
|
+
export { activateEmployeeDeviceWithActivationRequestWithDeps as activateEmployeeDeviceWithActivationCodeSimpleWithDeps, } from './device-activation.js';
|
|
4
|
+
export { confirmLegalOrganizationOrderWithDeps as confirmLegalOrganizationOrderSimpleWithDeps, } from './host-onboarding.js';
|
|
5
|
+
export { confirmIndividualOrganizationOrderWithDeps as confirmIndividualOrganizationOrderSimpleWithDeps, } from './individual-onboarding.js';
|
|
6
|
+
export { requestSmartTokenWithDeps as requestSmartTokenSimpleWithDeps, } from './smart-token.js';
|
|
7
|
+
export { startIndividualOrganizationWithDeps as startIndividualOrganizationSimpleWithDeps, } from './individual-start.js';
|
|
8
|
+
export { grantProfessionalAccessWithDeps as grantProfessionalAccessSimpleWithDeps } from './resource-operations.js';
|
|
9
|
+
export { resolvePollOptionsFromSeconds as resolveSimplePollOptions } from './poll-options.js';
|
|
10
|
+
export { HostOnboardingSdk as GdcHostOnboardingSdk, } from './orchestration/host-onboarding-sdk.js';
|
|
11
|
+
export { OrganizationControllerSdk as GdcOrganizationControllerSdk, } from './orchestration/organization-controller-sdk.js';
|
|
12
|
+
export { OrganizationEmployeeSdk as GdcOrganizationEmployeeSdk, } from './orchestration/organization-employee-sdk.js';
|
|
13
|
+
export { IndividualControllerSdk as GdcIndividualControllerSdk, } from './orchestration/individual-controller-sdk.js';
|
|
14
|
+
export { IndividualMemberSdk as GdcIndividualMemberSdk, } from './orchestration/individual-member-sdk.js';
|
|
15
|
+
export { PersonalSdk as GdcPersonalSdk, } from './orchestration/personal-sdk.js';
|
|
16
|
+
export { ProfessionalSdk as GdcProfessionalSdk, } from './orchestration/professional-sdk.js';
|
|
17
|
+
export { NodeActorSession as GdcNodeActorSession } from './session.js';
|
|
18
|
+
export { NodeHttpClient as GdcNodeHttpClient } from './node-runtime-client.js';
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type { ControllerBindingInput } from 'gdc-common-utils-ts/models';
|
|
2
|
+
import { type HostRouteContext } from './host-onboarding.js';
|
|
3
|
+
import { type IndividualOrganizationConfirmOrderInput, type RouteContext } from './individual-onboarding.js';
|
|
4
|
+
import { type SmartTokenRequestInput } from './smart-token.js';
|
|
5
|
+
import { type IndividualOrganizationBootstrapInput, type IndividualOrganizationStartResult } from './individual-start.js';
|
|
6
|
+
import { type CommunicationIngestionInput, type ClinicalBundleSearchInput, type GrantProfessionalAccessInput, type GrantProfessionalAccessResult, type OrganizationEmployeeCreationInput, type RelatedPersonUpsertInput } from './resource-operations.js';
|
|
7
|
+
import type { LegalOrganizationOrderInput } from './host-onboarding.js';
|
|
8
|
+
import type { SmartTokenExchangeResult } from './smart-token.js';
|
|
9
|
+
import type { NodeRuntimeClient, PollOptions, PollResult, SubmitAndPollResult, SubmitPayload, SubmitResponse } from './orchestration/client-port.js';
|
|
10
|
+
export type HttpRuntimeClientOptions = {
|
|
11
|
+
baseUrl: string;
|
|
12
|
+
bearerToken?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Optional default tenant route context reused by methods such as
|
|
15
|
+
* `requestSmartToken(...)` when callers do not want to repeat
|
|
16
|
+
* tenant/jurisdiction/sector on every call.
|
|
17
|
+
*/
|
|
18
|
+
ctx?: RouteContext;
|
|
19
|
+
defaultHeaders?: Record<string, string>;
|
|
20
|
+
requestTimeoutMs?: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Prefer `HttpRuntimeClientOptions`.
|
|
24
|
+
*/
|
|
25
|
+
export type NodeHttpClientOptions = HttpRuntimeClientOptions;
|
|
26
|
+
/**
|
|
27
|
+
* Runtime-oriented HTTP client for Node backends, BFFs, and workers that need
|
|
28
|
+
* to submit GDC gateway requests and poll asynchronous responses.
|
|
29
|
+
*
|
|
30
|
+
* This class is intentionally transport-focused. It does not try to be the
|
|
31
|
+
* high-level editor of FHIR documents; that role belongs to the shared helpers
|
|
32
|
+
* re-exported from `gdc-sdk-core-ts`.
|
|
33
|
+
*/
|
|
34
|
+
export declare class HttpRuntimeClient implements NodeRuntimeClient {
|
|
35
|
+
private readonly baseUrl;
|
|
36
|
+
private readonly bearerToken?;
|
|
37
|
+
private readonly ctx?;
|
|
38
|
+
private readonly defaultHeaders;
|
|
39
|
+
private readonly requestTimeoutMs;
|
|
40
|
+
private readonly httpTraceFile?;
|
|
41
|
+
private readonly tokenCache;
|
|
42
|
+
/**
|
|
43
|
+
* @param options.baseUrl Gateway base URL without trailing slash.
|
|
44
|
+
* @param options.interopMode Optional runtime interoperability mode from the SDK config layer (`demo`, `compat`, `strict`).
|
|
45
|
+
* @param options.bearerToken Optional bearer token reused for direct HTTP calls.
|
|
46
|
+
* @param options.ctx Optional default route context.
|
|
47
|
+
* @param options.defaultHeaders Optional static headers appended to every request.
|
|
48
|
+
* @param options.requestTimeoutMs Optional per-request timeout in milliseconds.
|
|
49
|
+
*/
|
|
50
|
+
constructor(options: HttpRuntimeClientOptions);
|
|
51
|
+
/**
|
|
52
|
+
* Builds a canonical GDC v1 resource/action path from a route context.
|
|
53
|
+
*/
|
|
54
|
+
v1Path(ctx: RouteContext | undefined, section: string, format: string, resourceType: string, action: string): string;
|
|
55
|
+
/**
|
|
56
|
+
* Submits a batch payload to a gateway batch endpoint.
|
|
57
|
+
*/
|
|
58
|
+
submitBatch(path: string, payload: SubmitPayload): Promise<SubmitResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* Polls a batch-response endpoint until the GW reports a terminal state.
|
|
61
|
+
*/
|
|
62
|
+
pollUntilComplete(pollPath: string, request: {
|
|
63
|
+
thid: string;
|
|
64
|
+
}, pollOptions?: PollOptions): Promise<PollResult>;
|
|
65
|
+
/**
|
|
66
|
+
* Convenience wrapper that performs submit and poll in sequence.
|
|
67
|
+
*/
|
|
68
|
+
submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
69
|
+
/**
|
|
70
|
+
* Activates a legal organization in the gateway host registry using an ICA
|
|
71
|
+
* proof token already obtained by the caller.
|
|
72
|
+
*/
|
|
73
|
+
activateOrganizationInGatewayFromIcaProof(hostCtx: HostRouteContext, input: {
|
|
74
|
+
vpToken: string;
|
|
75
|
+
controller?: ControllerBindingInput;
|
|
76
|
+
additionalClaims?: Record<string, unknown>;
|
|
77
|
+
}, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
78
|
+
/**
|
|
79
|
+
* Confirms a host-side legal organization order after the initial activation.
|
|
80
|
+
*/
|
|
81
|
+
confirmLegalOrganizationOrder(hostCtx: HostRouteContext, input: LegalOrganizationOrderInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
82
|
+
/**
|
|
83
|
+
* Creates an employee or professional entry under an existing organization tenant.
|
|
84
|
+
*/
|
|
85
|
+
createOrganizationEmployee(ctx: RouteContext, input: OrganizationEmployeeCreationInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
86
|
+
/**
|
|
87
|
+
* Starts the onboarding flow for an individual-oriented tenant or index.
|
|
88
|
+
*/
|
|
89
|
+
startIndividualOrganization(input: IndividualOrganizationBootstrapInput): Promise<IndividualOrganizationStartResult>;
|
|
90
|
+
/**
|
|
91
|
+
* Confirms the order returned by `startIndividualOrganization(...)`.
|
|
92
|
+
*/
|
|
93
|
+
confirmIndividualOrganizationOrder(input: IndividualOrganizationConfirmOrderInput): Promise<SubmitAndPollResult>;
|
|
94
|
+
/**
|
|
95
|
+
* Creates and submits a consent-oriented access grant for a professional actor.
|
|
96
|
+
*/
|
|
97
|
+
grantProfessionalAccess(ctx: RouteContext, input: GrantProfessionalAccessInput): Promise<GrantProfessionalAccessResult>;
|
|
98
|
+
/**
|
|
99
|
+
* Requests SMART/OpenID token material through the gateway.
|
|
100
|
+
*
|
|
101
|
+
* The business inputs are typically the actor DID plus requested scopes.
|
|
102
|
+
* Route details are resolved either from `input` compatibility fields
|
|
103
|
+
* (`tenantId` / `jurisdiction` / `sector`) or from
|
|
104
|
+
* the default client route context configured in the constructor.
|
|
105
|
+
*/
|
|
106
|
+
requestSmartToken(input: SmartTokenRequestInput): Promise<SmartTokenExchangeResult>;
|
|
107
|
+
/**
|
|
108
|
+
* Creates or updates a `RelatedPerson` for non-employee family/caregiver
|
|
109
|
+
* roles such as a grandfather, guardian, or external caregiver.
|
|
110
|
+
*/
|
|
111
|
+
upsertRelatedPersonAndPoll(ctx: RouteContext, input: RelatedPersonUpsertInput): Promise<SubmitAndPollResult>;
|
|
112
|
+
/**
|
|
113
|
+
* Submits a FHIR `Communication` ingestion request and polls until the
|
|
114
|
+
* GW has persisted the audit record and related projections.
|
|
115
|
+
*
|
|
116
|
+
* @param ctx Route context containing tenant/jurisdiction/sector.
|
|
117
|
+
* @param input Communication payload plus route/format options.
|
|
118
|
+
*/
|
|
119
|
+
ingestCommunicationAndUpdateIndex(ctx: RouteContext, input: CommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
120
|
+
/**
|
|
121
|
+
* Alias for `ingestCommunicationAndUpdateIndex(...)`.
|
|
122
|
+
*
|
|
123
|
+
* @param ctx Route context containing tenant/jurisdiction/sector.
|
|
124
|
+
* @param input Communication payload plus route/format options.
|
|
125
|
+
*/
|
|
126
|
+
submitCommunicationAndPoll(ctx: RouteContext, input: CommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
127
|
+
/**
|
|
128
|
+
* Executes a clinical `Bundle/_search` through the converged runtime.
|
|
129
|
+
*
|
|
130
|
+
* @param ctx Route context containing tenant/jurisdiction/sector.
|
|
131
|
+
* @param input Search parameters such as subject, section, date and included resource types.
|
|
132
|
+
*/
|
|
133
|
+
searchClinicalBundle(ctx: RouteContext, input: ClinicalBundleSearchInput): Promise<SubmitAndPollResult>;
|
|
134
|
+
/**
|
|
135
|
+
* Searches the latest IPS-oriented document view for a subject.
|
|
136
|
+
*
|
|
137
|
+
* Defaults the section to the IPS patient summary document and includes
|
|
138
|
+
* `Composition` plus `DocumentReference`.
|
|
139
|
+
*
|
|
140
|
+
* @param ctx Route context containing tenant/jurisdiction/sector.
|
|
141
|
+
* @param input Subject-scoped search parameters.
|
|
142
|
+
*/
|
|
143
|
+
searchLatestIps(ctx: RouteContext, input: Omit<ClinicalBundleSearchInput, 'includedTypes'>): Promise<SubmitAndPollResult>;
|
|
144
|
+
/**
|
|
145
|
+
* Searches a communication/document thread using `thid` and returns the
|
|
146
|
+
* indexed communication/document projections.
|
|
147
|
+
*/
|
|
148
|
+
listCommunicationThread(ctx: RouteContext, input: {
|
|
149
|
+
subject: string;
|
|
150
|
+
thid: string;
|
|
151
|
+
pollOptions?: PollOptions;
|
|
152
|
+
}): Promise<SubmitAndPollResult>;
|
|
153
|
+
private buildConsentClaimsWithCid;
|
|
154
|
+
private pollBatchResponse;
|
|
155
|
+
private postJson;
|
|
156
|
+
private buildHeaders;
|
|
157
|
+
private fetchWithTimeout;
|
|
158
|
+
private parseResponseBody;
|
|
159
|
+
private requireRouteContext;
|
|
160
|
+
private routeCtxFromInput;
|
|
161
|
+
private hostRegistryPath;
|
|
162
|
+
private requireHostRouteContext;
|
|
163
|
+
hostRegistryOrganizationActivatePath(ctx?: HostRouteContext): string;
|
|
164
|
+
hostRegistryOrganizationActivatePollPath(ctx?: HostRouteContext): string;
|
|
165
|
+
hostRegistryOrderBatchPath(ctx?: HostRouteContext): string;
|
|
166
|
+
hostRegistryOrderPollPath(ctx?: HostRouteContext): string;
|
|
167
|
+
employeeBatchPath(ctx?: RouteContext): string;
|
|
168
|
+
employeePollPath(ctx?: RouteContext): string;
|
|
169
|
+
individualFamilyOrganizationBatchPath(ctx?: RouteContext): string;
|
|
170
|
+
individualFamilyOrganizationPollPath(ctx?: RouteContext): string;
|
|
171
|
+
individualFamilyOrderBatchPath(ctx?: RouteContext): string;
|
|
172
|
+
individualFamilyOrderPollPath(ctx?: RouteContext): string;
|
|
173
|
+
individualRelatedPersonBatchPath(ctx?: RouteContext): string;
|
|
174
|
+
individualRelatedPersonPollPath(ctx?: RouteContext): string;
|
|
175
|
+
individualConsentR4BatchPath(ctx: RouteContext): string;
|
|
176
|
+
individualConsentR4PollPath(ctx: RouteContext): string;
|
|
177
|
+
individualCommunicationBatchPath(ctx: RouteContext, format: 'org.hl7.fhir.api' | 'org.hl7.fhir.r4'): string;
|
|
178
|
+
individualCommunicationPollPath(ctx: RouteContext, format: 'org.hl7.fhir.api' | 'org.hl7.fhir.r4'): string;
|
|
179
|
+
individualBundleSearchPath(ctx: RouteContext): string;
|
|
180
|
+
individualBundleSearchPollPath(ctx: RouteContext): string;
|
|
181
|
+
identityTokenExchangePath(ctx: RouteContext): string;
|
|
182
|
+
identityTokenExchangePollPath(ctx: RouteContext): string;
|
|
183
|
+
identityOpenIdSmartTokenPath(ctx: RouteContext): string;
|
|
184
|
+
identityOpenIdSmartTokenPollPath(ctx: RouteContext): string;
|
|
185
|
+
private extractOfferId;
|
|
186
|
+
private appendHttpTrace;
|
|
187
|
+
private parseTraceBody;
|
|
188
|
+
private parseTraceRawText;
|
|
189
|
+
private redactTraceValue;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* @deprecated Prefer `HttpRuntimeClient`.
|
|
193
|
+
*/
|
|
194
|
+
export declare class NodeHttpClient extends HttpRuntimeClient {
|
|
195
|
+
}
|