gdc-sdk-node-ts 2.4.45 → 2.5.0
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 +2 -1
- package/dist/orchestration/individual-controller-sdk.d.ts +6 -1
- package/dist/orchestration/individual-controller-sdk.js +6 -1
- package/dist/resource-operations.d.ts +8 -1
- package/package.json +3 -3
- package/dist/organization-registration-authorization.d.ts +0 -16
- package/dist/organization-registration-authorization.js +0 -34
package/README.md
CHANGED
|
@@ -702,7 +702,8 @@ modules below.
|
|
|
702
702
|
- [`NodeHttpClient.submitCommunicationAndPoll(...)`](src/node-runtime-client.ts)
|
|
703
703
|
- [`NodeHttpClient.searchClinicalBundle(...)`](src/node-runtime-client.ts)
|
|
704
704
|
- [`NodeHttpClient.updateClinicalSection(...)`](src/node-runtime-client.ts) for
|
|
705
|
-
one explicit section carried by a batch
|
|
705
|
+
one explicit section carried by a batch Communication; its typed entries may
|
|
706
|
+
mix `.create()`, `.update()` and exact authored `.delete()` operations
|
|
706
707
|
- [`NodeHttpClient.updateClinicalSummary(...)`](src/node-runtime-client.ts) for
|
|
707
708
|
a Composition-first multi-section document
|
|
708
709
|
- [`NodeHttpClient.searchLatestIps(...)`](src/node-runtime-client.ts)
|
|
@@ -94,7 +94,12 @@ export declare class IndividualControllerSdk {
|
|
|
94
94
|
* Ingests a FHIR `Communication` and waits for indexing.
|
|
95
95
|
*/
|
|
96
96
|
ingestCommunicationAndUpdateIndex(ctx: RouteContext, input: CommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
97
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* Updates one exact clinical section through a section-scoped batch.
|
|
99
|
+
* Entries choose their own operation, so one call may create one resource
|
|
100
|
+
* and delete another with `.delete()` and optional `.ifMatch(versionId)`.
|
|
101
|
+
* DELETE entries contain no resource body.
|
|
102
|
+
*/
|
|
98
103
|
updateClinicalSection(ctx: RouteContext, input: ClinicalSectionUpdateInput): Promise<SubmitAndPollResult>;
|
|
99
104
|
/** Updates the multi-section summary through a Composition-first document. */
|
|
100
105
|
updateClinicalSummary(ctx: RouteContext, input: ClinicalSummaryUpdateInput): Promise<SubmitAndPollResult>;
|
|
@@ -142,7 +142,12 @@ export class IndividualControllerSdk {
|
|
|
142
142
|
assertFacadeCapability(this.capabilities, ActorCapabilities.IndividualIngestCommunication, ActorKinds.IndividualController, 'ingestCommunicationAndUpdateIndex');
|
|
143
143
|
return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
|
|
144
144
|
}
|
|
145
|
-
/**
|
|
145
|
+
/**
|
|
146
|
+
* Updates one exact clinical section through a section-scoped batch.
|
|
147
|
+
* Entries choose their own operation, so one call may create one resource
|
|
148
|
+
* and delete another with `.delete()` and optional `.ifMatch(versionId)`.
|
|
149
|
+
* DELETE entries contain no resource body.
|
|
150
|
+
*/
|
|
146
151
|
updateClinicalSection(ctx, input) {
|
|
147
152
|
assertFacadeCapability(this.capabilities, ActorCapabilities.IndividualIngestCommunication, ActorKinds.IndividualController, 'updateClinicalSection');
|
|
148
153
|
return requireClientMethod(this.client, 'updateClinicalSection')(ctx, input);
|
|
@@ -291,7 +291,14 @@ type ClinicalUpdateRuntimeOptions = Readonly<{
|
|
|
291
291
|
intervalMs?: number;
|
|
292
292
|
};
|
|
293
293
|
}>;
|
|
294
|
-
/**
|
|
294
|
+
/**
|
|
295
|
+
* Updates exactly one clinical section through a scoped batch/collection.
|
|
296
|
+
* A `Bundle.type = batch` may mix typed create, update, and delete entries.
|
|
297
|
+
* A delete targets `ResourceType/id`, carries no resource body, and may use
|
|
298
|
+
* `ifMatch` for optimistic concurrency. GW authorizes it against the creator
|
|
299
|
+
* DID plus the caller's linked verified login identity; contact identifiers
|
|
300
|
+
* are never written into the clinical resource.
|
|
301
|
+
*/
|
|
295
302
|
export type ClinicalSectionUpdateInput = ClinicalSectionUpdateCommunicationInput & ClinicalUpdateRuntimeOptions;
|
|
296
303
|
/** Updates one complete multi-section clinical summary document. */
|
|
297
304
|
export type ClinicalSummaryUpdateInput = ClinicalUpdateCommunicationInput & ClinicalUpdateRuntimeOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdc-sdk-node-ts",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
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,8 +38,8 @@
|
|
|
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.
|
|
42
|
-
"gdc-sdk-core-ts": "
|
|
41
|
+
"gdc-common-utils-ts": "2.6.0",
|
|
42
|
+
"gdc-sdk-core-ts": "2.4.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^20.14.10",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { VerifiableCredentialV2 } from 'gdc-common-utils-ts/models/verifiable-credential';
|
|
2
|
-
import type { IWallet, WalletExecutionContext, WalletKeySelection } from 'gdc-sdk-core-ts';
|
|
3
|
-
/** Input required to add one human-authorizer proof to the out-of-band VC. */
|
|
4
|
-
export type SignOrganizationRegistrationAuthorizationInput = Readonly<{
|
|
5
|
-
credential: VerifiableCredentialV2;
|
|
6
|
-
wallet: IWallet;
|
|
7
|
-
context: WalletExecutionContext;
|
|
8
|
-
key: WalletKeySelection;
|
|
9
|
-
verificationMethod: string;
|
|
10
|
-
createdAt?: string;
|
|
11
|
-
}>;
|
|
12
|
-
/**
|
|
13
|
-
* Adds one detached JWS proof made by the already-unlocked professional
|
|
14
|
-
* profile. The browser never receives the private key or clear wallet seed.
|
|
15
|
-
*/
|
|
16
|
-
export declare function signOrganizationRegistrationAuthorizationCredential(input: SignOrganizationRegistrationAuthorizationInput): Promise<VerifiableCredentialV2>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { canonicalizeOrganizationRegistrationAuthorizationCredential, } from 'gdc-common-utils-ts/utils/organization-registration-authorization';
|
|
2
|
-
/**
|
|
3
|
-
* Adds one detached JWS proof made by the already-unlocked professional
|
|
4
|
-
* profile. The browser never receives the private key or clear wallet seed.
|
|
5
|
-
*/
|
|
6
|
-
export async function signOrganizationRegistrationAuthorizationCredential(input) {
|
|
7
|
-
if (!input.wallet.signDetachedJws) {
|
|
8
|
-
throw new Error('Wallet does not support detached organization authorization proofs.');
|
|
9
|
-
}
|
|
10
|
-
const verificationMethod = String(input.verificationMethod || '').trim();
|
|
11
|
-
if (!verificationMethod)
|
|
12
|
-
throw new Error('Organization authorization proof requires verificationMethod.');
|
|
13
|
-
const payload = canonicalizeOrganizationRegistrationAuthorizationCredential(input.credential);
|
|
14
|
-
const jws = await input.wallet.signDetachedJws(input.context, {
|
|
15
|
-
payload,
|
|
16
|
-
header: { typ: 'application/vc+ld+json' },
|
|
17
|
-
key: input.key,
|
|
18
|
-
});
|
|
19
|
-
const existingProofs = Array.isArray(input.credential.proof)
|
|
20
|
-
? input.credential.proof
|
|
21
|
-
: input.credential.proof
|
|
22
|
-
? [input.credential.proof]
|
|
23
|
-
: [];
|
|
24
|
-
return {
|
|
25
|
-
...input.credential,
|
|
26
|
-
proof: [...existingProofs, {
|
|
27
|
-
type: 'JsonWebSignature2020',
|
|
28
|
-
created: input.createdAt || new Date().toISOString(),
|
|
29
|
-
proofPurpose: 'contractAgreement',
|
|
30
|
-
verificationMethod,
|
|
31
|
-
jws,
|
|
32
|
-
}],
|
|
33
|
-
};
|
|
34
|
-
}
|