gdc-sdk-node-ts 2.4.22 → 2.4.24

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
@@ -288,9 +288,11 @@ npm run test:e2e:live-gw:all
288
288
 
289
289
  Profile note:
290
290
 
291
- - `didcomm-plain` is the current live baseline implemented by the Node runtime client
291
+ - `didcomm-plain` is the explicit demo-only live profile
292
292
  - `legacy-fhir` exercises raw `application/fhir+json` async batch submission for `org.hl7.fhir.*`
293
293
  - `all` runs every implemented profile from the same suite file
294
+ - each `NodeHttpClient` selects one profile at construction; every facade
295
+ operation and poll uses it and cannot override or downgrade it
294
296
 
295
297
  Run the IPS ingestion/search branch as well:
296
298
 
@@ -7,6 +7,8 @@
7
7
  * is actually deployed.
8
8
  */
9
9
  export declare const GwCoreLifecycleAction: Readonly<{
10
+ readonly Create: "_create";
11
+ readonly CreateResponse: "_create-response";
10
12
  readonly Batch: "_batch";
11
13
  readonly BatchResponse: "_batch-response";
12
14
  readonly Issue: "_issue";
@@ -9,6 +9,8 @@ import { LifecycleRequestType } from 'gdc-common-utils-ts';
9
9
  * is actually deployed.
10
10
  */
11
11
  export const GwCoreLifecycleAction = Object.freeze({
12
+ Create: '_create',
13
+ CreateResponse: '_create-response',
12
14
  Batch: '_batch',
13
15
  BatchResponse: '_batch-response',
14
16
  Issue: '_issue',
@@ -127,7 +127,9 @@ export declare class HttpRuntimeClient implements NodeRuntimeClient {
127
127
  */
128
128
  v1Path(ctx: RouteContext | undefined, section: string, format: string, resourceType: string, action: string): string;
129
129
  /**
130
- * Submits a batch payload to a gateway batch endpoint.
130
+ * Submits a batch payload using the transport profile selected once when the
131
+ * runtime client was constructed. Operations cannot downgrade or replace
132
+ * that profile locally.
131
133
  */
132
134
  submitBatch(path: string, payload: SubmitPayload): Promise<SubmitResponse>;
133
135
  /**
@@ -145,6 +147,13 @@ export declare class HttpRuntimeClient implements NodeRuntimeClient {
145
147
  /** Registers one tenant or exact-subject FHIR R5 rest-hook Subscription. */
146
148
  submitFhirR5SubscriptionBatch(ctx: RouteContext, input: FhirR5SubscriptionBatchInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
147
149
  private submitAndPollWithBearerToken;
150
+ /**
151
+ * Enforces the client-owned transport policy. Operation inputs retained for
152
+ * source compatibility may repeat the configured profile, but can never
153
+ * replace it or silently downgrade the wire protection selected at runtime
154
+ * construction.
155
+ */
156
+ private requireConfiguredTransportProfile;
148
157
  /**
149
158
  * Starts the host-side legal-organization verification transaction that GW
150
159
  * CORE forwards to ICA `_verify`.
@@ -547,8 +556,6 @@ export declare class HttpRuntimeClient implements NodeRuntimeClient {
547
556
  pollOptions?: PollOptions;
548
557
  }): Promise<SubmitAndPollResult>;
549
558
  private buildConsentClaimsWithCid;
550
- private pollBatchResponse;
551
- private postJson;
552
559
  private buildHeaders;
553
560
  private fetchWithTimeout;
554
561
  private parseResponseBody;
@@ -1,6 +1,3 @@
1
- // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
- // Always create JSDoc, do not use strings inline in keys nor values, use types instead, and reuse the data test examples.
3
- import { DIDCOMM_PLAINTEXT_JSON_MEDIA_TYPE, } from 'gdc-common-utils-ts/utils/didcomm-submit';
4
1
  import { buildAppHeaders, createBootstrapFacade, decodeTransportResponse, renderCommunicationOutboxRequest, renderGatewayMessageRequest, renderTransportPollRequest, resolveAppInfo, TransportProfiles, } from 'gdc-sdk-core-ts';
5
2
  import { pollUntilCompleteWithMethod } from './async-polling.js';
6
3
  import { confirmLegalOrganizationOrderWithDeps, HostLifecycleRequestType, HostedTenantLifecycleRequestType, submitHostedTenantLifecycleWithDeps, } from './host-onboarding.js';
@@ -14,8 +11,7 @@ import { confirmOrganizationLicenseOrderWithDeps } from './organization-license-
14
11
  import { startIndividualOrganizationWithDeps } from './individual-start.js';
15
12
  import { createOrganizationEmployeeWithDeps, issueOrganizationEmployeeLicenseWithDeps, disableIndividualMemberWithDeps, disableIndividualOrganizationWithDeps, disableOrganizationEmployeeWithDeps, listIndividualLicenseOffersWithDeps, listIndividualLicenseOrdersWithDeps, listIndividualLicensesWithDeps, addFreeIndividualMemberLicensesWithDeps, issueIndividualMemberLicenseWithDeps, transitionIndividualMemberLicenseWithDeps, listOrganizationLicenseOffersWithDeps, listOrganizationLicenseOrdersWithDeps, listOrganizationLicensesWithDeps, grantProfessionalAccessWithDeps, buildClinicalSectionUpdateIngestion, buildClinicalSummaryUpdateIngestion, ingestCommunicationAndUpdateIndexWithDeps, requestProfessionalAccessWithDeps, buildVitalSignBatchCommunicationFromSearchResponse, registerBlockchainArtifactAndUpdateIndexWithDeps, requestClinicalSummaryWithDeps, revokeProfessionalAccessWithDeps, searchCommunicationParticipantsWithDeps, purgeIndividualMemberWithDeps, purgeIndividualOrganizationWithDeps, purgeOrganizationEmployeeWithDeps, prepareEmployeeLifecycleMessageForTransport, searchIndividualLicensesWithDeps, searchIndividualLicenseOffersWithDeps, searchIndividualLicenseOrdersWithDeps, searchOrganizationLicensesWithDeps, searchOrganizationLicenseOffersWithDeps, searchOrganizationLicenseOrdersWithDeps, searchOrganizationEmployeesWithDeps, searchClinicalBundleWithDeps, searchLatestIpsWithDeps, upsertRelatedPersonAndPollWithDeps, normalizeCommunicationPathFormatSegment, addFreeOrganizationEmployeeLicensesWithDeps, requestOrganizationEmployeeLicenseOfferWithDeps, } from './resource-operations.js';
16
13
  import { listOrganizationEmployeeLifecycleWithDeps, provisionOrganizationEmployeeWithDeps, } from './organization-employee-lifecycle.js';
17
- import { submitAndPollWithMethods } from './orchestration/client-port.js';
18
- import { buildRuntimeHeaders, fetchWithTimeout, parseResponseBody, pollBatchResponseWithRuntimeConfig, postJsonWithRuntimeConfig, postRenderedWithRuntimeConfig, } from './runtime-transport.js';
14
+ import { buildRuntimeHeaders, fetchWithTimeout, parseResponseBody, postRenderedWithRuntimeConfig, } from './runtime-transport.js';
19
15
  import { activateOrganizationInGatewayFromIcaProofWithDeps, submitLegalOrganizationCredentialReissuanceWithDeps, submitLegalOrganizationVerificationTransactionWithDeps, submitOrganizationDidBindingWithDeps, } from './runtime-host-submission.js';
20
16
  import { buildGrantProfessionalAccessClaimsWithCid } from './runtime-consent.js';
21
17
  import { RuntimeClientPaths } from './runtime-client-paths.js';
@@ -102,22 +98,38 @@ export class HttpRuntimeClient {
102
98
  return this.paths.v1Path(ctx, section, format, resourceType, action);
103
99
  }
104
100
  /**
105
- * Submits a batch payload to a gateway batch endpoint.
101
+ * Submits a batch payload using the transport profile selected once when the
102
+ * runtime client was constructed. Operations cannot downgrade or replace
103
+ * that profile locally.
106
104
  */
107
105
  async submitBatch(path, payload) {
108
- return this.postJson(path, payload, DIDCOMM_PLAINTEXT_JSON_MEDIA_TYPE);
106
+ const rendered = await renderGatewayMessageRequest(payload, this.transportProfile, this.secureTransportAdapter);
107
+ const response = await postRenderedWithRuntimeConfig(this.transportConfig, path, rendered);
108
+ return { status: response.status, location: response.location, body: response.body };
109
109
  }
110
110
  /**
111
111
  * Polls a batch-response endpoint until the GW reports a terminal state.
112
112
  */
113
113
  async pollUntilComplete(pollPath, request, pollOptions) {
114
- return pollUntilCompleteWithMethod(this.pollBatchResponse.bind(this), pollPath, request, pollOptions);
114
+ return pollUntilCompleteWithMethod(async (path, currentRequest) => {
115
+ const rendered = await renderTransportPollRequest(currentRequest.thid, this.transportProfile, this.secureTransportAdapter);
116
+ const response = await postRenderedWithRuntimeConfig(this.transportConfig, path, rendered);
117
+ return {
118
+ status: response.status,
119
+ body: response.status === 202
120
+ ? response.body
121
+ : response.status >= 200 && response.status < 300
122
+ ? await decodeTransportResponse(response.body, this.transportProfile, this.secureTransportAdapter)
123
+ : response.body,
124
+ retryAfterMs: response.retryAfterMs,
125
+ };
126
+ }, pollPath, request, pollOptions);
115
127
  }
116
128
  /**
117
129
  * Convenience wrapper that performs submit and poll in sequence.
118
130
  */
119
131
  async submitAndPoll(submitPath, pollPath, payload, pollOptions) {
120
- return submitAndPollWithMethods(this, submitPath, pollPath, payload, pollOptions);
132
+ return this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions);
121
133
  }
122
134
  /** Registers one neutral FHIR R5 topic in the tenant-owned CORE catalog. */
123
135
  submitFhirR5SubscriptionTopicBatch(ctx, topic, pollOptions) {
@@ -138,13 +150,19 @@ export class HttpRuntimeClient {
138
150
  });
139
151
  }
140
152
  async submitAndPollWithBearerToken(bearerToken, submitPath, pollPath, payload, pollOptions) {
141
- const config = { ...this.transportConfig, bearerToken };
142
- const submitted = await postJsonWithRuntimeConfig(config, submitPath, payload, DIDCOMM_PLAINTEXT_JSON_MEDIA_TYPE);
143
- const poll = await pollUntilCompleteWithMethod((path, request) => pollBatchResponseWithRuntimeConfig(config, path, request), pollPath, { thid: String(payload.thid) }, pollOptions);
144
- return {
145
- submit: { status: submitted.status, location: submitted.location, body: submitted.body },
146
- poll,
147
- };
153
+ return this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions, bearerToken);
154
+ }
155
+ /**
156
+ * Enforces the client-owned transport policy. Operation inputs retained for
157
+ * source compatibility may repeat the configured profile, but can never
158
+ * replace it or silently downgrade the wire protection selected at runtime
159
+ * construction.
160
+ */
161
+ requireConfiguredTransportProfile(requested) {
162
+ if (requested && requested !== this.transportProfile) {
163
+ throw new Error(`Operation transport profile '${requested}' conflicts with configured runtime profile '${this.transportProfile}'.`);
164
+ }
165
+ return this.transportProfile;
148
166
  }
149
167
  /**
150
168
  * Starts the host-side legal-organization verification transaction that GW
@@ -175,9 +193,7 @@ export class HttpRuntimeClient {
175
193
  wrapBundleAsGatewayTransactionMessage: this.wrapBundleAsGatewayTransactionMessage.bind(this),
176
194
  submitPath: this.hostRegistryOrganizationTransactionPath.bind(this),
177
195
  pollPath: this.hostRegistryOrganizationTransactionPollPath.bind(this),
178
- submitAndPoll: this.transportProfile === TransportProfiles.DidcommEncryptedForm
179
- ? (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions)
180
- : this.submitAndPoll.bind(this),
196
+ submitAndPoll: this.submitAndPoll.bind(this),
181
197
  });
182
198
  }
183
199
  /**
@@ -199,9 +215,7 @@ export class HttpRuntimeClient {
199
215
  wrapBundleAsGatewayTransactionMessage: this.wrapBundleAsGatewayTransactionMessage.bind(this),
200
216
  submitPath: this.hostRegistryOrganizationIssuePath.bind(this),
201
217
  pollPath: this.hostRegistryOrganizationIssuePollPath.bind(this),
202
- submitAndPoll: this.transportProfile === TransportProfiles.DidcommEncryptedForm
203
- ? (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions)
204
- : this.submitAndPoll.bind(this),
218
+ submitAndPoll: this.submitAndPoll.bind(this),
205
219
  });
206
220
  }
207
221
  /**
@@ -364,7 +378,7 @@ export class HttpRuntimeClient {
364
378
  return createOrganizationEmployeeWithDeps(ctx, input, pollOptions, {
365
379
  employeeBatchPath: this.paths.employeeBatchPath.bind(this.paths),
366
380
  employeePollPath: this.paths.employeePollPath.bind(this.paths),
367
- submitAndPoll: (submitPath, pollPath, payload, options) => this.submitClinicalMessageAndPoll(submitPath, pollPath, prepareEmployeeLifecycleMessageForTransport(payload, this.transportProfile), this.transportProfile, options),
381
+ submitAndPoll: (submitPath, pollPath, payload, options) => this.submitAndPoll(submitPath, pollPath, prepareEmployeeLifecycleMessageForTransport(payload, this.transportProfile), options),
368
382
  });
369
383
  }
370
384
  /** Creates an employee and reserves its activation credential as one SDK workflow. */
@@ -382,9 +396,7 @@ export class HttpRuntimeClient {
382
396
  input,
383
397
  identityDeviceRevokePath: this.paths.identityDeviceRevokePath.bind(this.paths),
384
398
  identityDeviceRevokePollPath: this.paths.identityDeviceRevokePollPath.bind(this.paths),
385
- submitAndPoll: this.transportProfile === TransportProfiles.DidcommEncryptedForm
386
- ? (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions)
387
- : this.submitAndPoll.bind(this),
399
+ submitAndPoll: this.submitAndPoll.bind(this),
388
400
  });
389
401
  }
