gdc-sdk-node-ts 2.6.1 → 2.6.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.
@@ -512,12 +512,38 @@ export async function requestProfessionalAccessWithDeps(routeCtx, input, deps) {
512
512
  ],
513
513
  },
514
514
  });
515
+ const communicationClaims = {
516
+ ...communication.claims,
517
+ [CommunicationClaim.Category]: 'permission-request',
518
+ [CommunicationClaim.NoteText]: communication.text,
519
+ };
520
+ const persistedCommunication = { ...communication, claims: communicationClaims };
521
+ const communicationPayload = {
522
+ thid,
523
+ body: {
524
+ resourceType: ResourceTypesFhirR4.Bundle,
525
+ type: 'batch',
526
+ data: [{
527
+ type: 'CommMsgExtended',
528
+ meta: { claims: communicationClaims },
529
+ resource: {
530
+ resourceType: ResourceTypesFhirR4.Communication,
531
+ id: communicationIdentifier,
532
+ status: 'completed',
533
+ meta: { claims: communicationClaims },
534
+ },
535
+ }],
536
+ },
537
+ };
515
538
  const delivery = await ingestCommunicationAndUpdateIndexWithDeps(routeCtx, {
516
- communicationPayload: communication,
539
+ // The compatibility ingestion facade still declares the historical flat
540
+ // CommunicationInput even though its runtime contract accepts the GW
541
+ // Bundle envelope. Keep this high-level builder as the only cast boundary.
542
+ communicationPayload: communicationPayload,
517
543
  pathFormatSegment: 'r4',
518
544
  pollOptions: input.pollOptions,
519
545
  }, deps);
520
- return { thid, communicationIdentifier, communication, delivery };
546
+ return { thid, communicationIdentifier, communication: persistedCommunication, delivery };
521
547
  }
522
548
  export async function searchCommunicationParticipantsWithDeps(routeCtx, input, deps) {
523
549
  const payload = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-sdk-node-ts",
3
- "version": "2.6.1",
3
+ "version": "2.6.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.",