gdc-sdk-node-ts 2.7.6 → 2.7.8

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 CHANGED
@@ -704,6 +704,17 @@ modules below.
704
704
  `recipient`, never a portal alias
705
705
  - vital-sign helpers
706
706
 
707
+ ### Composition provenance in clinical Bundles
708
+
709
+ A document Bundle keeps `Composition.author` (who created the content) separate
710
+ from `Composition.attester` (the registered personal or professional assignment
711
+ that submitted/attested it). For a member or professional, the protected BFF
712
+ profile selects only `owner` or `creator`; a `RelatedPerson` or
713
+ `PractitionerRole` may be both author and attester when that actor created the
714
+ content. DIDComm sender and signing keys remain audit/transport identities.
715
+ See [Clinical writes from a Node BFF](./docs/101-BFF_CLINICAL_WRITES.md) and the
716
+ [gateway authorship contract](https://github.com/Global-DataCare/gwtemplate-node-ts/blob/main/docs/01-OVERVIEW-AND-GUIDES/101-01.N-AUTHENTICATED-CLINICAL-AUTHOR.md).
717
+
707
718
  ### Node runtime client
708
719
 
709
720
  - [`NodeHttpClient`](src/node-runtime-client.ts)
@@ -1,7 +1,7 @@
1
1
  import type { JWK } from 'gdc-common-utils-ts/models/jwk';
2
2
  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
- import { type AppInfo, type ConfidentialStorageProfile, type PollOptions, type SubmitAndPollResult, type ClinicalCreatorBinding, type ClinicalCreatorIpsExport } from 'gdc-sdk-core-ts';
4
+ import { type AppInfo, type ConfidentialStorageProfile, type PollOptions, type SubmitAndPollResult, type ClinicalCreatorBinding, type ClinicalCreatorIpsExport, type ClinicalSourceAuthorSelection } from 'gdc-sdk-core-ts';
5
5
  import { OrganizationControllerSdk } from './orchestration/organization-controller-sdk.js';
6
6
  import { IndividualControllerSdk } from './orchestration/individual-controller-sdk.js';
7
7
  import { ProfessionalSdk } from './orchestration/professional-sdk.js';
@@ -336,6 +336,16 @@ export type ServerProfileSessionManagerOptions = Readonly<{
336
336
  export declare class ServerProfileSessionManager {
337
337
  private readonly options;
338
338
  constructor(options: ServerProfileSessionManagerOptions);
339
+ /**
340
+ * Resolves the canonical IPS author/attester projection from one owned
341
+ * profile without exposing its protected wallet material to the portal.
342
+ */
343
+ exportClinicalCreatorIps(input: Readonly<{
344
+ ownerId: string;
345
+ profileId: string;
346
+ /** Closed BFF choice: content owner or authenticated registered creator. */
347
+ sourceAuthor?: ClinicalSourceAuthorSelection;
348
+ }>): Promise<ClinicalCreatorIpsExport>;
339
349
  enroll(input: ServerProfileEnrollmentInput): Promise<ServerProfileRecord>;
340
350
  /**
341
351
  * Rotates an employee wallet after a fresh OTP-authenticated GW recovery.
@@ -427,7 +437,11 @@ export declare class ServerProfileSessionManager {
427
437
  private now;
428
438
  }
429
439
  /**
430
- * Exports the stable FHIR IPS creator attached to a server profile. Direct
431
- * writes continue to use `profile.actorDid`; this function is export-only.
440
+ * Exports the stable FHIR IPS creator attached to a server profile. The
441
+ * optional closed selection determines whether the owner or the authenticated
442
+ * registered creator authored the content. DIDComm sender and signing keys
443
+ * remain transport/audit evidence and never become FHIR provenance.
432
444
  */
433
- export declare function exportServerProfileClinicalCreatorIps(profile: ServerProfileRecord): ClinicalCreatorIpsExport;
445
+ export declare function exportServerProfileClinicalCreatorIps(profile: ServerProfileRecord, options?: Readonly<{
446
+ sourceAuthor?: ClinicalSourceAuthorSelection;
447
+ }>): ClinicalCreatorIpsExport;
@@ -25,6 +25,13 @@ export class ServerProfileSessionManager {
25
25
  constructor(options) {
26
26
  this.options = options;
27
27
  }
28
+ /**
29
+ * Resolves the canonical IPS author/attester projection from one owned
30
+ * profile without exposing its protected wallet material to the portal.
31
+ */
32
+ async exportClinicalCreatorIps(input) {
33
+ return exportServerProfileClinicalCreatorIps(await this.requireOwnedProfile(input.ownerId, input.profileId), { sourceAuthor: input.sourceAuthor });
34
+ }
28
35
  async enroll(input) {
29
36
  requireEnrollment(input);
30
37
  const seed = input.walletSeed || randomBytes(32).toString('base64url');
@@ -822,16 +829,19 @@ function requireBase64UrlSeed32(seed) {
822
829
  }
823
830
  }
824
831
  /**
825
- * Exports the stable FHIR IPS creator attached to a server profile. Direct
826
- * writes continue to use `profile.actorDid`; this function is export-only.
832
+ * Exports the stable FHIR IPS creator attached to a server profile. The
833
+ * optional closed selection determines whether the owner or the authenticated
834
+ * registered creator authored the content. DIDComm sender and signing keys
835
+ * remain transport/audit evidence and never become FHIR provenance.
827
836
  */
828
- export function exportServerProfileClinicalCreatorIps(profile) {
837
+ export function exportServerProfileClinicalCreatorIps(profile, options = {}) {
829
838
  if (!profile.clinicalCreatorBinding) {
830
839
  throw new Error('Server profile has no clinical creator binding.');
831
840
  }
832
841
  return resolveClinicalCreatorIpsExport({
833
842
  bindings: [profile.clinicalCreatorBinding],
834
843
  evidence: { actorDid: profile.actorDid },
844
+ sourceAuthor: options.sourceAuthor,
835
845
  });
836
846
  }
837
847
  function bindClinicalCreatorChannels(binding, channel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-sdk-node-ts",
3
- "version": "2.7.6",
3
+ "version": "2.7.8",
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.8.5",
42
- "gdc-sdk-core-ts": "2.5.4"
41
+ "gdc-common-utils-ts": "2.8.7",
42
+ "gdc-sdk-core-ts": "2.5.6"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^20.14.10",