390
402
  /** Reserves an employee seat and issues its bounded multi-device activation credential. */
@@ -392,9 +404,7 @@ export class HttpRuntimeClient {
392
404
  return issueOrganizationEmployeeLicenseWithDeps(ctx, input, {
393
405
  identityLicenseIssuePath: this.paths.identityLicenseIssuePath.bind(this.paths),
394
406
  identityLicenseIssuePollPath: this.paths.identityLicenseIssuePollPath.bind(this.paths),
395
- submitAndPoll: this.transportProfile === TransportProfiles.DidcommEncryptedForm
396
- ? (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions)
397
- : this.submitAndPoll.bind(this),
407
+ submitAndPoll: this.submitAndPoll.bind(this),
398
408
  });
399
409
  }
400
410
  /**
@@ -477,21 +487,17 @@ export class HttpRuntimeClient {
477
487
  /** @deprecated Professional seats use Employee Offer and confirmed Order. */
478
488
  async addFreeOrganizationEmployeeLicenses(ctx, input) {
479
489
  return addFreeOrganizationEmployeeLicensesWithDeps(ctx, input, {
480
- organizationLicenseActionPath: this.paths.organizationLicenseActionPath.bind(this.paths),
481
- organizationLicenseActionPollPath: this.paths.organizationLicenseActionPollPath.bind(this.paths),
482
- submitAndPoll: this.transportProfile === TransportProfiles.DidcommEncryptedForm
483
- ? (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions)
484
- : this.submitAndPoll.bind(this),
490
+ organizationLicenseOfferCreatePath: this.paths.organizationLicenseOfferCreatePath.bind(this.paths),
491
+ organizationLicenseOfferCreatePollPath: this.paths.organizationLicenseOfferCreatePollPath.bind(this.paths),
492
+ submitAndPoll: this.submitAndPoll.bind(this),
485
493
  });
486
494
  }
