gdc-sdk-node-ts 2.5.1 → 2.5.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.
|
@@ -86,6 +86,7 @@ export type NodeHttpClientOptions = HttpRuntimeClientOptions;
|
|
|
86
86
|
export declare class HttpRuntimeClient implements NodeRuntimeClient {
|
|
87
87
|
private readonly baseUrl;
|
|
88
88
|
private readonly bearerToken?;
|
|
89
|
+
private activeSmartBearerToken?;
|
|
89
90
|
private readonly runtimeVpToken?;
|
|
90
91
|
private readonly resolvedAppInfo?;
|
|
91
92
|
private readonly ctx?;
|
|
@@ -461,6 +462,10 @@ export declare class HttpRuntimeClient implements NodeRuntimeClient {
|
|
|
461
462
|
* Route details are resolved either from `input` compatibility fields
|
|
462
463
|
* (`tenantId` / `jurisdiction` / `sector`) or from
|
|
463
464
|
* the default client route context configured in the constructor.
|
|
465
|
+
* A fetched actor-scoped access token is retained by this runtime for later
|
|
466
|
+
* clinical operations. Token acquisition and renewal continue to use the
|
|
467
|
+
* original account bearer, so applications must not reconstruct the SDK or
|
|
468
|
+
* manually replace its transport after this method returns.
|
|
464
469
|
*/
|
|
465
470
|
requestSmartToken(input: SmartTokenRequestInput): Promise<SmartTokenExchangeResult>;
|
|
466
471
|
/**
|
|
@@ -33,7 +33,7 @@ export class HttpRuntimeClient {
|
|
|
33
33
|
get transportConfig() {
|
|
34
34
|
return {
|
|
35
35
|
baseUrl: this.baseUrl,
|
|
36
|
-
bearerToken: this.bearerToken,
|
|
36
|
+
bearerToken: this.activeSmartBearerToken || this.bearerToken,
|
|
37
37
|
defaultHeaders: this.defaultHeaders,
|
|
38
38
|
requestTimeoutMs: this.requestTimeoutMs,
|
|
39
39
|
httpTraceFile: this.httpTraceFile,
|
|
@@ -886,10 +886,14 @@ export class HttpRuntimeClient {
|
|
|
886
886
|
* Route details are resolved either from `input` compatibility fields
|
|
887
887
|
* (`tenantId` / `jurisdiction` / `sector`) or from
|
|
888
888
|
* the default client route context configured in the constructor.
|
|
889
|
+
* A fetched actor-scoped access token is retained by this runtime for later
|
|
890
|
+
* clinical operations. Token acquisition and renewal continue to use the
|
|
891
|
+
* original account bearer, so applications must not reconstruct the SDK or
|
|
892
|
+
* manually replace its transport after this method returns.
|
|
889
893
|
*/
|
|
890
894
|
async requestSmartToken(input) {
|
|
891
895
|
const routeCtx = this.paths.routeCtxFromInput(input);
|
|
892
|
-
|
|
896
|
+
const result = await requestSmartTokenWithDeps({
|
|
893
897
|
input,
|
|
894
898
|
routeCtx,
|
|
895
899
|
baseUrl: this.baseUrl,
|
|
@@ -900,9 +904,16 @@ export class HttpRuntimeClient {
|
|
|
900
904
|
identityOpenIdSmartTokenPath: this.paths.identityOpenIdSmartTokenPath.bind(this.paths),
|
|
901
905
|
identityOpenIdSmartTokenPollPath: this.paths.identityOpenIdSmartTokenPollPath.bind(this.paths),
|
|
902
906
|
resolveSmartTokenEndpoint: this.smartTokenEndpointResolver,
|
|
903
|
-
|
|
907
|
+
// Token acquisition and refresh remain authenticated by the original
|
|
908
|
+
// account bearer. A previously granted SMART token must not replace the
|
|
909
|
+
// OIDC proof used to request the next actor-scoped token.
|
|
910
|
+
submitAndPoll: this.submitAndPollWithBearerToken.bind(this, this.bearerToken),
|
|
904
911
|
setTokenCache: (tokenCacheKey, token) => this.tokenCache.set(tokenCacheKey, token),
|
|
905
912
|
});
|
|
913
|
+
if (result.status === 'fetched' && result.accessToken) {
|
|
914
|
+
this.activeSmartBearerToken = result.accessToken;
|
|
915
|
+
}
|
|
916
|
+
return result;
|
|
906
917
|
}
|
|
907
918
|
/**
|
|
908
919
|
* Registers any actor profile device through activation-code exchange plus
|
|
@@ -80,6 +80,12 @@ export declare class IndividualControllerSdk {
|
|
|
80
80
|
revokeProfessionalAccess(ctx: RouteContext, input: RevokeProfessionalAccessInput): Promise<RevokeProfessionalAccessResult>;
|
|
81
81
|
/**
|
|
82
82
|
* Imports a FHIR/IPS payload and waits until it is indexed.
|
|
83
|
+
*
|
|
84
|
+
* The source `Composition.author` is provenance, not delegated authority.
|
|
85
|
+
* A controller that imports an IPS authored by an external URN does not gain
|
|
86
|
+
* permission to rewrite or delete it. A correction requires independently
|
|
87
|
+
* verified source provenance; merely resubmitting the same URN is
|
|
88
|
+
* insufficient and unsigned/demo imports remain locally immutable.
|
|
83
89
|
*/
|
|
84
90
|
importIpsOrFhirAndUpdateIndex(ctx: RouteContext, input: IpsOrFhirImportInput): Promise<SubmitAndPollResult>;
|
|
85
91
|
/**
|
|
@@ -119,6 +119,12 @@ export class IndividualControllerSdk {
|
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
121
|
* Imports a FHIR/IPS payload and waits until it is indexed.
|
|
122
|
+
*
|
|
123
|
+
* The source `Composition.author` is provenance, not delegated authority.
|
|
124
|
+
* A controller that imports an IPS authored by an external URN does not gain
|
|
125
|
+
* permission to rewrite or delete it. A correction requires independently
|
|
126
|
+
* verified source provenance; merely resubmitting the same URN is
|
|
127
|
+
* insufficient and unsigned/demo imports remain locally immutable.
|
|
122
128
|
*/
|
|
123
129
|
importIpsOrFhirAndUpdateIndex(ctx, input) {
|
|
124
130
|
assertFacadeCapability(this.capabilities, ActorCapabilities.IndividualImportIps, ActorKinds.IndividualController, 'importIpsOrFhirAndUpdateIndex');
|
|
@@ -208,6 +208,14 @@ export type IndividualMemberLifecycleInput = {
|
|
|
208
208
|
dataType?: string;
|
|
209
209
|
};
|
|
210
210
|
export type IpsOrFhirImportInput = {
|
|
211
|
+
/**
|
|
212
|
+
* Server-built IPS/FHIR payload whose original Composition author is
|
|
213
|
+
* preserved as provenance. Importing an external `urn:*` author never makes
|
|
214
|
+
* the authenticated controller that author and does not grant local update
|
|
215
|
+
* or delete authority. Repeating the same author URN is not proof that a
|
|
216
|
+
* correction came from the same source; unsigned/demo imports therefore
|
|
217
|
+
* remain locally immutable under the strict audit contract.
|
|
218
|
+
*/
|
|
211
219
|
compositionPayload: {
|
|
212
220
|
thid?: string;
|
|
213
221
|
} & Record<string, unknown>;
|
|
@@ -298,6 +306,8 @@ type ClinicalUpdateRuntimeOptions = Readonly<{
|
|
|
298
306
|
* `ifMatch` for optimistic concurrency. GW authorizes it against the creator
|
|
299
307
|
* DID plus the caller's linked verified login identity; contact identifiers
|
|
300
308
|
* are never written into the clinical resource.
|
|
309
|
+
* An externally authored `urn:*` may be preserved on first import, but a local
|
|
310
|
+
* controller cannot subsequently update or delete that source-authored fact.
|
|
301
311
|
*/
|
|
302
312
|
export type ClinicalSectionUpdateInput = ClinicalSectionUpdateCommunicationInput & ClinicalUpdateRuntimeOptions;
|
|
303
313
|
/** Updates one complete multi-section clinical summary document. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdc-sdk-node-ts",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.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.",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"test:e2e:live-gw:clean": "bash ./scripts/run-live-gw-clean.sh"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"gdc-common-utils-ts": "2.6.
|
|
41
|
+
"gdc-common-utils-ts": "2.6.2",
|
|
42
42
|
"gdc-sdk-core-ts": "2.4.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|