gdc-sdk-node-ts 0.9.1 → 2.0.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/README.md +153 -2
- package/dist/backend-profile-runtime.d.ts +214 -0
- package/dist/backend-profile-runtime.js +436 -0
- package/dist/consent-claim-helpers.d.ts +2 -1
- package/dist/constants/lifecycle.d.ts +1 -0
- package/dist/constants/lifecycle.js +2 -0
- package/dist/gdc-session-bridge.js +6 -2
- package/dist/host-onboarding.d.ts +6 -39
- package/dist/host-onboarding.js +8 -38
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/individual-controller-backend-runtime.d.ts +46 -0
- package/dist/individual-controller-backend-runtime.js +53 -0
- package/dist/individual-onboarding.d.ts +1 -0
- package/dist/individual-onboarding.js +1 -0
- package/dist/individual-start.d.ts +1 -10
- package/dist/legacy-compat.d.ts +2 -0
- package/dist/legacy-compat.js +1 -0
- package/dist/node-runtime-client.d.ts +141 -10
- package/dist/node-runtime-client.js +337 -26
- package/dist/orchestration/client-port.d.ts +46 -2
- package/dist/orchestration/host-onboarding-sdk.d.ts +16 -4
- package/dist/orchestration/host-onboarding-sdk.js +22 -1
- package/dist/orchestration/individual-controller-sdk.d.ts +41 -1
- package/dist/orchestration/individual-controller-sdk.js +58 -0
- package/dist/orchestration/organization-controller-sdk.d.ts +79 -2
- package/dist/orchestration/organization-controller-sdk.js +101 -0
- package/dist/orchestration/personal-sdk.d.ts +19 -1
- package/dist/orchestration/personal-sdk.js +36 -0
- package/dist/orchestration/professional-sdk.d.ts +6 -1
- package/dist/orchestration/professional-sdk.js +7 -0
- package/dist/order-offer-summary.d.ts +6 -0
- package/dist/order-offer-summary.js +11 -0
- package/dist/organization-license-order.d.ts +40 -0
- package/dist/organization-license-order.js +42 -0
- package/dist/resource-operations.d.ts +204 -1
- package/dist/resource-operations.js +213 -14
- package/dist/session.js +1 -1
- package/package.json +17 -4
|
@@ -1,20 +1,41 @@
|
|
|
1
1
|
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
2
|
// Always create JSDoc, do not use strings inline in keys nor values, use types instead, and reuse the data test examples.
|
|
3
3
|
import { requireClientMethod, submitAndPollWithClient, } from './client-port.js';
|
|
4
|
+
import { ActorCapabilities, ActorKinds } from 'gdc-common-utils-ts/constants/actor-session';
|
|
5
|
+
import { assertFacadeCapability } from './capability-guard.js';
|
|
4
6
|
export class HostOnboardingSdk {
|
|
5
|
-
constructor(client) {
|
|
7
|
+
constructor(client, capabilities = []) {
|
|
6
8
|
this.client = client;
|
|
9
|
+
this.capabilities = capabilities;
|
|
7
10
|
}
|
|
8
11
|
/**
|
|
9
12
|
* Submits the legal organization activation proof and required declared
|
|
10
13
|
* service capabilities to GW CORE.
|
|
11
14
|
*/
|
|
12
15
|
activateOrganizationInGatewayFromIcaProof(hostCtx, input, pollOptions) {
|
|
16
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.HostingActivateOrganization, ActorKinds.HostOnboarding, 'activateOrganizationInGatewayFromIcaProof');
|
|
13
17
|
return requireClientMethod(this.client, 'activateOrganizationInGatewayFromIcaProof')(hostCtx, input, pollOptions);
|
|
14
18
|
}
|
|
15
19
|
confirmLegalOrganizationOrder(hostCtx, input, pollOptions) {
|
|
20
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.HostingConfirmOrder, ActorKinds.HostOnboarding, 'confirmLegalOrganizationOrder');
|
|
16
21
|
return requireClientMethod(this.client, 'confirmLegalOrganizationOrder')(hostCtx, input, pollOptions);
|
|
17
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Disables the host registration after all hosted tenants have already been
|
|
25
|
+
* purged and the hosting operator should stop publishing discovery services.
|
|
26
|
+
*/
|
|
27
|
+
disableHost(hostCtx, input, pollOptions) {
|
|
28
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.HostingDisableHost, ActorKinds.HostOnboarding, 'disableHost');
|
|
29
|
+
return requireClientMethod(this.client, 'disableHost')(hostCtx, input, pollOptions);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Purges the already-disabled host registration once no hosted tenants
|
|
33
|
+
* remain in the registry.
|
|
34
|
+
*/
|
|
35
|
+
purgeHost(hostCtx, input, pollOptions) {
|
|
36
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.HostingPurgeHost, ActorKinds.HostOnboarding, 'purgeHost');
|
|
37
|
+
return requireClientMethod(this.client, 'purgeHost')(hostCtx, input, pollOptions);
|
|
38
|
+
}
|
|
18
39
|
submitAndPoll(submitPath, pollPath, payload, pollOptions) {
|
|
19
40
|
return submitAndPollWithClient(this.client, submitPath, pollPath, payload, pollOptions);
|
|
20
41
|
}
|
|
@@ -2,7 +2,7 @@ import { type NodeRuntimeClient, type PollOptions, type SubmitAndPollResult, typ
|
|
|
2
2
|
import type { IndividualOrganizationConfirmOrderInput, RouteContext } from '../individual-onboarding.js';
|
|
3
3
|
import type { IndividualOrganizationBootstrapInput, IndividualOrganizationStartResult } from '../individual-start.js';
|
|
4
4
|
import type { NodeCapability } from '../session.js';
|
|
5
|
-
import type { CommunicationIngestionInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IndividualMemberLifecycleInput, IndividualOrganizationLifecycleInput, IpsOrFhirImportInput, RelatedPersonUpsertInput } from '../resource-operations.js';
|
|
5
|
+
import type { ClinicalBundleSearchInput, CommunicationIngestionInput, CommunicationParticipantRuntimeSearchInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IndividualMemberLifecycleInput, IndividualOrganizationLifecycleInput, IpsOrFhirImportInput, LicenseListRuntimeSearchInput, LicenseOfferRuntimeSearchInput, LicenseOrderRuntimeSearchInput, RelatedPersonUpsertInput } from '../resource-operations.js';
|
|
6
6
|
import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
|
|
7
7
|
/**
|
|
8
8
|
* Individual-controller oriented facade over a `NodeRuntimeClient`.
|
|
@@ -71,10 +71,50 @@ export declare class IndividualControllerSdk {
|
|
|
71
71
|
* Ingests a FHIR `Communication` and waits for indexing.
|
|
72
72
|
*/
|
|
73
73
|
ingestCommunicationAndUpdateIndex(ctx: RouteContext, input: CommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
74
|
+
/**
|
|
75
|
+
* Searches indexed communication channel records by subject and participant
|
|
76
|
+
* identifiers.
|
|
77
|
+
*/
|
|
78
|
+
searchCommunicationParticipants(ctx: RouteContext, input: CommunicationParticipantRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
74
79
|
/**
|
|
75
80
|
* Generates a digital twin projection from subject data.
|
|
76
81
|
*/
|
|
77
82
|
generateDigitalTwinFromSubjectData(ctx: RouteContext, input: DigitalTwinGenerationInput): Promise<SubmitAndPollResult>;
|
|
83
|
+
/**
|
|
84
|
+
* Searches indexed clinical bundles for the current subject/controller context.
|
|
85
|
+
*/
|
|
86
|
+
searchClinicalBundle(ctx: RouteContext, input: ClinicalBundleSearchInput): Promise<SubmitAndPollResult>;
|
|
87
|
+
/**
|
|
88
|
+
* Returns the latest IPS-oriented bundle for one subject.
|
|
89
|
+
*/
|
|
90
|
+
getLatestIps(ctx: RouteContext, input: Omit<ClinicalBundleSearchInput, 'includedTypes'>): Promise<SubmitAndPollResult>;
|
|
91
|
+
/**
|
|
92
|
+
* Searches subject/individual-side license seats using semantic filters.
|
|
93
|
+
*/
|
|
94
|
+
searchLicenses(ctx: RouteContext, input: LicenseListRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
95
|
+
/**
|
|
96
|
+
* Lists subject/individual-side license seats with optional filters.
|
|
97
|
+
*/
|
|
98
|
+
listLicenses(ctx: RouteContext, input?: LicenseListRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
99
|
+
/**
|
|
100
|
+
* Searches commercial license offers known for the individual/family
|
|
101
|
+
* context.
|
|
102
|
+
*/
|
|
103
|
+
searchLicenseOffers(ctx: RouteContext, input: LicenseOfferRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
104
|
+
/**
|
|
105
|
+
* Lists commercial license offers known for the individual/family context.
|
|
106
|
+
*/
|
|
107
|
+
listLicenseOffers(ctx: RouteContext, input?: LicenseOfferRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
108
|
+
/**
|
|
109
|
+
* Searches commercial license orders/payment projections for the
|
|
110
|
+
* individual/family context.
|
|
111
|
+
*/
|
|
112
|
+
searchLicenseOrders(ctx: RouteContext, input: LicenseOrderRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
113
|
+
/**
|
|
114
|
+
* Lists commercial license orders/payment projections for the
|
|
115
|
+
* individual/family context.
|
|
116
|
+
*/
|
|
117
|
+
listLicenseOrders(ctx: RouteContext, input?: LicenseOrderRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
78
118
|
/**
|
|
79
119
|
* Requests a SMART/OpenID token for subsequent data access flows.
|
|
80
120
|
*/
|
|
@@ -106,6 +106,13 @@ export class IndividualControllerSdk {
|
|
|
106
106
|
assertFacadeCapability(this.capabilities, ActorCapabilities.IndividualIngestCommunication, ActorKinds.IndividualController, 'ingestCommunicationAndUpdateIndex');
|
|
107
107
|
return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
|
|
108
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Searches indexed communication channel records by subject and participant
|
|
111
|
+
* identifiers.
|
|
112
|
+
*/
|
|
113
|
+
searchCommunicationParticipants(ctx, input) {
|
|
114
|
+
return requireClientMethod(this.client, 'searchCommunicationParticipants')(ctx, input);
|
|
115
|
+
}
|
|
109
116
|
/**
|
|
110
117
|
* Generates a digital twin projection from subject data.
|
|
111
118
|
*/
|
|
@@ -113,6 +120,57 @@ export class IndividualControllerSdk {
|
|
|
113
120
|
assertFacadeCapability(this.capabilities, ActorCapabilities.IndividualGenerateDigitalTwin, ActorKinds.IndividualController, 'generateDigitalTwinFromSubjectData');
|
|
114
121
|
return requireClientMethod(this.client, 'generateDigitalTwinFromSubjectData')(ctx, input);
|
|
115
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Searches indexed clinical bundles for the current subject/controller context.
|
|
125
|
+
*/
|
|
126
|
+
searchClinicalBundle(ctx, input) {
|
|
127
|
+
return requireClientMethod(this.client, 'searchClinicalBundle')(ctx, input);
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Returns the latest IPS-oriented bundle for one subject.
|
|
131
|
+
*/
|
|
132
|
+
getLatestIps(ctx, input) {
|
|
133
|
+
return requireClientMethod(this.client, 'getLatestIps')(ctx, input);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Searches subject/individual-side license seats using semantic filters.
|
|
137
|
+
*/
|
|
138
|
+
searchLicenses(ctx, input) {
|
|
139
|
+
return requireClientMethod(this.client, 'searchIndividualLicenses')(ctx, input);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Lists subject/individual-side license seats with optional filters.
|
|
143
|
+
*/
|
|
144
|
+
listLicenses(ctx, input = {}) {
|
|
145
|
+
return requireClientMethod(this.client, 'listIndividualLicenses')(ctx, input);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Searches commercial license offers known for the individual/family
|
|
149
|
+
* context.
|
|
150
|
+
*/
|
|
151
|
+
searchLicenseOffers(ctx, input) {
|
|
152
|
+
return requireClientMethod(this.client, 'searchIndividualLicenseOffers')(ctx, input);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Lists commercial license offers known for the individual/family context.
|
|
156
|
+
*/
|
|
157
|
+
listLicenseOffers(ctx, input = {}) {
|
|
158
|
+
return requireClientMethod(this.client, 'listIndividualLicenseOffers')(ctx, input);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Searches commercial license orders/payment projections for the
|
|
162
|
+
* individual/family context.
|
|
163
|
+
*/
|
|
164
|
+
searchLicenseOrders(ctx, input) {
|
|
165
|
+
return requireClientMethod(this.client, 'searchIndividualLicenseOrders')(ctx, input);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Lists commercial license orders/payment projections for the
|
|
169
|
+
* individual/family context.
|
|
170
|
+
*/
|
|
171
|
+
listLicenseOrders(ctx, input = {}) {
|
|
172
|
+
return requireClientMethod(this.client, 'listIndividualLicenseOrders')(ctx, input);
|
|
173
|
+
}
|
|
116
174
|
/**
|
|
117
175
|
* Requests a SMART/OpenID token for subsequent data access flows.
|
|
118
176
|
*/
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { type NodeRuntimeClient, type PollOptions, type SubmitAndPollResult, type SubmitPayload } from './client-port.js';
|
|
1
|
+
import { type NodeOrganizationDidBindingInput, type NodeLegalOrganizationVerificationTransactionInput, type NodeRuntimeClient, type PollOptions, type SubmitAndPollResult, type SubmitPayload } from './client-port.js';
|
|
2
2
|
import type { RouteContext } from '../individual-onboarding.js';
|
|
3
|
+
import type { HostRouteContext, HostedTenantLifecycleInput } from '../host-onboarding.js';
|
|
3
4
|
import type { EmployeeDeviceActivationResult, EmployeeDeviceActivationRequestInput } from '../device-activation.js';
|
|
4
5
|
import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
|
|
6
|
+
import type { OrganizationLicenseOrderConfirmInput } from '../organization-license-order.js';
|
|
5
7
|
import type { NodeCapability } from '../session.js';
|
|
6
|
-
import type { OrganizationEmployeeCreationInput, OrganizationEmployeeLifecycleInput } from '../resource-operations.js';
|
|
8
|
+
import type { LicenseListRuntimeSearchInput, LicenseOfferRuntimeSearchInput, LicenseOrderRuntimeSearchInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput } from '../resource-operations.js';
|
|
7
9
|
/**
|
|
8
10
|
* Organization-controller oriented facade over a `NodeRuntimeClient`.
|
|
9
11
|
*
|
|
@@ -17,6 +19,26 @@ export declare class OrganizationControllerSdk {
|
|
|
17
19
|
* @param client Runtime client implementation used to submit and poll GW flows.
|
|
18
20
|
*/
|
|
19
21
|
constructor(client: NodeRuntimeClient, capabilities?: readonly NodeCapability[] | undefined);
|
|
22
|
+
/**
|
|
23
|
+
* Starts the host-side legal-organization verification transaction that GW
|
|
24
|
+
* CORE forwards to ICA `_verify`.
|
|
25
|
+
*
|
|
26
|
+
* This is intentionally distinct from the later host `_activate` step:
|
|
27
|
+
* - `_transaction` carries signed evidence and controller business binding
|
|
28
|
+
* - `_activate` later consumes the ICA proof returned after verification
|
|
29
|
+
*/
|
|
30
|
+
submitLegalOrganizationVerificationTransaction(hostCtx: HostRouteContext, input: NodeLegalOrganizationVerificationTransactionInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
31
|
+
/**
|
|
32
|
+
* Binds the current tenant organization DID document to one public alias
|
|
33
|
+
* view.
|
|
34
|
+
*
|
|
35
|
+
* Contract:
|
|
36
|
+
* - the tenant path identifies the organization
|
|
37
|
+
* - `organization.url`, when present, provides the public aliases/domains to
|
|
38
|
+
* bind
|
|
39
|
+
* - `controller.sameAs` is optional corroborating identity evidence
|
|
40
|
+
*/
|
|
41
|
+
submitOrganizationDidBinding(ctx: RouteContext, input: NodeOrganizationDidBindingInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
20
42
|
/**
|
|
21
43
|
* Creates an employee/professional under the current organization tenant.
|
|
22
44
|
*/
|
|
@@ -29,6 +51,51 @@ export declare class OrganizationControllerSdk {
|
|
|
29
51
|
* Preferred public alias for employee disable.
|
|
30
52
|
*/
|
|
31
53
|
disableEmployee(ctx: RouteContext, input: OrganizationEmployeeLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
54
|
+
/**
|
|
55
|
+
* Searches employees/professionals under the current organization tenant.
|
|
56
|
+
*/
|
|
57
|
+
searchOrganizationEmployees(ctx: RouteContext, input: OrganizationEmployeeSearchInput): Promise<SubmitAndPollResult>;
|
|
58
|
+
/**
|
|
59
|
+
* Searches organization-owned license seats using semantic license filters.
|
|
60
|
+
*/
|
|
61
|
+
searchLicenses(ctx: RouteContext, input: LicenseListRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
62
|
+
/**
|
|
63
|
+
* Lists organization-owned license seats with optional filters.
|
|
64
|
+
*/
|
|
65
|
+
listLicenses(ctx: RouteContext, input?: LicenseListRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
66
|
+
/**
|
|
67
|
+
* Searches commercial license offers known for the current organization.
|
|
68
|
+
*/
|
|
69
|
+
searchLicenseOffers(ctx: RouteContext, input: LicenseOfferRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
70
|
+
/**
|
|
71
|
+
* Lists commercial license offers known for the current organization.
|
|
72
|
+
*/
|
|
73
|
+
listLicenseOffers(ctx: RouteContext, input?: LicenseOfferRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
74
|
+
/**
|
|
75
|
+
* Searches commercial license orders/payment records known for the current
|
|
76
|
+
* organization.
|
|
77
|
+
*/
|
|
78
|
+
searchLicenseOrders(ctx: RouteContext, input: LicenseOrderRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
79
|
+
/**
|
|
80
|
+
* Lists commercial license orders/payment records known for the current
|
|
81
|
+
* organization.
|
|
82
|
+
*/
|
|
83
|
+
listLicenseOrders(ctx: RouteContext, input?: LicenseOrderRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
84
|
+
/**
|
|
85
|
+
* Confirms an already paid organization-side license order so GW CORE can
|
|
86
|
+
* activate additional tenant seats once the public route exists.
|
|
87
|
+
*
|
|
88
|
+
* The commercial/payment step happens outside GW CORE. This method models
|
|
89
|
+
* the follow-up confirmation that should materialize new seats from the
|
|
90
|
+
* accepted order.
|
|
91
|
+
*
|
|
92
|
+
* Current runtime note:
|
|
93
|
+
* - search/list of organization license offers and orders already exists
|
|
94
|
+
* - the public/write post-payment seat-activation route is not converged yet
|
|
95
|
+
* - current runtime clients therefore throw an explicit unsupported-flow
|
|
96
|
+
* error instead of fabricating an unstable payload contract
|
|
97
|
+
*/
|
|
98
|
+
confirmOrganizationLicenseOrder(ctx: RouteContext, input: OrganizationLicenseOrderConfirmInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
32
99
|
/**
|
|
33
100
|
* Purges an already inactive employee and frees the associated license seat.
|
|
34
101
|
*/
|
|
@@ -37,6 +104,16 @@ export declare class OrganizationControllerSdk {
|
|
|
37
104
|
* Preferred public alias for employee purge.
|
|
38
105
|
*/
|
|
39
106
|
purgeEmployee(ctx: RouteContext, input: OrganizationEmployeeLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
107
|
+
/**
|
|
108
|
+
* Disables the hosted tenant itself through the host registry once no active
|
|
109
|
+
* employees or individual/member descendants remain.
|
|
110
|
+
*/
|
|
111
|
+
disableTenant(hostCtx: HostRouteContext, input: HostedTenantLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
112
|
+
/**
|
|
113
|
+
* Purges the hosted tenant through the host registry after tenant disable and
|
|
114
|
+
* descendant purges have both completed.
|
|
115
|
+
*/
|
|
116
|
+
purgeTenant(hostCtx: HostRouteContext, input: HostedTenantLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
40
117
|
/**
|
|
41
118
|
* Activates the employee device from a previously issued activation request.
|
|
42
119
|
*/
|
|
@@ -16,6 +16,30 @@ export class OrganizationControllerSdk {
|
|
|
16
16
|
this.client = client;
|
|
17
17
|
this.capabilities = capabilities;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Starts the host-side legal-organization verification transaction that GW
|
|
21
|
+
* CORE forwards to ICA `_verify`.
|
|
22
|
+
*
|
|
23
|
+
* This is intentionally distinct from the later host `_activate` step:
|
|
24
|
+
* - `_transaction` carries signed evidence and controller business binding
|
|
25
|
+
* - `_activate` later consumes the ICA proof returned after verification
|
|
26
|
+
*/
|
|
27
|
+
submitLegalOrganizationVerificationTransaction(hostCtx, input, pollOptions) {
|
|
28
|
+
return requireClientMethod(this.client, 'submitLegalOrganizationVerificationTransaction')(hostCtx, input, pollOptions);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Binds the current tenant organization DID document to one public alias
|
|
32
|
+
* view.
|
|
33
|
+
*
|
|
34
|
+
* Contract:
|
|
35
|
+
* - the tenant path identifies the organization
|
|
36
|
+
* - `organization.url`, when present, provides the public aliases/domains to
|
|
37
|
+
* bind
|
|
38
|
+
* - `controller.sameAs` is optional corroborating identity evidence
|
|
39
|
+
*/
|
|
40
|
+
submitOrganizationDidBinding(ctx, input, pollOptions) {
|
|
41
|
+
return requireClientMethod(this.client, 'submitOrganizationDidBinding')(ctx, input, pollOptions);
|
|
42
|
+
}
|
|
19
43
|
/**
|
|
20
44
|
* Creates an employee/professional under the current organization tenant.
|
|
21
45
|
*/
|
|
@@ -37,6 +61,67 @@ export class OrganizationControllerSdk {
|
|
|
37
61
|
assertFacadeCapability(this.capabilities, ActorCapabilities.OrganizationDisableEmployee, ActorKinds.OrganizationController, 'disableEmployee');
|
|
38
62
|
return requireClientMethod(this.client, 'disableEmployee')(ctx, input, pollOptions);
|
|
39
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Searches employees/professionals under the current organization tenant.
|
|
66
|
+
*/
|
|
67
|
+
searchOrganizationEmployees(ctx, input) {
|
|
68
|
+
return requireClientMethod(this.client, 'searchOrganizationEmployees')(ctx, input);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Searches organization-owned license seats using semantic license filters.
|
|
72
|
+
*/
|
|
73
|
+
searchLicenses(ctx, input) {
|
|
74
|
+
return requireClientMethod(this.client, 'searchOrganizationLicenses')(ctx, input);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Lists organization-owned license seats with optional filters.
|
|
78
|
+
*/
|
|
79
|
+
listLicenses(ctx, input = {}) {
|
|
80
|
+
return requireClientMethod(this.client, 'listOrganizationLicenses')(ctx, input);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Searches commercial license offers known for the current organization.
|
|
84
|
+
*/
|
|
85
|
+
searchLicenseOffers(ctx, input) {
|
|
86
|
+
return requireClientMethod(this.client, 'searchOrganizationLicenseOffers')(ctx, input);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Lists commercial license offers known for the current organization.
|
|
90
|
+
*/
|
|
91
|
+
listLicenseOffers(ctx, input = {}) {
|
|
92
|
+
return requireClientMethod(this.client, 'listOrganizationLicenseOffers')(ctx, input);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Searches commercial license orders/payment records known for the current
|
|
96
|
+
* organization.
|
|
97
|
+
*/
|
|
98
|
+
searchLicenseOrders(ctx, input) {
|
|
99
|
+
return requireClientMethod(this.client, 'searchOrganizationLicenseOrders')(ctx, input);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Lists commercial license orders/payment records known for the current
|
|
103
|
+
* organization.
|
|
104
|
+
*/
|
|
105
|
+
listLicenseOrders(ctx, input = {}) {
|
|
106
|
+
return requireClientMethod(this.client, 'listOrganizationLicenseOrders')(ctx, input);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Confirms an already paid organization-side license order so GW CORE can
|
|
110
|
+
* activate additional tenant seats once the public route exists.
|
|
111
|
+
*
|
|
112
|
+
* The commercial/payment step happens outside GW CORE. This method models
|
|
113
|
+
* the follow-up confirmation that should materialize new seats from the
|
|
114
|
+
* accepted order.
|
|
115
|
+
*
|
|
116
|
+
* Current runtime note:
|
|
117
|
+
* - search/list of organization license offers and orders already exists
|
|
118
|
+
* - the public/write post-payment seat-activation route is not converged yet
|
|
119
|
+
* - current runtime clients therefore throw an explicit unsupported-flow
|
|
120
|
+
* error instead of fabricating an unstable payload contract
|
|
121
|
+
*/
|
|
122
|
+
confirmOrganizationLicenseOrder(ctx, input, pollOptions) {
|
|
123
|
+
return requireClientMethod(this.client, 'confirmOrganizationLicenseOrder')(ctx, input, pollOptions);
|
|
124
|
+
}
|
|
40
125
|
/**
|
|
41
126
|
* Purges an already inactive employee and frees the associated license seat.
|
|
42
127
|
*/
|
|
@@ -51,6 +136,22 @@ export class OrganizationControllerSdk {
|
|
|
51
136
|
assertFacadeCapability(this.capabilities, ActorCapabilities.OrganizationPurgeEmployee, ActorKinds.OrganizationController, 'purgeEmployee');
|
|
52
137
|
return requireClientMethod(this.client, 'purgeEmployee')(ctx, input, pollOptions);
|
|
53
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* Disables the hosted tenant itself through the host registry once no active
|
|
141
|
+
* employees or individual/member descendants remain.
|
|
142
|
+
*/
|
|
143
|
+
disableTenant(hostCtx, input, pollOptions) {
|
|
144
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.OrganizationDisableTenant, ActorKinds.OrganizationController, 'disableTenant');
|
|
145
|
+
return requireClientMethod(this.client, 'disableTenant')(hostCtx, input, pollOptions);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Purges the hosted tenant through the host registry after tenant disable and
|
|
149
|
+
* descendant purges have both completed.
|
|
150
|
+
*/
|
|
151
|
+
purgeTenant(hostCtx, input, pollOptions) {
|
|
152
|
+
assertFacadeCapability(this.capabilities, ActorCapabilities.OrganizationPurgeTenant, ActorKinds.OrganizationController, 'purgeTenant');
|
|
153
|
+
return requireClientMethod(this.client, 'purgeTenant')(hostCtx, input, pollOptions);
|
|
154
|
+
}
|
|
54
155
|
/**
|
|
55
156
|
* Activates the employee device from a previously issued activation request.
|
|
56
157
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type NodeRuntimeClient, type PollOptions, type SubmitAndPollResult, type SubmitPayload } from './client-port.js';
|
|
2
2
|
import type { IndividualOrganizationBootstrapInput, IndividualOrganizationStartResult } from '../individual-start.js';
|
|
3
3
|
import type { RouteContext } from '../individual-onboarding.js';
|
|
4
|
-
import type { CommunicationIngestionInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IpsOrFhirImportInput } from '../resource-operations.js';
|
|
4
|
+
import type { ClinicalBundleSearchInput, CommunicationIngestionInput, CommunicationParticipantRuntimeSearchInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IpsOrFhirImportInput, LicenseListRuntimeSearchInput, LicenseOfferRuntimeSearchInput, LicenseOrderRuntimeSearchInput } from '../resource-operations.js';
|
|
5
5
|
import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
|
|
6
6
|
export declare class PersonalSdk {
|
|
7
7
|
private readonly client;
|
|
@@ -14,8 +14,26 @@ export declare class PersonalSdk {
|
|
|
14
14
|
importIpsOrFhirAndUpdateIndex(ctx: RouteContext, input: IpsOrFhirImportInput): Promise<SubmitAndPollResult>;
|
|
15
15
|
/** Ingests canonical Communication and waits for projection completion. */
|
|
16
16
|
ingestCommunicationAndUpdateIndex(ctx: RouteContext, input: CommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
17
|
+
/** Searches indexed communication channel records by subject and participant identifiers. */
|
|
18
|
+
searchCommunicationParticipants(ctx: RouteContext, input: CommunicationParticipantRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
17
19
|
/** Triggers digital twin generation from subject data. */
|
|
18
20
|
generateDigitalTwinFromSubjectData(ctx: RouteContext, input: DigitalTwinGenerationInput): Promise<SubmitAndPollResult>;
|
|
21
|
+
/** Searches indexed clinical bundles for the current subject/controller context. */
|
|
22
|
+
searchClinicalBundle(ctx: RouteContext, input: ClinicalBundleSearchInput): Promise<SubmitAndPollResult>;
|
|
23
|
+
/** Returns the latest IPS-oriented bundle for one subject. */
|
|
24
|
+
getLatestIps(ctx: RouteContext, input: Omit<ClinicalBundleSearchInput, 'includedTypes'>): Promise<SubmitAndPollResult>;
|
|
25
|
+
/** Searches subject-side license seats using semantic filters. */
|
|
26
|
+
searchLicenses(ctx: RouteContext, input: LicenseListRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
27
|
+
/** Lists subject-side license seats with optional filters. */
|
|
28
|
+
listLicenses(ctx: RouteContext, input?: LicenseListRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
29
|
+
/** Searches subject-side commercial license offers. */
|
|
30
|
+
searchLicenseOffers(ctx: RouteContext, input: LicenseOfferRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
31
|
+
/** Lists subject-side commercial license offers. */
|
|
32
|
+
listLicenseOffers(ctx: RouteContext, input?: LicenseOfferRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
33
|
+
/** Searches subject-side commercial license orders/payment projections. */
|
|
34
|
+
searchLicenseOrders(ctx: RouteContext, input: LicenseOrderRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
35
|
+
/** Lists subject-side commercial license orders/payment projections. */
|
|
36
|
+
listLicenseOrders(ctx: RouteContext, input?: LicenseOrderRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
19
37
|
/** Requests SMART/OpenID token with simplified exchange flow. */
|
|
20
38
|
requestSmartToken(input: SmartTokenRequestInput): Promise<SmartTokenExchangeResult>;
|
|
21
39
|
submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
@@ -20,10 +20,46 @@ export class PersonalSdk {
|
|
|
20
20
|
ingestCommunicationAndUpdateIndex(ctx, input) {
|
|
21
21
|
return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
|
|
22
22
|
}
|
|
23
|
+
/** Searches indexed communication channel records by subject and participant identifiers. */
|
|
24
|
+
searchCommunicationParticipants(ctx, input) {
|
|
25
|
+
return requireClientMethod(this.client, 'searchCommunicationParticipants')(ctx, input);
|
|
26
|
+
}
|
|
23
27
|
/** Triggers digital twin generation from subject data. */
|
|
24
28
|
generateDigitalTwinFromSubjectData(ctx, input) {
|
|
25
29
|
return requireClientMethod(this.client, 'generateDigitalTwinFromSubjectData')(ctx, input);
|
|
26
30
|
}
|
|
31
|
+
/** Searches indexed clinical bundles for the current subject/controller context. */
|
|
32
|
+
searchClinicalBundle(ctx, input) {
|
|
33
|
+
return requireClientMethod(this.client, 'searchClinicalBundle')(ctx, input);
|
|
34
|
+
}
|
|
35
|
+
/** Returns the latest IPS-oriented bundle for one subject. */
|
|
36
|
+
getLatestIps(ctx, input) {
|
|
37
|
+
return requireClientMethod(this.client, 'getLatestIps')(ctx, input);
|
|
38
|
+
}
|
|
39
|
+
/** Searches subject-side license seats using semantic filters. */
|
|
40
|
+
searchLicenses(ctx, input) {
|
|
41
|
+
return requireClientMethod(this.client, 'searchIndividualLicenses')(ctx, input);
|
|
42
|
+
}
|
|
43
|
+
/** Lists subject-side license seats with optional filters. */
|
|
44
|
+
listLicenses(ctx, input = {}) {
|
|
45
|
+
return requireClientMethod(this.client, 'listIndividualLicenses')(ctx, input);
|
|
46
|
+
}
|
|
47
|
+
/** Searches subject-side commercial license offers. */
|
|
48
|
+
searchLicenseOffers(ctx, input) {
|
|
49
|
+
return requireClientMethod(this.client, 'searchIndividualLicenseOffers')(ctx, input);
|
|
50
|
+
}
|
|
51
|
+
/** Lists subject-side commercial license offers. */
|
|
52
|
+
listLicenseOffers(ctx, input = {}) {
|
|
53
|
+
return requireClientMethod(this.client, 'listIndividualLicenseOffers')(ctx, input);
|
|
54
|
+
}
|
|
55
|
+
/** Searches subject-side commercial license orders/payment projections. */
|
|
56
|
+
searchLicenseOrders(ctx, input) {
|
|
57
|
+
return requireClientMethod(this.client, 'searchIndividualLicenseOrders')(ctx, input);
|
|
58
|
+
}
|
|
59
|
+
/** Lists subject-side commercial license orders/payment projections. */
|
|
60
|
+
listLicenseOrders(ctx, input = {}) {
|
|
61
|
+
return requireClientMethod(this.client, 'listIndividualLicenseOrders')(ctx, input);
|
|
62
|
+
}
|
|
27
63
|
/** Requests SMART/OpenID token with simplified exchange flow. */
|
|
28
64
|
requestSmartToken(input) {
|
|
29
65
|
return requireClientMethod(this.client, 'requestSmartToken')(input);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type NodeRuntimeClient, type PollOptions, type SubmitAndPollResult, type SubmitPayload } from './client-port.js';
|
|
2
2
|
import type { RouteContext } from '../individual-onboarding.js';
|
|
3
3
|
import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
|
|
4
|
-
import type { CommunicationIngestionInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult } from '../resource-operations.js';
|
|
4
|
+
import type { CommunicationIngestionInput, CommunicationParticipantRuntimeSearchInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult } from '../resource-operations.js';
|
|
5
5
|
/**
|
|
6
6
|
* Professional-oriented facade for runtime actions that belong to the
|
|
7
7
|
* professional actor itself after tenant and employee provisioning have already
|
|
@@ -33,6 +33,11 @@ export declare class ProfessionalSdk {
|
|
|
33
33
|
* Ingests a FHIR `Communication` and waits for indexing.
|
|
34
34
|
*/
|
|
35
35
|
ingestCommunicationAndUpdateIndex(ctx: RouteContext, input: CommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
36
|
+
/**
|
|
37
|
+
* Searches indexed communication channel records by subject and participant
|
|
38
|
+
* identifiers.
|
|
39
|
+
*/
|
|
40
|
+
searchCommunicationParticipants(ctx: RouteContext, input: CommunicationParticipantRuntimeSearchInput): Promise<SubmitAndPollResult>;
|
|
36
41
|
/**
|
|
37
42
|
* Grants access to a professional through a consent flow.
|
|
38
43
|
*/
|
|
@@ -37,6 +37,13 @@ export class ProfessionalSdk {
|
|
|
37
37
|
ingestCommunicationAndUpdateIndex(ctx, input) {
|
|
38
38
|
return requireClientMethod(this.client, 'ingestCommunicationAndUpdateIndex')(ctx, input);
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Searches indexed communication channel records by subject and participant
|
|
42
|
+
* identifiers.
|
|
43
|
+
*/
|
|
44
|
+
searchCommunicationParticipants(ctx, input) {
|
|
45
|
+
return requireClientMethod(this.client, 'searchCommunicationParticipants')(ctx, input);
|
|
46
|
+
}
|
|
40
47
|
/**
|
|
41
48
|
* Grants access to a professional through a consent flow.
|
|
42
49
|
*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type LicenseOfferPreview, type LicenseOrderSummary } from 'gdc-common-utils-ts';
|
|
2
|
+
export type OfferPreview = LicenseOfferPreview;
|
|
3
|
+
export type OrderSummary = LicenseOrderSummary;
|
|
4
|
+
export declare function extractOfferIdFromResponseBody(body: unknown): string | undefined;
|
|
5
|
+
export declare function extractOfferPreviewFromResponseBody(body: unknown): OfferPreview;
|
|
6
|
+
export declare function extractOrderSummaryFromResponseBody(body: unknown): OrderSummary;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { ClaimsOfferSchemaorg, extractPrimaryClaims, readLicenseOfferPreviewFromResponseBody, readLicenseOrderSummaryFromResponseBody, } from 'gdc-common-utils-ts';
|
|
3
|
+
export function extractOfferIdFromResponseBody(body) {
|
|
4
|
+
return String(extractPrimaryClaims(body)[ClaimsOfferSchemaorg.identifier] || '').trim() || undefined;
|
|
5
|
+
}
|
|
6
|
+
export function extractOfferPreviewFromResponseBody(body) {
|
|
7
|
+
return readLicenseOfferPreviewFromResponseBody(body);
|
|
8
|
+
}
|
|
9
|
+
export function extractOrderSummaryFromResponseBody(body) {
|
|
10
|
+
return readLicenseOrderSummaryFromResponseBody(body);
|
|
11
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { PollOptions, SubmitAndPollResult } from './orchestration/client-port.js';
|
|
2
|
+
import type { HostRouteContext } from './host-onboarding.js';
|
|
3
|
+
import type { RouteContext } from './individual-onboarding.js';
|
|
4
|
+
/**
|
|
5
|
+
* High-level runtime input for organization-side extra-license activation after
|
|
6
|
+
* the portal has already resolved the commercial/payment step out of band.
|
|
7
|
+
*
|
|
8
|
+
* Target business sequence:
|
|
9
|
+
* - portal lists/searches `Offer`
|
|
10
|
+
* - portal completes the fictitious or real payment outside GW CORE
|
|
11
|
+
* - portal confirms the accepted offer to GW CORE
|
|
12
|
+
* - GW CORE materializes the new `device-licenses` seats for the tenant
|
|
13
|
+
*
|
|
14
|
+
* Transport note:
|
|
15
|
+
* - current GW CORE exposes this confirmation step through the host
|
|
16
|
+
* `registry/org.schema/Order/_batch` route
|
|
17
|
+
* - the organization controller still reasons in tenant context, so the
|
|
18
|
+
* runtime adapts that higher-level intent onto the current host route
|
|
19
|
+
*/
|
|
20
|
+
export type OrganizationLicenseOrderConfirmInput = Readonly<{
|
|
21
|
+
offerId: string;
|
|
22
|
+
hostNetwork?: string;
|
|
23
|
+
dataType?: string;
|
|
24
|
+
additionalClaims?: Record<string, unknown>;
|
|
25
|
+
timeoutSeconds?: number;
|
|
26
|
+
intervalSeconds?: number;
|
|
27
|
+
}>;
|
|
28
|
+
type ConfirmOrganizationLicenseOrderDeps = Readonly<{
|
|
29
|
+
routeCtx: RouteContext;
|
|
30
|
+
input: OrganizationLicenseOrderConfirmInput;
|
|
31
|
+
defaultTimeoutMs?: number;
|
|
32
|
+
defaultIntervalMs?: number;
|
|
33
|
+
hostRegistryOrderBatchPath: (ctx: HostRouteContext) => string;
|
|
34
|
+
hostRegistryOrderPollPath: (ctx: HostRouteContext) => string;
|
|
35
|
+
submitAndPoll: (submitPath: string, pollPath: string, payload: {
|
|
36
|
+
thid?: string;
|
|
37
|
+
} & Record<string, unknown>, options?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
38
|
+
}>;
|
|
39
|
+
export declare function confirmOrganizationLicenseOrderWithDeps(deps: ConfirmOrganizationLicenseOrderDeps): Promise<SubmitAndPollResult>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { resolvePollOptionsFromSeconds } from './poll-options.js';
|
|
3
|
+
export async function confirmOrganizationLicenseOrderWithDeps(deps) {
|
|
4
|
+
const offerId = String(deps.input.offerId || '').trim();
|
|
5
|
+
if (!offerId) {
|
|
6
|
+
throw new Error('confirmOrganizationLicenseOrder requires offerId.');
|
|
7
|
+
}
|
|
8
|
+
const claims = {
|
|
9
|
+
'@context': 'org.schema',
|
|
10
|
+
'Order.acceptedOffer.identifier': offerId,
|
|
11
|
+
...(deps.input.additionalClaims || {}),
|
|
12
|
+
};
|
|
13
|
+
const hostCtx = {
|
|
14
|
+
jurisdiction: String(deps.routeCtx.jurisdiction || '').trim(),
|
|
15
|
+
hostNetwork: String(deps.input.hostNetwork || 'test').trim() || 'test',
|
|
16
|
+
};
|
|
17
|
+
const payload = {
|
|
18
|
+
jti: `jti-${createRuntimeUuid()}`,
|
|
19
|
+
iss: deps.routeCtx.tenantId,
|
|
20
|
+
aud: deps.routeCtx.tenantId,
|
|
21
|
+
type: 'application/didcomm-plain+json',
|
|
22
|
+
thid: `organization-license-order-${createRuntimeUuid()}`,
|
|
23
|
+
body: {
|
|
24
|
+
data: [{
|
|
25
|
+
type: deps.input.dataType || 'Organization-order-request-v1.0',
|
|
26
|
+
meta: { claims },
|
|
27
|
+
resource: { meta: { claims } },
|
|
28
|
+
}],
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
return deps.submitAndPoll(deps.hostRegistryOrderBatchPath(hostCtx), deps.hostRegistryOrderPollPath(hostCtx), payload, resolvePollOptionsFromSeconds(deps.input.timeoutSeconds, deps.input.intervalSeconds, {
|
|
32
|
+
timeoutMs: deps.defaultTimeoutMs,
|
|
33
|
+
intervalMs: deps.defaultIntervalMs,
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
function createRuntimeUuid() {
|
|
37
|
+
const fromCrypto = globalThis.crypto?.randomUUID?.();
|
|
38
|
+
if (fromCrypto) {
|
|
39
|
+
return fromCrypto;
|
|
40
|
+
}
|
|
41
|
+
return `fallback-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
42
|
+
}
|