487
495
  /** Starts the commercial Offer flow for additional professional seats. */
488
496
  async requestOrganizationEmployeeLicenseOffer(ctx, input) {
489
497
  return requestOrganizationEmployeeLicenseOfferWithDeps(ctx, input, {
490
- organizationLicenseActionPath: this.paths.organizationLicenseActionPath.bind(this.paths),
491
- organizationLicenseActionPollPath: this.paths.organizationLicenseActionPollPath.bind(this.paths),
492
- submitAndPoll: this.transportProfile === TransportProfiles.DidcommEncryptedForm
493
- ? (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions)
494
- : this.submitAndPoll.bind(this),
498
+ organizationLicenseOfferCreatePath: this.paths.organizationLicenseOfferCreatePath.bind(this.paths),
499
+ organizationLicenseOfferCreatePollPath: this.paths.organizationLicenseOfferCreatePollPath.bind(this.paths),
500
+ submitAndPoll: this.submitAndPoll.bind(this),
495
501
  });
496
502
  }
497
503
  async searchOrganizationLicenseOffers(ctx, input) {
@@ -848,10 +854,11 @@ export class HttpRuntimeClient {
848
854
  * configured secure transport adapter signs/encrypts DIDComm when enabled.
849
855
  */
850
856
  async requestProfessionalAccess(ctx, input) {
857
+ this.requireConfiguredTransportProfile(input.transportProfile);
851
858
  return requestProfessionalAccessWithDeps(ctx, input, {
852
859
  individualCommunicationBatchPath: this.paths.individualCommunicationBatchPath.bind(this.paths),
853
860
  individualCommunicationPollPath: this.paths.individualCommunicationPollPath.bind(this.paths),
854
- submitAndPoll: (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, input.transportProfile || this.transportProfile, pollOptions),
861
+ submitAndPoll: this.submitAndPoll.bind(this),
855
862
  });
856
863
  }
857
864
  /**
@@ -895,7 +902,7 @@ export class HttpRuntimeClient {
895
902
  */
896
903
  async submitCommunicationOutboxJobAndPoll(ctx, input) {
897
904
  const job = input.communicationJob;
898
- const profile = input.transportProfile || this.transportProfile;
905
+ const profile = this.requireConfiguredTransportProfile(input.transportProfile);
899
906
  const format = normalizeCommunicationPathFormatSegment(input.clinicalFormat || input.pathFormatSegment);
900
907
  const submitPath = this.paths.individualCommunicationBatchPath(ctx, format);
901
908
  const pollPath = this.paths.individualCommunicationPollPath(ctx, format);
@@ -937,7 +944,13 @@ export class HttpRuntimeClient {
937
944
  const renderedSubmit = await renderGatewayMessageRequest(payload, profile, this.secureTransportAdapter);
938
945
  const submit = await postRenderedWithRuntimeConfig(transportConfig, submitPath, renderedSubmit);
939
946
  const poll = await pollUntilCompleteWithMethod(async (path, request) => {
940
- const renderedPoll = await renderTransportPollRequest(request.thid, profile, this.secureTransportAdapter);
947
+ const renderedPoll = profile === TransportProfiles.DidcommEncryptedForm
948
+ ? await renderGatewayMessageRequest({
949
+ thid: request.thid,
950
+ ...(typeof payload.iss === 'string' ? { iss: payload.iss } : {}),
951
+ ...(typeof payload.aud === 'string' ? { aud: payload.aud } : {}),
952
+ }, profile, this.secureTransportAdapter)
953
+ : await renderTransportPollRequest(request.thid, profile, this.secureTransportAdapter);
941
954
  const response = await postRenderedWithRuntimeConfig(transportConfig, path, renderedPoll);
942
955
  return {
943
956
  status: response.status,
@@ -1005,10 +1018,11 @@ export class HttpRuntimeClient {
1005
1018
  * @param input Search parameters such as subject, section, date and included resource types.
1006
1019
  */
1007
1020
  async searchClinicalBundle(ctx, input) {
1021
+ this.requireConfiguredTransportProfile(input.transportProfile);
1008
1022
  return searchClinicalBundleWithDeps(ctx, input, {
1009
1023
  bundleSearchPath: this.paths.individualBundleSearchPath.bind(this.paths),
1010
1024
  bundleSearchPollPath: this.paths.individualBundleSearchPollPath.bind(this.paths),
1011
- submitAndPoll: (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, input.transportProfile || this.transportProfile, pollOptions),
1025
+ submitAndPoll: this.submitAndPoll.bind(this),
1012
1026
  });
1013
1027
  }
1014
1028
  /** Searches tenant digital twins using coded, pseudonymous research claims. */
@@ -1020,7 +1034,7 @@ export class HttpRuntimeClient {
1020
1034
  digitalTwinCompositionPollPath: this.paths.digitalTwinCompositionPollPath.bind(this.paths),
1021
1035
  digitalTwinCommunicationBatchPath: this.paths.digitalTwinCommunicationBatchPath.bind(this.paths),
1022
1036
  digitalTwinCommunicationPollPath: this.paths.digitalTwinCommunicationPollPath.bind(this.paths),
1023
- submitAndPoll: (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions, input.accessToken),
1037
+ submitAndPoll: (submitPath, pollPath, payload, pollOptions) => this.submitAndPollWithBearerToken(input.accessToken, submitPath, pollPath, payload, pollOptions),
1024
1038
  });
1025
1039
  }
1026
1040
  /** Saves one tagged researcher working copy without mutating the canonical twin. */
@@ -1032,7 +1046,7 @@ export class HttpRuntimeClient {
1032
1046
  digitalTwinCompositionPollPath: this.paths.digitalTwinCompositionPollPath.bind(this.paths),
1033
1047
  digitalTwinCommunicationBatchPath: this.paths.digitalTwinCommunicationBatchPath.bind(this.paths),
1034
1048
  digitalTwinCommunicationPollPath: this.paths.digitalTwinCommunicationPollPath.bind(this.paths),
1035
- submitAndPoll: (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions, input.accessToken),
1049
+ submitAndPoll: (submitPath, pollPath, payload, pollOptions) => this.submitAndPollWithBearerToken(input.accessToken, submitPath, pollPath, payload, pollOptions),
1036
1050
  });
1037
1051
  }
1038
1052
  /** Materializes one selected pseudonymous research subject as a summary Bundle. */
@@ -1044,7 +1058,7 @@ export class HttpRuntimeClient {
1044
1058
  digitalTwinCompositionPollPath: this.paths.digitalTwinCompositionPollPath.bind(this.paths),
1045
1059
  digitalTwinCommunicationBatchPath: this.paths.digitalTwinCommunicationBatchPath.bind(this.paths),
1046
1060
  digitalTwinCommunicationPollPath: this.paths.digitalTwinCommunicationPollPath.bind(this.paths),
1047
- submitAndPoll: (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions, input.accessToken),
1061
+ submitAndPoll: (submitPath, pollPath, payload, pollOptions) => this.submitAndPollWithBearerToken(input.accessToken, submitPath, pollPath, payload, pollOptions),
1048
1062
  });
1049
1063
  }
1050
1064
  /**
@@ -1082,12 +1096,6 @@ export class HttpRuntimeClient {
1082
1096
  buildConsentClaimsWithCid(input) {
1083
1097
  return buildGrantProfessionalAccessClaimsWithCid(input, runtimeUuid);
1084
1098
  }
1085
- async pollBatchResponse(path, request) {
1086
- return pollBatchResponseWithRuntimeConfig(this.transportConfig, path, request);
1087
- }
1088
- async postJson(path, payload, contentType) {
1089
- return postJsonWithRuntimeConfig(this.transportConfig, path, payload, contentType);
1090
- }
1091
1099
  buildHeaders(contentType) {
1092
1100
  return buildRuntimeHeaders(this.transportConfig, contentType);
1093
1101
  }
@@ -18,6 +18,8 @@ import type { RouteContext } from './individual-onboarding.js';
18
18
  * runtime adapts that higher-level intent onto the current host route
19
19
  */
20
20
  export type OrganizationLicenseOrderConfirmInput = Readonly<{
21
+ /** Exact DCR-registered controller DID that signs the protected request. */
22
+ issuerDid: string;
21
23
  offerId: string;
22
24
  hostNetwork?: string;
23
25
  dataType?: string;
@@ -5,6 +5,10 @@ export async function confirmOrganizationLicenseOrderWithDeps(deps) {
5
5
  if (!offerId) {
6
6
  throw new Error('confirmOrganizationLicenseOrder requires offerId.');
7
7
  }
8
+ const issuerDid = String(deps.input.issuerDid || '').trim();
9
+ if (!issuerDid) {
10
+ throw new Error('confirmOrganizationLicenseOrder requires issuerDid.');
11
+ }
8
12
  const claims = {
9
13
  '@context': 'org.schema',
10
14
  'Order.acceptedOffer.identifier': offerId,
@@ -16,7 +20,7 @@ export async function confirmOrganizationLicenseOrderWithDeps(deps) {
16
20
  };
17
21
  const payload = {
18
22
  jti: `jti-${createRuntimeUuid()}`,
19
- iss: deps.routeCtx.tenantId,
23
+ iss: issuerDid,
20
24
  aud: deps.routeCtx.tenantId,
21
25
  type: 'application/didcomm-plain+json',
22
26
  thid: `organization-license-order-${createRuntimeUuid()}`,
@@ -135,6 +135,8 @@ export type IndividualMemberLicenseAddInput = {
135
135
  };
136
136
  /** Requests a host-authored Offer for additional professional employee seats. */
137
137
  export type OrganizationEmployeeLicenseOfferInput = {
138
+ /** Exact DCR-registered controller DID that signs the protected request. */
139
+ issuerDid: string;
138
140
  quantity: number;
139
141
  requestThid?: string;
140
142
  pollOptions?: {
@@ -667,8 +669,8 @@ type IndividualLicenseMutationDeps = {
667
669
  }) => Promise<SubmitAndPollResult>;
668
670
  };
669
671
  type OrganizationLicenseMutationDeps = {
670
- organizationLicenseActionPath: (ctx: RouteContext, action: string) => string;
671
- organizationLicenseActionPollPath: (ctx: RouteContext, action: string) => string;
672
+ organizationLicenseOfferCreatePath: (ctx: RouteContext) => string;
673
+ organizationLicenseOfferCreatePollPath: (ctx: RouteContext) => string;
672
674
  submitAndPoll: IndividualLicenseMutationDeps['submitAndPoll'];
673
675
  };
674
676
  /**
@@ -253,7 +253,14 @@ export async function requestOrganizationEmployeeLicenseOfferWithDeps(routeCtx,
253
253
  userClass: 'employee',
254
254
  type: 'web',
255
255
  });
256
- return deps.submitAndPoll(deps.organizationLicenseActionPath(routeCtx, '_add'), deps.organizationLicenseActionPollPath(routeCtx, '_add'), {
256
+ const issuerDid = String(input.issuerDid || '').trim();
257
+ if (!issuerDid)
258
+ throw new Error('requestOrganizationEmployeeLicenseOffer requires issuerDid.');
259
+ return deps.submitAndPoll(deps.organizationLicenseOfferCreatePath(routeCtx), deps.organizationLicenseOfferCreatePollPath(routeCtx), {
260
+ jti: `jti-${createRuntimeUuid()}`,
261
+ iss: issuerDid,
262
+ aud: routeCtx.tenantId,
263
+ type: 'application/didcomm-plain+json',
257
264
  thid: input.requestThid || `organization-license-offer-${createRuntimeUuid()}`,
258
265
  body: { resourceType: 'Bundle', type: 'batch', data: [entry] },
259
266
  }, input.pollOptions);
@@ -40,6 +40,9 @@ export declare class RuntimeClientPaths {
40
40
  organizationDidBindingPollPath(ctx?: RouteContext): string;
41
41
  organizationLicenseOfferSearchPath(ctx?: RouteContext): string;
42
42
  organizationLicenseOfferSearchPollPath(ctx?: RouteContext): string;
43
+ /** Host-authored professional seat Offer creation; this never mutates License inventory. */
44
+ organizationLicenseOfferCreatePath(ctx?: RouteContext): string;
45
+ organizationLicenseOfferCreatePollPath(ctx?: RouteContext): string;
43
46
  organizationLicenseOrderSearchPath(ctx?: RouteContext): string;
44
47
  organizationLicenseOrderSearchPollPath(ctx?: RouteContext): string;
45
48
  employeePurgePath(ctx?: RouteContext): string;
@@ -54,6 +54,9 @@ export class RuntimeClientPaths {
54
54
  organizationDidBindingPollPath(ctx) { return buildOrganizationDidBindingPollPath(this.requireRouteContext(ctx)); }
55
55
  organizationLicenseOfferSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Offer', '_search'); }
56
56
  organizationLicenseOfferSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Offer', '_search-response'); }
57
+ /** Host-authored professional seat Offer creation; this never mutates License inventory. */
58
+ organizationLicenseOfferCreatePath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Offer', GwCoreLifecycleAction.Create); }
59
+ organizationLicenseOfferCreatePollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Offer', GwCoreLifecycleAction.CreateResponse); }
57
60
  organizationLicenseOrderSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Order', '_search'); }
58
61
  organizationLicenseOrderSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Order', '_search-response'); }
59
62
  employeePurgePath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', GwCoreLifecycleAction.Purge); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-sdk-node-ts",
3
- "version": "2.4.22",
3
+ "version": "2.4.24",
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.",