gdc-sdk-node-ts 0.2.1 → 0.3.1

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
@@ -1,176 +1,360 @@
1
1
  # gdc-sdk-node-ts
2
2
 
3
- Target Node runtime package for the converged GDC SDK family.
4
-
5
- Key docs:
6
-
7
- - [CHANGELOG.md](CHANGELOG.md)
8
- - [SECURITY.md](SECURITY.md)
9
- - [TEST_CORE.md](TEST_CORE.md)
10
- - [SDK_INTEGRATION_101.md](SDK_INTEGRATION_101.md)
11
-
12
- Current status:
13
-
14
- - package created
15
- - build/test baseline created
16
- - migration target from `dataspace-client-sdk-node` completed for live runtime path
17
- - runtime contract skeleton declared
18
- - actor-scoped node session bridge implemented
19
- - first actor-scoped orchestration facades implemented on top of `GdcNodeRuntimeClient`
20
- - shared async submit/poll helpers implemented for converged Node orchestration
21
- - live GW E2E migrated here with `gdc-sdk-node-ts` runtime client only, with JSONL debug/HTTP trace artifacts under `test-results/`
22
-
23
- Not migrated yet:
24
-
25
- - full wallet/runtime adapter parity from legacy package
26
- - secure E2E script parity in this package
27
- - full live use-case parity matrix vs legacy suite
28
-
29
- Live validation:
30
-
31
- - `npm run test:e2e:live-gw`
32
- - core coverage summary for memory/thesis justification: `TEST_CORE.md`
33
- - optional:
34
- - `BASE_URL=http://127.0.0.1:8000`
35
- - `RUN_LIVE_GW_E2E_IPS_INGESTION=1`
36
- - `LIVE_GW_NODE_E2E_DEBUG=1`
37
- - artifacts:
38
- - `test-results/live-gw-node-runtime-debug-*.jsonl`
39
- - `test-results/live-gw-http-trace-*.jsonl`
40
-
41
- Runtime migration note:
42
-
43
- - the live E2E in this package no longer imports `dataspace-client-sdk-node`
44
- - actor-scoped facades now run on the in-package `GdcNodeHttpClient`
45
- - remaining migration scope is parity hardening, not runtime ownership
46
- - this package now consumes the published `gdc-common-utils-ts` `^1.4.22` line; the sibling checkout is only needed for source browsing and optional local cross-repo work
47
-
48
- Role in the transition:
49
-
50
- - `gdc-sdk-core-ts` will own shared actor/capability contracts
51
- - `gdc-sdk-node-ts` will own Node runtime adapters and backend-facing orchestration
52
- - `dataspace-client-sdk-node` is now the legacy source repo for migration, not the final name
53
-
54
- Reusable payload source of truth:
55
-
56
- - [../gdc-common-utils-ts/src/examples/organization-controller.ts](../gdc-common-utils-ts/src/examples/organization-controller.ts)
57
- - `_activate`, legal order, employee creation, employee device activation
58
- - [../gdc-common-utils-ts/src/examples/individual-controller.ts](../gdc-common-utils-ts/src/examples/individual-controller.ts)
59
- - individual bootstrap, consent, search, communication ingestion, digital twin
60
- - [../gdc-common-utils-ts/src/examples/professional.ts](../gdc-common-utils-ts/src/examples/professional.ts)
61
- - SMART token and clinical access request examples
62
- - reusable professional role/permission scenarios by section and expected FHIR types
63
- - reusable consent-vs-smart matrices for actor targeting by email, organization, or jurisdiction
64
- - [../gdc-common-utils-ts/src/examples/shared.ts](../gdc-common-utils-ts/src/examples/shared.ts)
65
- - shared route contexts and helper builders
66
- - [../gdc-common-utils-ts/src/examples/api-flow-examples.ts](../gdc-common-utils-ts/src/examples/api-flow-examples.ts)
67
- - preferred compatibility aggregator when one import surface is needed without using the overloaded term `contract`
68
- - [tests/fixtures/ica-vp-minimal.json](tests/fixtures/ica-vp-minimal.json)
69
- - minimal VP fixture used by live GW onboarding/smart flows
70
-
71
- CORE vs extension note:
72
-
73
- - shared CORE examples are email-first for individual/controller bootstrap
74
- - `subjectPhone`, `subjectGivenName`, and phone-first controller onboarding are compatibility or extension concerns, not required CORE GW contract fields
75
- - route `tenantId` examples use identifier-style values such as `acme-id`, not friendly alternate names
76
- - individual/family bootstrap uses `org.schema.Organization.owner.*` claims for the human owner/controller
77
- - legal organization activation uses `Person` representative semantics plus VC `memberOf` / `hasOccupation`
3
+ Node runtime package for consuming the shared GDC SDK contracts against real
4
+ gateway backends.
5
+
6
+ Use this package when your backend needs to:
7
+
8
+ - call GW APIs
9
+ - submit/poll async operations
10
+ - orchestrate onboarding, consent, communication, and search flows
11
+ - consume the shared relationship invitation/acceptance contracts from
12
+ `gdc-sdk-core-ts`
13
+
14
+ This package is for runtime execution. It is not the place where the canonical
15
+ business contract is defined.
16
+
17
+ ## Start Here
18
+
19
+ If you are integrating this package for the first time, open these in order:
20
+
21
+ 1. [docs/SDK_END_TO_END_101.md](./docs/SDK_END_TO_END_101.md)
22
+ Ordered onboarding guide with end-to-end journeys, copy/paste snippets, and
23
+ the recommended reading path for new backend integrators.
24
+ 2. [docs/SDK_INTEGRATION_101.md](./docs/SDK_INTEGRATION_101.md)
25
+ Real backend setup, imports, `initializeCommunicationIdentity(...)`,
26
+ `new NodeHttpClient(...)`, route context, facade selection, and live method
27
+ usage.
28
+ 3. [gdc-sdk-core-ts/docs/SDK_FLOWS_101.md](https://github.com/Global-DataCare/gdc-sdk-core-ts/blob/main/docs/SDK_FLOWS_101.md)
29
+ Actor split and business-flow map across organization, individual,
30
+ permissions, invitation, import, and SMART flows.
31
+ 4. [gdc-common-utils-ts/src/examples/](https://gitlab.dev.accuro.es/idi/espacio-de-datos/global-datacare/gdc-common-utils-ts/-/tree/main/src/examples)
32
+ Shared payload values used by the docs and tests.
33
+ 5. [gdc-common-utils-ts/docs/LIFECYCLE_101.md](https://gitlab.dev.accuro.es/idi/espacio-de-datos/global-datacare/gdc-common-utils-ts/-/blob/main/docs/LIFECYCLE_101.md)
34
+ Canonical `enable/disable/delete` semantics and copy/paste placeholders.
35
+
36
+ If you need the shortest path:
37
+
38
+ - main onboarding guide:
39
+ [docs/SDK_END_TO_END_101.md](./docs/SDK_END_TO_END_101.md)
40
+ - GW CORE app identity:
41
+ `appId` mandatory, `appVersion` optional with default `v1.0`
42
+ - backend technical identity:
43
+ [`initializeCommunicationIdentity(...)`](./docs/SDK_INTEGRATION_101.md)
44
+ - runtime client:
45
+ [`NodeHttpClient`](src/node-runtime-client.ts)
46
+ - step-by-step runtime usage:
47
+ [docs/SDK_INTEGRATION_101.md](./docs/SDK_INTEGRATION_101.md)
48
+
49
+ ## Executable Usage Examples
50
+
51
+ Open these tests when you want to see exact method calls and exact inputs:
52
+
53
+ - [tests/host-onboarding.test.mjs](tests/host-onboarding.test.mjs)
54
+ Organization activation and order confirmation.
55
+ - [tests/individual-start.test.mjs](tests/individual-start.test.mjs)
56
+ Individual organization start flow.
57
+ - [tests/individual-onboarding.test.mjs](tests/individual-onboarding.test.mjs)
58
+ Individual order/offer confirmation flow.
59
+ - [tests/device-activation.test.mjs](tests/device-activation.test.mjs)
60
+ Employee activation code and activation request flows.
61
+ - [tests/resource-operations.test.mjs](tests/resource-operations.test.mjs)
62
+ Related person upsert, communication ingestion, search, and access grants.
63
+ - [tests/smart-token.test.mjs](tests/smart-token.test.mjs)
64
+ SMART token request flow.
65
+ - [tests/live-gw-node-runtime.e2e.test.mjs](tests/live-gw-node-runtime.e2e.test.mjs)
66
+ End-to-end runtime wiring against a real GW environment.
67
+
68
+ ## Actor Split And Runtime Scope
69
+
70
+ This package must be understandable from the same actor split used by the
71
+ shared contracts:
72
+
73
+ - organization controller
74
+ - organization employee / professional member
75
+ - individual controller
76
+ - individual member / self
77
+ - related person
78
+ - professional with consented access
79
+
80
+ The Node runtime layer is where those shared flows are executed against GW.
81
+ That includes organization onboarding, employee creation, individual bootstrap,
82
+ permission grants, `RelatedPerson` upserts, SMART token requests, and clinical
83
+ data ingestion/search.
84
+
85
+ ## Flow Families
86
+
87
+ - organization activation and order/offer confirmation
88
+ - employee creation and employee activation
89
+ - individual organization start and order confirmation
90
+ - related person upsert
91
+ - professional access grant
92
+ - invitation / OTP / relationship PIN runtime wiring
93
+ - permission-request `Communication`
94
+ - communication ingestion and search
95
+ - SMART token retrieval
96
+
97
+ ## Main Flows
98
+
99
+ ### 1. Controller invites a related person or professional
100
+
101
+ Typical backend sequence:
102
+
103
+ 1. build shared invitation payload with `gdc-sdk-core-ts`
104
+ 2. send it through the node runtime client or your backend adapter
105
+ 3. persist or return the invitation state to portal/app
106
+
107
+ What matters here:
108
+
109
+ - this package executes the runtime call
110
+ - `gdc-sdk-core-ts` defines the payload shape
111
+ - callers should not hardcode route families in app code
112
+
113
+ ### 2. Invitee accepts the relationship
114
+
115
+ Typical backend sequence:
116
+
117
+ 1. start OTP challenge
118
+ 2. confirm OTP
119
+ 3. set relationship PIN if required
120
+ 4. activate the relationship channel
121
+
122
+ Shared contract builders come from `gdc-sdk-core-ts`; this package is where a
123
+ Node backend wires them to real runtime operations.
124
+
125
+ ### 3. Consent-aware communication and search
126
+
127
+ Use this package when your backend needs to:
128
+
129
+ - ingest `Communication`
130
+ - search clinical bundles
131
+ - request SMART tokens
132
+ - grant access
133
+ - create or update `RelatedPerson`
134
+
135
+ ## What This Package Owns
136
+
137
+ - Node runtime client
138
+ - submit/poll orchestration
139
+ - actor-scoped node sessions
140
+ - backend-facing orchestration helpers
141
+
142
+ ## What This Package Does Not Own
143
+
144
+ - the canonical invitation/OTP/PIN contract
145
+ - UNID-specific reminder runtime semantics
146
+ - frontend session UX
147
+
148
+ Those belong to:
149
+
150
+ - `gdc-sdk-core-ts` for shared contracts
151
+ - runtime extensions such as UNID/UHC for product-specific behavior
152
+ - `gdc-sdk-front-ts` for frontend-facing consumption
153
+
154
+ ## Minimal Examples
155
+
156
+ ### Use shared invitation contract from Node
157
+
158
+ ```ts
159
+ import {
160
+ createRelationshipChannelInvitationInput,
161
+ RelationshipAccessActorKinds,
162
+ RelationshipEnrollmentChannels,
163
+ type RelationshipChannelInvitationInput,
164
+ } from 'gdc-sdk-core-ts';
165
+ import {
166
+ buildIndividualDidWeb,
167
+ HealthcareActorRoles,
168
+ HealthcareConsentPurposes,
169
+ } from 'gdc-common-utils-ts';
170
+
171
+ const tenantId = 'acme-id';
172
+ const jurisdiction = 'ES';
173
+ const sector = 'health-care';
174
+ const providerOrganizationDid = subjectProfile.organizationDid;
175
+ const subjectLocalId = subjectProfile.subjectId;
176
+ const subjectId = buildIndividualDidWeb({
177
+ organizationDidWeb: providerOrganizationDid,
178
+ subjectId: subjectLocalId,
179
+ });
180
+ const professionalEmail = invitedProfessional.email;
181
+
182
+ const invitationInput: RelationshipChannelInvitationInput = {
183
+ tenantId,
184
+ jurisdiction,
185
+ sector,
186
+ subjectId,
187
+ subjectKind: 'person',
188
+ actorKind: RelationshipAccessActorKinds.Professional,
189
+ actorIdentifier: professionalEmail,
190
+ actorRole: HealthcareActorRoles.Physician,
191
+ deliveryChannel: RelationshipEnrollmentChannels.Email,
192
+ deliveryTarget: professionalEmail,
193
+ purpose: HealthcareConsentPurposes.Treatment,
194
+ relationshipLabel: 'primary-physician',
195
+ phonePinOptional: false,
196
+ };
197
+
198
+ const invitation = createRelationshipChannelInvitationInput(invitationInput);
199
+ ```
200
+
201
+ The backend should obtain those variables from:
202
+
203
+ - tenant route selection
204
+ - target subject identifier
205
+ - invited actor identity
206
+ - selected enrollment channel
207
+ - intended purpose/relationship label
208
+
209
+ ### Request SMART token and search bundle
210
+
211
+ ```ts
212
+ import { NodeHttpClient } from 'gdc-sdk-node-ts';
213
+ import {
214
+ EXAMPLE_LATEST_IPS_SEARCH_INPUT,
215
+ } from 'gdc-common-utils-ts/examples/individual-controller';
216
+ import { HealthcareBasicSections } from 'gdc-common-utils-ts/constants/healthcare';
217
+ import { buildSmartCompositionReadScope } from 'gdc-common-utils-ts/utils/smart-scope';
218
+
219
+ const client = new NodeHttpClient({ baseUrl: process.env.BASE_URL! });
220
+
221
+ const subjectDid = EXAMPLE_LATEST_IPS_SEARCH_INPUT.subject;
222
+
223
+ const token = await client.requestSmartToken({
224
+ ctx,
225
+ actorDid: 'did:web:doctor.example.org:employee:001',
226
+ subjectDid,
227
+ scopes: [
228
+ buildSmartCompositionReadScope({
229
+ subjectDid,
230
+ sections: HealthcareBasicSections.PatientSummaryDocument.claim,
231
+ }),
232
+ ],
233
+ idToken: '...',
234
+ });
235
+
236
+ const result = await client.searchClinicalBundle(ctx, {
237
+ subject: subjectDid,
238
+ });
239
+ ```
240
+
241
+ Teaching rule:
242
+
243
+ - start with the composition read scope when the actor only needs subject-scoped read access
244
+ - add `SmartGatewayScopesFhirR4.ConsentCruds` only if the backend also needs consent management operations
245
+
246
+ ## Shared Contract Sources
247
+
248
+ - [gdc-sdk-core-ts/README.md](https://github.com/Global-DataCare/gdc-sdk-core-ts/blob/main/README.md)
249
+ - [gdc-common-utils-ts/docs/CONSENT_ACCESS_101.md](https://gitlab.dev.accuro.es/idi/espacio-de-datos/global-datacare/gdc-common-utils-ts/-/blob/main/docs/CONSENT_ACCESS_101.md)
250
+
251
+ Reusable payload examples:
252
+
253
+ - [gdc-common-utils-ts/src/examples/organization-controller.ts](https://gitlab.dev.accuro.es/idi/espacio-de-datos/global-datacare/gdc-common-utils-ts/-/blob/main/src/examples/organization-controller.ts)
254
+ - [gdc-common-utils-ts/src/examples/individual-controller.ts](https://gitlab.dev.accuro.es/idi/espacio-de-datos/global-datacare/gdc-common-utils-ts/-/blob/main/src/examples/individual-controller.ts)
255
+ - [gdc-common-utils-ts/src/examples/professional.ts](https://gitlab.dev.accuro.es/idi/espacio-de-datos/global-datacare/gdc-common-utils-ts/-/blob/main/src/examples/professional.ts)
256
+ - [gdc-common-utils-ts/src/examples/shared.ts](https://gitlab.dev.accuro.es/idi/espacio-de-datos/global-datacare/gdc-common-utils-ts/-/blob/main/src/examples/shared.ts)
257
+ - [gdc-common-utils-ts/src/examples/lifecycle.ts](https://gitlab.dev.accuro.es/idi/espacio-de-datos/global-datacare/gdc-common-utils-ts/-/blob/main/src/examples/lifecycle.ts)
258
+ - [gdc-common-utils-ts/src/examples/api-flow-examples.ts](https://gitlab.dev.accuro.es/idi/espacio-de-datos/global-datacare/gdc-common-utils-ts/-/blob/main/src/examples/api-flow-examples.ts)
78
259
 
79
260
  ## API Index
80
261
 
81
- The canonical API contract should live in JSDoc on exported code. The README is the linked index.
82
-
83
- ### Core document helpers re-exported from `gdc-sdk-core-ts`
84
-
85
- - [`createCommunicationResource(...)`](../gdc-sdk-core-ts/src/communication-resource-helpers.ts)
86
- - Creates a minimal FHIR `Communication` resource.
87
- - Main params: `subject`, `sender?`, `recipient?`, `sent?`, `status?`, `category?`, `noteText?`, `claims?`.
88
- - [`addFhirResourceToCommunication(...)`](../gdc-sdk-core-ts/src/communication-resource-helpers.ts)
89
- - Attaches a FHIR resource to `Communication.payload`, optionally wrapped as `DocumentReference`.
90
- - Main params: `communication`, `resource`, `noteText?`, `asDocumentReference?`, `attachmentTitle?`, `attachmentContentType?`, `documentDescription?`, `documentDate?`, `documentSubject?`.
91
- - [`addClaimsResourceToCommunication(...)`](../gdc-sdk-core-ts/src/communication-resource-helpers.ts)
92
- - Attaches a claims-only pseudo-resource using `meta.claims`.
93
- - Main params: `communication`, `resourceType`, `claims`, `options?`.
94
- - [`buildCommunicationBatchMessage(...)`](../gdc-sdk-core-ts/src/communication-resource-helpers.ts)
95
- - Wraps a FHIR `Communication` into a GW-ready batch envelope.
96
- - Main params: `communication`, `thid?`, `jti?`, `iss?`, `aud?`, `requestUrl?`, `entryType?`, `messageType?`, `fhirVersion?`.
97
- - [`createCommunicationFacade()`](../gdc-sdk-core-ts/src/communication-document-facade.ts)
98
- - Creates the high-level document access facade.
99
- - [`getDocumentFromCommunication(...)`](../gdc-sdk-core-ts/src/communication-document-facade.ts)
100
- - Resolves the first attached document and hides direct attachment vs `DocumentReference`.
101
- - [`createFhirDocumentFacade(...)`](../gdc-sdk-core-ts/src/communication-document-facade.ts)
102
- - Exposes `getBundle()`, `getSections()`, `getResources(resourceType?)`, `getByDates(resourceType, start, end?)`, `getContainingTextOrDisplay(resourceType, text)`.
103
- - [`createCommunicationDraft(...)`](../gdc-sdk-core-ts/src/communication-draft.ts)
104
- - Starts an in-memory communication draft.
105
- - [`addFhirResourceToDraft(...)`](../gdc-sdk-core-ts/src/communication-draft.ts)
106
- - Appends a concrete FHIR resource to the draft.
107
- - [`addClaimsResourceToDraft(...)`](../gdc-sdk-core-ts/src/communication-draft.ts)
108
- - Appends a claims-only pseudo-resource to the draft.
109
- - [`createOutboxJobFromDraft(...)`](../gdc-sdk-core-ts/src/communication-draft.ts)
110
- - Freezes the draft into a transport-oriented outbox job.
111
- - [`updateOutboxJobStatus(...)`](../gdc-sdk-core-ts/src/communication-draft.ts)
112
- - Updates the outbox job status and transport result metadata.
113
- - [`groupConsentsForControllerView(...)`](../gdc-sdk-core-ts/src/consent-access.ts)
114
- - Aggregates all active consent rules for one subject and groups them by actor-specific, organization, jurisdiction, and phone-extension target.
115
- - [`evaluateRequestedAccess(...)`](../gdc-sdk-core-ts/src/consent-access.ts)
116
- - Evaluates effective permission coverage with first-tier precedence for concrete email matches, then organization and jurisdiction coverage.
117
- - [`getMissingPermissions(...)`](../gdc-sdk-core-ts/src/consent-access.ts)
118
- - Extracts deterministic missing section/resource-type coverage for a SMART request.
119
- - [`buildPermissionRequestCommunication(...)`](../gdc-sdk-core-ts/src/consent-access.ts)
120
- - Builds the canonical `Communication` payload used to request additional subject-controlled access.
121
- - [`buildPermissionRequestCommunicationLookupQuery(...)`](../gdc-sdk-core-ts/src/consent-access.ts)
122
- - Builds a subject-scoped lookup query for recovering the permission request by `Communication.identifier`, `thid`, or `DocumentReference.contenthash`.
123
- - [`IOutboxRepository`](../gdc-sdk-core-ts/src/communication-outbox.ts)
124
- - [`OutboxRepositoryMemory`](../gdc-sdk-core-ts/src/communication-outbox.ts)
125
- - [`createHeartRateObservation(...)`](../gdc-sdk-core-ts/src/vital-signs.ts)
126
- - [`createBodyTemperatureObservation(...)`](../gdc-sdk-core-ts/src/vital-signs.ts)
127
- - [`createBloodPressureObservation(...)`](../gdc-sdk-core-ts/src/vital-signs.ts)
262
+ ## Full Public Surface
263
+
264
+ This package exports the full `gdc-sdk-core-ts` surface plus the Node runtime
265
+ modules below.
266
+
267
+ - [`src/runtime-contracts.ts`](src/runtime-contracts.ts)
268
+ - types/constants: `LegacyNodeSourcePackage`, `NodeRuntimeMode`, `NodeInteropMode`, `TenantContext`, `NodeOperatorContext`, `NodeFetchLike`, `NodeRuntimeConfig`, `NodePackageStatus`, `GDC_SDK_NODE_STATUS`
269
+ - [`src/identity-bootstrap.ts`](src/identity-bootstrap.ts)
270
+ - function: `initializeCommunicationIdentity(...)`
271
+ - [`src/async-polling.ts`](src/async-polling.ts)
272
+ - types: `AcceptedPollResponse`
273
+ - function: `pollUntilCompleteWithMethod(...)`
274
+ - [`src/poll-options.ts`](src/poll-options.ts)
275
+ - re-export: `resolvePollOptionsFromSeconds(...)`
276
+ - [`src/host-onboarding.ts`](src/host-onboarding.ts)
277
+ - types: `HostRouteContext`, `LegalOrganizationOrderInput`
278
+ - function: `confirmLegalOrganizationOrderWithDeps(...)`
279
+ - [`src/individual-start.ts`](src/individual-start.ts)
280
+ - types: `IndividualOrganizationBootstrapInput`, `OfferPreview`, `IndividualOrganizationStartResult`
281
+ - function: `startIndividualOrganizationWithDeps(...)`
282
+ - [`src/individual-onboarding.ts`](src/individual-onboarding.ts)
283
+ - types: `RouteContext`, `IndividualOrganizationConfirmOrderInput`
284
+ - function: `confirmIndividualOrganizationOrderWithDeps(...)`
285
+ - [`src/device-activation.ts`](src/device-activation.ts)
286
+ - types: `EmployeeDeviceActivationInput`, `EmployeeDeviceActivationRequestInput`, `EmployeeDeviceActivationResult`
287
+ - functions: `activateEmployeeDeviceWithActivationCodeWithDeps(...)`, `activateEmployeeDeviceWithActivationRequestWithDeps(...)`
288
+ - [`src/smart-token.ts`](src/smart-token.ts)
289
+ - types: `SmartTokenRequestInput`, `SmartTokenExchangeResult`
290
+ - function: `requestSmartTokenWithDeps(...)`
291
+ - [`src/resource-operations.ts`](src/resource-operations.ts)
292
+ - types: `OrganizationEmployeeCreationInput`, `IpsOrFhirImportInput`, `RelatedPersonUpsertInput`, `CommunicationIngestionInput`, `ClinicalDateRange`, `ClinicalBundleSearchInput`, `ConsentActorTargetInput`, `GrantProfessionalAccessInput`, `GrantProfessionalAccessResult`, `DigitalTwinGenerationInput`
293
+ - functions: `createOrganizationEmployeeWithDeps(...)`, `importIpsOrFhirAndUpdateIndexWithDeps(...)`, `upsertRelatedPersonAndPollWithDeps(...)`, `ingestCommunicationAndUpdateIndexWithDeps(...)`, `searchClinicalBundleWithDeps(...)`, `searchLatestIpsWithDeps(...)`, `grantProfessionalAccessWithDeps(...)`, `generateDigitalTwinFromSubjectDataWithDeps(...)`
294
+ - [`src/session.ts`](src/session.ts)
295
+ - types: `NodeCapability`, `NodeActorSessionContext`, `ActorSessionContext`
296
+ - classes: `ActorSession`, `NodeActorSession`
297
+ - [`src/node-runtime-client.ts`](src/node-runtime-client.ts)
298
+ - types: `HttpRuntimeClientOptions`, `NodeHttpClientOptions`
299
+ - classes: `HttpRuntimeClient`, `NodeHttpClient`
300
+ - [`src/gdc-session-bridge.ts`](src/gdc-session-bridge.ts)
301
+ - functions: `createNodeActorSessionsFromFacades(...)`, `createNodeActorSessionFromFacade(...)`, `createNodeActorSessionsFromDescriptor(...)`, `createNodeActorSessionFromDescriptor(...)`, `createActorSessionsFromFacades(...)`, `createActorSessionFromFacade(...)`, `createActorSessionsFromDescriptor(...)`, `createActorSessionFromDescriptor(...)`
302
+ - [`src/orchestration/client-port.ts`](src/orchestration/client-port.ts)
303
+ - types: `RuntimeClient`, `NodeRuntimeClient`
304
+ - functions: `requireClientMethod(...)`, `submitAndPollWithMethods(...)`, `canClientSubmitAndPoll(...)`, `submitAndPollWithClient(...)`
305
+ - [`src/orchestration/host-onboarding-sdk.ts`](src/orchestration/host-onboarding-sdk.ts)
306
+ - class: `HostOnboardingSdk`
307
+ - [`src/orchestration/organization-controller-sdk.ts`](src/orchestration/organization-controller-sdk.ts)
308
+ - class: `OrganizationControllerSdk`
309
+ - [`src/orchestration/organization-employee-sdk.ts`](src/orchestration/organization-employee-sdk.ts)
310
+ - class: `OrganizationEmployeeSdk`
311
+ - [`src/orchestration/individual-controller-sdk.ts`](src/orchestration/individual-controller-sdk.ts)
312
+ - class: `IndividualControllerSdk`
313
+ - [`src/orchestration/individual-member-sdk.ts`](src/orchestration/individual-member-sdk.ts)
314
+ - class: `IndividualMemberSdk`
315
+ - [`src/orchestration/personal-sdk.ts`](src/orchestration/personal-sdk.ts)
316
+ - class: `PersonalSdk`
317
+ - [`src/orchestration/professional-sdk.ts`](src/orchestration/professional-sdk.ts)
318
+ - class: `ProfessionalSdk`
319
+ - [`src/legacy-compat.ts`](src/legacy-compat.ts)
320
+ - compatibility aliases for simplified helpers, runtime classes, and legacy names such as `GdcNodeActorSession` and `GdcNodeHttpClient`
321
+
322
+ ### Re-exported shared helpers from `gdc-sdk-core-ts`
323
+
324
+ - consent access helpers
325
+ - relationship invitation/acceptance builders
326
+ - communication/document builders
327
+ - draft/outbox helpers
328
+ - document facade helpers
329
+ - vital-sign helpers
128
330
 
129
331
  ### Node runtime client
130
332
 
131
333
  - [`NodeHttpClient`](src/node-runtime-client.ts)
132
- - Main runtime class for submit/poll orchestration against the GW.
133
334
  - [`NodeHttpClient.ingestCommunicationAndUpdateIndex(...)`](src/node-runtime-client.ts)
134
- - Sends a `Communication` ingestion request and polls until indexed.
135
- - Main params: `ctx`, `input.communicationPayload`, `input.pathFormatSegment?`, `input.autoConvertClaimsToFhirR4?`, `input.pollOptions?`.
136
335
  - [`NodeHttpClient.submitCommunicationAndPoll(...)`](src/node-runtime-client.ts)
137
- - Alias of `ingestCommunicationAndUpdateIndex(...)`.
138
336
  - [`NodeHttpClient.searchClinicalBundle(...)`](src/node-runtime-client.ts)
139
- - Executes clinical `Bundle/_search`.
140
- - Main params: `ctx`, `input.subject`, `input.section?`, `input.date?`, `input.includedTypes?`, `input.code?`, `input.category?`, `input.author?`, `input.pollOptions?`.
141
337
  - [`NodeHttpClient.searchLatestIps(...)`](src/node-runtime-client.ts)
142
- - Shortcut for latest IPS-oriented document search.
143
338
  - [`NodeHttpClient.grantProfessionalAccess(...)`](src/node-runtime-client.ts)
144
- - Sends a consent-grant flow for a professional actor.
145
339
  - [`NodeHttpClient.requestSmartToken(...)`](src/node-runtime-client.ts)
146
- - Requests SMART/OpenID token material through the GW.
147
- - Main params: `input.actorDid`, `input.subjectDid`, `input.scopes`, `input.idToken`, optional `input.vpToken`, and optional route compatibility fields when the client was not initialized with a default `ctx`.
148
340
 
149
341
  ### Runtime configuration
150
342
 
151
343
  - [`NodeRuntimeConfig`](src/runtime-contracts.ts)
152
- - Includes `interopMode?`, `persistencePolicy?`, and `outboxRepositoryFactory?` so node runtimes can declare `demo`/`compat`/`strict` mode and choose `memory` vs `server-remote` persistence explicitly.
153
- - [`initializeCommunicationIdentityFromSeed(...)`](src/identity-bootstrap.ts)
154
- - Node SDK wrapper for the shared technical communication identity bootstrap helper from `gdc-common-utils-ts`.
344
+ - [`initializeCommunicationIdentity(...)`](src/identity-bootstrap.ts)
155
345
 
156
346
  ### Low-level orchestration helpers
157
347
 
158
348
  - [`createOrganizationEmployeeWithDeps(...)`](src/resource-operations.ts)
159
- - Creates an employee/person batch payload for CORE GW using canonical `org.schema.Person.*` claims.
160
349
  - [`importIpsOrFhirAndUpdateIndexWithDeps(...)`](src/resource-operations.ts)
161
350
  - [`upsertRelatedPersonAndPollWithDeps(...)`](src/resource-operations.ts)
162
- - Creates or updates a `RelatedPerson` for family/caregiver roles outside employee/controller flows.
163
351
  - [`ingestCommunicationAndUpdateIndexWithDeps(...)`](src/resource-operations.ts)
164
352
  - [`searchClinicalBundleWithDeps(...)`](src/resource-operations.ts)
165
353
  - [`searchLatestIpsWithDeps(...)`](src/resource-operations.ts)
166
354
  - [`grantProfessionalAccessWithDeps(...)`](src/resource-operations.ts)
167
- - Builds a consent grant where actor targeting should normally be passed as canonical `Consent.actor-identifier` input: a `did:web`, email, `tel:+...`, country code, or comma-separated list of those values.
168
-
169
- These functions are runtime-oriented building blocks. For application-level document handling, prefer the re-exported communication/document helpers from `gdc-sdk-core-ts`.
170
355
 
171
- ### Documentation rule
356
+ ## Documentation Rule
172
357
 
173
- - JSDoc on exported code is canonical.
174
- - README entries should link to source and summarize the most important parameters.
175
- - If you add a public method/function, document it in JSDoc first and then add it here.
176
- - If a public payload shape is used in tests or docs, keep its reusable example in the relevant module under [`../gdc-common-utils-ts/src/examples/`](../gdc-common-utils-ts/src/examples/) and link that specific flow file from the relevant markdown section.
358
+ - README explains backend-facing flows first.
359
+ - Shared contract shapes must be documented in `gdc-sdk-core-ts`, not duplicated here.
360
+ - Route details and GW-specific behavior belong in runtime docs and JSDoc, not in app-facing examples.
@@ -1,4 +1,4 @@
1
- import { type ActorKind, type ActorFacadeDescriptor, type ActorSessionDescriptor } from '../../gdc-sdk-core-ts/dist/index.js';
1
+ import { type ActorKind, type ActorFacadeDescriptor, type ActorSessionDescriptor } from 'gdc-sdk-core-ts';
2
2
  import { ActorSession, NodeActorSession } from './session.js';
3
3
  import type { RuntimeClient } from './orchestration/client-port.js';
4
4
  export declare function createNodeActorSessionsFromFacades(facades: ActorFacadeDescriptor[], client?: RuntimeClient): NodeActorSession[];
@@ -1,5 +1,5 @@
1
1
  // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
- import { expandActorSessionDescriptorToFacades, filterCapabilitiesForActor, } from '../../gdc-sdk-core-ts/dist/index.js';
2
+ import { expandActorSessionDescriptorToFacades, filterCapabilitiesForActor, } from 'gdc-sdk-core-ts';
3
3
  import { ActorSession, NodeActorSession } from './session.js';
4
4
  const capabilityMap = {
5
5
  'organization.create_employee': 'organization.create_employee',
@@ -26,5 +26,9 @@ import { type CommunicationIdentityBootstrapOptions, type CommunicationIdentityB
26
26
  * @param options Stable seed/bootstrap options. See the shared
27
27
  * `CommunicationIdentityBootstrapOptions` JSDoc in `gdc-common-utils-ts`.
28
28
  */
29
- export declare function initializeCommunicationIdentityFromSeed(options: CommunicationIdentityBootstrapOptions): Promise<CommunicationIdentityBootstrapResult>;
29
+ export declare function initializeCommunicationIdentity(options: CommunicationIdentityBootstrapOptions): Promise<CommunicationIdentityBootstrapResult>;
30
+ /**
31
+ * @deprecated Use `initializeCommunicationIdentity(...)`.
32
+ */
33
+ export declare const initializeCommunicationIdentityFromSeed: typeof initializeCommunicationIdentity;
30
34
  export type { CommunicationIdentityBootstrapOptions as NodeSdkCommunicationIdentityBootstrapOptions, CommunicationIdentityBootstrapResult as NodeSdkCommunicationIdentityBootstrapResult, } from 'gdc-common-utils-ts/utils/communication-identity';
@@ -1,5 +1,5 @@
1
1
  // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
- import { initializeCommunicationIdentityFromSeed as initializeSharedCommunicationIdentityFromSeed, } from 'gdc-common-utils-ts/utils/communication-identity';
2
+ import { initializeCommunicationIdentityFromSeed as initializeSharedCommunicationIdentity, } from 'gdc-common-utils-ts/utils/communication-identity';
3
3
  /**
4
4
  * Node SDK convenience wrapper for the shared technical communication identity
5
5
  * bootstrap helper defined in `gdc-common-utils-ts`.
@@ -27,6 +27,10 @@ import { initializeCommunicationIdentityFromSeed as initializeSharedCommunicatio
27
27
  * @param options Stable seed/bootstrap options. See the shared
28
28
  * `CommunicationIdentityBootstrapOptions` JSDoc in `gdc-common-utils-ts`.
29
29
  */
30
- export async function initializeCommunicationIdentityFromSeed(options) {
31
- return initializeSharedCommunicationIdentityFromSeed(options);
30
+ export async function initializeCommunicationIdentity(options) {
31
+ return initializeSharedCommunicationIdentity(options);
32
32
  }
33
+ /**
34
+ * @deprecated Use `initializeCommunicationIdentity(...)`.
35
+ */
36
+ export const initializeCommunicationIdentityFromSeed = initializeCommunicationIdentity;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from '../../gdc-sdk-core-ts/dist/index.js';
1
+ export * from 'gdc-sdk-core-ts';
2
2
  export * from './runtime-contracts.js';
3
3
  export * from './identity-bootstrap.js';
4
4
  export * from './async-polling.js';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
- export * from '../../gdc-sdk-core-ts/dist/index.js';
2
+ export * from 'gdc-sdk-core-ts';
3
3
  export * from './runtime-contracts.js';
4
4
  export * from './identity-bootstrap.js';
5
5
  export * from './async-polling.js';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Re-export canonical lifecycle examples for Node runtime consumers.
3
+ *
4
+ * The Node SDK must not hardcode its own copies of lifecycle payload examples.
5
+ * Import and reuse the shared `gdc-common-utils-ts` source instead.
6
+ */
7
+ export * from 'gdc-common-utils-ts/examples/lifecycle';
@@ -0,0 +1,8 @@
1
+ // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
+ /**
3
+ * Re-export canonical lifecycle examples for Node runtime consumers.
4
+ *
5
+ * The Node SDK must not hardcode its own copies of lifecycle payload examples.
6
+ * Import and reuse the shared `gdc-common-utils-ts` source instead.
7
+ */
8
+ export * from 'gdc-common-utils-ts/examples/lifecycle';
@@ -1,5 +1,7 @@
1
- import type { ControllerBindingInput } from 'gdc-common-utils-ts/models';
1
+ import type { AppInfo } from 'gdc-sdk-core-ts';
2
+ import { type ResolvedAppInfo } from 'gdc-sdk-core-ts';
2
3
  import { type HostRouteContext } from './host-onboarding.js';
4
+ import type { NodeOrganizationActivationInput } from './orchestration/client-port.js';
3
5
  import { type IndividualOrganizationConfirmOrderInput, type RouteContext } from './individual-onboarding.js';
4
6
  import { type SmartTokenRequestInput } from './smart-token.js';
5
7
  import { type IndividualOrganizationBootstrapInput, type IndividualOrganizationStartResult } from './individual-start.js';
@@ -10,6 +12,14 @@ import type { NodeRuntimeClient, PollOptions, PollResult, SubmitAndPollResult, S
10
12
  export type HttpRuntimeClientOptions = {
11
13
  baseUrl: string;
12
14
  bearerToken?: string;
15
+ /**
16
+ * Host app identity required by GW CORE.
17
+ *
18
+ * `appId` is mandatory when you want the SDK to inject canonical `AppId` and
19
+ * `AppVersion` headers automatically. `appVersion` is optional and defaults
20
+ * to `v1.0`.
21
+ */
22
+ appInfo?: AppInfo;
13
23
  /**
14
24
  * Optional default tenant route context reused by methods such as
15
25
  * `requestSmartToken(...)` when callers do not want to repeat
@@ -34,6 +44,7 @@ export type NodeHttpClientOptions = HttpRuntimeClientOptions;
34
44
  export declare class HttpRuntimeClient implements NodeRuntimeClient {
35
45
  private readonly baseUrl;
36
46
  private readonly bearerToken?;
47
+ private readonly resolvedAppInfo?;
37
48
  private readonly ctx?;
38
49
  private readonly defaultHeaders;
39
50
  private readonly requestTimeoutMs;
@@ -43,11 +54,21 @@ export declare class HttpRuntimeClient implements NodeRuntimeClient {
43
54
  * @param options.baseUrl Gateway base URL without trailing slash.
44
55
  * @param options.interopMode Optional runtime interoperability mode from the SDK config layer (`demo`, `compat`, `strict`).
45
56
  * @param options.bearerToken Optional bearer token reused for direct HTTP calls.
57
+ * @param options.appInfo Optional GW CORE app identity. When present, the
58
+ * client injects `AppId` and `AppVersion` into all outgoing requests.
46
59
  * @param options.ctx Optional default route context.
47
60
  * @param options.defaultHeaders Optional static headers appended to every request.
48
61
  * @param options.requestTimeoutMs Optional per-request timeout in milliseconds.
49
62
  */
50
63
  constructor(options: HttpRuntimeClientOptions);
64
+ /**
65
+ * Returns the canonical GW CORE app identity resolved by the Node client.
66
+ */
67
+ getResolvedAppInfo(): ResolvedAppInfo | undefined;
68
+ /**
69
+ * Returns the standard GW CORE headers currently injected by the Node client.
70
+ */
71
+ getAppHeaders(): Record<'AppId' | 'AppVersion', string> | undefined;
51
72
  /**
52
73
  * Builds a canonical GDC v1 resource/action path from a route context.
53
74
  */
@@ -70,11 +91,7 @@ export declare class HttpRuntimeClient implements NodeRuntimeClient {
70
91
  * Activates a legal organization in the gateway host registry using an ICA
71
92
  * proof token already obtained by the caller.
72
93
  */
73
- activateOrganizationInGatewayFromIcaProof(hostCtx: HostRouteContext, input: {
74
- vpToken: string;
75
- controller?: ControllerBindingInput;
76
- additionalClaims?: Record<string, unknown>;
77
- }, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
94
+ activateOrganizationInGatewayFromIcaProof(hostCtx: HostRouteContext, input: NodeOrganizationActivationInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
78
95
  /**
79
96
  * Confirms a host-side legal organization order after the initial activation.
80
97
  */
@@ -1,6 +1,8 @@
1
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.
2
3
  import fs from 'node:fs';
3
4
  import path from 'node:path';
5
+ import { buildAppHeaders, createBootstrapFacade, resolveAppInfo, } from 'gdc-sdk-core-ts';
4
6
  import { buildConsentClaimsSimpleWithCid } from 'gdc-common-utils-ts/utils/consent';
5
7
  import { pollUntilCompleteWithMethod } from './async-polling.js';
6
8
  import { confirmLegalOrganizationOrderWithDeps } from './host-onboarding.js';
@@ -9,6 +11,7 @@ import { requestSmartTokenWithDeps } from './smart-token.js';
9
11
  import { startIndividualOrganizationWithDeps } from './individual-start.js';
10
12
  import { createOrganizationEmployeeWithDeps, grantProfessionalAccessWithDeps, ingestCommunicationAndUpdateIndexWithDeps, searchClinicalBundleWithDeps, searchLatestIpsWithDeps, upsertRelatedPersonAndPollWithDeps, } from './resource-operations.js';
11
13
  import { submitAndPollWithMethods } from './orchestration/client-port.js';
14
+ const bootstrapFacade = createBootstrapFacade();
12
15
  /**
13
16
  * Runtime-oriented HTTP client for Node backends, BFFs, and workers that need
14
17
  * to submit GDC gateway requests and poll asynchronous responses.
@@ -22,6 +25,8 @@ export class HttpRuntimeClient {
22
25
  * @param options.baseUrl Gateway base URL without trailing slash.
23
26
  * @param options.interopMode Optional runtime interoperability mode from the SDK config layer (`demo`, `compat`, `strict`).
24
27
  * @param options.bearerToken Optional bearer token reused for direct HTTP calls.
28
+ * @param options.appInfo Optional GW CORE app identity. When present, the
29
+ * client injects `AppId` and `AppVersion` into all outgoing requests.
25
30
  * @param options.ctx Optional default route context.
26
31
  * @param options.defaultHeaders Optional static headers appended to every request.
27
32
  * @param options.requestTimeoutMs Optional per-request timeout in milliseconds.
@@ -30,11 +35,29 @@ export class HttpRuntimeClient {
30
35
  this.tokenCache = new Map();
31
36
  this.baseUrl = String(options.baseUrl || '').replace(/\/+$/, '');
32
37
  this.bearerToken = String(options.bearerToken || '').trim() || undefined;
38
+ this.resolvedAppInfo = options.appInfo ? resolveAppInfo(options.appInfo) : undefined;
33
39
  this.ctx = options.ctx;
34
- this.defaultHeaders = options.defaultHeaders || {};
40
+ this.defaultHeaders = {
41
+ ...(this.resolvedAppInfo ? buildAppHeaders(this.resolvedAppInfo) : {}),
42
+ ...(options.defaultHeaders || {}),
43
+ };
35
44
  this.requestTimeoutMs = Math.max(1, Math.floor(options.requestTimeoutMs ?? 15000));
36
45
  this.httpTraceFile = String(process.env.SDK_HTTP_TRACE_FILE || '').trim() || undefined;
37
46
  }
47
+ /**
48
+ * Returns the canonical GW CORE app identity resolved by the Node client.
49
+ */
50
+ getResolvedAppInfo() {
51
+ return this.resolvedAppInfo ? { ...this.resolvedAppInfo } : undefined;
52
+ }
53
+ /**
54
+ * Returns the standard GW CORE headers currently injected by the Node client.
55
+ */
56
+ getAppHeaders() {
57
+ if (!this.resolvedAppInfo)
58
+ return undefined;
59
+ return buildAppHeaders(this.resolvedAppInfo);
60
+ }
38
61
  /**
39
62
  * Builds a canonical GDC v1 resource/action path from a route context.
40
63
  */
@@ -66,6 +89,13 @@ export class HttpRuntimeClient {
66
89
  */
67
90
  async activateOrganizationInGatewayFromIcaProof(hostCtx, input, pollOptions) {
68
91
  const thid = `activate-org-${runtimeUuid()}`;
92
+ const activationDraft = bootstrapFacade.createOrganizationActivationDraft({
93
+ vpToken: input.vpToken,
94
+ controller: input.controller,
95
+ service: input.service,
96
+ additionalClaims: input.additionalClaims,
97
+ });
98
+ const serviceClaims = activationDraft.buildServiceClaims();
69
99
  const payload = {
70
100
  thid,
71
101
  iss: String(hostCtx.controllerDid || '').trim() || undefined,
@@ -79,6 +109,7 @@ export class HttpRuntimeClient {
79
109
  meta: {
80
110
  claims: {
81
111
  '@context': 'org.schema',
112
+ ...serviceClaims,
82
113
  ...(input.additionalClaims || {}),
83
114
  },
84
115
  },
@@ -86,6 +117,7 @@ export class HttpRuntimeClient {
86
117
  meta: {
87
118
  claims: {
88
119
  '@context': 'org.schema',
120
+ ...serviceClaims,
89
121
  ...(input.additionalClaims || {}),
90
122
  },
91
123
  },
@@ -1,12 +1,24 @@
1
1
  import type { ControllerBindingInput } from 'gdc-common-utils-ts/models';
2
- import type { AsyncPollRequest, PollOptions, PollResult, SubmitAndPollResult, SubmitPayload, SubmitResponse } from '../../../gdc-sdk-core-ts/dist/index.js';
3
- export type { AsyncPollRequest, PollOptions, PollResult, SubmitAndPollResult, SubmitPayload, SubmitResponse, } from '../../../gdc-sdk-core-ts/dist/index.js';
2
+ import type { AsyncPollRequest, OrganizationActivationServiceOptions, PollOptions, PollResult, SubmitAndPollResult, SubmitPayload, SubmitResponse } from 'gdc-sdk-core-ts';
3
+ export type { AsyncPollRequest, PollOptions, PollResult, SubmitAndPollResult, SubmitPayload, SubmitResponse, } from 'gdc-sdk-core-ts';
4
4
  import type { EmployeeDeviceActivationResult, EmployeeDeviceActivationRequestInput } from '../device-activation.js';
5
5
  import type { HostRouteContext, LegalOrganizationOrderInput } from '../host-onboarding.js';
6
6
  import type { IndividualOrganizationConfirmOrderInput, RouteContext } from '../individual-onboarding.js';
7
7
  import type { IndividualOrganizationBootstrapInput, IndividualOrganizationStartResult } from '../individual-start.js';
8
8
  import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
9
9
  import type { CommunicationIngestionInput, ClinicalBundleSearchInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IpsOrFhirImportInput, OrganizationEmployeeCreationInput, RelatedPersonUpsertInput } from '../resource-operations.js';
10
+ /**
11
+ * Shared node-runtime activation input.
12
+ *
13
+ * Keep this centralized in the node runtime until every consumer compiles
14
+ * against a published `gdc-sdk-core-ts` version that exports the same alias.
15
+ */
16
+ export type NodeOrganizationActivationInput = {
17
+ vpToken: string;
18
+ controller?: ControllerBindingInput;
19
+ service?: OrganizationActivationServiceOptions;
20
+ additionalClaims?: Record<string, unknown>;
21
+ };
10
22
  /**
11
23
  * Runtime-neutral actor/application client contract as exposed by the Node SDK.
12
24
  *
@@ -15,11 +27,7 @@ import type { CommunicationIngestionInput, ClinicalBundleSearchInput, DigitalTwi
15
27
  * converge across runtimes.
16
28
  */
17
29
  export type RuntimeClient = {
18
- activateOrganizationInGatewayFromIcaProof?: (hostCtx: HostRouteContext, input: {
19
- vpToken: string;
20
- controller?: ControllerBindingInput;
21
- additionalClaims?: Record<string, unknown>;
22
- }, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
30
+ activateOrganizationInGatewayFromIcaProof?: (hostCtx: HostRouteContext, input: NodeOrganizationActivationInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
23
31
  confirmLegalOrganizationOrder?: (hostCtx: HostRouteContext, input: LegalOrganizationOrderInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
24
32
  createOrganizationEmployee?: (ctx: RouteContext, input: OrganizationEmployeeCreationInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
25
33
  activateEmployeeDeviceWithActivationRequest?: (input: EmployeeDeviceActivationRequestInput) => Promise<EmployeeDeviceActivationResult>;
@@ -1,14 +1,13 @@
1
- import type { ControllerBindingInput } from 'gdc-common-utils-ts/models';
2
- import { type NodeRuntimeClient, type PollOptions, type SubmitAndPollResult, type SubmitPayload } from './client-port.js';
1
+ import { type NodeOrganizationActivationInput, type NodeRuntimeClient, type PollOptions, type SubmitAndPollResult, type SubmitPayload } from './client-port.js';
3
2
  import type { HostRouteContext, LegalOrganizationOrderInput } from '../host-onboarding.js';
4
3
  export declare class HostOnboardingSdk {
5
4
  private readonly client;
6
5
  constructor(client: NodeRuntimeClient);
7
- activateOrganizationInGatewayFromIcaProof(hostCtx: HostRouteContext, input: {
8
- vpToken: string;
9
- controller?: ControllerBindingInput;
10
- additionalClaims?: Record<string, unknown>;
11
- }, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
6
+ /**
7
+ * Submits the legal organization activation proof and required declared
8
+ * service capabilities to GW CORE.
9
+ */
10
+ activateOrganizationInGatewayFromIcaProof(hostCtx: HostRouteContext, input: NodeOrganizationActivationInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
12
11
  confirmLegalOrganizationOrder(hostCtx: HostRouteContext, input: LegalOrganizationOrderInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
13
12
  submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
14
13
  }
@@ -1,8 +1,14 @@
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.
1
3
  import { requireClientMethod, submitAndPollWithClient, } from './client-port.js';
2
4
  export class HostOnboardingSdk {
3
5
  constructor(client) {
4
6
  this.client = client;
5
7
  }
8
+ /**
9
+ * Submits the legal organization activation proof and required declared
10
+ * service capabilities to GW CORE.
11
+ */
6
12
  activateOrganizationInGatewayFromIcaProof(hostCtx, input, pollOptions) {
7
13
  return requireClientMethod(this.client, 'activateOrganizationInGatewayFromIcaProof')(hostCtx, input, pollOptions);
8
14
  }
@@ -8,7 +8,7 @@ export declare class IndividualMemberSdk {
8
8
  /**
9
9
  * Creates or updates the member/caregiver `RelatedPerson` relationship to the subject.
10
10
  */
11
- upsertRelatedPersonAndPoll(ctx: RouteContext, input: RelatedPersonUpsertInput): Promise<import("./client-port.js").SubmitAndPollResult>;
11
+ upsertRelatedPersonAndPoll(ctx: RouteContext, input: RelatedPersonUpsertInput): Promise<import("gdc-sdk-core-ts/polling-model.js").SubmitAndPollResult>;
12
12
  /**
13
13
  * Requests a SMART token for a non-employee actor such as a `RelatedPerson`
14
14
  * caregiver, guardian, or family member.
@@ -1,5 +1,4 @@
1
- import type { ControllerBindingInput } from 'gdc-common-utils-ts/models';
2
- import { type NodeRuntimeClient, type PollOptions, type SubmitAndPollResult, type SubmitPayload } from './client-port.js';
1
+ import { type NodeOrganizationActivationInput, type NodeRuntimeClient, type PollOptions, type SubmitAndPollResult, type SubmitPayload } from './client-port.js';
3
2
  import type { HostRouteContext } from '../host-onboarding.js';
4
3
  import type { RouteContext } from '../individual-onboarding.js';
5
4
  import type { EmployeeDeviceActivationResult, EmployeeDeviceActivationRequestInput } from '../device-activation.js';
@@ -16,13 +15,11 @@ export declare class ProfessionalSdk {
16
15
  */
17
16
  constructor(client: NodeRuntimeClient);
18
17
  /**
19
- * Activates the legal organization in the gateway from an ICA-issued proof token.
18
+ * Activates the legal organization in the gateway from an ICA-issued proof
19
+ * token and the declared service capabilities that will be published through
20
+ * DID/DCAT discovery.
20
21
  */
21
- activateOrganizationInGatewayFromIcaProof(hostCtx: HostRouteContext, input: {
22
- vpToken: string;
23
- controller?: ControllerBindingInput;
24
- additionalClaims?: Record<string, unknown>;
25
- }, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
22
+ activateOrganizationInGatewayFromIcaProof(hostCtx: HostRouteContext, input: NodeOrganizationActivationInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
26
23
  /**
27
24
  * Creates an employee/professional under the current organization tenant.
28
25
  */
@@ -1,3 +1,5 @@
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.
1
3
  import { requireClientMethod, submitAndPollWithClient, } from './client-port.js';
2
4
  /**
3
5
  * Professional-oriented facade combining host onboarding, employee bootstrap,
@@ -11,7 +13,9 @@ export class ProfessionalSdk {
11
13
  this.client = client;
12
14
  }
13
15
  /**
14
- * Activates the legal organization in the gateway from an ICA-issued proof token.
16
+ * Activates the legal organization in the gateway from an ICA-issued proof
17
+ * token and the declared service capabilities that will be published through
18
+ * DID/DCAT discovery.
15
19
  */
16
20
  activateOrganizationInGatewayFromIcaProof(hostCtx, input, pollOptions) {
17
21
  return requireClientMethod(this.client, 'activateOrganizationInGatewayFromIcaProof')(hostCtx, input, pollOptions);
@@ -1 +1 @@
1
- export { resolvePollOptionsFromSeconds } from '../../gdc-sdk-core-ts/dist/index.js';
1
+ export { resolvePollOptionsFromSeconds } from 'gdc-sdk-core-ts';
@@ -1,2 +1,2 @@
1
1
  // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
2
- export { resolvePollOptionsFromSeconds } from '../../gdc-sdk-core-ts/dist/index.js';
2
+ export { resolvePollOptionsFromSeconds } from 'gdc-sdk-core-ts';
@@ -1,4 +1,4 @@
1
- import type { BundleSearchQuery, CommunicationInput, DateRange } from '../../gdc-sdk-core-ts/dist/index.js';
1
+ import type { BundleSearchQuery, CommunicationInput, DateRange } from 'gdc-sdk-core-ts';
2
2
  import type { SubmitAndPollResult } from './orchestration/client-port.js';
3
3
  import type { RouteContext } from './individual-onboarding.js';
4
4
  export type OrganizationEmployeeCreationInput = {
@@ -1,5 +1,5 @@
1
1
  import type { NodeOperatorNetworkType } from 'gdc-common-utils-ts/constants/network';
2
- import type { DataPersistencePolicy } from '../../gdc-sdk-core-ts/dist/index.js';
2
+ import type { DataPersistencePolicy } from 'gdc-sdk-core-ts';
3
3
  export type LegacyNodeSourcePackage = never;
4
4
  /**
5
5
  * Deployment/runtime form factor of the Node SDK host process itself.
package/dist/session.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ActorKind, Capability } from '../../gdc-sdk-core-ts/dist/index.js';
1
+ import type { ActorKind, Capability } from 'gdc-sdk-core-ts';
2
2
  import { HostOnboardingSdk } from './orchestration/host-onboarding-sdk.js';
3
3
  import { IndividualControllerSdk } from './orchestration/individual-controller-sdk.js';
4
4
  import { IndividualMemberSdk } from './orchestration/individual-member-sdk.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-sdk-node-ts",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
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.",
@@ -17,7 +17,8 @@
17
17
  "test:e2e:live-gw": "npm run build && RUN_LIVE_GW_E2E=1 node --test tests/live-gw-node-runtime.e2e.test.mjs"
18
18
  },
19
19
  "dependencies": {
20
- "gdc-common-utils-ts": "^1.5.1"
20
+ "gdc-common-utils-ts": "^1.7.0",
21
+ "gdc-sdk-core-ts": "^0.3.2"
21
22
  },
22
23
  "devDependencies": {
23
24
  "@types/node": "^20.14.10",