gdc-sdk-node-ts 2.7.0 → 2.7.2
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.
|
@@ -4,7 +4,7 @@ import type { IndividualOrganizationConfirmOrderInput, IndividualOrganizationOrd
|
|
|
4
4
|
import type { IndividualOrganizationBootstrapInput, IndividualOrganizationStartResult } from './individual-start.js';
|
|
5
5
|
import type { EnsureFamilyOrganizationRegistrationInput, EnsureFamilyOrganizationRegistrationResult } from './family-organization-registration.js';
|
|
6
6
|
import type { FamilyOrganizationSearchInput } from './family-organization-search.js';
|
|
7
|
-
import type { BlockchainArtifactRegistrationInput, ClinicalBundleSearchInput, ClinicalSummaryReadResult, ClinicalSummaryRequestInput } from './resource-operations.js';
|
|
7
|
+
import type { BlockchainArtifactRegistrationInput, ClinicalBundleSearchInput, ClinicalSectionUpdateInput, ClinicalSummaryReadResult, ClinicalSummaryRequestInput, ClinicalSummaryUpdateInput, CommunicationIngestionInput, IpsOrFhirImportInput } from './resource-operations.js';
|
|
8
8
|
import { type BackendIndividualControllerProfile, type BackendProfileRuntimeClient } from './backend-profile-runtime.js';
|
|
9
9
|
import type { ProfileLoadRequest } from 'gdc-sdk-core-ts';
|
|
10
10
|
/**
|
|
@@ -61,6 +61,14 @@ export declare class IndividualControllerBackendRuntime {
|
|
|
61
61
|
* individual-controller facade.
|
|
62
62
|
*/
|
|
63
63
|
getLatestIps(profile: BackendIndividualControllerProfile, ctx: RouteContext, input: Omit<ClinicalBundleSearchInput, 'includedTypes'>): Promise<SubmitAndPollResult>;
|
|
64
|
+
/** Imports one IPS/FHIR payload and waits for its derived index update. */
|
|
65
|
+
importIpsOrFhirAndUpdateIndex(profile: BackendIndividualControllerProfile, ctx: RouteContext, input: IpsOrFhirImportInput): Promise<SubmitAndPollResult>;
|
|
66
|
+
/** Ingests one controller-authored Communication and waits for indexing. */
|
|
67
|
+
ingestCommunicationAndUpdateIndex(profile: BackendIndividualControllerProfile, ctx: RouteContext, input: CommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
68
|
+
/** Applies one explicit clinical-section batch. */
|
|
69
|
+
updateClinicalSection(profile: BackendIndividualControllerProfile, ctx: RouteContext, input: ClinicalSectionUpdateInput): Promise<SubmitAndPollResult>;
|
|
70
|
+
/** Applies one Composition-first multi-section clinical update. */
|
|
71
|
+
updateClinicalSummary(profile: BackendIndividualControllerProfile, ctx: RouteContext, input: ClinicalSummaryUpdateInput): Promise<SubmitAndPollResult>;
|
|
64
72
|
/**
|
|
65
73
|
* Registers one FHIR resource or raw artifact on blockchain before it is
|
|
66
74
|
* attached to a subject communication.
|
|
@@ -71,6 +71,22 @@ export class IndividualControllerBackendRuntime {
|
|
|
71
71
|
getLatestIps(profile, ctx, input) {
|
|
72
72
|
return profile.sdk.getLatestIps(ctx, input);
|
|
73
73
|
}
|
|
74
|
+
/** Imports one IPS/FHIR payload and waits for its derived index update. */
|
|
75
|
+
importIpsOrFhirAndUpdateIndex(profile, ctx, input) {
|
|
76
|
+
return profile.sdk.importIpsOrFhirAndUpdateIndex(ctx, input);
|
|
77
|
+
}
|
|
78
|
+
/** Ingests one controller-authored Communication and waits for indexing. */
|
|
79
|
+
ingestCommunicationAndUpdateIndex(profile, ctx, input) {
|
|
80
|
+
return profile.sdk.ingestCommunicationAndUpdateIndex(ctx, input);
|
|
81
|
+
}
|
|
82
|
+
/** Applies one explicit clinical-section batch. */
|
|
83
|
+
updateClinicalSection(profile, ctx, input) {
|
|
84
|
+
return profile.sdk.updateClinicalSection(ctx, input);
|
|
85
|
+
}
|
|
86
|
+
/** Applies one Composition-first multi-section clinical update. */
|
|
87
|
+
updateClinicalSummary(profile, ctx, input) {
|
|
88
|
+
return profile.sdk.updateClinicalSummary(ctx, input);
|
|
89
|
+
}
|
|
74
90
|
/**
|
|
75
91
|
* Registers one FHIR resource or raw artifact on blockchain before it is
|
|
76
92
|
* attached to a subject communication.
|
|
@@ -3,6 +3,7 @@ import type { ActorKind } from 'gdc-common-utils-ts/models/actor-session';
|
|
|
3
3
|
import type { LegalOrganizationVerificationTransactionInput } from 'gdc-common-utils-ts/utils/legal-organization-verification-transaction';
|
|
4
4
|
import { type AppInfo, type ConfidentialStorageProfile, type PollOptions, type SubmitAndPollResult, type ClinicalCreatorBinding, type ClinicalCreatorIpsExport } from 'gdc-sdk-core-ts';
|
|
5
5
|
import { OrganizationControllerSdk } from './orchestration/organization-controller-sdk.js';
|
|
6
|
+
import { IndividualControllerSdk } from './orchestration/individual-controller-sdk.js';
|
|
6
7
|
import { ProfessionalSdk } from './orchestration/professional-sdk.js';
|
|
7
8
|
import { DigitalTwinSdk } from './orchestration/digital-twin-sdk.js';
|
|
8
9
|
import type { SmartTokenExchangeResult } from './smart-token.js';
|
|
@@ -249,6 +250,17 @@ export type OpenedServerOrganizationController = Readonly<{
|
|
|
249
250
|
profile: ServerProfileRecord;
|
|
250
251
|
sdk: OrganizationControllerSdk;
|
|
251
252
|
}>;
|
|
253
|
+
/** Opens the individual-controller facade from an authenticated SMART session. */
|
|
254
|
+
export type ServerIndividualControllerOpenInput = Readonly<{
|
|
255
|
+
ownerId: string;
|
|
256
|
+
sessionId: string;
|
|
257
|
+
}>;
|
|
258
|
+
/** Session-bound individual-controller facade and its durable profile. */
|
|
259
|
+
export type OpenedServerIndividualController = Readonly<{
|
|
260
|
+
session: ResolvedServerProfileSession;
|
|
261
|
+
profile: ServerProfileRecord;
|
|
262
|
+
sdk: IndividualControllerSdk;
|
|
263
|
+
}>;
|
|
252
264
|
/** Server-owned role evidence used to sign a fresh professional VP. */
|
|
253
265
|
export type ServerProfessionalProofInput = Readonly<{
|
|
254
266
|
role: string;
|
|
@@ -366,6 +378,13 @@ export declare class ServerProfileSessionManager {
|
|
|
366
378
|
*/
|
|
367
379
|
refreshSession(ownerId: string, sessionId: string, idToken: string): Promise<ResolvedServerProfileSession>;
|
|
368
380
|
resolveSession(ownerId: string, sessionId: string): Promise<ResolvedServerProfileSession>;
|
|
381
|
+
/**
|
|
382
|
+
* Opens a registered individual controller from an already unlocked SMART
|
|
383
|
+
* session. The session owns subject scope, access token and wallet transport;
|
|
384
|
+
* callers never reconstruct the HTTP client or expose those values to a
|
|
385
|
+
* browser.
|
|
386
|
+
*/
|
|
387
|
+
openIndividualController(input: ServerIndividualControllerOpenInput): Promise<OpenedServerIndividualController>;
|
|
369
388
|
/**
|
|
370
389
|
* Opens the high-level organization-controller API without exposing wallet,
|
|
371
390
|
* DIDComm, DCR or HTTP-client plumbing to the integrating BFF.
|
|
@@ -7,6 +7,7 @@ import { TransportProfiles, resolveClinicalCreatorIpsExport, } from 'gdc-sdk-cor
|
|
|
7
7
|
import { NodeManagedWallet } from './node-managed-wallet.js';
|
|
8
8
|
import { NodeHttpClient } from './node-runtime-client.js';
|
|
9
9
|
import { OrganizationControllerSdk } from './orchestration/organization-controller-sdk.js';
|
|
10
|
+
import { IndividualControllerSdk } from './orchestration/individual-controller-sdk.js';
|
|
10
11
|
import { ProfessionalSdk } from './orchestration/professional-sdk.js';
|
|
11
12
|
import { DigitalTwinSdk } from './orchestration/digital-twin-sdk.js';
|
|
12
13
|
import { buildIdentityOpenIdSmartTokenPath } from './runtime-paths.js';
|
|
@@ -478,6 +479,30 @@ export class ServerProfileSessionManager {
|
|
|
478
479
|
},
|
|
479
480
|
};
|
|
480
481
|
}
|
|
482
|
+
/**
|
|
483
|
+
* Opens a registered individual controller from an already unlocked SMART
|
|
484
|
+
* session. The session owns subject scope, access token and wallet transport;
|
|
485
|
+
* callers never reconstruct the HTTP client or expose those values to a
|
|
486
|
+
* browser.
|
|
487
|
+
*/
|
|
488
|
+
async openIndividualController(input) {
|
|
489
|
+
const session = await this.resolveSession(input.ownerId, input.sessionId);
|
|
490
|
+
const profile = session.profile;
|
|
491
|
+
if (profile.actorKind !== ActorKinds.IndividualController
|
|
492
|
+
|| (profile.actorMode !== 'self' && profile.actorMode !== 'controller')) {
|
|
493
|
+
throw new Error('Profile is not an individual controller.');
|
|
494
|
+
}
|
|
495
|
+
const client = new NodeHttpClient({
|
|
496
|
+
baseUrl: this.options.gatewayBaseUrl,
|
|
497
|
+
ctx: profile.routeContext,
|
|
498
|
+
bearerToken: session.accessToken,
|
|
499
|
+
fetchImpl: this.options.fetchImpl,
|
|
500
|
+
appInfo: this.options.appInfo,
|
|
501
|
+
transportProfile: TransportProfiles.DidcommEncryptedForm,
|
|
502
|
+
secureTransportAdapter: session.secureTransportAdapter,
|
|
503
|
+
});
|
|
504
|
+
return { session, profile, sdk: new IndividualControllerSdk(client) };
|
|
505
|
+
}
|
|
481
506
|
/**
|
|
482
507
|
* Opens the high-level organization-controller API without exposing wallet,
|
|
483
508
|
* DIDComm, DCR or HTTP-client plumbing to the integrating BFF.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdc-sdk-node-ts",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"description": "Next-generation Node runtime package for the GDC SDK family",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Antifraud Services Inc.",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"gdc-common-utils-ts": "2.8.1",
|
|
42
|
-
"gdc-sdk-core-ts": "2.5.
|
|
42
|
+
"gdc-sdk-core-ts": "2.5.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^20.14.10",
|