gdc-sdk-front-ts 0.6.5 → 0.6.6
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 +21 -8
- package/dist/ProfileManager.d.ts +22 -0
- package/dist/ProfileManager.js +155 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/orchestration/client-port.d.ts +161 -0
- package/dist/orchestration/client-port.js +26 -0
- package/dist/orchestration/facades.d.ts +65 -0
- package/dist/orchestration/facades.js +142 -0
- package/dist/orchestration/host-onboarding-sdk.d.ts +9 -0
- package/dist/orchestration/host-onboarding-sdk.js +16 -0
- package/dist/orchestration/individual-controller-sdk.d.ts +18 -0
- package/dist/orchestration/individual-controller-sdk.js +43 -0
- package/dist/orchestration/individual-member-sdk.d.ts +8 -0
- package/dist/orchestration/individual-member-sdk.js +13 -0
- package/dist/orchestration/organization-controller-sdk.d.ts +11 -0
- package/dist/orchestration/organization-controller-sdk.js +22 -0
- package/dist/orchestration/organization-employee-sdk.d.ts +8 -0
- package/dist/orchestration/organization-employee-sdk.js +13 -0
- package/dist/orchestration/personal-sdk.d.ts +13 -0
- package/dist/orchestration/personal-sdk.js +28 -0
- package/dist/orchestration/professional-sdk.d.ts +10 -0
- package/dist/orchestration/professional-sdk.js +19 -0
- package/dist/services.d.ts +58 -10
- package/dist/services.js +88 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -14,22 +14,35 @@ Use this package when your frontend needs to:
|
|
|
14
14
|
This package is frontend-facing. It should explain app flows, not gateway route
|
|
15
15
|
details.
|
|
16
16
|
|
|
17
|
+
Architectural rule:
|
|
18
|
+
|
|
19
|
+
- `gdc-sdk-front-ts` should converge on the same actor-scoped facade boundaries
|
|
20
|
+
as `gdc-sdk-node-ts`
|
|
21
|
+
- transport and adapter details may differ
|
|
22
|
+
- business ownership must not differ by runtime
|
|
23
|
+
|
|
17
24
|
## Start Here
|
|
18
25
|
|
|
19
26
|
If you are integrating this package for the first time, open these in order:
|
|
20
27
|
|
|
21
|
-
1. [docs/
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
1. [gdc-sdk-core-ts/docs/101-SDK_PACKAGE_BOUNDARIES.md](https://github.com/Global-DataCare/gdc-sdk-core-ts/blob/main/docs/101-SDK_PACKAGE_BOUNDARIES.md)
|
|
29
|
+
Why `core`, `node`, and `front` are separate packages, what each one owns,
|
|
30
|
+
and why frontend facades should mirror backend actor boundaries.
|
|
31
|
+
1. [docs/101-SDK_INTEGRATION.md](./docs/101-SDK_INTEGRATION.md)
|
|
32
|
+
Real frontend/native setup, imports, `new ClientSDK(...)`,
|
|
33
|
+
`initializeCommunicationIdentity(...)`, provider discovery, and
|
|
24
34
|
`initializeSession(...)`.
|
|
25
35
|
2. [docs/DATASPACE_DISCOVERY_FRONTEND_TODO.md](./docs/DATASPACE_DISCOVERY_FRONTEND_TODO.md)
|
|
26
36
|
Frontend discovery guide for BFF-first provider/operator discovery, UI card
|
|
27
37
|
mapping, and copy/paste backend DTO consumption.
|
|
28
|
-
3. [gdc-sdk-core-ts/docs/
|
|
38
|
+
3. [gdc-sdk-core-ts/docs/101-SDK_FLOWS.md](https://github.com/Global-DataCare/gdc-sdk-core-ts/blob/main/docs/101-SDK_FLOWS.md)
|
|
29
39
|
Shared business-flow map by actor family.
|
|
30
|
-
4. [gdc-
|
|
40
|
+
4. [gdc-sdk-node-ts/docs/101-LIVE_GW_LOCAL.md](https://github.com/Global-DataCare/gdc-sdk-node-ts/blob/main/docs/101-LIVE_GW_LOCAL.md)
|
|
41
|
+
Canonical local/TTY/Docker GW reference when the frontend team also needs a
|
|
42
|
+
real local GW running for end-to-end checks.
|
|
43
|
+
5. [gdc-common-utils-ts/src/examples/frontend-session.ts](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/main/src/examples/frontend-session.ts)
|
|
31
44
|
Shared profile/session payload source of truth.
|
|
32
|
-
|
|
45
|
+
6. [gdc-common-utils-ts/docs/LIFECYCLE_101.md](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/main/docs/LIFECYCLE_101.md)
|
|
33
46
|
Canonical lifecycle semantics and reusable placeholders for UI and portal flows.
|
|
34
47
|
|
|
35
48
|
If you need the shortest path:
|
|
@@ -37,12 +50,12 @@ If you need the shortest path:
|
|
|
37
50
|
- app identity required by GW CORE:
|
|
38
51
|
`appId` mandatory, `appVersion` optional with default `v1.0`
|
|
39
52
|
- frontend technical identity:
|
|
40
|
-
[`initializeCommunicationIdentity(...)`](./docs/
|
|
53
|
+
[`initializeCommunicationIdentity(...)`](./docs/101-SDK_INTEGRATION.md)
|
|
41
54
|
for the technical device/channel profile identity, not the legal organization id
|
|
42
55
|
- main runtime class:
|
|
43
56
|
[`ClientSDK`](src/ClientSDK.ts)
|
|
44
57
|
- profile/session bootstrap:
|
|
45
|
-
[`initializeSession(...)`](./docs/
|
|
58
|
+
[`initializeSession(...)`](./docs/101-SDK_INTEGRATION.md)
|
|
46
59
|
|
|
47
60
|
## Executable Usage Examples
|
|
48
61
|
|
package/dist/ProfileManager.d.ts
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import type { DeviceAppType, DeviceUserClass } from 'gdc-common-utils-ts/constants';
|
|
2
2
|
import type { Profile } from './types.js';
|
|
3
3
|
import type { CommonServices, FamilyAdminServices, IndividualServices, OrgAdminServices, ProfessionalServices } from './roleRegistry.js';
|
|
4
|
+
import { HostOnboardingSdk } from './orchestration/host-onboarding-sdk.js';
|
|
5
|
+
import { IndividualControllerSdk } from './orchestration/individual-controller-sdk.js';
|
|
6
|
+
import { IndividualMemberSdk } from './orchestration/individual-member-sdk.js';
|
|
7
|
+
import { OrganizationControllerSdk } from './orchestration/organization-controller-sdk.js';
|
|
8
|
+
import { OrganizationEmployeeSdk } from './orchestration/organization-employee-sdk.js';
|
|
9
|
+
import { PersonalSdk } from './orchestration/personal-sdk.js';
|
|
10
|
+
import { ProfessionalSdk } from './orchestration/professional-sdk.js';
|
|
4
11
|
/**
|
|
5
12
|
* Role-scoped session object returned by `ClientSDK.initializeSession(...)`.
|
|
6
13
|
*
|
|
7
14
|
* It exposes the common/auth surface plus the services allowed by the current
|
|
8
15
|
* profile capabilities.
|
|
16
|
+
*
|
|
17
|
+
* Architectural note:
|
|
18
|
+
* `ProfileManager` remains the frontend session/composition entry point, but it
|
|
19
|
+
* also materializes actor-scoped facades that mirror `gdc-sdk-node-ts`.
|
|
20
|
+
*
|
|
21
|
+
* The goal is to preserve the legacy/frontend-friendly session API while
|
|
22
|
+
* keeping the same actor boundaries as the backend runtime.
|
|
9
23
|
*/
|
|
10
24
|
export declare class ProfileManager {
|
|
11
25
|
readonly profile: Profile;
|
|
@@ -17,6 +31,7 @@ export declare class ProfileManager {
|
|
|
17
31
|
readonly familyAdmin?: FamilyAdminServices;
|
|
18
32
|
readonly individual?: IndividualServices;
|
|
19
33
|
readonly professional?: ProfessionalServices;
|
|
34
|
+
private readonly runtimeClient;
|
|
20
35
|
/**
|
|
21
36
|
* @param profile Current logical profile.
|
|
22
37
|
* @param orgDid DID of the provider/organization used as the session anchor.
|
|
@@ -131,6 +146,13 @@ export declare class ProfileManager {
|
|
|
131
146
|
}): Promise<{
|
|
132
147
|
thid: string;
|
|
133
148
|
}>;
|
|
149
|
+
asHostOnboarding(): HostOnboardingSdk;
|
|
150
|
+
asOrganizationController(): OrganizationControllerSdk;
|
|
151
|
+
asOrganizationEmployee(): OrganizationEmployeeSdk;
|
|
152
|
+
asIndividualController(): IndividualControllerSdk;
|
|
153
|
+
asIndividualMember(): IndividualMemberSdk;
|
|
154
|
+
asPersonal(): PersonalSdk;
|
|
155
|
+
asProfessional(): ProfessionalSdk;
|
|
134
156
|
}
|
|
135
157
|
/**
|
|
136
158
|
* Preferred neutral frontend actor-session surface.
|
package/dist/ProfileManager.js
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
2
|
import { CommonAuthService } from './services.js';
|
|
3
3
|
import { mapCapabilitiesToServices } from './capabilityMapper.js';
|
|
4
|
+
import { HostOnboardingSdk, } from './orchestration/host-onboarding-sdk.js';
|
|
5
|
+
import { IndividualControllerSdk } from './orchestration/individual-controller-sdk.js';
|
|
6
|
+
import { IndividualMemberSdk } from './orchestration/individual-member-sdk.js';
|
|
7
|
+
import { OrganizationControllerSdk } from './orchestration/organization-controller-sdk.js';
|
|
8
|
+
import { OrganizationEmployeeSdk } from './orchestration/organization-employee-sdk.js';
|
|
9
|
+
import { PersonalSdk } from './orchestration/personal-sdk.js';
|
|
10
|
+
import { ProfessionalSdk } from './orchestration/professional-sdk.js';
|
|
11
|
+
import { createSyntheticSubmitAndPollResult } from './orchestration/client-port.js';
|
|
4
12
|
/**
|
|
5
13
|
* Role-scoped session object returned by `ClientSDK.initializeSession(...)`.
|
|
6
14
|
*
|
|
7
15
|
* It exposes the common/auth surface plus the services allowed by the current
|
|
8
16
|
* profile capabilities.
|
|
17
|
+
*
|
|
18
|
+
* Architectural note:
|
|
19
|
+
* `ProfileManager` remains the frontend session/composition entry point, but it
|
|
20
|
+
* also materializes actor-scoped facades that mirror `gdc-sdk-node-ts`.
|
|
21
|
+
*
|
|
22
|
+
* The goal is to preserve the legacy/frontend-friendly session API while
|
|
23
|
+
* keeping the same actor boundaries as the backend runtime.
|
|
9
24
|
*/
|
|
10
25
|
export class ProfileManager {
|
|
11
26
|
/**
|
|
@@ -21,6 +36,111 @@ export class ProfileManager {
|
|
|
21
36
|
this.familyAdmin = mapped.familyAdmin;
|
|
22
37
|
this.individual = mapped.individual;
|
|
23
38
|
this.professional = mapped.professional;
|
|
39
|
+
this.runtimeClient = {
|
|
40
|
+
activateOrganizationInGatewayFromIcaProof: (input) => {
|
|
41
|
+
if (!this.orgAdmin?.admin)
|
|
42
|
+
throw new Error('orgAdmin.admin service is not available for this profile.');
|
|
43
|
+
return this.orgAdmin.admin.activateOrganizationInGatewayFromIcaProof(input);
|
|
44
|
+
},
|
|
45
|
+
confirmLegalOrganizationOrder: (input) => {
|
|
46
|
+
if (!this.orgAdmin?.admin)
|
|
47
|
+
throw new Error('orgAdmin.admin service is not available for this profile.');
|
|
48
|
+
return this.orgAdmin.admin.confirmLegalOrganizationOrder(input);
|
|
49
|
+
},
|
|
50
|
+
createOrganizationEmployee: (ctx, input) => {
|
|
51
|
+
if (!this.orgAdmin?.admin)
|
|
52
|
+
throw new Error('orgAdmin.admin service is not available for this profile.');
|
|
53
|
+
return this.orgAdmin.admin.createOrganizationEmployee(ctx.providerDid, ctx.idToken, input)
|
|
54
|
+
.then((result) => createSyntheticSubmitAndPollResult(result.thid));
|
|
55
|
+
},
|
|
56
|
+
disableEmployee: (ctx, input) => {
|
|
57
|
+
if (!this.orgAdmin?.admin)
|
|
58
|
+
throw new Error('orgAdmin.admin service is not available for this profile.');
|
|
59
|
+
return this.orgAdmin.admin.disableEmployee(ctx.providerDid, ctx.idToken, input);
|
|
60
|
+
},
|
|
61
|
+
purgeEmployee: (ctx, input) => {
|
|
62
|
+
if (!this.orgAdmin?.admin)
|
|
63
|
+
throw new Error('orgAdmin.admin service is not available for this profile.');
|
|
64
|
+
return this.orgAdmin.admin.purgeEmployee(ctx.providerDid, ctx.idToken, input);
|
|
65
|
+
},
|
|
66
|
+
activateEmployeeDeviceWithActivationRequest: (ctx, input) => this.common.auth.activateEmployeeDeviceWithActivationRequest(input.activationCode, ctx.providerDid, ctx.idToken, input.dcrPayload),
|
|
67
|
+
requestSmartToken: (input) => this.common.auth.requestSmartToken(input),
|
|
68
|
+
startIndividualOrganization: (ctx, input) => {
|
|
69
|
+
if (!this.familyAdmin?.admin)
|
|
70
|
+
throw new Error('familyAdmin.admin service is not available for this profile.');
|
|
71
|
+
return this.familyAdmin.admin.startIndividualOrganization(ctx.providerDid, ctx.idToken, input);
|
|
72
|
+
},
|
|
73
|
+
confirmIndividualOrganizationOrder: (ctx, input) => {
|
|
74
|
+
if (!this.familyAdmin?.admin)
|
|
75
|
+
throw new Error('familyAdmin.admin service is not available for this profile.');
|
|
76
|
+
return this.familyAdmin.admin.confirmIndividualOrganizationOrder(ctx.providerDid, ctx.idToken, input);
|
|
77
|
+
},
|
|
78
|
+
disableIndividual: (ctx, input) => {
|
|
79
|
+
if (!this.familyAdmin?.admin)
|
|
80
|
+
throw new Error('familyAdmin.admin service is not available for this profile.');
|
|
81
|
+
return this.familyAdmin.admin.disableIndividual(ctx.providerDid, ctx.idToken, input);
|
|
82
|
+
},
|
|
83
|
+
purgeIndividual: (ctx, input) => {
|
|
84
|
+
if (!this.familyAdmin?.admin)
|
|
85
|
+
throw new Error('familyAdmin.admin service is not available for this profile.');
|
|
86
|
+
return this.familyAdmin.admin.purgeIndividual(ctx.providerDid, ctx.idToken, input);
|
|
87
|
+
},
|
|
88
|
+
disableIndividualMember: (ctx, input) => {
|
|
89
|
+
if (!this.familyAdmin?.admin)
|
|
90
|
+
throw new Error('familyAdmin.admin service is not available for this profile.');
|
|
91
|
+
return this.familyAdmin.admin.disableIndividualMember(ctx.providerDid, ctx.idToken, input);
|
|
92
|
+
},
|
|
93
|
+
purgeIndividualMember: (ctx, input) => {
|
|
94
|
+
if (!this.familyAdmin?.admin)
|
|
95
|
+
throw new Error('familyAdmin.admin service is not available for this profile.');
|
|
96
|
+
return this.familyAdmin.admin.purgeIndividualMember(ctx.providerDid, ctx.idToken, input);
|
|
97
|
+
},
|
|
98
|
+
grantProfessionalAccess: (ctx, input) => {
|
|
99
|
+
if (this.professional?.physician) {
|
|
100
|
+
return this.professional.physician.grantProfessionalAccess({ ...input, providerDid: ctx.providerDid, requiredScope: ctx.requiredScope, idToken: ctx.idToken });
|
|
101
|
+
}
|
|
102
|
+
if (!this.individual?.service)
|
|
103
|
+
throw new Error('individual.service is not available for this profile.');
|
|
104
|
+
return this.individual.service.grantProfessionalAccess({ ...input, providerDid: ctx.providerDid, requiredScope: ctx.requiredScope || '', idToken: ctx.idToken });
|
|
105
|
+
},
|
|
106
|
+
importIpsOrFhirAndUpdateIndex: (ctx, input) => {
|
|
107
|
+
if (!this.individual?.service)
|
|
108
|
+
throw new Error('individual.service is not available for this profile.');
|
|
109
|
+
return this.individual.service.importIpsOrFhirAndUpdateIndex(input.compositionPayload, ctx.providerDid, ctx.requiredScope || '', ctx.idToken, input.format).then((result) => createSyntheticSubmitAndPollResult(result.thid));
|
|
110
|
+
},
|
|
111
|
+
upsertRelatedPersonAndPoll: (ctx, input) => {
|
|
112
|
+
if (!this.individual?.service)
|
|
113
|
+
throw new Error('individual.service is not available for this profile.');
|
|
114
|
+
return this.individual.service.upsertRelatedPersonAndPoll(input.relatedPersonPayload, ctx.providerDid, ctx.requiredScope || '', ctx.idToken);
|
|
115
|
+
},
|
|
116
|
+
ingestCommunicationAndUpdateIndex: (ctx, input) => {
|
|
117
|
+
if (this.professional?.physician) {
|
|
118
|
+
return this.professional.physician.ingestCommunicationAndUpdateIndex(input.communicationPayload, ctx.providerDid, ctx.requiredScope || '', ctx.idToken, input.pathFormatSegment);
|
|
119
|
+
}
|
|
120
|
+
if (this.professional?.paramedic) {
|
|
121
|
+
return this.professional.paramedic.ingestCommunicationAndUpdateIndex(input.communicationPayload, ctx.providerDid, ctx.requiredScope || '', ctx.idToken, input.pathFormatSegment);
|
|
122
|
+
}
|
|
123
|
+
if (!this.individual?.service)
|
|
124
|
+
throw new Error('individual.service is not available for this profile.');
|
|
125
|
+
return this.individual.service.ingestCommunicationAndUpdateIndex(input.communicationPayload, ctx.providerDid, ctx.requiredScope || '', ctx.idToken, input.pathFormatSegment);
|
|
126
|
+
},
|
|
127
|
+
generateDigitalTwinFromSubjectData: (ctx, input) => {
|
|
128
|
+
if (!this.individual?.service)
|
|
129
|
+
throw new Error('individual.service is not available for this profile.');
|
|
130
|
+
return this.individual.service.generateDigitalTwinFromSubjectData(input.compositionPayload, ctx.providerDid, ctx.requiredScope || '', ctx.idToken, input.format).then((result) => createSyntheticSubmitAndPollResult(result.thid));
|
|
131
|
+
},
|
|
132
|
+
searchClinicalBundle: (ctx, input) => {
|
|
133
|
+
if (!this.individual?.service)
|
|
134
|
+
throw new Error('individual.service is not available for this profile.');
|
|
135
|
+
return this.individual.service.searchClinicalBundle(input, ctx.providerDid, ctx.requiredScope || '', ctx.idToken);
|
|
136
|
+
},
|
|
137
|
+
getLatestIps: (ctx, subject) => {
|
|
138
|
+
if (!this.individual?.service)
|
|
139
|
+
throw new Error('individual.service is not available for this profile.');
|
|
140
|
+
return this.individual.service.getLatestIps(subject, ctx.providerDid, ctx.requiredScope || '', ctx.idToken);
|
|
141
|
+
},
|
|
142
|
+
submitAndPoll: async (_submitPath, _pollPath, payload) => createSyntheticSubmitAndPollResult(String(payload.thid || `front-${Date.now()}`)),
|
|
143
|
+
};
|
|
24
144
|
}
|
|
25
145
|
/**
|
|
26
146
|
* Organization-admin helper for employee/professional creation.
|
|
@@ -67,6 +187,41 @@ export class ProfileManager {
|
|
|
67
187
|
}
|
|
68
188
|
return this.individual.service.generateDigitalTwinFromSubjectData(params.compositionPayload, params.providerDid, params.requiredScope, params.idToken, params.format);
|
|
69
189
|
}
|
|
190
|
+
asHostOnboarding() {
|
|
191
|
+
if (!this.orgAdmin?.admin)
|
|
192
|
+
throw new Error('HostOnboardingSdk is not available for this profile.');
|
|
193
|
+
return new HostOnboardingSdk(this.runtimeClient);
|
|
194
|
+
}
|
|
195
|
+
asOrganizationController() {
|
|
196
|
+
if (!this.orgAdmin?.admin)
|
|
197
|
+
throw new Error('OrganizationControllerSdk is not available for this profile.');
|
|
198
|
+
return new OrganizationControllerSdk(this.runtimeClient);
|
|
199
|
+
}
|
|
200
|
+
asOrganizationEmployee() {
|
|
201
|
+
return new OrganizationEmployeeSdk(this.runtimeClient);
|
|
202
|
+
}
|
|
203
|
+
asIndividualController() {
|
|
204
|
+
if (!this.familyAdmin?.admin)
|
|
205
|
+
throw new Error('IndividualControllerSdk is not available for this profile.');
|
|
206
|
+
return new IndividualControllerSdk(this.runtimeClient);
|
|
207
|
+
}
|
|
208
|
+
asIndividualMember() {
|
|
209
|
+
if (!this.individual?.service)
|
|
210
|
+
throw new Error('IndividualMemberSdk is not available for this profile.');
|
|
211
|
+
return new IndividualMemberSdk(this.runtimeClient);
|
|
212
|
+
}
|
|
213
|
+
asPersonal() {
|
|
214
|
+
if (!this.familyAdmin?.admin && !this.individual?.service) {
|
|
215
|
+
throw new Error('PersonalSdk is not available for this profile.');
|
|
216
|
+
}
|
|
217
|
+
return new PersonalSdk(this.runtimeClient);
|
|
218
|
+
}
|
|
219
|
+
asProfessional() {
|
|
220
|
+
if (!this.professional?.physician && !this.professional?.paramedic && !this.individual?.service) {
|
|
221
|
+
throw new Error('ProfessionalSdk is not available for this profile.');
|
|
222
|
+
}
|
|
223
|
+
return new ProfessionalSdk(this.runtimeClient);
|
|
224
|
+
}
|
|
70
225
|
}
|
|
71
226
|
/**
|
|
72
227
|
* Preferred neutral frontend actor-session surface.
|
package/dist/index.d.ts
CHANGED
|
@@ -12,3 +12,11 @@ export * from './ProfileManager.js';
|
|
|
12
12
|
export * from './ProfileRegistry.js';
|
|
13
13
|
export * from './ClientSDK.js';
|
|
14
14
|
export * from './discovery/index.js';
|
|
15
|
+
export * from './orchestration/client-port.js';
|
|
16
|
+
export * from './orchestration/host-onboarding-sdk.js';
|
|
17
|
+
export * from './orchestration/organization-controller-sdk.js';
|
|
18
|
+
export * from './orchestration/organization-employee-sdk.js';
|
|
19
|
+
export * from './orchestration/individual-controller-sdk.js';
|
|
20
|
+
export * from './orchestration/individual-member-sdk.js';
|
|
21
|
+
export * from './orchestration/personal-sdk.js';
|
|
22
|
+
export * from './orchestration/professional-sdk.js';
|
package/dist/index.js
CHANGED
|
@@ -13,3 +13,11 @@ export * from './ProfileManager.js';
|
|
|
13
13
|
export * from './ProfileRegistry.js';
|
|
14
14
|
export * from './ClientSDK.js';
|
|
15
15
|
export * from './discovery/index.js';
|
|
16
|
+
export * from './orchestration/client-port.js';
|
|
17
|
+
export * from './orchestration/host-onboarding-sdk.js';
|
|
18
|
+
export * from './orchestration/organization-controller-sdk.js';
|
|
19
|
+
export * from './orchestration/organization-employee-sdk.js';
|
|
20
|
+
export * from './orchestration/individual-controller-sdk.js';
|
|
21
|
+
export * from './orchestration/individual-member-sdk.js';
|
|
22
|
+
export * from './orchestration/personal-sdk.js';
|
|
23
|
+
export * from './orchestration/professional-sdk.js';
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import type { DeviceAppType, DeviceUserClass } from 'gdc-common-utils-ts/constants';
|
|
2
|
+
import type { BundleSearchQuery, CommunicationInput, PollOptions, SubmitAndPollResult, SubmitPayload } from 'gdc-sdk-core-ts';
|
|
3
|
+
export type FrontRouteContext = {
|
|
4
|
+
providerDid: string;
|
|
5
|
+
idToken: string;
|
|
6
|
+
requiredScope?: string;
|
|
7
|
+
format?: 'org.hl7.fhir.r4' | 'org.hl7.fhir.api';
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Frontend/runtime-neutral contract consumed by actor-scoped facades in
|
|
11
|
+
* `gdc-sdk-front-ts`.
|
|
12
|
+
*
|
|
13
|
+
* Frontend code still needs the same actor boundaries as `gdc-sdk-node-ts`,
|
|
14
|
+
* even when execution goes through local services, a BFF, or browser/mobile
|
|
15
|
+
* adapters instead of direct GW calls.
|
|
16
|
+
*/
|
|
17
|
+
export type FrontOrganizationActivationInput = {
|
|
18
|
+
vpToken: string;
|
|
19
|
+
controller?: Record<string, unknown>;
|
|
20
|
+
service?: Record<string, unknown>;
|
|
21
|
+
additionalClaims?: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
export type FrontLegalOrganizationOrderInput = {
|
|
24
|
+
offerId: string;
|
|
25
|
+
orderClaims?: Record<string, unknown>;
|
|
26
|
+
};
|
|
27
|
+
export type FrontOrganizationEmployeeCreationInput = {
|
|
28
|
+
email: string;
|
|
29
|
+
role: string;
|
|
30
|
+
userClass?: DeviceUserClass;
|
|
31
|
+
type?: DeviceAppType;
|
|
32
|
+
employeeClaims?: Record<string, unknown>;
|
|
33
|
+
};
|
|
34
|
+
export type FrontOrganizationEmployeeLifecycleInput = {
|
|
35
|
+
employeeClaims?: Record<string, unknown>;
|
|
36
|
+
resourceId?: string;
|
|
37
|
+
};
|
|
38
|
+
export type FrontEmployeeDeviceActivationRequestInput = {
|
|
39
|
+
activationCode: string;
|
|
40
|
+
dcrPayload?: Record<string, unknown>;
|
|
41
|
+
};
|
|
42
|
+
export type FrontSmartTokenRequestInput = {
|
|
43
|
+
idToken: string;
|
|
44
|
+
scopes: string[];
|
|
45
|
+
actorDid?: string;
|
|
46
|
+
subjectDid?: string;
|
|
47
|
+
clientId?: string;
|
|
48
|
+
issuer?: string;
|
|
49
|
+
audience?: string;
|
|
50
|
+
additionalClaims?: Record<string, unknown>;
|
|
51
|
+
};
|
|
52
|
+
export type FrontSmartTokenExchangeResult = {
|
|
53
|
+
status: 'fetched' | 'failed';
|
|
54
|
+
accessToken?: string;
|
|
55
|
+
tokenType?: string;
|
|
56
|
+
scopes?: string[];
|
|
57
|
+
statusCode?: number;
|
|
58
|
+
response?: unknown;
|
|
59
|
+
};
|
|
60
|
+
export type FrontIndividualOrganizationBootstrapInput = {
|
|
61
|
+
registrationClaims: object;
|
|
62
|
+
acceptedOfferId?: string;
|
|
63
|
+
};
|
|
64
|
+
export type FrontIndividualOrganizationStartResult = {
|
|
65
|
+
registrationThid: string;
|
|
66
|
+
confirmationThid?: string;
|
|
67
|
+
};
|
|
68
|
+
export type FrontIndividualOrganizationConfirmOrderInput = {
|
|
69
|
+
offerId: string;
|
|
70
|
+
orderClaims?: Record<string, unknown>;
|
|
71
|
+
};
|
|
72
|
+
export type FrontIndividualOrganizationLifecycleInput = {
|
|
73
|
+
organizationClaims?: Record<string, unknown>;
|
|
74
|
+
resourceId?: string;
|
|
75
|
+
};
|
|
76
|
+
export type FrontIndividualMemberLifecycleInput = {
|
|
77
|
+
memberClaims?: Record<string, unknown>;
|
|
78
|
+
resourceId?: string;
|
|
79
|
+
};
|
|
80
|
+
export type FrontIpsOrFhirImportInput = {
|
|
81
|
+
compositionPayload: object;
|
|
82
|
+
format?: 'org.hl7.fhir.r4' | 'org.hl7.fhir.api';
|
|
83
|
+
};
|
|
84
|
+
export type FrontRelatedPersonUpsertInput = {
|
|
85
|
+
relatedPersonPayload: object;
|
|
86
|
+
};
|
|
87
|
+
export type FrontCommunicationIngestionInput = {
|
|
88
|
+
communicationPayload: CommunicationInput & Record<string, unknown>;
|
|
89
|
+
pathFormatSegment?: 'org.hl7.fhir.r4' | 'org.hl7.fhir.api';
|
|
90
|
+
};
|
|
91
|
+
export type FrontClinicalBundleSearchInput = BundleSearchQuery & {
|
|
92
|
+
requestThid?: string;
|
|
93
|
+
};
|
|
94
|
+
export type FrontGrantProfessionalAccessInput = {
|
|
95
|
+
subjectDid?: string;
|
|
96
|
+
subjectPhone?: string;
|
|
97
|
+
subjectGivenName?: string;
|
|
98
|
+
actorId?: string | string[] | {
|
|
99
|
+
didWeb?: string;
|
|
100
|
+
organizationUrl?: string;
|
|
101
|
+
organizationTaxId?: string;
|
|
102
|
+
email?: string;
|
|
103
|
+
phone?: string;
|
|
104
|
+
};
|
|
105
|
+
actor?: string | string[] | {
|
|
106
|
+
didWeb?: string;
|
|
107
|
+
organizationUrl?: string;
|
|
108
|
+
organizationTaxId?: string;
|
|
109
|
+
email?: string;
|
|
110
|
+
phone?: string;
|
|
111
|
+
};
|
|
112
|
+
actorRole: string;
|
|
113
|
+
purpose: string;
|
|
114
|
+
actions: string[];
|
|
115
|
+
consentIdentifier?: string;
|
|
116
|
+
consentDate?: string;
|
|
117
|
+
decision?: 'permit' | 'deny';
|
|
118
|
+
attachmentContentType?: string;
|
|
119
|
+
attachmentBase64?: string;
|
|
120
|
+
};
|
|
121
|
+
export type FrontGrantProfessionalAccessResult = {
|
|
122
|
+
thid: string;
|
|
123
|
+
consent: SubmitAndPollResult;
|
|
124
|
+
subjectIdentifier: string;
|
|
125
|
+
actorIdentifier: string;
|
|
126
|
+
consentClaims: Record<string, unknown>;
|
|
127
|
+
claimsCid?: string;
|
|
128
|
+
};
|
|
129
|
+
export type FrontDigitalTwinGenerationInput = {
|
|
130
|
+
compositionPayload: object;
|
|
131
|
+
format?: 'org.hl7.fhir.r4' | 'org.hl7.fhir.api';
|
|
132
|
+
};
|
|
133
|
+
export type FrontRuntimeClient = {
|
|
134
|
+
activateOrganizationInGatewayFromIcaProof?: (input: FrontOrganizationActivationInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
135
|
+
confirmLegalOrganizationOrder?: (input: FrontLegalOrganizationOrderInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
136
|
+
createOrganizationEmployee?: (ctx: FrontRouteContext, input: FrontOrganizationEmployeeCreationInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
137
|
+
disableEmployee?: (ctx: FrontRouteContext, input: FrontOrganizationEmployeeLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
138
|
+
purgeEmployee?: (ctx: FrontRouteContext, input: FrontOrganizationEmployeeLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
139
|
+
activateEmployeeDeviceWithActivationRequest?: (ctx: FrontRouteContext, input: FrontEmployeeDeviceActivationRequestInput) => Promise<SubmitAndPollResult>;
|
|
140
|
+
requestSmartToken?: (input: FrontSmartTokenRequestInput) => Promise<FrontSmartTokenExchangeResult>;
|
|
141
|
+
startIndividualOrganization?: (ctx: FrontRouteContext, input: FrontIndividualOrganizationBootstrapInput) => Promise<FrontIndividualOrganizationStartResult>;
|
|
142
|
+
confirmIndividualOrganizationOrder?: (ctx: FrontRouteContext, input: FrontIndividualOrganizationConfirmOrderInput) => Promise<SubmitAndPollResult>;
|
|
143
|
+
disableIndividual?: (ctx: FrontRouteContext, input: FrontIndividualOrganizationLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
144
|
+
purgeIndividual?: (ctx: FrontRouteContext, input: FrontIndividualOrganizationLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
145
|
+
disableIndividualMember?: (ctx: FrontRouteContext, input: FrontIndividualMemberLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
146
|
+
purgeIndividualMember?: (ctx: FrontRouteContext, input: FrontIndividualMemberLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
147
|
+
grantProfessionalAccess?: (ctx: FrontRouteContext, input: FrontGrantProfessionalAccessInput) => Promise<FrontGrantProfessionalAccessResult>;
|
|
148
|
+
importIpsOrFhirAndUpdateIndex?: (ctx: FrontRouteContext, input: FrontIpsOrFhirImportInput) => Promise<SubmitAndPollResult>;
|
|
149
|
+
upsertRelatedPersonAndPoll?: (ctx: FrontRouteContext, input: FrontRelatedPersonUpsertInput) => Promise<SubmitAndPollResult>;
|
|
150
|
+
ingestCommunicationAndUpdateIndex?: (ctx: FrontRouteContext, input: FrontCommunicationIngestionInput) => Promise<SubmitAndPollResult>;
|
|
151
|
+
generateDigitalTwinFromSubjectData?: (ctx: FrontRouteContext, input: FrontDigitalTwinGenerationInput) => Promise<SubmitAndPollResult>;
|
|
152
|
+
searchClinicalBundle?: (ctx: FrontRouteContext, input: FrontClinicalBundleSearchInput) => Promise<{
|
|
153
|
+
thid: string;
|
|
154
|
+
}>;
|
|
155
|
+
getLatestIps?: (ctx: FrontRouteContext, subject: string) => Promise<{
|
|
156
|
+
thid: string;
|
|
157
|
+
}>;
|
|
158
|
+
submitAndPoll?: (submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
159
|
+
};
|
|
160
|
+
export declare function requireClientMethod<T extends keyof FrontRuntimeClient>(client: FrontRuntimeClient, method: T): NonNullable<FrontRuntimeClient[T]>;
|
|
161
|
+
export declare function createSyntheticSubmitAndPollResult(thid: string, body?: unknown): SubmitAndPollResult;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
export function requireClientMethod(client, method) {
|
|
3
|
+
const candidate = client[method];
|
|
4
|
+
if (typeof candidate !== 'function') {
|
|
5
|
+
throw new Error(`FrontRuntimeClient does not implement '${String(method)}'.`);
|
|
6
|
+
}
|
|
7
|
+
return candidate.bind(client);
|
|
8
|
+
}
|
|
9
|
+
export function createSyntheticSubmitAndPollResult(thid, body = { thid, accepted: true }) {
|
|
10
|
+
return {
|
|
11
|
+
submit: {
|
|
12
|
+
status: 202,
|
|
13
|
+
location: `/jobs/${thid}`,
|
|
14
|
+
body,
|
|
15
|
+
},
|
|
16
|
+
poll: {
|
|
17
|
+
status: 200,
|
|
18
|
+
body: {
|
|
19
|
+
completed: true,
|
|
20
|
+
thid,
|
|
21
|
+
...(body && typeof body === 'object' ? body : { body }),
|
|
22
|
+
},
|
|
23
|
+
attempts: 1,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { PollOptions, SubmitAndPollResult, SubmitPayload } from 'gdc-sdk-core-ts';
|
|
2
|
+
import { type FrontRuntimeClient, type FrontCommunicationIngestionInput, type FrontDigitalTwinGenerationInput, type FrontEmployeeDeviceActivationRequestInput, type FrontGrantProfessionalAccessInput, type FrontGrantProfessionalAccessResult, type FrontIndividualMemberLifecycleInput, type FrontIndividualOrganizationBootstrapInput, type FrontIndividualOrganizationConfirmOrderInput, type FrontIndividualOrganizationLifecycleInput, type FrontIndividualOrganizationStartResult, type FrontIpsOrFhirImportInput, type FrontLegalOrganizationOrderInput, type FrontOrganizationActivationInput, type FrontOrganizationEmployeeCreationInput, type FrontOrganizationEmployeeLifecycleInput, type FrontRelatedPersonUpsertInput, type FrontRouteContext, type FrontSmartTokenExchangeResult, type FrontSmartTokenRequestInput } from './client-port.js';
|
|
3
|
+
export declare class HostOnboardingSdk {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: FrontRuntimeClient);
|
|
6
|
+
activateOrganizationInGatewayFromIcaProof(input: FrontOrganizationActivationInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
7
|
+
confirmLegalOrganizationOrder(input: FrontLegalOrganizationOrderInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
8
|
+
submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
9
|
+
}
|
|
10
|
+
export declare class OrganizationControllerSdk {
|
|
11
|
+
private readonly client;
|
|
12
|
+
constructor(client: FrontRuntimeClient);
|
|
13
|
+
createOrganizationEmployee(ctx: FrontRouteContext, input: FrontOrganizationEmployeeCreationInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
14
|
+
disableEmployee(ctx: FrontRouteContext, input: FrontOrganizationEmployeeLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
15
|
+
purgeEmployee(ctx: FrontRouteContext, input: FrontOrganizationEmployeeLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
16
|
+
activateEmployeeDeviceWithActivationRequest(ctx: FrontRouteContext, input: FrontEmployeeDeviceActivationRequestInput): Promise<SubmitAndPollResult>;
|
|
17
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
18
|
+
}
|
|
19
|
+
export declare class OrganizationEmployeeSdk {
|
|
20
|
+
private readonly client;
|
|
21
|
+
constructor(client: FrontRuntimeClient);
|
|
22
|
+
activateEmployeeDeviceWithActivationRequest(ctx: FrontRouteContext, input: FrontEmployeeDeviceActivationRequestInput): Promise<SubmitAndPollResult>;
|
|
23
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
24
|
+
}
|
|
25
|
+
export declare class IndividualControllerSdk {
|
|
26
|
+
private readonly client;
|
|
27
|
+
constructor(client: FrontRuntimeClient);
|
|
28
|
+
startIndividualOrganization(ctx: FrontRouteContext, input: FrontIndividualOrganizationBootstrapInput): Promise<FrontIndividualOrganizationStartResult>;
|
|
29
|
+
confirmIndividualOrganizationOrder(ctx: FrontRouteContext, input: FrontIndividualOrganizationConfirmOrderInput): Promise<SubmitAndPollResult>;
|
|
30
|
+
disableIndividual(ctx: FrontRouteContext, input: FrontIndividualOrganizationLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
31
|
+
purgeIndividual(ctx: FrontRouteContext, input: FrontIndividualOrganizationLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
32
|
+
disableIndividualMember(ctx: FrontRouteContext, input: FrontIndividualMemberLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
33
|
+
purgeIndividualMember(ctx: FrontRouteContext, input: FrontIndividualMemberLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
34
|
+
grantProfessionalAccess(ctx: FrontRouteContext, input: FrontGrantProfessionalAccessInput): Promise<FrontGrantProfessionalAccessResult>;
|
|
35
|
+
importIpsOrFhirAndUpdateIndex(ctx: FrontRouteContext, input: FrontIpsOrFhirImportInput): Promise<SubmitAndPollResult>;
|
|
36
|
+
upsertRelatedPersonAndPoll(ctx: FrontRouteContext, input: FrontRelatedPersonUpsertInput): Promise<SubmitAndPollResult>;
|
|
37
|
+
ingestCommunicationAndUpdateIndex(ctx: FrontRouteContext, input: FrontCommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
38
|
+
generateDigitalTwinFromSubjectData(ctx: FrontRouteContext, input: FrontDigitalTwinGenerationInput): Promise<SubmitAndPollResult>;
|
|
39
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
40
|
+
}
|
|
41
|
+
export declare class IndividualMemberSdk {
|
|
42
|
+
private readonly client;
|
|
43
|
+
constructor(client: FrontRuntimeClient);
|
|
44
|
+
upsertRelatedPersonAndPoll(ctx: FrontRouteContext, input: FrontRelatedPersonUpsertInput): Promise<SubmitAndPollResult>;
|
|
45
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
46
|
+
}
|
|
47
|
+
export declare class PersonalSdk {
|
|
48
|
+
private readonly client;
|
|
49
|
+
constructor(client: FrontRuntimeClient);
|
|
50
|
+
startIndividualOrganization(ctx: FrontRouteContext, input: FrontIndividualOrganizationBootstrapInput): Promise<FrontIndividualOrganizationStartResult>;
|
|
51
|
+
grantProfessionalAccess(ctx: FrontRouteContext, input: FrontGrantProfessionalAccessInput): Promise<FrontGrantProfessionalAccessResult>;
|
|
52
|
+
importIpsOrFhirAndUpdateIndex(ctx: FrontRouteContext, input: FrontIpsOrFhirImportInput): Promise<SubmitAndPollResult>;
|
|
53
|
+
ingestCommunicationAndUpdateIndex(ctx: FrontRouteContext, input: FrontCommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
54
|
+
generateDigitalTwinFromSubjectData(ctx: FrontRouteContext, input: FrontDigitalTwinGenerationInput): Promise<SubmitAndPollResult>;
|
|
55
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
56
|
+
submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
57
|
+
}
|
|
58
|
+
export declare class ProfessionalSdk {
|
|
59
|
+
private readonly client;
|
|
60
|
+
constructor(client: FrontRuntimeClient);
|
|
61
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
62
|
+
ingestCommunicationAndUpdateIndex(ctx: FrontRouteContext, input: FrontCommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
63
|
+
grantProfessionalAccess(ctx: FrontRouteContext, input: FrontGrantProfessionalAccessInput): Promise<FrontGrantProfessionalAccessResult>;
|
|
64
|
+
submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
65
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { requireClientMethod } from './client-port.js';
|
|
3
|
+
export class HostOnboardingSdk {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
activateOrganizationInGatewayFromIcaProof(input, pollOptions) {
|
|
8
|
+
return requireClientMethod(this.client, 'activateOrganizationInGatewayFromIcaProof')(input, pollOptions);
|
|
9
|
+
}
|
|
10
|
+
confirmLegalOrganizationOrder(input, pollOptions) {
|
|
11
|
+
return requireClientMethod(this.client, 'confirmLegalOrganizationOrder')(input, pollOptions);
|
|
12
|
+
}
|
|
13
|
+
submitAndPoll(submitPath, pollPath, payload, pollOptions) {
|
|
14
|
+
return requireClientMethod(this.client, 'submitAndPoll')(submitPath, pollPath, payload, pollOptions);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export class OrganizationControllerSdk {
|
|
18
|
+
constructor(client) {
|
|
19
|
+
this.client = client;
|
|
20
|
+
}
|
|
21
|
+
createOrganizationEmployee(ctx, input, pollOptions) {
|
|
22
|
+
return requireClientMethod(this.client, 'createOrganizationEmployee')(ctx, input, pollOptions);
|
|
23
|
+
}
|
|
24
|
+
disableEmployee(ctx, input, pollOptions) {
|
|
25
|
+
return requireClientMethod(this.client, 'disableEmployee')(ctx, input, pollOptions);
|
|
26
|
+
}
|
|
27
|
+
purgeEmployee(ctx, input, pollOptions) {
|
|
28
|
+
return requireClientMethod(this.client, 'purgeEmployee')(ctx, input, pollOptions);
|
|
29
|
+
}
|
|
30
|
+
activateEmployeeDeviceWithActivationRequest(ctx, input) {
|
|
31
|
+
return requireClientMethod(this.client, 'activateEmployeeDeviceWithActivationRequest')(ctx, input);
|
|
32
|
+
}
|
|
33
|
+
requestSmartToken(input) {
|
|
34
|
+
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export class OrganizationEmployeeSdk {
|
|
38
|
+
constructor(client) {
|
|
39
|
+
this.client = client;
|
|
40
|
+
}
|
|
41
|
+
activateEmployeeDeviceWithActivationRequest(ctx, input) {
|
|
42
|
+
return requireClientMethod(this.client, 'activateEmployeeDeviceWithActivationRequest')(ctx, input);
|
|
43
|
+
}
|
|
44
|
+
requestSmartToken(input) {
|
|
45
|
+
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export class IndividualControllerSdk {
|
|
49
|
+
constructor(client) {
|
|
50
|
+
this.client = client;
|
|
51
|
+
}
|
|
52
|
+
startIndividualOrganization(ctx, input) {
|
|
53
|
+
return requireClientMethod(this.client, 'startIndividualOrganization')(ctx, input);
|
|
54
|
+
}
|
|
55
|
+
confirmIndividualOrganizationOrder(ctx, input) {
|
|
56
|
+
return requireClientMethod(this.client, 'confirmIndividualOrganizationOrder')(ctx, input);
|
|
57
|
+
}
|
|
58
|
+
disableIndividual(ctx, input, pollOptions) {
|
|
59
|
+
return requireClientMethod(this.client, 'disableIndividual')(ctx, input, pollOptions);
|
|
60
|
+
}
|
|
61
|
+
purgeIndividual(ctx, input, pollOptions) {
|
|
62
|
+
return requireClientMethod(this.client, 'purgeIndividual')(ctx, input, pollOptions);
|
|
63
|
+
}
|
|
64
|
+
disableIndividualMember(ctx, input, pollOptions) {
|
|
65
|
+
return requireClientMethod(this.client, 'disableIndividualMember')(ctx, input, pollOptions);
|
|
66
|
+
}
|
|
67
|
+
purgeIndividualMember(ctx, input, pollOptions) {
|
|
68
|
+
return requireClientMethod(this.client, 'purgeIndividualMember')(ctx, input, pollOptions);
|
|
69
|
+
}
|
|
70
|
+
grantProfessionalAccess(ctx, input) {
|
|
71
|
+
return requireClientMethod(this.client, 'grantProfessionalAccess')(ctx, input);
|
|
72
|
+
}
|
|
73
|
+
importIpsOrFhirAndUpdateIndex(ctx, input) {
|
|
74
|
+
return requireClientMethod(this.client, 'importIpsOrFhirAndUpdateIndex')(ctx, input);
|
|
75
|
+
}
|
|
76
|
+
upsertRelatedPersonAndPoll(ctx, input) {
|
|
77
|
+
return requireClientMethod(this.client, 'upsertRelatedPersonAndPoll')(ctx, input);
|
|
78
|
+
}
|
|
79
|
+
ingestCommunicationAndUpdateIndex(ctx, input) {
|
|
80
|
+
return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
|
|
81
|
+
}
|
|
82
|
+
generateDigitalTwinFromSubjectData(ctx, input) {
|
|
83
|
+
return requireClientMethod(this.client, 'generateDigitalTwinFromSubjectData')(ctx, input);
|
|
84
|
+
}
|
|
85
|
+
requestSmartToken(input) {
|
|
86
|
+
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export class IndividualMemberSdk {
|
|
90
|
+
constructor(client) {
|
|
91
|
+
this.client = client;
|
|
92
|
+
}
|
|
93
|
+
upsertRelatedPersonAndPoll(ctx, input) {
|
|
94
|
+
return requireClientMethod(this.client, 'upsertRelatedPersonAndPoll')(ctx, input);
|
|
95
|
+
}
|
|
96
|
+
requestSmartToken(input) {
|
|
97
|
+
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
export class PersonalSdk {
|
|
101
|
+
constructor(client) {
|
|
102
|
+
this.client = client;
|
|
103
|
+
}
|
|
104
|
+
startIndividualOrganization(ctx, input) {
|
|
105
|
+
return requireClientMethod(this.client, 'startIndividualOrganization')(ctx, input);
|
|
106
|
+
}
|
|
107
|
+
grantProfessionalAccess(ctx, input) {
|
|
108
|
+
return requireClientMethod(this.client, 'grantProfessionalAccess')(ctx, input);
|
|
109
|
+
}
|
|
110
|
+
importIpsOrFhirAndUpdateIndex(ctx, input) {
|
|
111
|
+
return requireClientMethod(this.client, 'importIpsOrFhirAndUpdateIndex')(ctx, input);
|
|
112
|
+
}
|
|
113
|
+
ingestCommunicationAndUpdateIndex(ctx, input) {
|
|
114
|
+
return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
|
|
115
|
+
}
|
|
116
|
+
generateDigitalTwinFromSubjectData(ctx, input) {
|
|
117
|
+
return requireClientMethod(this.client, 'generateDigitalTwinFromSubjectData')(ctx, input);
|
|
118
|
+
}
|
|
119
|
+
requestSmartToken(input) {
|
|
120
|
+
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
121
|
+
}
|
|
122
|
+
submitAndPoll(submitPath, pollPath, payload, pollOptions) {
|
|
123
|
+
return requireClientMethod(this.client, 'submitAndPoll')(submitPath, pollPath, payload, pollOptions);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
export class ProfessionalSdk {
|
|
127
|
+
constructor(client) {
|
|
128
|
+
this.client = client;
|
|
129
|
+
}
|
|
130
|
+
requestSmartToken(input) {
|
|
131
|
+
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
132
|
+
}
|
|
133
|
+
ingestCommunicationAndUpdateIndex(ctx, input) {
|
|
134
|
+
return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
|
|
135
|
+
}
|
|
136
|
+
grantProfessionalAccess(ctx, input) {
|
|
137
|
+
return requireClientMethod(this.client, 'grantProfessionalAccess')(ctx, input);
|
|
138
|
+
}
|
|
139
|
+
submitAndPoll(submitPath, pollPath, payload, pollOptions) {
|
|
140
|
+
return requireClientMethod(this.client, 'submitAndPoll')(submitPath, pollPath, payload, pollOptions);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PollOptions, SubmitAndPollResult, SubmitPayload } from 'gdc-sdk-core-ts';
|
|
2
|
+
import { type FrontLegalOrganizationOrderInput, type FrontOrganizationActivationInput, type FrontRuntimeClient } from './client-port.js';
|
|
3
|
+
export declare class HostOnboardingSdk {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: FrontRuntimeClient);
|
|
6
|
+
activateOrganizationInGatewayFromIcaProof(input: FrontOrganizationActivationInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
7
|
+
confirmLegalOrganizationOrder(input: FrontLegalOrganizationOrderInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
8
|
+
submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { requireClientMethod } from './client-port.js';
|
|
3
|
+
export class HostOnboardingSdk {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
activateOrganizationInGatewayFromIcaProof(input, pollOptions) {
|
|
8
|
+
return requireClientMethod(this.client, 'activateOrganizationInGatewayFromIcaProof')(input, pollOptions);
|
|
9
|
+
}
|
|
10
|
+
confirmLegalOrganizationOrder(input, pollOptions) {
|
|
11
|
+
return requireClientMethod(this.client, 'confirmLegalOrganizationOrder')(input, pollOptions);
|
|
12
|
+
}
|
|
13
|
+
submitAndPoll(submitPath, pollPath, payload, pollOptions) {
|
|
14
|
+
return requireClientMethod(this.client, 'submitAndPoll')(submitPath, pollPath, payload, pollOptions);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PollOptions, SubmitAndPollResult } from 'gdc-sdk-core-ts';
|
|
2
|
+
import { type FrontCommunicationIngestionInput, type FrontDigitalTwinGenerationInput, type FrontGrantProfessionalAccessInput, type FrontGrantProfessionalAccessResult, type FrontIndividualMemberLifecycleInput, type FrontIndividualOrganizationBootstrapInput, type FrontIndividualOrganizationConfirmOrderInput, type FrontIndividualOrganizationLifecycleInput, type FrontIndividualOrganizationStartResult, type FrontIpsOrFhirImportInput, type FrontRelatedPersonUpsertInput, type FrontRouteContext, type FrontRuntimeClient, type FrontSmartTokenExchangeResult, type FrontSmartTokenRequestInput } from './client-port.js';
|
|
3
|
+
export declare class IndividualControllerSdk {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: FrontRuntimeClient);
|
|
6
|
+
startIndividualOrganization(ctx: FrontRouteContext, input: FrontIndividualOrganizationBootstrapInput): Promise<FrontIndividualOrganizationStartResult>;
|
|
7
|
+
confirmIndividualOrganizationOrder(ctx: FrontRouteContext, input: FrontIndividualOrganizationConfirmOrderInput): Promise<SubmitAndPollResult>;
|
|
8
|
+
disableIndividual(ctx: FrontRouteContext, input: FrontIndividualOrganizationLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
9
|
+
purgeIndividual(ctx: FrontRouteContext, input: FrontIndividualOrganizationLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
10
|
+
disableIndividualMember(ctx: FrontRouteContext, input: FrontIndividualMemberLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
11
|
+
purgeIndividualMember(ctx: FrontRouteContext, input: FrontIndividualMemberLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
12
|
+
grantProfessionalAccess(ctx: FrontRouteContext, input: FrontGrantProfessionalAccessInput): Promise<FrontGrantProfessionalAccessResult>;
|
|
13
|
+
importIpsOrFhirAndUpdateIndex(ctx: FrontRouteContext, input: FrontIpsOrFhirImportInput): Promise<SubmitAndPollResult>;
|
|
14
|
+
upsertRelatedPersonAndPoll(ctx: FrontRouteContext, input: FrontRelatedPersonUpsertInput): Promise<SubmitAndPollResult>;
|
|
15
|
+
ingestCommunicationAndUpdateIndex(ctx: FrontRouteContext, input: FrontCommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
16
|
+
generateDigitalTwinFromSubjectData(ctx: FrontRouteContext, input: FrontDigitalTwinGenerationInput): Promise<SubmitAndPollResult>;
|
|
17
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { requireClientMethod } from './client-port.js';
|
|
3
|
+
export class IndividualControllerSdk {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
startIndividualOrganization(ctx, input) {
|
|
8
|
+
return requireClientMethod(this.client, 'startIndividualOrganization')(ctx, input);
|
|
9
|
+
}
|
|
10
|
+
confirmIndividualOrganizationOrder(ctx, input) {
|
|
11
|
+
return requireClientMethod(this.client, 'confirmIndividualOrganizationOrder')(ctx, input);
|
|
12
|
+
}
|
|
13
|
+
disableIndividual(ctx, input, pollOptions) {
|
|
14
|
+
return requireClientMethod(this.client, 'disableIndividual')(ctx, input, pollOptions);
|
|
15
|
+
}
|
|
16
|
+
purgeIndividual(ctx, input, pollOptions) {
|
|
17
|
+
return requireClientMethod(this.client, 'purgeIndividual')(ctx, input, pollOptions);
|
|
18
|
+
}
|
|
19
|
+
disableIndividualMember(ctx, input, pollOptions) {
|
|
20
|
+
return requireClientMethod(this.client, 'disableIndividualMember')(ctx, input, pollOptions);
|
|
21
|
+
}
|
|
22
|
+
purgeIndividualMember(ctx, input, pollOptions) {
|
|
23
|
+
return requireClientMethod(this.client, 'purgeIndividualMember')(ctx, input, pollOptions);
|
|
24
|
+
}
|
|
25
|
+
grantProfessionalAccess(ctx, input) {
|
|
26
|
+
return requireClientMethod(this.client, 'grantProfessionalAccess')(ctx, input);
|
|
27
|
+
}
|
|
28
|
+
importIpsOrFhirAndUpdateIndex(ctx, input) {
|
|
29
|
+
return requireClientMethod(this.client, 'importIpsOrFhirAndUpdateIndex')(ctx, input);
|
|
30
|
+
}
|
|
31
|
+
upsertRelatedPersonAndPoll(ctx, input) {
|
|
32
|
+
return requireClientMethod(this.client, 'upsertRelatedPersonAndPoll')(ctx, input);
|
|
33
|
+
}
|
|
34
|
+
ingestCommunicationAndUpdateIndex(ctx, input) {
|
|
35
|
+
return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
|
|
36
|
+
}
|
|
37
|
+
generateDigitalTwinFromSubjectData(ctx, input) {
|
|
38
|
+
return requireClientMethod(this.client, 'generateDigitalTwinFromSubjectData')(ctx, input);
|
|
39
|
+
}
|
|
40
|
+
requestSmartToken(input) {
|
|
41
|
+
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SubmitAndPollResult } from 'gdc-sdk-core-ts';
|
|
2
|
+
import { type FrontRelatedPersonUpsertInput, type FrontRouteContext, type FrontRuntimeClient, type FrontSmartTokenExchangeResult, type FrontSmartTokenRequestInput } from './client-port.js';
|
|
3
|
+
export declare class IndividualMemberSdk {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: FrontRuntimeClient);
|
|
6
|
+
upsertRelatedPersonAndPoll(ctx: FrontRouteContext, input: FrontRelatedPersonUpsertInput): Promise<SubmitAndPollResult>;
|
|
7
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { requireClientMethod } from './client-port.js';
|
|
3
|
+
export class IndividualMemberSdk {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
upsertRelatedPersonAndPoll(ctx, input) {
|
|
8
|
+
return requireClientMethod(this.client, 'upsertRelatedPersonAndPoll')(ctx, input);
|
|
9
|
+
}
|
|
10
|
+
requestSmartToken(input) {
|
|
11
|
+
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PollOptions, SubmitAndPollResult } from 'gdc-sdk-core-ts';
|
|
2
|
+
import { type FrontEmployeeDeviceActivationRequestInput, type FrontOrganizationEmployeeCreationInput, type FrontOrganizationEmployeeLifecycleInput, type FrontRouteContext, type FrontRuntimeClient, type FrontSmartTokenExchangeResult, type FrontSmartTokenRequestInput } from './client-port.js';
|
|
3
|
+
export declare class OrganizationControllerSdk {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: FrontRuntimeClient);
|
|
6
|
+
createOrganizationEmployee(ctx: FrontRouteContext, input: FrontOrganizationEmployeeCreationInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
7
|
+
disableEmployee(ctx: FrontRouteContext, input: FrontOrganizationEmployeeLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
8
|
+
purgeEmployee(ctx: FrontRouteContext, input: FrontOrganizationEmployeeLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
9
|
+
activateEmployeeDeviceWithActivationRequest(ctx: FrontRouteContext, input: FrontEmployeeDeviceActivationRequestInput): Promise<SubmitAndPollResult>;
|
|
10
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { requireClientMethod } from './client-port.js';
|
|
3
|
+
export class OrganizationControllerSdk {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
createOrganizationEmployee(ctx, input, pollOptions) {
|
|
8
|
+
return requireClientMethod(this.client, 'createOrganizationEmployee')(ctx, input, pollOptions);
|
|
9
|
+
}
|
|
10
|
+
disableEmployee(ctx, input, pollOptions) {
|
|
11
|
+
return requireClientMethod(this.client, 'disableEmployee')(ctx, input, pollOptions);
|
|
12
|
+
}
|
|
13
|
+
purgeEmployee(ctx, input, pollOptions) {
|
|
14
|
+
return requireClientMethod(this.client, 'purgeEmployee')(ctx, input, pollOptions);
|
|
15
|
+
}
|
|
16
|
+
activateEmployeeDeviceWithActivationRequest(ctx, input) {
|
|
17
|
+
return requireClientMethod(this.client, 'activateEmployeeDeviceWithActivationRequest')(ctx, input);
|
|
18
|
+
}
|
|
19
|
+
requestSmartToken(input) {
|
|
20
|
+
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SubmitAndPollResult } from 'gdc-sdk-core-ts';
|
|
2
|
+
import { type FrontEmployeeDeviceActivationRequestInput, type FrontRouteContext, type FrontRuntimeClient, type FrontSmartTokenExchangeResult, type FrontSmartTokenRequestInput } from './client-port.js';
|
|
3
|
+
export declare class OrganizationEmployeeSdk {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: FrontRuntimeClient);
|
|
6
|
+
activateEmployeeDeviceWithActivationRequest(ctx: FrontRouteContext, input: FrontEmployeeDeviceActivationRequestInput): Promise<SubmitAndPollResult>;
|
|
7
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { requireClientMethod } from './client-port.js';
|
|
3
|
+
export class OrganizationEmployeeSdk {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
activateEmployeeDeviceWithActivationRequest(ctx, input) {
|
|
8
|
+
return requireClientMethod(this.client, 'activateEmployeeDeviceWithActivationRequest')(ctx, input);
|
|
9
|
+
}
|
|
10
|
+
requestSmartToken(input) {
|
|
11
|
+
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PollOptions, SubmitAndPollResult, SubmitPayload } from 'gdc-sdk-core-ts';
|
|
2
|
+
import { type FrontCommunicationIngestionInput, type FrontDigitalTwinGenerationInput, type FrontGrantProfessionalAccessInput, type FrontGrantProfessionalAccessResult, type FrontIndividualOrganizationBootstrapInput, type FrontIndividualOrganizationStartResult, type FrontIpsOrFhirImportInput, type FrontRouteContext, type FrontRuntimeClient, type FrontSmartTokenExchangeResult, type FrontSmartTokenRequestInput } from './client-port.js';
|
|
3
|
+
export declare class PersonalSdk {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: FrontRuntimeClient);
|
|
6
|
+
startIndividualOrganization(ctx: FrontRouteContext, input: FrontIndividualOrganizationBootstrapInput): Promise<FrontIndividualOrganizationStartResult>;
|
|
7
|
+
grantProfessionalAccess(ctx: FrontRouteContext, input: FrontGrantProfessionalAccessInput): Promise<FrontGrantProfessionalAccessResult>;
|
|
8
|
+
importIpsOrFhirAndUpdateIndex(ctx: FrontRouteContext, input: FrontIpsOrFhirImportInput): Promise<SubmitAndPollResult>;
|
|
9
|
+
ingestCommunicationAndUpdateIndex(ctx: FrontRouteContext, input: FrontCommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
10
|
+
generateDigitalTwinFromSubjectData(ctx: FrontRouteContext, input: FrontDigitalTwinGenerationInput): Promise<SubmitAndPollResult>;
|
|
11
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
12
|
+
submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { requireClientMethod } from './client-port.js';
|
|
3
|
+
export class PersonalSdk {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
startIndividualOrganization(ctx, input) {
|
|
8
|
+
return requireClientMethod(this.client, 'startIndividualOrganization')(ctx, input);
|
|
9
|
+
}
|
|
10
|
+
grantProfessionalAccess(ctx, input) {
|
|
11
|
+
return requireClientMethod(this.client, 'grantProfessionalAccess')(ctx, input);
|
|
12
|
+
}
|
|
13
|
+
importIpsOrFhirAndUpdateIndex(ctx, input) {
|
|
14
|
+
return requireClientMethod(this.client, 'importIpsOrFhirAndUpdateIndex')(ctx, input);
|
|
15
|
+
}
|
|
16
|
+
ingestCommunicationAndUpdateIndex(ctx, input) {
|
|
17
|
+
return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
|
|
18
|
+
}
|
|
19
|
+
generateDigitalTwinFromSubjectData(ctx, input) {
|
|
20
|
+
return requireClientMethod(this.client, 'generateDigitalTwinFromSubjectData')(ctx, input);
|
|
21
|
+
}
|
|
22
|
+
requestSmartToken(input) {
|
|
23
|
+
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
24
|
+
}
|
|
25
|
+
submitAndPoll(submitPath, pollPath, payload, pollOptions) {
|
|
26
|
+
return requireClientMethod(this.client, 'submitAndPoll')(submitPath, pollPath, payload, pollOptions);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PollOptions, SubmitAndPollResult, SubmitPayload } from 'gdc-sdk-core-ts';
|
|
2
|
+
import { type FrontCommunicationIngestionInput, type FrontGrantProfessionalAccessInput, type FrontGrantProfessionalAccessResult, type FrontRouteContext, type FrontRuntimeClient, type FrontSmartTokenExchangeResult, type FrontSmartTokenRequestInput } from './client-port.js';
|
|
3
|
+
export declare class ProfessionalSdk {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: FrontRuntimeClient);
|
|
6
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
7
|
+
ingestCommunicationAndUpdateIndex(ctx: FrontRouteContext, input: FrontCommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
8
|
+
grantProfessionalAccess(ctx: FrontRouteContext, input: FrontGrantProfessionalAccessInput): Promise<FrontGrantProfessionalAccessResult>;
|
|
9
|
+
submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { requireClientMethod } from './client-port.js';
|
|
3
|
+
export class ProfessionalSdk {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
requestSmartToken(input) {
|
|
8
|
+
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
9
|
+
}
|
|
10
|
+
ingestCommunicationAndUpdateIndex(ctx, input) {
|
|
11
|
+
return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
|
|
12
|
+
}
|
|
13
|
+
grantProfessionalAccess(ctx, input) {
|
|
14
|
+
return requireClientMethod(this.client, 'grantProfessionalAccess')(ctx, input);
|
|
15
|
+
}
|
|
16
|
+
submitAndPoll(submitPath, pollPath, payload, pollOptions) {
|
|
17
|
+
return requireClientMethod(this.client, 'submitAndPoll')(submitPath, pollPath, payload, pollOptions);
|
|
18
|
+
}
|
|
19
|
+
}
|
package/dist/services.d.ts
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import type { DeviceAppType, DeviceUserClass } from 'gdc-common-utils-ts/constants';
|
|
2
|
+
import type { SubmitAndPollResult } from 'gdc-sdk-core-ts';
|
|
3
|
+
import { type FrontGrantProfessionalAccessResult, type FrontSmartTokenExchangeResult, type FrontSmartTokenRequestInput } from './orchestration/client-port.js';
|
|
2
4
|
export declare class CommonAuthService {
|
|
3
5
|
activateDevice(_licenseCode: string, _providerDid: string, _idToken: string): Promise<{
|
|
4
6
|
thid: string;
|
|
5
7
|
}>;
|
|
8
|
+
activateEmployeeDeviceWithActivationRequest(_activationCode: string, _providerDid: string, _idToken: string, _dcrPayload?: Record<string, unknown>): Promise<SubmitAndPollResult>;
|
|
9
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
6
10
|
}
|
|
7
11
|
export declare class OrgAdminService {
|
|
12
|
+
activateOrganizationInGatewayFromIcaProof(_input: {
|
|
13
|
+
vpToken: string;
|
|
14
|
+
controller?: Record<string, unknown>;
|
|
15
|
+
service?: Record<string, unknown>;
|
|
16
|
+
additionalClaims?: Record<string, unknown>;
|
|
17
|
+
}): Promise<SubmitAndPollResult>;
|
|
18
|
+
confirmLegalOrganizationOrder(_input: {
|
|
19
|
+
offerId: string;
|
|
20
|
+
orderClaims?: Record<string, unknown>;
|
|
21
|
+
}): Promise<SubmitAndPollResult>;
|
|
8
22
|
createOrganizationEmployee(_providerDid: string, _idToken: string, _params: {
|
|
9
23
|
email: string;
|
|
10
24
|
role: string;
|
|
@@ -13,9 +27,24 @@ export declare class OrgAdminService {
|
|
|
13
27
|
}): Promise<{
|
|
14
28
|
thid: string;
|
|
15
29
|
}>;
|
|
30
|
+
disableEmployee(_providerDid: string, _idToken: string, _input: {
|
|
31
|
+
employeeClaims?: Record<string, unknown>;
|
|
32
|
+
resourceId?: string;
|
|
33
|
+
}): Promise<SubmitAndPollResult>;
|
|
34
|
+
purgeEmployee(_providerDid: string, _idToken: string, _input: {
|
|
35
|
+
employeeClaims?: Record<string, unknown>;
|
|
36
|
+
resourceId?: string;
|
|
37
|
+
}): Promise<SubmitAndPollResult>;
|
|
16
38
|
}
|
|
17
39
|
export declare class FamilyAdminService {
|
|
18
|
-
|
|
40
|
+
startIndividualOrganization(_providerDid: string, _idToken: string, _params: {
|
|
41
|
+
registrationClaims: object;
|
|
42
|
+
acceptedOfferId?: string;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
registrationThid: string;
|
|
45
|
+
confirmationThid?: string;
|
|
46
|
+
}>;
|
|
47
|
+
bootstrapSubjectOrganizationIndex(params: {
|
|
19
48
|
registrationClaims: object;
|
|
20
49
|
providerDid: string;
|
|
21
50
|
idToken: string;
|
|
@@ -24,6 +53,26 @@ export declare class FamilyAdminService {
|
|
|
24
53
|
registrationThid: string;
|
|
25
54
|
confirmationThid?: string;
|
|
26
55
|
}>;
|
|
56
|
+
confirmIndividualOrganizationOrder(_providerDid: string, _idToken: string, _input: {
|
|
57
|
+
offerId: string;
|
|
58
|
+
orderClaims?: Record<string, unknown>;
|
|
59
|
+
}): Promise<SubmitAndPollResult>;
|
|
60
|
+
disableIndividual(_providerDid: string, _idToken: string, _input: {
|
|
61
|
+
organizationClaims?: Record<string, unknown>;
|
|
62
|
+
resourceId?: string;
|
|
63
|
+
}): Promise<SubmitAndPollResult>;
|
|
64
|
+
purgeIndividual(_providerDid: string, _idToken: string, _input: {
|
|
65
|
+
organizationClaims?: Record<string, unknown>;
|
|
66
|
+
resourceId?: string;
|
|
67
|
+
}): Promise<SubmitAndPollResult>;
|
|
68
|
+
disableIndividualMember(_providerDid: string, _idToken: string, _input: {
|
|
69
|
+
memberClaims?: Record<string, unknown>;
|
|
70
|
+
resourceId?: string;
|
|
71
|
+
}): Promise<SubmitAndPollResult>;
|
|
72
|
+
purgeIndividualMember(_providerDid: string, _idToken: string, _input: {
|
|
73
|
+
memberClaims?: Record<string, unknown>;
|
|
74
|
+
resourceId?: string;
|
|
75
|
+
}): Promise<SubmitAndPollResult>;
|
|
27
76
|
}
|
|
28
77
|
export declare class IndividualService {
|
|
29
78
|
/**
|
|
@@ -92,16 +141,12 @@ export declare class IndividualService {
|
|
|
92
141
|
decision?: 'permit' | 'deny';
|
|
93
142
|
attachmentContentType?: string;
|
|
94
143
|
attachmentBase64?: string;
|
|
95
|
-
}): Promise<
|
|
96
|
-
thid: string;
|
|
97
|
-
subjectIdentifier: string;
|
|
98
|
-
actorIdentifier: string;
|
|
99
|
-
consentClaims: Record<string, unknown>;
|
|
100
|
-
claimsCid?: string;
|
|
101
|
-
}>;
|
|
144
|
+
}): Promise<FrontGrantProfessionalAccessResult>;
|
|
102
145
|
generateDigitalTwinFromSubjectData(_compositionPayload: object, _providerDid: string, _requiredScope: string, _idToken: string, _format?: 'org.hl7.fhir.r4' | 'org.hl7.fhir.api'): Promise<{
|
|
103
146
|
thid: string;
|
|
104
147
|
}>;
|
|
148
|
+
upsertRelatedPersonAndPoll(_relatedPersonPayload: object, _providerDid: string, _requiredScope: string, _idToken: string): Promise<SubmitAndPollResult>;
|
|
149
|
+
ingestCommunicationAndUpdateIndex(_communicationPayload: object, _providerDid: string, _requiredScope: string, _idToken: string, _format?: 'org.hl7.fhir.r4' | 'org.hl7.fhir.api'): Promise<SubmitAndPollResult>;
|
|
105
150
|
/**
|
|
106
151
|
* Sends a lightweight communication request description.
|
|
107
152
|
*
|
|
@@ -161,7 +206,10 @@ export declare class IndividualService {
|
|
|
161
206
|
thid: string;
|
|
162
207
|
}>;
|
|
163
208
|
}
|
|
164
|
-
export declare class PhysicianService {
|
|
165
|
-
}
|
|
166
209
|
export declare class ParamedicService {
|
|
210
|
+
requestSmartToken(input: FrontSmartTokenRequestInput): Promise<FrontSmartTokenExchangeResult>;
|
|
211
|
+
ingestCommunicationAndUpdateIndex(_communicationPayload: object, _providerDid: string, _requiredScope: string, _idToken: string, _format?: 'org.hl7.fhir.r4' | 'org.hl7.fhir.api'): Promise<SubmitAndPollResult>;
|
|
212
|
+
}
|
|
213
|
+
export declare class PhysicianService extends ParamedicService {
|
|
214
|
+
grantProfessionalAccess(_params: Record<string, unknown>): Promise<FrontGrantProfessionalAccessResult>;
|
|
167
215
|
}
|
package/dist/services.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { createSyntheticSubmitAndPollResult, } from './orchestration/client-port.js';
|
|
2
3
|
function requireNonEmptyText(value, fieldName) {
|
|
3
4
|
const normalized = String(value ?? '').trim();
|
|
4
5
|
if (!normalized) {
|
|
@@ -6,19 +7,70 @@ function requireNonEmptyText(value, fieldName) {
|
|
|
6
7
|
}
|
|
7
8
|
return normalized;
|
|
8
9
|
}
|
|
10
|
+
function runtimeThid(prefix) {
|
|
11
|
+
return `${prefix}-${Date.now()}`;
|
|
12
|
+
}
|
|
9
13
|
export class CommonAuthService {
|
|
10
14
|
async activateDevice(_licenseCode, _providerDid, _idToken) {
|
|
11
15
|
return { thid: `thid-${Date.now()}` };
|
|
12
16
|
}
|
|
17
|
+
async activateEmployeeDeviceWithActivationRequest(_activationCode, _providerDid, _idToken, _dcrPayload) {
|
|
18
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('employee-device-activation'));
|
|
19
|
+
}
|
|
20
|
+
async requestSmartToken(input) {
|
|
21
|
+
const scopes = [...new Set((input.scopes || []).filter(Boolean))];
|
|
22
|
+
return {
|
|
23
|
+
status: 'fetched',
|
|
24
|
+
accessToken: `front-token-${Date.now()}`,
|
|
25
|
+
tokenType: 'Bearer',
|
|
26
|
+
scopes,
|
|
27
|
+
statusCode: 200,
|
|
28
|
+
response: {
|
|
29
|
+
actorDid: input.actorDid,
|
|
30
|
+
subjectDid: input.subjectDid,
|
|
31
|
+
scopes,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
13
35
|
}
|
|
14
36
|
export class OrgAdminService {
|
|
37
|
+
async activateOrganizationInGatewayFromIcaProof(_input) {
|
|
38
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('host-activation'));
|
|
39
|
+
}
|
|
40
|
+
async confirmLegalOrganizationOrder(_input) {
|
|
41
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('host-order-confirmation'));
|
|
42
|
+
}
|
|
15
43
|
async createOrganizationEmployee(_providerDid, _idToken, _params) {
|
|
16
44
|
return { thid: `thid-${Date.now()}` };
|
|
17
45
|
}
|
|
46
|
+
async disableEmployee(_providerDid, _idToken, _input) {
|
|
47
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('employee-disable'));
|
|
48
|
+
}
|
|
49
|
+
async purgeEmployee(_providerDid, _idToken, _input) {
|
|
50
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('employee-purge'));
|
|
51
|
+
}
|
|
18
52
|
}
|
|
19
53
|
export class FamilyAdminService {
|
|
20
|
-
async
|
|
21
|
-
return { registrationThid:
|
|
54
|
+
async startIndividualOrganization(_providerDid, _idToken, _params) {
|
|
55
|
+
return { registrationThid: runtimeThid('individual-bootstrap') };
|
|
56
|
+
}
|
|
57
|
+
async bootstrapSubjectOrganizationIndex(params) {
|
|
58
|
+
return this.startIndividualOrganization(params.providerDid, params.idToken, params);
|
|
59
|
+
}
|
|
60
|
+
async confirmIndividualOrganizationOrder(_providerDid, _idToken, _input) {
|
|
61
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('individual-order-confirmation'));
|
|
62
|
+
}
|
|
63
|
+
async disableIndividual(_providerDid, _idToken, _input) {
|
|
64
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('individual-disable'));
|
|
65
|
+
}
|
|
66
|
+
async purgeIndividual(_providerDid, _idToken, _input) {
|
|
67
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('individual-purge'));
|
|
68
|
+
}
|
|
69
|
+
async disableIndividualMember(_providerDid, _idToken, _input) {
|
|
70
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('individual-member-disable'));
|
|
71
|
+
}
|
|
72
|
+
async purgeIndividualMember(_providerDid, _idToken, _input) {
|
|
73
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('individual-member-purge'));
|
|
22
74
|
}
|
|
23
75
|
}
|
|
24
76
|
export class IndividualService {
|
|
@@ -32,8 +84,10 @@ export class IndividualService {
|
|
|
32
84
|
return { thid: `thid-${Date.now()}` };
|
|
33
85
|
}
|
|
34
86
|
async grantProfessionalAccess(_params) {
|
|
87
|
+
const thid = runtimeThid('consent');
|
|
35
88
|
return {
|
|
36
|
-
thid
|
|
89
|
+
thid,
|
|
90
|
+
consent: createSyntheticSubmitAndPollResult(thid),
|
|
37
91
|
subjectIdentifier: '',
|
|
38
92
|
actorIdentifier: '',
|
|
39
93
|
consentClaims: {},
|
|
@@ -42,6 +96,12 @@ export class IndividualService {
|
|
|
42
96
|
async generateDigitalTwinFromSubjectData(_compositionPayload, _providerDid, _requiredScope, _idToken, _format) {
|
|
43
97
|
return { thid: `thid-${Date.now()}` };
|
|
44
98
|
}
|
|
99
|
+
async upsertRelatedPersonAndPoll(_relatedPersonPayload, _providerDid, _requiredScope, _idToken) {
|
|
100
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('related-person-upsert'));
|
|
101
|
+
}
|
|
102
|
+
async ingestCommunicationAndUpdateIndex(_communicationPayload, _providerDid, _requiredScope, _idToken, _format) {
|
|
103
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('communication-ingest'));
|
|
104
|
+
}
|
|
45
105
|
/**
|
|
46
106
|
* Sends a lightweight communication request description.
|
|
47
107
|
*
|
|
@@ -72,7 +132,30 @@ export class IndividualService {
|
|
|
72
132
|
return { thid: `thid-${Date.now()}` };
|
|
73
133
|
}
|
|
74
134
|
}
|
|
75
|
-
export class PhysicianService {
|
|
76
|
-
}
|
|
77
135
|
export class ParamedicService {
|
|
136
|
+
async requestSmartToken(input) {
|
|
137
|
+
return {
|
|
138
|
+
status: 'fetched',
|
|
139
|
+
accessToken: `front-token-${Date.now()}`,
|
|
140
|
+
tokenType: 'Bearer',
|
|
141
|
+
scopes: [...new Set((input.scopes || []).filter(Boolean))],
|
|
142
|
+
statusCode: 200,
|
|
143
|
+
response: { actorDid: input.actorDid },
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
async ingestCommunicationAndUpdateIndex(_communicationPayload, _providerDid, _requiredScope, _idToken, _format) {
|
|
147
|
+
return createSyntheticSubmitAndPollResult(runtimeThid('professional-communication'));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
export class PhysicianService extends ParamedicService {
|
|
151
|
+
async grantProfessionalAccess(_params) {
|
|
152
|
+
const thid = runtimeThid('professional-consent');
|
|
153
|
+
return {
|
|
154
|
+
thid,
|
|
155
|
+
consent: createSyntheticSubmitAndPollResult(thid),
|
|
156
|
+
subjectIdentifier: '',
|
|
157
|
+
actorIdentifier: '',
|
|
158
|
+
consentClaims: {},
|
|
159
|
+
};
|
|
160
|
+
}
|
|
78
161
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdc-sdk-front-ts",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "Next-generation frontend 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
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@babel/runtime": "^7.28.4",
|
|
20
|
-
"gdc-common-utils-ts": "^1.14.
|
|
21
|
-
"gdc-sdk-core-ts": "^0.6.
|
|
20
|
+
"gdc-common-utils-ts": "^1.14.14",
|
|
21
|
+
"gdc-sdk-core-ts": "^0.6.12"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^20.14.10",
|