gdc-sdk-node-ts 2.1.1 → 2.1.4

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.
@@ -1,7 +1,7 @@
1
1
  import type { ControllerBindingInput } from 'gdc-common-utils-ts/models';
2
2
  import type { FamilyOrganizationSummary } from 'gdc-common-utils-ts/utils/family-organization-summary';
3
3
  import type { LegalOrganizationVerificationTransactionInput } from 'gdc-common-utils-ts/utils/legal-organization-verification-transaction';
4
- import type { OrganizationDidBindingInput } from 'gdc-sdk-core-ts';
4
+ import type { IndividualOrganizationLifecycleInput, OrganizationDidBindingInput } from 'gdc-sdk-core-ts';
5
5
  import type { LicenseListRuntimeSearchInput, LicenseOfferRuntimeSearchInput, LicenseOrderRuntimeSearchInput } from '../resource-operations.js';
6
6
  import type { AsyncPollRequest, OrganizationActivationServiceOptions, PollOptions, PollResult, SubmitAndPollResult, SubmitPayload, SubmitResponse } from 'gdc-sdk-core-ts';
7
7
  export type { AsyncPollRequest, PollOptions, PollResult, SubmitAndPollResult, SubmitPayload, SubmitResponse, } from 'gdc-sdk-core-ts';
@@ -13,7 +13,7 @@ import type { FamilyOrganizationSearchInput } from '../family-organization-searc
13
13
  import type { EnsureFamilyOrganizationRegistrationInput, EnsureFamilyOrganizationRegistrationResult } from '../family-organization-registration.js';
14
14
  import type { OrganizationLicenseOrderConfirmInput } from '../organization-license-order.js';
15
15
  import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
16
- import type { CommunicationIngestionInput, CommunicationParticipantRuntimeSearchInput, ClinicalBundleSearchInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IndividualMemberLifecycleInput, IndividualOrganizationLifecycleInput, IpsOrFhirImportInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput, RevokeProfessionalAccessInput, RevokeProfessionalAccessResult, RelatedPersonUpsertInput } from '../resource-operations.js';
16
+ import type { CommunicationIngestionInput, CommunicationParticipantRuntimeSearchInput, ClinicalBundleSearchInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IndividualMemberLifecycleInput, IpsOrFhirImportInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput, RevokeProfessionalAccessInput, RevokeProfessionalAccessResult, RelatedPersonUpsertInput } from '../resource-operations.js';
17
17
  /**
18
18
  * Shared node-runtime activation input.
19
19
  *
@@ -5,7 +5,8 @@ import type { FamilyOrganizationSearchInput } from '../family-organization-searc
5
5
  import type { IndividualOrganizationConfirmOrderInput, RouteContext } from '../individual-onboarding.js';
6
6
  import type { IndividualOrganizationBootstrapInput, IndividualOrganizationStartResult } from '../individual-start.js';
7
7
  import type { NodeCapability } from '../session.js';
8
- import type { ClinicalBundleSearchInput, CommunicationIngestionInput, CommunicationParticipantRuntimeSearchInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IndividualMemberLifecycleInput, IndividualOrganizationLifecycleInput, IpsOrFhirImportInput, LicenseListRuntimeSearchInput, LicenseOfferRuntimeSearchInput, LicenseOrderRuntimeSearchInput, RevokeProfessionalAccessInput, RevokeProfessionalAccessResult, RelatedPersonUpsertInput } from '../resource-operations.js';
8
+ import type { IndividualOrganizationLifecycleInput } from 'gdc-sdk-core-ts';
9
+ import type { ClinicalBundleSearchInput, CommunicationIngestionInput, CommunicationParticipantRuntimeSearchInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IndividualMemberLifecycleInput, IpsOrFhirImportInput, LicenseListRuntimeSearchInput, LicenseOfferRuntimeSearchInput, LicenseOrderRuntimeSearchInput, RevokeProfessionalAccessInput, RevokeProfessionalAccessResult, RelatedPersonUpsertInput } from '../resource-operations.js';
9
10
  import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
10
11
  /**
11
12
  * Individual-controller oriented facade over a `NodeRuntimeClient`.
@@ -55,17 +56,13 @@ export declare class IndividualControllerSdk {
55
56
  */
