gdc-sdk-node-ts 2.4.18 → 2.4.23

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.
@@ -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',
@@ -11,7 +11,7 @@ import { type SmartTokenRequestInput } from './smart-token.js';
11
11
  import { type EmployeeDeviceActivationRequestInput, type EmployeeDeviceActivationResult, type EmployeeDeviceRevocationInput } from './device-activation.js';
12
12
  import { type OrganizationLicenseOrderConfirmInput } from './organization-license-order.js';
13
13
  import { type IndividualOrganizationBootstrapInput, type IndividualOrganizationStartResult } from './individual-start.js';
14
- import { type CommunicationIngestionInput, type BlockchainArtifactRegistrationInput, type VitalSignBatchCommunicationFromSearchResponseInput, type CommunicationParticipantRuntimeSearchInput, type ClinicalBundleSearchInput, type ClinicalSectionUpdateInput, type ClinicalSummaryReadResult, type ClinicalSummaryRequestInput, type ClinicalSummaryUpdateInput, type GrantProfessionalAccessInput, type GrantProfessionalAccessResult, type IndividualMemberLifecycleInput, type IndividualMemberLicenseAddInput, type IndividualMemberLicenseInvitationInput, type IndividualMemberLicenseTransitionInput, type LicenseListRuntimeSearchInput, type LicenseOfferRuntimeSearchInput, type LicenseOrderRuntimeSearchInput, type OrganizationEmployeeCreationInput, type OrganizationEmployeeLicenseAddInput, type OrganizationEmployeeLicenseInvitationInput, type OrganizationEmployeeLifecycleInput, type OrganizationEmployeeSearchInput, type ProfessionalAccessRequestInput, type ProfessionalAccessRequestResult, type RevokeProfessionalAccessInput, type RevokeProfessionalAccessResult, type RelatedPersonUpsertInput } from './resource-operations.js';
14
+ import { type CommunicationIngestionInput, type BlockchainArtifactRegistrationInput, type VitalSignBatchCommunicationFromSearchResponseInput, type CommunicationParticipantRuntimeSearchInput, type ClinicalBundleSearchInput, type ClinicalSectionUpdateInput, type ClinicalSummaryReadResult, type ClinicalSummaryRequestInput, type ClinicalSummaryUpdateInput, type GrantProfessionalAccessInput, type GrantProfessionalAccessResult, type IndividualMemberLifecycleInput, type IndividualMemberLicenseAddInput, type IndividualMemberLicenseInvitationInput, type IndividualMemberLicenseTransitionInput, type LicenseListRuntimeSearchInput, type LicenseOfferRuntimeSearchInput, type LicenseOrderRuntimeSearchInput, type OrganizationEmployeeCreationInput, type OrganizationEmployeeLicenseAddInput, type OrganizationEmployeeLicenseOfferInput, type OrganizationEmployeeLicenseInvitationInput, type OrganizationEmployeeLifecycleInput, type OrganizationEmployeeSearchInput, type ProfessionalAccessRequestInput, type ProfessionalAccessRequestResult, type RevokeProfessionalAccessInput, type RevokeProfessionalAccessResult, type RelatedPersonUpsertInput } from './resource-operations.js';
15
15
  import type { LegalOrganizationOrderInput } from './host-onboarding.js';
16
16
  import type { SmartTokenExchangeResult } from './smart-token.js';
17
17
  import { type OrganizationEmployeeProvisioningInput, type OrganizationEmployeeProvisioningResult } from './organization-employee-lifecycle.js';
