gdc-sdk-node-ts 2.7.7 → 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';
@@ -343,6 +343,8 @@ export declare class ServerProfileSessionManager {
343
343
  exportClinicalCreatorIps(input: Readonly<{
344
344
  ownerId: string;
345
345
  profileId: string;
346
+ /** Closed BFF choice: content owner or authenticated registered creator. */
347
+ sourceAuthor?: ClinicalSourceAuthorSelection;
346
348
  }>): Promise<ClinicalCreatorIpsExport>;
347
349
  enroll(input: ServerProfileEnrollmentInput): Promise<ServerProfileRecord>;
348
350
  /**
@@ -435,7 +437,11 @@ export declare class ServerProfileSessionManager {
435
437
  private now;
436
438
  }
437
439
  /**
438
- * Exports the stable FHIR IPS creator attached to a server profile. Direct
439
- * 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.
440
444
  */
441
- export declare function exportServerProfileClinicalCreatorIps(profile: ServerProfileRecord): ClinicalCreatorIpsExport;
445
+ export declare function exportServerProfileClinicalCreatorIps(profile: ServerProfileRecord, options?: Readonly<{
446
+ sourceAuthor?: ClinicalSourceAuthorSelection;
447
+ }>): ClinicalCreatorIpsExport;
@@ -30,7 +30,7 @@ export class ServerProfileSessionManager {
30
30
  * profile without exposing its protected wallet material to the portal.
31
31
  */
32
32
  async exportClinicalCreatorIps(input) {
33
- return exportServerProfileClinicalCreatorIps(await this.requireOwnedProfile(input.ownerId, input.profileId));
33
+ return exportServerProfileClinicalCreatorIps(await this.requireOwnedProfile(input.ownerId, input.profileId), { sourceAuthor: input.sourceAuthor });
34
34
  }
35
35
  async enroll(input) {
36
36
  requireEnrollment(input);
@@ -829,16 +829,19 @@ function requireBase64UrlSeed32(seed) {
829
829
  }
830
830
  }
831
831
  /**
832
- * Exports the stable FHIR IPS creator attached to a server profile. Direct
833
- * 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.
834
836
  */
835
- export function exportServerProfileClinicalCreatorIps(profile) {
837
+ export function exportServerProfileClinicalCreatorIps(profile, options = {}) {
836
838
  if (!profile.clinicalCreatorBinding) {
837
839
  throw new Error('Server profile has no clinical creator binding.');
838
840
  }
839
841
  return resolveClinicalCreatorIpsExport({
840
842
  bindings: [profile.clinicalCreatorBinding],
841
843
  evidence: { actorDid: profile.actorDid },
844
+ sourceAuthor: options.sourceAuthor,
842
845
  });
843
846
  }
844
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.7",
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.6",
42
- "gdc-sdk-core-ts": "2.5.5"
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",