56
57
  purgeIndividual(ctx: RouteContext, input: IndividualOrganizationLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
57
58
  /**
58
- * Controller-only placeholder for a future individual-member lifecycle flow.
59
- *
60
- * Current GW CORE still lacks the stable member disable route. The runtime
61
- * client currently throws a not-supported error by design.
59
+ * Soft-disables one individual-member / caregiver relationship through the
60
+ * current `RelatedPerson/_batch` lifecycle contract.
62
61
  */
63
62
  disableIndividualMember(ctx: RouteContext, input: IndividualMemberLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
64
63
  /**
65
- * Controller-only placeholder for a future individual-member lifecycle flow.
66
- *
67
- * Current GW CORE still lacks the stable member purge route. The runtime
68
- * client currently throws a not-supported error by design.
64
+ * Purges one previously disabled individual-member / caregiver relationship
65
+ * through the explicit `RelatedPerson/_purge` lifecycle contract.
69
66
  */
70
67
  purgeIndividualMember(ctx: RouteContext, input: IndividualMemberLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
71
68
  /**
@@ -73,20 +73,16 @@ export class IndividualControllerSdk {
73
73
  return requireClientMethod(this.client, 'purgeIndividual')(ctx, input, pollOptions);
74
74
  }
75
75
  /**
76
- * Controller-only placeholder for a future individual-member lifecycle flow.
77
- *
78
- * Current GW CORE still lacks the stable member disable route. The runtime
79
- * client currently throws a not-supported error by design.
76
+ * Soft-disables one individual-member / caregiver relationship through the
77
+ * current `RelatedPerson/_batch` lifecycle contract.
80
78
  */
81
79
  disableIndividualMember(ctx, input, pollOptions) {
82
80
  assertFacadeCapability(this.capabilities, ActorCapabilities.IndividualMemberDisable, ActorKinds.IndividualController, 'disableIndividualMember');
83
81
  return requireClientMethod(this.client, 'disableIndividualMember')(ctx, input, pollOptions);
84
82
  }
85
83
  /**
86
- * Controller-only placeholder for a future individual-member lifecycle flow.
87
- *
88
- * Current GW CORE still lacks the stable member purge route. The runtime
89
- * client currently throws a not-supported error by design.
84
+ * Purges one previously disabled individual-member / caregiver relationship
85
+ * through the explicit `RelatedPerson/_purge` lifecycle contract.
90
86
  */
91
87
  purgeIndividualMember(ctx, input, pollOptions) {
92
88
  assertFacadeCapability(this.capabilities, ActorCapabilities.IndividualMemberPurge, ActorKinds.IndividualController, 'purgeIndividualMember');
@@ -1,3 +1,4 @@
1
+ import { type ProfessionalEmployeeCredentialInput, type ProfessionalSmartVpPayloadInput } from 'gdc-common-utils-ts';
1
2
  import { type NodeRuntimeClient, type PollOptions, type SubmitAndPollResult, type SubmitPayload } from './client-port.js';
2
3
  import type { RouteContext } from '../individual-onboarding.js';
3
4
  import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
@@ -29,6 +30,30 @@ export declare class ProfessionalSdk {
29
30
  * `NodeHttpClient({ ctx })` instead of being repeated on every call.
30
31
  */
31
32
  requestSmartToken(input: SmartTokenRequestInput): Promise<SmartTokenExchangeResult>;
33
+ /**
34
+ * Returns the normalized public continuity aliases that would be embedded in
35
+ * the professional identity VC for SMART/OpenID4VP flows.
36
+ */
37
+ getIdentitySameAs(input: ProfessionalEmployeeCredentialInput): string[];
38
+ /**
39
+ * Builds the canonical professional identity VC used by the shared SMART VP
40
+ * helpers.
41
+ */
42
+ getIdentityVC(input: ProfessionalEmployeeCredentialInput): Record<string, unknown>;
43
+ /**
44
+ * Builds the canonical professional identity VP payload used by the shared
45
+ * SMART/OpenID4VP helpers.
46
+ */
47
+ buildIdentityVpPayload(input: ProfessionalSmartVpPayloadInput): Record<string, unknown>;
48
+ /**
49
+ * Builds one unsigned compact VP JWT for the canonical professional
50
+ * identity payload.
51
+ */
52
+ buildUnsignedIdentityVpJwt(input: ProfessionalSmartVpPayloadInput, options?: Readonly<{
53
+ nowSeconds?: number;
54
+ ttlSeconds?: number;
55
+ nonce?: string;
56
+ }>): string;
32
57
  /**
33
58
  * Executes one clinical `Bundle/_search` using the professional actor
34
59
  * session and tenant route context.
@@ -1,5 +1,6 @@
1
1
  // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
2
  // Always create JSDoc, do not use strings inline in keys nor values, use types instead, and reuse the data test examples.
3
+ import { buildProfessionalIdentityVpPayload, buildUnsignedProfessionalIdentityVpJwt, getProfessionalIdentitySameAs, getProfessionalIdentityVC, } from 'gdc-common-utils-ts';
3
4
  import { requireClientMethod, submitAndPollWithClient, } from './client-port.js';
4
5
  /**
5
6
  * Professional-oriented facade for runtime actions that belong to the
@@ -31,6 +32,34 @@ export class ProfessionalSdk {
31
32
  requestSmartToken(input) {
32
33
  return requireClientMethod(this.client, 'requestSmartToken')(input);
33
34
  }
35
+ /**
36
+ * Returns the normalized public continuity aliases that would be embedded in
37
+ * the professional identity VC for SMART/OpenID4VP flows.
38
+ */
39
+ getIdentitySameAs(input) {
40
+ return getProfessionalIdentitySameAs(input);
41
+ }
42
+ /**
43
+ * Builds the canonical professional identity VC used by the shared SMART VP
44
+ * helpers.
45
+ */
46
+ getIdentityVC(input) {
47
+ return getProfessionalIdentityVC(input);
48
+ }
49
+ /**
50
+ * Builds the canonical professional identity VP payload used by the shared
51
+ * SMART/OpenID4VP helpers.
52
+ */
53
+ buildIdentityVpPayload(input) {
54
+ return buildProfessionalIdentityVpPayload(input);
55
+ }
56
+ /**
57
+ * Builds one unsigned compact VP JWT for the canonical professional
58
+ * identity payload.
59
+ */
60
+ buildUnsignedIdentityVpJwt(input, options = {}) {
61
+ return buildUnsignedProfessionalIdentityVpJwt(input, options);
62
+ }
34
63
  /**
35
64
  * Executes one clinical `Bundle/_search` using the professional actor
36
65
  * session and tenant route context.
@@ -1,7 +1,6 @@
1
- import { IndividualOrganizationLifecycleEditor } from 'gdc-common-utils-ts';
2
1
  import type { LicenseOfferSearchState, LicenseOrderSearchState } from 'gdc-common-utils-ts/utils/license-commercial-search';
3
2
  import type { LicenseListSearchState } from 'gdc-common-utils-ts/utils/license-list-search';
4
- import type { BundleSearchQuery, CommunicationInput, DateRange, EmployeeSearchValue } from 'gdc-sdk-core-ts';
3
+ import type { BundleSearchQuery, CommunicationInput, DateRange, EmployeeSearchValue, IndividualOrganizationLifecycleInput } from 'gdc-sdk-core-ts';
5
4
  import type { SubmitAndPollResult } from './orchestration/client-port.js';
6
5
  import type { RouteContext } from './individual-onboarding.js';
7
6
  export type OrganizationEmployeeCreationInput = {
@@ -116,34 +115,18 @@ export type LicenseOrderRuntimeSearchInput = {
116
115
  * - disable is `individual/org.schema/Organization/_disable`
117
116
  * - purge is `individual/org.schema/Organization/_purge`
118
117
  */
119
- export type IndividualOrganizationLifecycleInput = {
120
- /**
121
- * Canonical claims used by GW CORE to locate the hosted individual/family
122
- * registration.
123
- */
124
- organizationClaims?: Record<string, unknown>;
125
- /**
126
- * Preferred high-level shared editor for lifecycle callers that want to
127
- * avoid assembling raw claims inline.
128
- */
129
- organizationEditor?: IndividualOrganizationLifecycleEditor;
130
- /**
131
- * Optional canonical resource id when already known by the caller.
132
- */
133
- resourceId?: string;
134
- dataType?: string;
135
- };
136
118
  /**
137
- * Forward-looking locator payload for a future individual-member lifecycle contract.
119
+ * Current locator payload for individual-member / caregiver lifecycle
120
+ * operations backed by `RelatedPerson`.
138
121
  *
139
- * Current GW CORE does not yet expose a stable lifecycle contract for
140
- * `RelatedPerson` / individual-member records. The Node SDK keeps this type so
141
- * controller-only methods and TDD can be prepared without fabricating backend behavior.
122
+ * Current runtime behavior:
123
+ * - disable uses `RelatedPerson/_batch` with identifier-first lifecycle
124
+ * resource semantics
125
+ * - purge uses explicit `RelatedPerson/_purge`
142
126
  */
143
127
  export type IndividualMemberLifecycleInput = {
144
128
  /**
145
- * Canonical claims expected to locate the member/caregiver relationship once
146
- * GW CORE exposes the lifecycle contract.
129
+ * Canonical claims used to locate the member/caregiver relationship.
147
130
  */
148
131
  memberClaims: Record<string, unknown>;
149
132
  resourceId?: string;
@@ -125,6 +125,7 @@ export async function disableIndividualOrganizationWithDeps(routeCtx, input, opt
125
125
  routeCtx,
126
126
  requestType: input.dataType || GwCoreLifecycleRequestType.IndividualOrganizationDisable,
127
127
  organizationClaims: input.organizationClaims,
128
+ individualEditor: input.individualEditor,
128
129
  organizationEditor: input.organizationEditor,
129
130
  resourceId: input.resourceId,
130
131
  thidPrefix: 'individual-organization-disable',
@@ -136,6 +137,7 @@ export async function purgeIndividualOrganizationWithDeps(routeCtx, input, optio
136
137
  routeCtx,
137
138
  requestType: input.dataType || GwCoreLifecycleRequestType.IndividualOrganizationPurge,
138
139
  organizationClaims: input.organizationClaims,
140
+ individualEditor: input.individualEditor,
139
141
  organizationEditor: input.organizationEditor,
140
142
  resourceId: input.resourceId,
141
143
  thidPrefix: 'individual-organization-purge',
@@ -438,8 +440,9 @@ function buildEmployeeLifecyclePayload(input) {
438
440
  };
439
441
  }
440
442
  function buildIndividualOrganizationLifecyclePayload(input) {
441
- const payload = input.organizationEditor
442
- ? new IndividualOrganizationLifecycleEditor(input.organizationEditor.getState())
443
+ const editor = input.individualEditor || input.organizationEditor;
444
+ const payload = editor
445
+ ? new IndividualOrganizationLifecycleEditor(editor.getState())
443
446
  : new IndividualOrganizationLifecycleEditor().setClaims(input.organizationClaims || {});
444
447
  payload
445
448
  .setRequestType(input.requestType)
@@ -0,0 +1,79 @@
1
+ import type { HostRouteContext } from './host-onboarding.js';
2
+ import type { RouteContext } from './individual-onboarding.js';
3
+ export declare class RuntimeClientPaths {
4
+ private readonly defaultCtx?;
5
+ private readonly warningState;
6
+ constructor(defaultCtx?: RouteContext);
7
+ requireRouteContext(ctx?: RouteContext): RouteContext;
8
+ routeCtxFromInput(input: {
9
+ serviceProviderDid?: string;
10
+ tenantId?: string;
11
+ jurisdiction?: string;
12
+ sector?: string;
13
+ }): RouteContext;
14
+ requireHostRouteContext(ctx?: HostRouteContext): HostRouteContext;
15
+ v1Path(ctx: RouteContext | undefined, section: string, format: string, resourceType: string, action: string): string;
16
+ hostRegistryPath(ctx: HostRouteContext | undefined, resourceType: string, action: string): string;
17
+ hostRegistryOrganizationTransactionPath(ctx?: HostRouteContext): string;
18
+ hostRegistryOrganizationTransactionPollPath(ctx?: HostRouteContext): string;
19
+ hostRegistryOrganizationIssuePath(ctx?: HostRouteContext): string;
20
+ hostRegistryOrganizationIssuePollPath(ctx?: HostRouteContext): string;
21
+ hostRegistryOrganizationActivatePath(ctx?: HostRouteContext): string;
22
+ hostRegistryOrganizationActivatePollPath(ctx?: HostRouteContext): string;
23
+ hostRegistryOrganizationDisablePath(ctx?: HostRouteContext): string;
24
+ hostRegistryOrganizationDisablePollPath(ctx?: HostRouteContext): string;
25
+ hostRegistryOrganizationPurgePath(ctx?: HostRouteContext): string;
26
+ hostRegistryOrganizationPurgePollPath(ctx?: HostRouteContext): string;
27
+ hostRegistryOrderBatchPath(ctx?: HostRouteContext): string;
28
+ hostRegistryOrderPollPath(ctx?: HostRouteContext): string;
29
+ employeeBatchPath(ctx?: RouteContext): string;
30
+ employeePollPath(ctx?: RouteContext): string;
31
+ employeeSearchPath(ctx?: RouteContext): string;
32
+ employeeSearchPollPath(ctx?: RouteContext): string;
33
+ organizationLicenseSearchPath(ctx?: RouteContext): string;
34
+ organizationLicenseSearchPollPath(ctx?: RouteContext): string;
35
+ organizationDidBindingPath(ctx?: RouteContext): string;
36
+ organizationDidBindingPollPath(ctx?: RouteContext): string;
37
+ organizationLicenseOfferSearchPath(ctx?: RouteContext): string;
38
+ organizationLicenseOfferSearchPollPath(ctx?: RouteContext): string;
39
+ organizationLicenseOrderSearchPath(ctx?: RouteContext): string;
40
+ organizationLicenseOrderSearchPollPath(ctx?: RouteContext): string;
41
+ employeePurgePath(ctx?: RouteContext): string;
42
+ employeePurgePollPath(ctx?: RouteContext): string;
43
+ individualFamilyOrganizationBatchPath(ctx?: RouteContext): string;
44
+ individualFamilyOrganizationPollPath(ctx?: RouteContext): string;
45
+ individualFamilyOrganizationSearchPath(ctx?: RouteContext): string;
46
+ individualFamilyOrganizationSearchPollPath(ctx?: RouteContext): string;
47
+ individualFamilyOrganizationTransactionPath(ctx?: RouteContext): string;
48
+ individualFamilyOrganizationTransactionPollPath(ctx?: RouteContext): string;
49
+ individualFamilyOrganizationDisablePath(ctx?: RouteContext): string;
50
+ individualFamilyOrganizationDisablePollPath(ctx?: RouteContext): string;
51
+ individualFamilyOrganizationPurgePath(ctx?: RouteContext): string;
52
+ individualFamilyOrganizationPurgePollPath(ctx?: RouteContext): string;
53
+ individualLicenseSearchPath(ctx?: RouteContext): string;
54
+ individualLicenseSearchPollPath(ctx?: RouteContext): string;
55
+ individualLicenseOfferSearchPath(ctx?: RouteContext): string;
56
+ individualLicenseOfferSearchPollPath(ctx?: RouteContext): string;
57
+ individualLicenseOrderSearchPath(ctx?: RouteContext): string;
58
+ individualLicenseOrderSearchPollPath(ctx?: RouteContext): string;
59
+ individualFamilyOrderBatchPath(ctx?: RouteContext): string;
60
+ individualFamilyOrderPollPath(ctx?: RouteContext): string;
61
+ individualRelatedPersonBatchPath(ctx?: RouteContext): string;
62
+ individualRelatedPersonPollPath(ctx?: RouteContext): string;
63
+ individualRelatedPersonPurgePath(ctx?: RouteContext): string;
64
+ individualRelatedPersonPurgePollPath(ctx?: RouteContext): string;
65
+ individualConsentR4BatchPath(ctx: RouteContext): string;
66
+ individualConsentR4PollPath(ctx: RouteContext): string;
67
+ individualCommunicationBatchPath(ctx: RouteContext, format: 'org.hl7.fhir.api' | 'org.hl7.fhir.r4'): string;
68
+ individualCommunicationPollPath(ctx: RouteContext, format: 'org.hl7.fhir.api' | 'org.hl7.fhir.r4'): string;
69
+ individualCommunicationSearchPath(ctx: RouteContext): string;
70
+ individualCommunicationSearchPollPath(ctx: RouteContext): string;
71
+ individualBundleSearchPath(ctx: RouteContext): string;
72
+ individualBundleSearchPollPath(ctx: RouteContext): string;
73
+ identityTokenExchangePath(ctx: RouteContext): string;
74
+ identityTokenExchangePollPath(ctx: RouteContext): string;
75
+ identityDeviceDcrPath(ctx: RouteContext): string;
76
+ identityDeviceDcrPollPath(ctx: RouteContext): string;
77
+ identityOpenIdSmartTokenPath(ctx: RouteContext): string;
78
+ identityOpenIdSmartTokenPollPath(ctx: RouteContext): string;
79
+ }
@@ -0,0 +1,93 @@
1
+ // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
+ import { GwCoreLifecycleAction } from './constants/lifecycle.js';
3
+ import { buildHostRegistryPath, buildIdentityDeviceDcrPath, buildIdentityDeviceDcrPollPath, buildIdentityOpenIdSmartTokenPath, buildIdentityOpenIdSmartTokenPollPath, buildIdentityTokenExchangePath, buildIdentityTokenExchangePollPath, buildOrganizationDidBindingPath, buildOrganizationDidBindingPollPath, buildV1Path, } from './runtime-paths.js';
4
+ import { requireHostRouteContext, requireRouteContext, routeCtxFromInput, } from './runtime-route-context.js';
5
+ export class RuntimeClientPaths {
6
+ constructor(defaultCtx) {
7
+ this.warningState = {
8
+ warnedDefaultHostNetwork: false,
9
+ };
10
+ this.defaultCtx = defaultCtx;
11
+ }
12
+ requireRouteContext(ctx) {
13
+ return requireRouteContext(ctx, this.defaultCtx);
14
+ }
15
+ routeCtxFromInput(input) {
16
+ return routeCtxFromInput(input, this.defaultCtx);
17
+ }
18
+ requireHostRouteContext(ctx) {
19
+ return requireHostRouteContext(ctx, {
20
+ defaultJurisdiction: this.defaultCtx?.jurisdiction,
21
+ warningState: this.warningState,
22
+ warn: (message) => console.warn(message),
23
+ });
24
+ }
25
+ v1Path(ctx, section, format, resourceType, action) {
26
+ return buildV1Path(this.requireRouteContext(ctx), section, format, resourceType, action);
27
+ }
28
+ hostRegistryPath(ctx, resourceType, action) {
29
+ return buildHostRegistryPath(this.requireHostRouteContext(ctx), resourceType, action);
30
+ }
31
+ hostRegistryOrganizationTransactionPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.Transaction); }
32
+ hostRegistryOrganizationTransactionPollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.TransactionResponse); }
33
+ hostRegistryOrganizationIssuePath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.Issue); }
34
+ hostRegistryOrganizationIssuePollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.IssueResponse); }
35
+ hostRegistryOrganizationActivatePath(ctx) { return this.hostRegistryPath(ctx, 'Organization', '_activate'); }
36
+ hostRegistryOrganizationActivatePollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', '_activate-response'); }
37
+ hostRegistryOrganizationDisablePath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.Disable); }
38
+ hostRegistryOrganizationDisablePollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', `${GwCoreLifecycleAction.Disable}-response`); }
39
+ hostRegistryOrganizationPurgePath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.Purge); }
40
+ hostRegistryOrganizationPurgePollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', `${GwCoreLifecycleAction.Purge}-response`); }
41
+ hostRegistryOrderBatchPath(ctx) { return this.hostRegistryPath(ctx, 'Order', '_batch'); }
42
+ hostRegistryOrderPollPath(ctx) { return this.hostRegistryPath(ctx, 'Order', '_batch-response'); }
43
+ employeeBatchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', GwCoreLifecycleAction.Batch); }
44
+ employeePollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', GwCoreLifecycleAction.BatchResponse); }
45
+ employeeSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', '_search'); }
46
+ employeeSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', '_search-response'); }
47
+ organizationLicenseSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'License', '_search'); }
48
+ organizationLicenseSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'License', '_search-response'); }
49
+ organizationDidBindingPath(ctx) { return buildOrganizationDidBindingPath(this.requireRouteContext(ctx)); }
50
+ organizationDidBindingPollPath(ctx) { return buildOrganizationDidBindingPollPath(this.requireRouteContext(ctx)); }
51
+ organizationLicenseOfferSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Offer', '_search'); }
52
+ organizationLicenseOfferSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Offer', '_search-response'); }
53
+ organizationLicenseOrderSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Order', '_search'); }
54
+ organizationLicenseOrderSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Order', '_search-response'); }
55
+ employeePurgePath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', GwCoreLifecycleAction.Purge); }
56
+ employeePurgePollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', `${GwCoreLifecycleAction.Purge}-response`); }
57
+ individualFamilyOrganizationBatchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.Batch); }
58
+ individualFamilyOrganizationPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.BatchResponse); }
59
+ individualFamilyOrganizationSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', '_search'); }
60
+ individualFamilyOrganizationSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', '_search-response'); }
61
+ individualFamilyOrganizationTransactionPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.Transaction); }
62
+ individualFamilyOrganizationTransactionPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.TransactionResponse); }
63
+ individualFamilyOrganizationDisablePath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.Disable); }
64
+ individualFamilyOrganizationDisablePollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', `${GwCoreLifecycleAction.Disable}-response`); }
65
+ individualFamilyOrganizationPurgePath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.Purge); }
66
+ individualFamilyOrganizationPurgePollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', `${GwCoreLifecycleAction.Purge}-response`); }
67
+ individualLicenseSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'License', '_search'); }
68
+ individualLicenseSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'License', '_search-response'); }
69
+ individualLicenseOfferSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Offer', '_search'); }
70
+ individualLicenseOfferSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Offer', '_search-response'); }
71
+ individualLicenseOrderSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Order', '_search'); }
72
+ individualLicenseOrderSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Order', '_search-response'); }
73
+ individualFamilyOrderBatchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Order', '_batch'); }
74
+ individualFamilyOrderPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Order', '_batch-response'); }
75
+ individualRelatedPersonBatchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'RelatedPerson', '_batch'); }
76
+ individualRelatedPersonPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'RelatedPerson', '_batch-response'); }
77
+ individualRelatedPersonPurgePath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'RelatedPerson', '_purge'); }
78
+ individualRelatedPersonPurgePollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'RelatedPerson', '_purge-response'); }
79
+ individualConsentR4BatchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Consent', '_batch'); }
80
+ individualConsentR4PollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Consent', '_batch-response'); }
81
+ individualCommunicationBatchPath(ctx, format) { return this.v1Path(ctx, 'individual', format, 'Communication', '_batch'); }
82
+ individualCommunicationPollPath(ctx, format) { return this.v1Path(ctx, 'individual', format, 'Communication', '_batch-response'); }
83
+ individualCommunicationSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Communication', '_search'); }
84
+ individualCommunicationSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Communication', '_search-response'); }
85
+ individualBundleSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Bundle', '_search'); }
86
+ individualBundleSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Bundle', '_search-response'); }
87
+ identityTokenExchangePath(ctx) { return buildIdentityTokenExchangePath(ctx); }
88
+ identityTokenExchangePollPath(ctx) { return buildIdentityTokenExchangePollPath(ctx); }
89
+ identityDeviceDcrPath(ctx) { return buildIdentityDeviceDcrPath(ctx); }
90
+ identityDeviceDcrPollPath(ctx) { return buildIdentityDeviceDcrPollPath(ctx); }
91
+ identityOpenIdSmartTokenPath(ctx) { return buildIdentityOpenIdSmartTokenPath(ctx); }
92
+ identityOpenIdSmartTokenPollPath(ctx) { return buildIdentityOpenIdSmartTokenPollPath(ctx); }
93
+ }
@@ -0,0 +1,7 @@
1
+ import type { GrantProfessionalAccessInput } from './resource-operations.js';
2
+ export declare function buildGrantProfessionalAccessClaimsWithCid(input: GrantProfessionalAccessInput, createRuntimeUuid: () => string): {
3
+ actorIdentifier: string;
4
+ subjectIdentifier: string;
5
+ consentClaims: Record<string, unknown>;
6
+ claimsCid?: string;
7
+ };
@@ -0,0 +1,21 @@
1
+ // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
+ import { buildConsentClaimsSimpleWithCid } from 'gdc-common-utils-ts/utils/consent';
3
+ export function buildGrantProfessionalAccessClaimsWithCid(input, createRuntimeUuid) {
4
+ return buildConsentClaimsSimpleWithCid({
5
+ subjectDid: input.subjectDid,
6
+ subjectPhone: input.subjectPhone,
7
+ subjectGivenName: input.subjectGivenName,
8
+ actor: input.actorId ?? input.actor ?? '',
9
+ actorRole: String(input?.actorRole || ''),
10
+ purpose: String(input?.purpose || ''),
11
+ actions: Array.isArray(input?.actions) ? input.actions : [],
12
+ consentIdentifier: input.consentIdentifier,
13
+ consentDate: input.consentDate,
14
+ decision: input.decision,
15
+ attachmentContentType: input.attachmentContentType,
16
+ attachmentBase64: input.attachmentBase64,
17
+ }, {
18
+ errorPrefix: 'grantProfessionalAccess:',
19
+ consentIdentifierFactory: () => `urn:uuid:${createRuntimeUuid()}`,
20
+ });
21
+ }
@@ -0,0 +1,62 @@
1
+ import type { OrganizationDidBindingInput } from 'gdc-sdk-core-ts';
2
+ import type { OrganizationActivationDraft } from 'gdc-sdk-core-ts';
3
+ import { buildLegalOrganizationVerificationGatewayRequestBundle } from 'gdc-sdk-core-ts';
4
+ import type { HostRouteContext } from './host-onboarding.js';
5
+ import type { NodeLegalOrganizationVerificationTransactionInput, NodeOrganizationActivationInput, NodeOrganizationDidBindingInput, PollOptions, SubmitAndPollResult, SubmitPayload } from './orchestration/client-port.js';
6
+ import type { RouteContext } from './individual-onboarding.js';
7
+ type SubmitAndPollMethod = (submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
8
+ export declare function submitLegalOrganizationVerificationTransactionWithDeps(input: {
9
+ hostCtx: HostRouteContext;
10
+ verificationInput: NodeLegalOrganizationVerificationTransactionInput;
11
+ pollOptions?: PollOptions;
12
+ createRuntimeUuid: () => string;
13
+ wrapBundleAsGatewayTransactionMessage: (input: {
14
+ thid: string;
15
+ jti: string;
16
+ hostCtx: HostRouteContext;
17
+ bundle: ReturnType<typeof buildLegalOrganizationVerificationGatewayRequestBundle>;
18
+ }) => SubmitPayload;
19
+ submitPath: (ctx: HostRouteContext) => string;
20
+ pollPath: (ctx: HostRouteContext) => string;
21
+ submitAndPoll: SubmitAndPollMethod;
22
+ }): Promise<SubmitAndPollResult>;
23
+ export declare function submitLegalOrganizationIssueWithDeps(input: {
24
+ hostCtx: HostRouteContext;
25
+ verificationInput: NodeLegalOrganizationVerificationTransactionInput;
26
+ pollOptions?: PollOptions;
27
+ createRuntimeUuid: () => string;
28
+ wrapBundleAsGatewayTransactionMessage: (input: {
29
+ thid: string;
30
+ jti: string;
31
+ hostCtx: HostRouteContext;
32
+ bundle: ReturnType<typeof buildLegalOrganizationVerificationGatewayRequestBundle>;
33
+ }) => SubmitPayload;
34
+ submitPath: (ctx: HostRouteContext) => string;
35
+ pollPath: (ctx: HostRouteContext) => string;
36
+ submitAndPoll: SubmitAndPollMethod;
37
+ }): Promise<SubmitAndPollResult>;
38
+ export declare function submitOrganizationDidBindingWithDeps(input: {
39
+ routeCtx: RouteContext;
40
+ bindingInput: NodeOrganizationDidBindingInput | OrganizationDidBindingInput;
41
+ pollOptions?: PollOptions;
42
+ createRuntimeUuid: () => string;
43
+ organizationDidBindingPath: (ctx: RouteContext) => string;
44
+ organizationDidBindingPollPath: (ctx: RouteContext) => string;
45
+ submitAndPoll: SubmitAndPollMethod;
46
+ }): Promise<SubmitAndPollResult>;
47
+ export declare function activateOrganizationInGatewayFromIcaProofWithDeps(input: {
48
+ hostCtx: HostRouteContext;
49
+ activationInput: NodeOrganizationActivationInput;
50
+ pollOptions?: PollOptions;
51
+ createRuntimeUuid: () => string;
52
+ activationDraftFactory: (input: {
53
+ vpToken: string;
54
+ controller?: NodeOrganizationActivationInput['controller'];
55
+ service?: NodeOrganizationActivationInput['service'];
56
+ additionalClaims?: NodeOrganizationActivationInput['additionalClaims'];
57
+ }) => OrganizationActivationDraft;
58
+ submitPath: (ctx: HostRouteContext) => string;
59
+ pollPath: (ctx: HostRouteContext) => string;
60
+ submitAndPoll: SubmitAndPollMethod;
61
+ }): Promise<SubmitAndPollResult>;
62
+ export {};
@@ -0,0 +1,82 @@
1
+ import { buildLegalOrganizationVerificationGatewayRequestBundle, buildOrganizationDidBindingBundle, } from 'gdc-sdk-core-ts';
2
+ import { buildDidcommPlaintextTransportMetadata } from 'gdc-common-utils-ts/utils/activation-request';
3
+ export async function submitLegalOrganizationVerificationTransactionWithDeps(input) {
4
+ const thid = `organization-verification-transaction-${input.createRuntimeUuid()}`;
5
+ const jti = `organization-verification-transaction-jti-${input.createRuntimeUuid()}`;
6
+ const verificationBundle = buildLegalOrganizationVerificationGatewayRequestBundle(input.verificationInput);
7
+ const payload = input.wrapBundleAsGatewayTransactionMessage({
8
+ thid,
9
+ jti,
10
+ hostCtx: input.hostCtx,
11
+ bundle: verificationBundle,
12
+ });
13
+ return input.submitAndPoll(input.submitPath(input.hostCtx), input.pollPath(input.hostCtx), payload, input.pollOptions);
14
+ }
15
+ export async function submitLegalOrganizationIssueWithDeps(input) {
16
+ const thid = `organization-issue-${input.createRuntimeUuid()}`;
17
+ const jti = `organization-issue-jti-${input.createRuntimeUuid()}`;
18
+ const verificationBundle = buildLegalOrganizationVerificationGatewayRequestBundle(input.verificationInput);
19
+ const payload = input.wrapBundleAsGatewayTransactionMessage({
20
+ thid,
21
+ jti,
22
+ hostCtx: input.hostCtx,
23
+ bundle: verificationBundle,
24
+ });
25
+ return input.submitAndPoll(input.submitPath(input.hostCtx), input.pollPath(input.hostCtx), payload, input.pollOptions);
26
+ }
27
+ export async function submitOrganizationDidBindingWithDeps(input) {
28
+ const thid = `organization-did-binding-${input.createRuntimeUuid()}`;
29
+ const jti = `organization-did-binding-jti-${input.createRuntimeUuid()}`;
30
+ const payload = {
31
+ jti,
32
+ thid,
33
+ type: 'application/api+json',
34
+ body: buildOrganizationDidBindingBundle(input.bindingInput),
35
+ };
36
+ return input.submitAndPoll(input.organizationDidBindingPath(input.routeCtx), input.organizationDidBindingPollPath(input.routeCtx), payload, input.pollOptions);
37
+ }
38
+ export async function activateOrganizationInGatewayFromIcaProofWithDeps(input) {
39
+ const thid = `activate-org-${input.createRuntimeUuid()}`;
40
+ const activationDraft = input.activationDraftFactory({
41
+ vpToken: input.activationInput.vpToken,
42
+ controller: input.activationInput.controller,
43
+ service: input.activationInput.service,
44
+ additionalClaims: input.activationInput.additionalClaims,
45
+ });
46
+ const serviceClaims = activationDraft.buildServiceClaims();
47
+ const transportMeta = buildDidcommPlaintextTransportMetadata({
48
+ controller: input.activationInput.controller,
49
+ contentType: 'application/didcomm-plain+json',
50
+ });
51
+ const payload = {
52
+ thid,
53
+ iss: String(input.hostCtx.controllerDid || '').trim() || undefined,
54
+ aud: String(input.hostCtx.hostDid || '').trim() || undefined,
55
+ type: 'application/api+json',
56
+ ...(transportMeta ? { meta: transportMeta } : {}),
57
+ body: {
58
+ vp_token: input.activationInput.vpToken,
59
+ ...(input.activationInput.controller ? { controller: input.activationInput.controller } : {}),
60
+ data: [{
61
+ type: 'Organization-activation-request-v1.0',
62
+ meta: {
63
+ claims: {
64
+ '@context': 'org.schema',
65
+ ...serviceClaims,
66
+ ...(input.activationInput.additionalClaims || {}),
67
+ },
68
+ },
69
+ resource: {
70
+ meta: {
71
+ claims: {
72
+ '@context': 'org.schema',
73
+ ...serviceClaims,
74
+ ...(input.activationInput.additionalClaims || {}),
75
+ },
76
+ },
77
+ },
78
+ }],
79
+ },
80
+ };
81
+ return input.submitAndPoll(input.submitPath(input.hostCtx), input.pollPath(input.hostCtx), payload, input.pollOptions);
82
+ }
@@ -0,0 +1,4 @@
1
+ export declare function appendHttpTrace(traceFile: string | undefined, entry: Record<string, unknown>): void;
2
+ export declare function parseTraceBody(body: BodyInit | null | undefined): unknown;
3
+ export declare function parseTraceRawText(raw: string): unknown;
4
+ export declare function redactTraceValue<T>(value: T): T;