@@ -299,6 +299,8 @@ export declare class HttpRuntimeClient implements NodeRuntimeClient {
299
299
  listOrganizationLicenses(ctx: RouteContext, input?: LicenseListRuntimeSearchInput): Promise<SubmitAndPollResult>;
300
300
  /** @deprecated Professional seats use Employee Offer and confirmed Order. */
301
301
  addFreeOrganizationEmployeeLicenses(ctx: RouteContext, input: OrganizationEmployeeLicenseAddInput): Promise<SubmitAndPollResult>;
302
+ /** Starts the commercial Offer flow for additional professional seats. */
303
+ requestOrganizationEmployeeLicenseOffer(ctx: RouteContext, input: OrganizationEmployeeLicenseOfferInput): Promise<SubmitAndPollResult>;
302
304
  searchOrganizationLicenseOffers(ctx: RouteContext, input: LicenseOfferRuntimeSearchInput): Promise<SubmitAndPollResult>;
303
305
  listOrganizationLicenseOffers(ctx: RouteContext, input?: LicenseOfferRuntimeSearchInput): Promise<SubmitAndPollResult>;
304
306
  searchOrganizationLicenseOrders(ctx: RouteContext, input: LicenseOrderRuntimeSearchInput): Promise<SubmitAndPollResult>;
@@ -12,7 +12,7 @@ import { activateEmployeeDeviceWithActivationCodeWithDeps, activateEmployeeDevic
12
12
  import { extractOfferIdFromResponseBody, extractOfferPreviewFromResponseBody, } from './order-offer-summary.js';
13
13
  import { confirmOrganizationLicenseOrderWithDeps } from './organization-license-order.js';
14
14
  import { startIndividualOrganizationWithDeps } from './individual-start.js';
15
- 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, } from './resource-operations.js';
15
+ 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
16
  import { listOrganizationEmployeeLifecycleWithDeps, provisionOrganizationEmployeeWithDeps, } from './organization-employee-lifecycle.js';
17
17
  import { submitAndPollWithMethods } from './orchestration/client-port.js';
18
18
  import { buildRuntimeHeaders, fetchWithTimeout, parseResponseBody, pollBatchResponseWithRuntimeConfig, postJsonWithRuntimeConfig, postRenderedWithRuntimeConfig, } from './runtime-transport.js';
@@ -477,8 +477,18 @@ export class HttpRuntimeClient {
477
477
  /** @deprecated Professional seats use Employee Offer and confirmed Order. */
478
478
  async addFreeOrganizationEmployeeLicenses(ctx, input) {
479
479
  return addFreeOrganizationEmployeeLicensesWithDeps(ctx, input, {
480
- organizationLicenseActionPath: this.paths.organizationLicenseActionPath.bind(this.paths),
481
- organizationLicenseActionPollPath: this.paths.organizationLicenseActionPollPath.bind(this.paths),
480
+ organizationLicenseOfferCreatePath: this.paths.organizationLicenseOfferCreatePath.bind(this.paths),
481
+ organizationLicenseOfferCreatePollPath: this.paths.organizationLicenseOfferCreatePollPath.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),
485
+ });
486
+ }
487
+ /** Starts the commercial Offer flow for additional professional seats. */
488
+ async requestOrganizationEmployeeLicenseOffer(ctx, input) {
489
+ return requestOrganizationEmployeeLicenseOfferWithDeps(ctx, input, {
490
+ organizationLicenseOfferCreatePath: this.paths.organizationLicenseOfferCreatePath.bind(this.paths),
491
+ organizationLicenseOfferCreatePollPath: this.paths.organizationLicenseOfferCreatePollPath.bind(this.paths),
482
492
  submitAndPoll: this.transportProfile === TransportProfiles.DidcommEncryptedForm
483
493
  ? (submitPath, pollPath, payload, pollOptions) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, pollOptions)
484
494
  : this.submitAndPoll.bind(this),
@@ -530,7 +540,9 @@ export class HttpRuntimeClient {
530
540
  defaultIntervalMs: pollOptions?.intervalMs,
531
541
  hostRegistryOrderBatchPath: this.paths.hostRegistryOrderBatchPath.bind(this.paths),
532
542
  hostRegistryOrderPollPath: this.paths.hostRegistryOrderPollPath.bind(this.paths),
533
- submitAndPoll: this.submitAndPoll.bind(this),
543
+ submitAndPoll: this.transportProfile === TransportProfiles.DidcommEncryptedForm
544
+ ? (submitPath, pollPath, payload, options) => this.submitClinicalMessageAndPoll(submitPath, pollPath, payload, this.transportProfile, options)
545
+ : this.submitAndPoll.bind(this),
534
546
  });
535
547
  }
536
548
  /**
@@ -927,7 +939,13 @@ export class HttpRuntimeClient {
927
939
  const renderedSubmit = await renderGatewayMessageRequest(payload, profile, this.secureTransportAdapter);
928
940
  const submit = await postRenderedWithRuntimeConfig(transportConfig, submitPath, renderedSubmit);
929
941
  const poll = await pollUntilCompleteWithMethod(async (path, request) => {
930
- const renderedPoll = await renderTransportPollRequest(request.thid, profile, this.secureTransportAdapter);
942
+ const renderedPoll = profile === TransportProfiles.DidcommEncryptedForm
943
+ ? await renderGatewayMessageRequest({
944
+ thid: request.thid,
945
+ ...(typeof payload.iss === 'string' ? { iss: payload.iss } : {}),
946
+ ...(typeof payload.aud === 'string' ? { aud: payload.aud } : {}),
947
+ }, profile, this.secureTransportAdapter)
948
+ : await renderTransportPollRequest(request.thid, profile, this.secureTransportAdapter);
931
949
  const response = await postRenderedWithRuntimeConfig(transportConfig, path, renderedPoll);
932
950
  return {
933
951
  status: response.status,
@@ -18,7 +18,7 @@ import type { EnsureFamilyOrganizationRegistrationInput, EnsureFamilyOrganizatio
18
18
  import type { OrganizationLicenseOrderConfirmInput } from '../organization-license-order.js';
19
19
  import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
20
20
  import type { DigitalTwinMaterializationInput, DigitalTwinSearchInput, DigitalTwinSelectionInput } from '../digital-twin.js';
21
- import type { CommunicationIngestionInput, BlockchainArtifactRegistrationInput, CommunicationParticipantRuntimeSearchInput, ClinicalBundleSearchInput, ClinicalSectionUpdateInput, ClinicalSummaryReadResult, ClinicalSummaryRequestInput, ClinicalSummaryUpdateInput, VitalSignBatchCommunicationFromSearchResponseInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IndividualMemberLifecycleInput, IndividualMemberLicenseAddInput, IndividualMemberLicenseInvitationInput, IndividualMemberLicenseTransitionInput, IpsOrFhirImportInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLicenseAddInput, OrganizationEmployeeLicenseInvitationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput, ProfessionalAccessRequestInput, ProfessionalAccessRequestResult, RevokeProfessionalAccessInput, RevokeProfessionalAccessResult, RelatedPersonUpsertInput } from '../resource-operations.js';
21
+ import type { CommunicationIngestionInput, BlockchainArtifactRegistrationInput, CommunicationParticipantRuntimeSearchInput, ClinicalBundleSearchInput, ClinicalSectionUpdateInput, ClinicalSummaryReadResult, ClinicalSummaryRequestInput, ClinicalSummaryUpdateInput, VitalSignBatchCommunicationFromSearchResponseInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IndividualMemberLifecycleInput, IndividualMemberLicenseAddInput, IndividualMemberLicenseInvitationInput, IndividualMemberLicenseTransitionInput, IpsOrFhirImportInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLicenseAddInput, OrganizationEmployeeLicenseOfferInput, OrganizationEmployeeLicenseInvitationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput, ProfessionalAccessRequestInput, ProfessionalAccessRequestResult, RevokeProfessionalAccessInput, RevokeProfessionalAccessResult, RelatedPersonUpsertInput } from '../resource-operations.js';
22
22
  /**
23
23
  * Shared node-runtime activation input.
24
24
  *
@@ -82,6 +82,7 @@ export type RuntimeClient = {
82
82
  searchOrganizationLicenses?: (ctx: RouteContext, input: LicenseListRuntimeSearchInput) => Promise<SubmitAndPollResult>;
83
83
  listOrganizationLicenses?: (ctx: RouteContext, input?: LicenseListRuntimeSearchInput) => Promise<SubmitAndPollResult>;
84
84
  addFreeOrganizationEmployeeLicenses?: (ctx: RouteContext, input: OrganizationEmployeeLicenseAddInput) => Promise<SubmitAndPollResult>;
85
+ requestOrganizationEmployeeLicenseOffer?: (ctx: RouteContext, input: OrganizationEmployeeLicenseOfferInput) => Promise<SubmitAndPollResult>;
85
86
  searchOrganizationLicenseOffers?: (ctx: RouteContext, input: LicenseOfferRuntimeSearchInput) => Promise<SubmitAndPollResult>;
86
87
  listOrganizationLicenseOffers?: (ctx: RouteContext, input?: LicenseOfferRuntimeSearchInput) => Promise<SubmitAndPollResult>;
87
88
  searchOrganizationLicenseOrders?: (ctx: RouteContext, input: LicenseOrderRuntimeSearchInput) => Promise<SubmitAndPollResult>;
@@ -5,7 +5,7 @@ import type { EmployeeDeviceActivationResult, EmployeeDeviceActivationRequestInp
5
5
  import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
6
6
  import type { OrganizationLicenseOrderConfirmInput } from '../organization-license-order.js';
7
7
  import type { NodeCapability } from '../session.js';
8
- import type { LicenseListRuntimeSearchInput, LicenseOfferRuntimeSearchInput, LicenseOrderRuntimeSearchInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLicenseAddInput, OrganizationEmployeeLicenseInvitationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput } from '../resource-operations.js';
8
+ import type { LicenseListRuntimeSearchInput, LicenseOfferRuntimeSearchInput, LicenseOrderRuntimeSearchInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLicenseAddInput, OrganizationEmployeeLicenseOfferInput, OrganizationEmployeeLicenseInvitationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput } from '../resource-operations.js';
9
9
  import type { OrganizationEmployeeProvisioningInput, OrganizationEmployeeProvisioningResult } from '../organization-employee-lifecycle.js';
10
10
  import type { OrganizationEmployeeLifecycleRecord } from 'gdc-common-utils-ts/models/organization-employee-lifecycle';
11
11
  /**
@@ -85,6 +85,8 @@ export declare class OrganizationControllerSdk {
85
85
  listLicenses(ctx: RouteContext, input?: LicenseListRuntimeSearchInput): Promise<SubmitAndPollResult>;
86
86
  /** @deprecated Professional seats use Employee Offer and confirmed Order. */
87
87
  addFreeEmployeeLicenses(ctx: RouteContext, input: OrganizationEmployeeLicenseAddInput): Promise<SubmitAndPollResult>;
88
+ /** Requests an Offer for additional employee seats before invitations. */
89
+ requestEmployeeLicenseOffer(ctx: RouteContext, input: OrganizationEmployeeLicenseOfferInput): Promise<SubmitAndPollResult>;
88
90
  /**
89
91
  * Searches commercial license offers known for the current organization.
90
92
  */
@@ -115,6 +115,10 @@ export class OrganizationControllerSdk {
115
115
  addFreeEmployeeLicenses(ctx, input) {
116
116
  return requireClientMethod(this.client, 'addFreeOrganizationEmployeeLicenses')(ctx, input);
117
117
  }
118
+ /** Requests an Offer for additional employee seats before invitations. */
119
+ requestEmployeeLicenseOffer(ctx, input) {
120
+ return requireClientMethod(this.client, 'requestOrganizationEmployeeLicenseOffer')(ctx, input);
121
+ }
118
122
  /**
119
123
  * Searches commercial license offers known for the current organization.
120
124
  */
@@ -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()}`,
@@ -133,8 +133,10 @@ export type IndividualMemberLicenseAddInput = {
133
133
  intervalMs?: number;
134
134
  };
135
135
  };
136
- /** Adds zero-cost employee seats on an explicitly configured test network. */
137
- export type OrganizationEmployeeLicenseAddInput = {
136
+ /** Requests a host-authored Offer for additional professional employee seats. */
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?: {
@@ -142,6 +144,8 @@ export type OrganizationEmployeeLicenseAddInput = {
142
144
  intervalMs?: number;
143
145
  };
144
146
  };
147
+ /** @deprecated Use `OrganizationEmployeeLicenseOfferInput`. */
148
+ export type OrganizationEmployeeLicenseAddInput = OrganizationEmployeeLicenseOfferInput;
145
149
  /** Input shared by invitation acceptance, deactivation and release. */
146
150
  export type IndividualMemberLicenseTransitionInput = {
147
151
  /** Required for controller deactivation/release; acceptance resolves by code. */
@@ -665,12 +669,17 @@ type IndividualLicenseMutationDeps = {
665
669
  }) => Promise<SubmitAndPollResult>;
666
670
  };
667
671
  type OrganizationLicenseMutationDeps = {
668
- organizationLicenseActionPath: (ctx: RouteContext, action: string) => string;
669
- organizationLicenseActionPollPath: (ctx: RouteContext, action: string) => string;
672
+ organizationLicenseOfferCreatePath: (ctx: RouteContext) => string;
673
+ organizationLicenseOfferCreatePollPath: (ctx: RouteContext) => string;
670
674
  submitAndPoll: IndividualLicenseMutationDeps['submitAndPoll'];
671
675
  };
672
- /** @deprecated Professional seats always use Employee Offer and confirmed Order. */
673
- export declare function addFreeOrganizationEmployeeLicensesWithDeps(_routeCtx: RouteContext, _input: OrganizationEmployeeLicenseAddInput, _deps: OrganizationLicenseMutationDeps): Promise<SubmitAndPollResult>;
676
+ /**
677
+ * Requests a professional-seat Offer without creating or assigning seats.
678
+ * The returned Offer must be accepted through the existing paid Order flow.
679
+ */
680
+ export declare function requestOrganizationEmployeeLicenseOfferWithDeps(routeCtx: RouteContext, input: OrganizationEmployeeLicenseOfferInput, deps: OrganizationLicenseMutationDeps): Promise<SubmitAndPollResult>;
681
+ /** @deprecated Use `requestOrganizationEmployeeLicenseOfferWithDeps`. */
682
+ export declare function addFreeOrganizationEmployeeLicensesWithDeps(routeCtx: RouteContext, input: OrganizationEmployeeLicenseAddInput, deps: OrganizationLicenseMutationDeps): Promise<SubmitAndPollResult>;
674
683
  /**
675
684
  * Reserves one available household/member seat for a selected contact.
676
685
  *
@@ -243,9 +243,31 @@ export async function searchIndividualLicensesWithDeps(routeCtx, input, deps) {
243
243
  export async function listIndividualLicensesWithDeps(routeCtx, input, deps) {
244
244
  return searchIndividualLicensesWithDeps(routeCtx, input || {}, deps);
245
245
  }
246
- /** @deprecated Professional seats always use Employee Offer and confirmed Order. */
247
- export async function addFreeOrganizationEmployeeLicensesWithDeps(_routeCtx, _input, _deps) {
248
- throw new Error('Professional seats require Employee Offer and Order payment verification; License/_add is not supported.');
246
+ /**
247
+ * Requests a professional-seat Offer without creating or assigning seats.
248
+ * The returned Offer must be accepted through the existing paid Order flow.
249
+ */
250
+ export async function requestOrganizationEmployeeLicenseOfferWithDeps(routeCtx, input, deps) {
251
+ const entry = buildLicensePurchaseEntry({
252
+ quantity: input.quantity,
253
+ userClass: 'employee',
254
+ type: 'web',
255
+ });
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',
264
+ thid: input.requestThid || `organization-license-offer-${createRuntimeUuid()}`,
265
+ body: { resourceType: 'Bundle', type: 'batch', data: [entry] },
266
+ }, input.pollOptions);
267
+ }
268
+ /** @deprecated Use `requestOrganizationEmployeeLicenseOfferWithDeps`. */
269
+ export async function addFreeOrganizationEmployeeLicensesWithDeps(routeCtx, input, deps) {
270
+ return requestOrganizationEmployeeLicenseOfferWithDeps(routeCtx, input, deps);
249
271
  }
250
272
  /**
251
273
  * Reserves one available household/member seat for a selected contact.
@@ -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); }
@@ -1,6 +1,7 @@
1
1
  // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
2
  import { randomBytes } from 'node:crypto';
3
3
  import { IdentityDcrMetadataFields, IdentityDeviceInfoFields } from 'gdc-common-utils-ts/constants/identity-auth';
4
+ import { ActorKinds } from 'gdc-common-utils-ts/constants/actor-session';
4
5
  import { TransportProfiles, } from 'gdc-sdk-core-ts';
5
6
  import { NodeManagedWallet } from './node-managed-wallet.js';
6
7
  import { NodeHttpClient } from './node-runtime-client.js';
@@ -182,6 +183,7 @@ export class ServerProfileSessionManager {
182
183
  clientAssertion: assertion,
183
184
  clientAssertionType: 'private_key_jwt',
184
185
  smartTokenKind: 'openid-smart',
186
+ acrValues: profileSmartAcrValues(profile.actorKind),
185
187
  scopes: unique(input.scopes),
186
188
  tokenCacheKey: `profile:${profile.profileId}:${input.subjectDid}:${unique(input.scopes).join(',')}`,
187
189
  });
@@ -222,7 +224,7 @@ export class ServerProfileSessionManager {
222
224
  scopes: session.scopes,
223
225
  accessToken: await this.options.sealer.unseal(session.sealedAccessToken, `${sessionId}:access-token`),
224
226
  secureTransportAdapter: {
225
- pack: (message) => wallet.packForRecipientWithContext(message, profile.providerDid, { context }),
227
+ pack: (message) => wallet.packForRecipientWithContext(bindTransportActor(message, profile.actorDid, profile.clientId), profile.providerDid, { context }),
226
228
  unpack: async (jwe) => (await wallet.unpackWithContext(jwe, { context })).content,
227
229
  },
228
230
  confidentialStorageAdapter: {
@@ -303,6 +305,21 @@ export class ServerProfileSessionManager {
303
305
  }
304
306
  now() { return this.options.now?.() || new Date(); }
305
307
  }
308
+ /**
309
+ * Binds every direct resource action and async poll to the actor and DCR client
310
+ * stored in the server profile. The caller may author the business body and
311
+ * thread id, but cannot replace either verification identity.
312
+ */
313
+ function bindTransportActor(message, actorDid, clientId) {
314
+ return { ...message, iss: actorDid, client_id: clientId };
315
+ }
316
+ /** Keeps the OpenID proof class aligned with the durable actor profile. */
317
+ function profileSmartAcrValues(actorKind) {
318
+ return actorKind === ActorKinds.IndividualController
319
+ || actorKind === ActorKinds.IndividualMember
320
+ ? 'urn:antifraud:acr:openid4vp:individual'
321
+ : 'urn:antifraud:acr:openid4vp:employee';
322
+ }
306
323
  async function buildWalletClientAssertion(wallet, profile, audience, now) {
307
324
  const seconds = Math.floor(now.getTime() / 1000);
308
325
  return wallet.signCompactJws(walletContext(profile.walletKeyDerivationId || profile.profileId), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-sdk-node-ts",
3
- "version": "2.4.18",
3
+ "version": "2.4.23",
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.",