gdc-sdk-node-ts 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/orchestration/individual-controller-sdk.js +6 -0
- package/dist/orchestration/organization-controller-sdk.d.ts +1 -9
- package/dist/orchestration/organization-controller-sdk.js +1 -12
- package/dist/orchestration/organization-employee-sdk.d.ts +3 -1
- package/dist/orchestration/organization-employee-sdk.js +6 -1
- package/dist/session.js +1 -1
- package/package.json +3 -3
|
@@ -27,6 +27,7 @@ export class IndividualControllerSdk {
|
|
|
27
27
|
* Confirms the order returned by `startIndividualOrganization(...)`.
|
|
28
28
|
*/
|
|
29
29
|
confirmIndividualOrganizationOrder(input) {
|
|
30
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.IndividualBootstrap, ActorKinds.IndividualController, 'confirmIndividualOrganizationOrder');
|
|
30
31
|
return requireClientMethod(this.client, 'confirmIndividualOrganizationOrder')(input);
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
@@ -81,30 +82,35 @@ export class IndividualControllerSdk {
|
|
|
81
82
|
* Grants access to a professional through a consent flow.
|
|
82
83
|
*/
|
|
83
84
|
grantProfessionalAccess(ctx, input) {
|
|
85
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.ConsentGrantProfessionalAccess, ActorKinds.IndividualController, 'grantProfessionalAccess');
|
|
84
86
|
return requireClientMethod(this.client, 'grantProfessionalAccess')(ctx, input);
|
|
85
87
|
}
|
|
86
88
|
/**
|
|
87
89
|
* Imports a FHIR/IPS payload and waits until it is indexed.
|
|
88
90
|
*/
|
|
89
91
|
importIpsOrFhirAndUpdateIndex(ctx, input) {
|
|
92
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.IndividualImportIps, ActorKinds.IndividualController, 'importIpsOrFhirAndUpdateIndex');
|
|
90
93
|
return requireClientMethod(this.client, 'importIpsOrFhirAndUpdateIndex')(ctx, input);
|
|
91
94
|
}
|
|
92
95
|
/**
|
|
93
96
|
* Creates or updates a `RelatedPerson` for non-employee caregivers or family members.
|
|
94
97
|
*/
|
|
95
98
|
upsertRelatedPersonAndPoll(ctx, input) {
|
|
99
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.IndividualUpsertRelatedPerson, ActorKinds.IndividualController, 'upsertRelatedPersonAndPoll');
|
|
96
100
|
return requireClientMethod(this.client, 'upsertRelatedPersonAndPoll')(ctx, input);
|
|
97
101
|
}
|
|
98
102
|
/**
|
|
99
103
|
* Ingests a FHIR `Communication` and waits for indexing.
|
|
100
104
|
*/
|
|
101
105
|
ingestCommunicationAndUpdateIndex(ctx, input) {
|
|
106
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.IndividualIngestCommunication, ActorKinds.IndividualController, 'ingestCommunicationAndUpdateIndex');
|
|
102
107
|
return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
|
|
103
108
|
}
|
|
104
109
|
/**
|
|
105
110
|
* Generates a digital twin projection from subject data.
|
|
106
111
|
*/
|
|
107
112
|
generateDigitalTwinFromSubjectData(ctx, input) {
|
|
113
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.IndividualGenerateDigitalTwin, ActorKinds.IndividualController, 'generateDigitalTwinFromSubjectData');
|
|
108
114
|
return requireClientMethod(this.client, 'generateDigitalTwinFromSubjectData')(ctx, input);
|
|
109
115
|
}
|
|
110
116
|
/**
|
|
@@ -3,7 +3,7 @@ import type { RouteContext } from '../individual-onboarding.js';
|
|
|
3
3
|
import type { EmployeeDeviceActivationResult, EmployeeDeviceActivationRequestInput } from '../device-activation.js';
|
|
4
4
|
import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
|
|
5
5
|
import type { NodeCapability } from '../session.js';
|
|
6
|
-
import type {
|
|
6
|
+
import type { OrganizationEmployeeCreationInput, OrganizationEmployeeLifecycleInput } from '../resource-operations.js';
|
|
7
7
|
/**
|
|
8
8
|
* Organization-controller oriented facade over a `NodeRuntimeClient`.
|
|
9
9
|
*
|
|
@@ -49,14 +49,6 @@ export declare class OrganizationControllerSdk {
|
|
|
49
49
|
* compatibility requires overriding them on the call.
|
|
50
50
|
*/
|
|
51
51
|
requestSmartToken(input: SmartTokenRequestInput): Promise<SmartTokenExchangeResult>;
|
|
52
|
-
/**
|
|
53
|
-
* Ingests a `Communication` and waits for indexing.
|
|
54
|
-
*/
|
|
55
|
-
ingestCommunicationAndUpdateIndex(ctx: RouteContext, input: CommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
56
|
-
/**
|
|
57
|
-
* Grants access to a professional through a consent flow.
|
|
58
|
-
*/
|
|
59
|
-
grantProfessionalAccess(ctx: RouteContext, input: GrantProfessionalAccessInput): Promise<GrantProfessionalAccessResult>;
|
|
60
52
|
/**
|
|
61
53
|
* Low-level escape hatch for direct submit/poll flows.
|
|
62
54
|
*/
|
|
@@ -65,20 +65,9 @@ export class OrganizationControllerSdk {
|
|
|
65
65
|
* compatibility requires overriding them on the call.
|
|
66
66
|
*/
|
|
67
67
|
requestSmartToken(input) {
|
|
68
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.OrganizationRequestSmartToken, ActorKinds.OrganizationController, 'requestSmartToken');
|
|
68
69
|
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
69
70
|
}
|
|
70
|
-
/**
|
|
71
|
-
* Ingests a `Communication` and waits for indexing.
|
|
72
|
-
*/
|
|
73
|
-
ingestCommunicationAndUpdateIndex(ctx, input) {
|
|
74
|
-
return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Grants access to a professional through a consent flow.
|
|
78
|
-
*/
|
|
79
|
-
grantProfessionalAccess(ctx, input) {
|
|
80
|
-
return requireClientMethod(this.client, 'grantProfessionalAccess')(ctx, input);
|
|
81
|
-
}
|
|
82
71
|
/**
|
|
83
72
|
* Low-level escape hatch for direct submit/poll flows.
|
|
84
73
|
*/
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type NodeRuntimeClient } from './client-port.js';
|
|
2
2
|
import type { EmployeeDeviceActivationResult, EmployeeDeviceActivationRequestInput } from '../device-activation.js';
|
|
3
3
|
import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
|
|
4
|
+
import type { NodeCapability } from '../session.js';
|
|
4
5
|
export declare class OrganizationEmployeeSdk {
|
|
5
6
|
private readonly client;
|
|
6
|
-
|
|
7
|
+
private readonly capabilities?;
|
|
8
|
+
constructor(client: NodeRuntimeClient, capabilities?: readonly NodeCapability[] | undefined);
|
|
7
9
|
activateEmployeeDeviceWithActivationRequest(input: EmployeeDeviceActivationRequestInput): Promise<EmployeeDeviceActivationResult>;
|
|
8
10
|
requestSmartToken(input: SmartTokenRequestInput): Promise<SmartTokenExchangeResult>;
|
|
9
11
|
}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { ActorCapabilities, ActorKinds } from 'gdc-common-utils-ts/constants/actor-session';
|
|
2
3
|
import { requireClientMethod } from './client-port.js';
|
|
4
|
+
import { assertFacadeCapability } from './capability-guard.js';
|
|
3
5
|
export class OrganizationEmployeeSdk {
|
|
4
|
-
constructor(client) {
|
|
6
|
+
constructor(client, capabilities) {
|
|
5
7
|
this.client = client;
|
|
8
|
+
this.capabilities = capabilities;
|
|
6
9
|
}
|
|
7
10
|
activateEmployeeDeviceWithActivationRequest(input) {
|
|
11
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.OrganizationActivateDevice, ActorKinds.OrganizationEmployee, 'activateEmployeeDeviceWithActivationRequest');
|
|
8
12
|
return requireClientMethod(this.client, 'activateEmployeeDeviceWithActivationRequest')(input);
|
|
9
13
|
}
|
|
10
14
|
requestSmartToken(input) {
|
|
15
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.OrganizationRequestSmartToken, ActorKinds.OrganizationEmployee, 'requestSmartToken');
|
|
11
16
|
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
12
17
|
}
|
|
13
18
|
}
|
package/dist/session.js
CHANGED
|
@@ -38,7 +38,7 @@ export class ActorSession {
|
|
|
38
38
|
}
|
|
39
39
|
asOrganizationEmployee() {
|
|
40
40
|
this.assertActorKind(ActorKinds.OrganizationEmployee);
|
|
41
|
-
return new OrganizationEmployeeSdk(this.requireClient());
|
|
41
|
+
return new OrganizationEmployeeSdk(this.requireClient(), this.capabilities);
|
|
42
42
|
}
|
|
43
43
|
asIndividualController() {
|
|
44
44
|
this.assertActorKind(ActorKinds.IndividualController);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdc-sdk-node-ts",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Next-generation Node runtime package for the GDC SDK family",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Antifraud Services Inc.",
|
|
@@ -17,8 +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.
|
|
21
|
-
"gdc-sdk-core-ts": "^0.8.
|
|
20
|
+
"gdc-common-utils-ts": "^1.17.0",
|
|
21
|
+
"gdc-sdk-core-ts": "^0.8.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^20.14.10",
|