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
|
@@ -2,14 +2,17 @@
|
|
|
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 fs from 'node:fs';
|
|
4
4
|
import path from 'node:path';
|
|
5
|
-
import { buildAppHeaders, createBootstrapFacade, resolveAppInfo, } from 'gdc-sdk-core-ts';
|
|
5
|
+
import { buildLegalOrganizationVerificationGatewayRequestBundle, buildOrganizationDidBindingBundle, buildAppHeaders, createBootstrapFacade, resolveAppInfo, } from 'gdc-sdk-core-ts';
|
|
6
6
|
import { buildConsentClaimsSimpleWithCid } from 'gdc-common-utils-ts/utils/consent';
|
|
7
|
+
import { buildDidcommPlaintextTransportMetadata } from 'gdc-common-utils-ts/utils/activation-request';
|
|
7
8
|
import { pollUntilCompleteWithMethod } from './async-polling.js';
|
|
8
|
-
import { confirmLegalOrganizationOrderWithDeps } from './host-onboarding.js';
|
|
9
|
+
import { confirmLegalOrganizationOrderWithDeps, HostLifecycleRequestType, HostedTenantLifecycleRequestType, submitHostedTenantLifecycleWithDeps, } from './host-onboarding.js';
|
|
9
10
|
import { confirmIndividualOrganizationOrderWithDeps, } from './individual-onboarding.js';
|
|
10
11
|
import { requestSmartTokenWithDeps } from './smart-token.js';
|
|
12
|
+
import { extractOfferIdFromResponseBody, extractOfferPreviewFromResponseBody, } from './order-offer-summary.js';
|
|
13
|
+
import { confirmOrganizationLicenseOrderWithDeps } from './organization-license-order.js';
|
|
11
14
|
import { startIndividualOrganizationWithDeps } from './individual-start.js';
|
|
12
|
-
import { createOrganizationEmployeeWithDeps, disableIndividualOrganizationWithDeps, disableOrganizationEmployeeWithDeps, grantProfessionalAccessWithDeps, ingestCommunicationAndUpdateIndexWithDeps, purgeIndividualOrganizationWithDeps, purgeOrganizationEmployeeWithDeps, searchOrganizationEmployeesWithDeps, searchClinicalBundleWithDeps, searchLatestIpsWithDeps, upsertRelatedPersonAndPollWithDeps, } from './resource-operations.js';
|
|
15
|
+
import { createOrganizationEmployeeWithDeps, disableIndividualMemberWithDeps, disableIndividualOrganizationWithDeps, disableOrganizationEmployeeWithDeps, listIndividualLicenseOffersWithDeps, listIndividualLicenseOrdersWithDeps, listIndividualLicensesWithDeps, listOrganizationLicenseOffersWithDeps, listOrganizationLicenseOrdersWithDeps, listOrganizationLicensesWithDeps, grantProfessionalAccessWithDeps, ingestCommunicationAndUpdateIndexWithDeps, searchCommunicationParticipantsWithDeps, purgeIndividualMemberWithDeps, purgeIndividualOrganizationWithDeps, purgeOrganizationEmployeeWithDeps, searchIndividualLicensesWithDeps, searchIndividualLicenseOffersWithDeps, searchIndividualLicenseOrdersWithDeps, searchOrganizationLicensesWithDeps, searchOrganizationLicenseOffersWithDeps, searchOrganizationLicenseOrdersWithDeps, searchOrganizationEmployeesWithDeps, searchClinicalBundleWithDeps, searchLatestIpsWithDeps, upsertRelatedPersonAndPollWithDeps, } from './resource-operations.js';
|
|
13
16
|
import { submitAndPollWithMethods } from './orchestration/client-port.js';
|
|
14
17
|
import { GwCoreLifecycleAction } from './constants/lifecycle.js';
|
|
15
18
|
const bootstrapFacade = createBootstrapFacade();
|
|
@@ -94,9 +97,66 @@ export class HttpRuntimeClient {
|
|
|
94
97
|
async submitAndPoll(submitPath, pollPath, payload, pollOptions) {
|
|
95
98
|
return submitAndPollWithMethods(this, submitPath, pollPath, payload, pollOptions);
|
|
96
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Starts the host-side legal-organization verification transaction that GW
|
|
102
|
+
* CORE forwards to ICA `_verify`.
|
|
103
|
+
*
|
|
104
|
+
* Runtime ownership:
|
|
105
|
+
* - builds the canonical shared business bundle from `sdk-core/common-utils`
|
|
106
|
+
* - keeps communication/runtime transport concerns at the outer message layer
|
|
107
|
+
* - keeps the controller business key inside the submitted bundle payload
|
|
108
|
+
*
|
|
109
|
+
* Flow separation:
|
|
110
|
+
* - `_transaction` is the first host onboarding step
|
|
111
|
+
* - `_activate` remains a later step that consumes the ICA proof
|
|
112
|
+
*/
|
|
113
|
+
async submitLegalOrganizationVerificationTransaction(hostCtx, input, pollOptions) {
|
|
114
|
+
const thid = `organization-verification-transaction-${runtimeUuid()}`;
|
|
115
|
+
const jti = `organization-verification-transaction-jti-${runtimeUuid()}`;
|
|
116
|
+
const verificationBundle = buildLegalOrganizationVerificationGatewayRequestBundle(input);
|
|
117
|
+
const payload = this.wrapBundleAsGatewayTransactionMessage({
|
|
118
|
+
thid,
|
|
119
|
+
jti,
|
|
120
|
+
hostCtx,
|
|
121
|
+
bundle: verificationBundle,
|
|
122
|
+
});
|
|
123
|
+
return this.submitAndPoll(this.hostRegistryOrganizationTransactionPath(hostCtx), this.hostRegistryOrganizationTransactionPollPath(hostCtx), payload, pollOptions);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Submits one tenant-scoped DID document binding request.
|
|
127
|
+
*
|
|
128
|
+
* Binding semantics:
|
|
129
|
+
* - the tenant path identifies the existing organization
|
|
130
|
+
* - `organization.url` carries the public alias/domain list
|
|
131
|
+
* - `controller.sameAs` is optional corroborating identity material
|
|
132
|
+
* - the flow does not rotate or replace organization public keys
|
|
133
|
+
*/
|
|
134
|
+
async submitOrganizationDidBinding(ctx, input, pollOptions) {
|
|
135
|
+
const thid = `organization-did-binding-${runtimeUuid()}`;
|
|
136
|
+
const jti = `organization-did-binding-jti-${runtimeUuid()}`;
|
|
137
|
+
const payload = {
|
|
138
|
+
jti,
|
|
139
|
+
thid,
|
|
140
|
+
type: 'application/api+json',
|
|
141
|
+
body: buildOrganizationDidBindingBundle(input),
|
|
142
|
+
};
|
|
143
|
+
return this.submitAndPoll(this.organizationDidBindingPath(ctx), this.organizationDidBindingPollPath(ctx), payload, pollOptions);
|
|
144
|
+
}
|
|
97
145
|
/**
|
|
98
146
|
* Activates a legal organization in the gateway host registry using an ICA
|
|
99
147
|
* proof token already obtained by the caller.
|
|
148
|
+
*
|
|
149
|
+
* Plaintext transport note:
|
|
150
|
+
* - this Node runtime currently submits `_activate` as
|
|
151
|
+
* `application/didcomm-plaintext+json`
|
|
152
|
+
* - because there is no real outer JWS/JWE envelope in that mode, the
|
|
153
|
+
* runtime mirrors the technical communication metadata derived from
|
|
154
|
+
* `controller.publicKeyJwk` / `controller.jwks` into `meta.jws.protected`
|
|
155
|
+
* and `meta.jwe.header`
|
|
156
|
+
* - secure JOSE transports should carry those values in the real protected
|
|
157
|
+
* headers instead of plaintext `meta`
|
|
158
|
+
* - this mirrored metadata is transport fallback only; the canonical
|
|
159
|
+
* activation contract remains `body.vp_token` plus `body.controller.*`
|
|
100
160
|
*/
|
|
101
161
|
async activateOrganizationInGatewayFromIcaProof(hostCtx, input, pollOptions) {
|
|
102
162
|
const thid = `activate-org-${runtimeUuid()}`;
|
|
@@ -107,11 +167,16 @@ export class HttpRuntimeClient {
|
|
|
107
167
|
additionalClaims: input.additionalClaims,
|
|
108
168
|
});
|
|
109
169
|
const serviceClaims = activationDraft.buildServiceClaims();
|
|
170
|
+
const transportMeta = buildDidcommPlaintextTransportMetadata({
|
|
171
|
+
controller: input.controller,
|
|
172
|
+
contentType: 'application/didcomm-plaintext+json',
|
|
173
|
+
});
|
|
110
174
|
const payload = {
|
|
111
175
|
thid,
|
|
112
176
|
iss: String(hostCtx.controllerDid || '').trim() || undefined,
|
|
113
177
|
aud: String(hostCtx.hostDid || '').trim() || undefined,
|
|
114
178
|
type: 'application/api+json',
|
|
179
|
+
...(transportMeta ? { meta: transportMeta } : {}),
|
|
115
180
|
body: {
|
|
116
181
|
vp_token: input.vpToken,
|
|
117
182
|
...(input.controller ? { controller: input.controller } : {}),
|
|
@@ -152,6 +217,73 @@ export class HttpRuntimeClient {
|
|
|
152
217
|
defaultIntervalMs: pollOptions?.intervalMs,
|
|
153
218
|
});
|
|
154
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Disables the host registration itself after every hosted tenant has
|
|
222
|
+
* already been purged from the host registry.
|
|
223
|
+
*/
|
|
224
|
+
async disableHost(hostCtx, input, pollOptions) {
|
|
225
|
+
return submitHostedTenantLifecycleWithDeps({
|
|
226
|
+
hostCtx,
|
|
227
|
+
input,
|
|
228
|
+
requestType: HostLifecycleRequestType.Disable,
|
|
229
|
+
submitPath: this.hostRegistryOrganizationDisablePath.bind(this),
|
|
230
|
+
pollPath: this.hostRegistryOrganizationDisablePollPath.bind(this),
|
|
231
|
+
thidPrefix: 'host-disable',
|
|
232
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
233
|
+
defaultTimeoutMs: pollOptions?.timeoutMs,
|
|
234
|
+
defaultIntervalMs: pollOptions?.intervalMs,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Purges the disabled host registration after the hosted tenant registry has
|
|
239
|
+
* become empty.
|
|
240
|
+
*/
|
|
241
|
+
async purgeHost(hostCtx, input, pollOptions) {
|
|
242
|
+
return submitHostedTenantLifecycleWithDeps({
|
|
243
|
+
hostCtx,
|
|
244
|
+
input,
|
|
245
|
+
requestType: HostLifecycleRequestType.Purge,
|
|
246
|
+
submitPath: this.hostRegistryOrganizationPurgePath.bind(this),
|
|
247
|
+
pollPath: this.hostRegistryOrganizationPurgePollPath.bind(this),
|
|
248
|
+
thidPrefix: 'host-purge',
|
|
249
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
250
|
+
defaultTimeoutMs: pollOptions?.timeoutMs,
|
|
251
|
+
defaultIntervalMs: pollOptions?.intervalMs,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Disables one hosted tenant through the host registry after its descendants
|
|
256
|
+
* have already been disabled/purged.
|
|
257
|
+
*/
|
|
258
|
+
async disableTenant(hostCtx, input, pollOptions) {
|
|
259
|
+
return submitHostedTenantLifecycleWithDeps({
|
|
260
|
+
hostCtx,
|
|
261
|
+
input,
|
|
262
|
+
requestType: HostedTenantLifecycleRequestType.Disable,
|
|
263
|
+
submitPath: this.hostRegistryOrganizationDisablePath.bind(this),
|
|
264
|
+
pollPath: this.hostRegistryOrganizationDisablePollPath.bind(this),
|
|
265
|
+
thidPrefix: 'tenant-disable',
|
|
266
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
267
|
+
defaultTimeoutMs: pollOptions?.timeoutMs,
|
|
268
|
+
defaultIntervalMs: pollOptions?.intervalMs,
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Purges one already-disabled hosted tenant through the host registry.
|
|
273
|
+
*/
|
|
274
|
+
async purgeTenant(hostCtx, input, pollOptions) {
|
|
275
|
+
return submitHostedTenantLifecycleWithDeps({
|
|
276
|
+
hostCtx,
|
|
277
|
+
input,
|
|
278
|
+
requestType: HostedTenantLifecycleRequestType.Purge,
|
|
279
|
+
submitPath: this.hostRegistryOrganizationPurgePath.bind(this),
|
|
280
|
+
pollPath: this.hostRegistryOrganizationPurgePollPath.bind(this),
|
|
281
|
+
thidPrefix: 'tenant-purge',
|
|
282
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
283
|
+
defaultTimeoutMs: pollOptions?.timeoutMs,
|
|
284
|
+
defaultIntervalMs: pollOptions?.intervalMs,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
155
287
|
/**
|
|
156
288
|
* Creates an employee or professional entry under an existing organization tenant.
|
|
157
289
|
*/
|
|
@@ -210,6 +342,77 @@ export class HttpRuntimeClient {
|
|
|
210
342
|
submitAndPoll: this.submitAndPoll.bind(this),
|
|
211
343
|
});
|
|
212
344
|
}
|
|
345
|
+
/**
|
|
346
|
+
* Searches organization-owned license seats through the canonical
|
|
347
|
+
* `License/_search` route.
|
|
348
|
+
*/
|
|
349
|
+
async searchOrganizationLicenses(ctx, input) {
|
|
350
|
+
return searchOrganizationLicensesWithDeps(ctx, input, {
|
|
351
|
+
organizationLicenseSearchPath: this.organizationLicenseSearchPath.bind(this),
|
|
352
|
+
organizationLicenseSearchPollPath: this.organizationLicenseSearchPollPath.bind(this),
|
|
353
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Lists organization-owned license seats using the same `License/_search`
|
|
358
|
+
* route with optional filters.
|
|
359
|
+
*/
|
|
360
|
+
async listOrganizationLicenses(ctx, input = {}) {
|
|
361
|
+
return listOrganizationLicensesWithDeps(ctx, input, {
|
|
362
|
+
organizationLicenseSearchPath: this.organizationLicenseSearchPath.bind(this),
|
|
363
|
+
organizationLicenseSearchPollPath: this.organizationLicenseSearchPollPath.bind(this),
|
|
364
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
async searchOrganizationLicenseOffers(ctx, input) {
|
|
368
|
+
return searchOrganizationLicenseOffersWithDeps(ctx, input, {
|
|
369
|
+
organizationLicenseOfferSearchPath: this.organizationLicenseOfferSearchPath.bind(this),
|
|
370
|
+
organizationLicenseOfferSearchPollPath: this.organizationLicenseOfferSearchPollPath.bind(this),
|
|
371
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
async listOrganizationLicenseOffers(ctx, input = {}) {
|
|
375
|
+
return listOrganizationLicenseOffersWithDeps(ctx, input, {
|
|
376
|
+
organizationLicenseOfferSearchPath: this.organizationLicenseOfferSearchPath.bind(this),
|
|
377
|
+
organizationLicenseOfferSearchPollPath: this.organizationLicenseOfferSearchPollPath.bind(this),
|
|
378
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
async searchOrganizationLicenseOrders(ctx, input) {
|
|
382
|
+
return searchOrganizationLicenseOrdersWithDeps(ctx, input, {
|
|
383
|
+
organizationLicenseOrderSearchPath: this.organizationLicenseOrderSearchPath.bind(this),
|
|
384
|
+
organizationLicenseOrderSearchPollPath: this.organizationLicenseOrderSearchPollPath.bind(this),
|
|
385
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
async listOrganizationLicenseOrders(ctx, input = {}) {
|
|
389
|
+
return listOrganizationLicenseOrdersWithDeps(ctx, input, {
|
|
390
|
+
organizationLicenseOrderSearchPath: this.organizationLicenseOrderSearchPath.bind(this),
|
|
391
|
+
organizationLicenseOrderSearchPollPath: this.organizationLicenseOrderSearchPollPath.bind(this),
|
|
392
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Confirms an already paid organization-side license order so additional
|
|
397
|
+
* seats become usable once GW CORE exposes the public converged route.
|
|
398
|
+
*
|
|
399
|
+
* Current runtime note:
|
|
400
|
+
* - search/list for organization license offers and orders already works
|
|
401
|
+
* - the public/write post-payment seat activation route is not wired yet
|
|
402
|
+
* - this method therefore fails explicitly instead of guessing a transport
|
|
403
|
+
* contract that is not stable in GW CORE
|
|
404
|
+
*/
|
|
405
|
+
async confirmOrganizationLicenseOrder(ctx, input, pollOptions) {
|
|
406
|
+
return confirmOrganizationLicenseOrderWithDeps({
|
|
407
|
+
routeCtx: ctx,
|
|
408
|
+
input,
|
|
409
|
+
defaultTimeoutMs: pollOptions?.timeoutMs,
|
|
410
|
+
defaultIntervalMs: pollOptions?.intervalMs,
|
|
411
|
+
hostRegistryOrderBatchPath: this.hostRegistryOrderBatchPath.bind(this),
|
|
412
|
+
hostRegistryOrderPollPath: this.hostRegistryOrderPollPath.bind(this),
|
|
413
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
414
|
+
});
|
|
415
|
+
}
|
|
213
416
|
/**
|
|
214
417
|
* Starts the onboarding flow for an individual-oriented tenant or index.
|
|
215
418
|
*/
|
|
@@ -221,8 +424,8 @@ export class HttpRuntimeClient {
|
|
|
221
424
|
individualFamilyOrganizationBatchPath: this.individualFamilyOrganizationTransactionPath.bind(this),
|
|
222
425
|
individualFamilyOrganizationPollPath: this.individualFamilyOrganizationTransactionPollPath.bind(this),
|
|
223
426
|
submitAndPoll: this.submitAndPoll.bind(this),
|
|
224
|
-
getOfferIdFromResponse: (result) =>
|
|
225
|
-
getOfferPreviewFromResponse: () => (
|
|
427
|
+
getOfferIdFromResponse: (result) => extractOfferIdFromResponseBody(result.poll.body),
|
|
428
|
+
getOfferPreviewFromResponse: (result) => extractOfferPreviewFromResponseBody(result.poll.body),
|
|
226
429
|
});
|
|
227
430
|
}
|
|
228
431
|
/**
|
|
@@ -277,13 +480,65 @@ export class HttpRuntimeClient {
|
|
|
277
480
|
return this.purgeIndividualOrganization(ctx, input, pollOptions);
|
|
278
481
|
}
|
|
279
482
|
/**
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
|
|
283
|
-
|
|
483
|
+
* Soft-disables a `RelatedPerson` membership/contact using the current
|
|
484
|
+
* public batch-update path and `RelatedPerson.active = false`.
|
|
485
|
+
*/
|
|
486
|
+
async disableIndividualMember(ctx, input, pollOptions) {
|
|
487
|
+
return disableIndividualMemberWithDeps(ctx, input, pollOptions, {
|
|
488
|
+
individualRelatedPersonBatchPath: this.individualRelatedPersonBatchPath.bind(this),
|
|
489
|
+
individualRelatedPersonPollPath: this.individualRelatedPersonPollPath.bind(this),
|
|
490
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Searches individual/family-side license seats through the canonical
|
|
495
|
+
* `License/_search` route.
|
|
496
|
+
*/
|
|
497
|
+
async searchIndividualLicenses(ctx, input) {
|
|
498
|
+
return searchIndividualLicensesWithDeps(ctx, input, {
|
|
499
|
+
individualLicenseSearchPath: this.individualLicenseSearchPath.bind(this),
|
|
500
|
+
individualLicenseSearchPollPath: this.individualLicenseSearchPollPath.bind(this),
|
|
501
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Lists individual/family-side license seats using the same search route
|
|
506
|
+
* with optional filters.
|
|
284
507
|
*/
|
|
285
|
-
async
|
|
286
|
-
|
|
508
|
+
async listIndividualLicenses(ctx, input = {}) {
|
|
509
|
+
return listIndividualLicensesWithDeps(ctx, input, {
|
|
510
|
+
individualLicenseSearchPath: this.individualLicenseSearchPath.bind(this),
|
|
511
|
+
individualLicenseSearchPollPath: this.individualLicenseSearchPollPath.bind(this),
|
|
512
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
async searchIndividualLicenseOffers(ctx, input) {
|
|
516
|
+
return searchIndividualLicenseOffersWithDeps(ctx, input, {
|
|
517
|
+
individualLicenseOfferSearchPath: this.individualLicenseOfferSearchPath.bind(this),
|
|
518
|
+
individualLicenseOfferSearchPollPath: this.individualLicenseOfferSearchPollPath.bind(this),
|
|
519
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
async listIndividualLicenseOffers(ctx, input = {}) {
|
|
523
|
+
return listIndividualLicenseOffersWithDeps(ctx, input, {
|
|
524
|
+
individualLicenseOfferSearchPath: this.individualLicenseOfferSearchPath.bind(this),
|
|
525
|
+
individualLicenseOfferSearchPollPath: this.individualLicenseOfferSearchPollPath.bind(this),
|
|
526
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
async searchIndividualLicenseOrders(ctx, input) {
|
|
530
|
+
return searchIndividualLicenseOrdersWithDeps(ctx, input, {
|
|
531
|
+
individualLicenseOrderSearchPath: this.individualLicenseOrderSearchPath.bind(this),
|
|
532
|
+
individualLicenseOrderSearchPollPath: this.individualLicenseOrderSearchPollPath.bind(this),
|
|
533
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
async listIndividualLicenseOrders(ctx, input = {}) {
|
|
537
|
+
return listIndividualLicenseOrdersWithDeps(ctx, input, {
|
|
538
|
+
individualLicenseOrderSearchPath: this.individualLicenseOrderSearchPath.bind(this),
|
|
539
|
+
individualLicenseOrderSearchPollPath: this.individualLicenseOrderSearchPollPath.bind(this),
|
|
540
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
541
|
+
});
|
|
287
542
|
}
|
|
288
543
|
/**
|
|
289
544
|
* Placeholder for a future GW CORE member/caregiver lifecycle contract.
|
|
@@ -291,8 +546,12 @@ export class HttpRuntimeClient {
|
|
|
291
546
|
* Current GW CORE does not yet expose a stable lifecycle route for
|
|
292
547
|
* `RelatedPerson` / individual-member purge.
|
|
293
548
|
*/
|
|
294
|
-
async purgeIndividualMember(
|
|
295
|
-
|
|
549
|
+
async purgeIndividualMember(ctx, input, pollOptions) {
|
|
550
|
+
return purgeIndividualMemberWithDeps(ctx, input, pollOptions, {
|
|
551
|
+
individualRelatedPersonPurgePath: this.individualRelatedPersonPurgePath.bind(this),
|
|
552
|
+
individualRelatedPersonPurgePollPath: this.individualRelatedPersonPurgePollPath.bind(this),
|
|
553
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
554
|
+
});
|
|
296
555
|
}
|
|
297
556
|
/**
|
|
298
557
|
* Creates and submits a consent-oriented access grant for a professional actor.
|
|
@@ -354,6 +613,17 @@ export class HttpRuntimeClient {
|
|
|
354
613
|
submitAndPoll: this.submitAndPoll.bind(this),
|
|
355
614
|
});
|
|
356
615
|
}
|
|
616
|
+
/**
|
|
617
|
+
* Searches communication channel records by subject and participant
|
|
618
|
+
* identifiers through `Communication/_search`.
|
|
619
|
+
*/
|
|
620
|
+
async searchCommunicationParticipants(ctx, input) {
|
|
621
|
+
return searchCommunicationParticipantsWithDeps(ctx, input, {
|
|
622
|
+
communicationSearchPath: this.individualCommunicationSearchPath.bind(this),
|
|
623
|
+
communicationSearchPollPath: this.individualCommunicationSearchPollPath.bind(this),
|
|
624
|
+
submitAndPoll: this.submitAndPoll.bind(this),
|
|
625
|
+
});
|
|
626
|
+
}
|
|
357
627
|
/**
|
|
358
628
|
* Alias for `ingestCommunicationAndUpdateIndex(...)`.
|
|
359
629
|
*
|
|
@@ -390,6 +660,12 @@ export class HttpRuntimeClient {
|
|
|
390
660
|
searchClinicalBundle: this.searchClinicalBundle.bind(this),
|
|
391
661
|
});
|
|
392
662
|
}
|
|
663
|
+
/**
|
|
664
|
+
* Preferred runtime alias for latest-IPS retrieval used by shared facades.
|
|
665
|
+
*/
|
|
666
|
+
async getLatestIps(ctx, input) {
|
|
667
|
+
return this.searchLatestIps(ctx, input);
|
|
668
|
+
}
|
|
393
669
|
/**
|
|
394
670
|
* Searches a communication/document thread using `thid` and returns the
|
|
395
671
|
* indexed communication/document projections.
|
|
@@ -521,6 +797,24 @@ export class HttpRuntimeClient {
|
|
|
521
797
|
? { tenantId, jurisdiction: input.jurisdiction, sector: input.sector }
|
|
522
798
|
: undefined);
|
|
523
799
|
}
|
|
800
|
+
/**
|
|
801
|
+
* Reuses the shared bundle business contract while keeping attachment
|
|
802
|
+
* transport fields at the DIDComm/plaintext message layer expected by GW.
|
|
803
|
+
*/
|
|
804
|
+
wrapBundleAsGatewayTransactionMessage(input) {
|
|
805
|
+
const rawBundle = (input.bundle || {});
|
|
806
|
+
const attachments = Array.isArray(rawBundle.attachments) ? rawBundle.attachments : undefined;
|
|
807
|
+
const { attachments: _ignoredAttachments, ...body } = rawBundle;
|
|
808
|
+
return {
|
|
809
|
+
jti: input.jti,
|
|
810
|
+
thid: input.thid,
|
|
811
|
+
iss: String(input.hostCtx.controllerDid || '').trim() || undefined,
|
|
812
|
+
aud: String(input.hostCtx.hostDid || '').trim() || undefined,
|
|
813
|
+
type: 'application/api+json',
|
|
814
|
+
body,
|
|
815
|
+
...(attachments && attachments.length > 0 ? { attachments } : {}),
|
|
816
|
+
};
|
|
817
|
+
}
|
|
524
818
|
hostRegistryPath(ctx, resourceType, action) {
|
|
525
819
|
const hostCtx = this.requireHostRouteContext(ctx);
|
|
526
820
|
return `/host/cds-${encodeURIComponent(hostCtx.jurisdiction)}/v1/${encodeURIComponent(hostCtx.hostNetwork || '')}/registry/org.schema/${encodeURIComponent(resourceType)}/${encodeURIComponent(action)}`;
|
|
@@ -533,14 +827,34 @@ export class HttpRuntimeClient {
|
|
|
533
827
|
throw new Error('Host route context is required.');
|
|
534
828
|
return { jurisdiction, hostNetwork };
|
|
535
829
|
}
|
|
830
|
+
hostRegistryOrganizationTransactionPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.Transaction); }
|
|
831
|
+
hostRegistryOrganizationTransactionPollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.TransactionResponse); }
|
|
536
832
|
hostRegistryOrganizationActivatePath(ctx) { return this.hostRegistryPath(ctx, 'Organization', '_activate'); }
|
|
537
833
|
hostRegistryOrganizationActivatePollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', '_activate-response'); }
|
|
834
|
+
hostRegistryOrganizationDisablePath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.Disable); }
|
|
835
|
+
hostRegistryOrganizationDisablePollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', `${GwCoreLifecycleAction.Disable}-response`); }
|
|
836
|
+
hostRegistryOrganizationPurgePath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.Purge); }
|
|
837
|
+
hostRegistryOrganizationPurgePollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', `${GwCoreLifecycleAction.Purge}-response`); }
|
|
538
838
|
hostRegistryOrderBatchPath(ctx) { return this.hostRegistryPath(ctx, 'Order', '_batch'); }
|
|
539
839
|
hostRegistryOrderPollPath(ctx) { return this.hostRegistryPath(ctx, 'Order', '_batch-response'); }
|
|
540
840
|
employeeBatchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', GwCoreLifecycleAction.Batch); }
|
|
541
841
|
employeePollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', GwCoreLifecycleAction.BatchResponse); }
|
|
542
842
|
employeeSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', '_search'); }
|
|
543
843
|
employeeSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', '_search-response'); }
|
|
844
|
+
organizationLicenseSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'License', '_search'); }
|
|
845
|
+
organizationLicenseSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'License', '_search-response'); }
|
|
846
|
+
organizationDidBindingPath(ctx) {
|
|
847
|
+
const resolved = this.requireRouteContext(ctx);
|
|
848
|
+
return `/${encodeURIComponent(resolved.tenantId)}/cds-${encodeURIComponent(resolved.jurisdiction)}/v1/${encodeURIComponent(resolved.sector)}/did/document/_binding`;
|
|
849
|
+
}
|
|
850
|
+
organizationDidBindingPollPath(ctx) {
|
|
851
|
+
const resolved = this.requireRouteContext(ctx);
|
|
852
|
+
return `/${encodeURIComponent(resolved.tenantId)}/cds-${encodeURIComponent(resolved.jurisdiction)}/v1/${encodeURIComponent(resolved.sector)}/did/document/_binding-response`;
|
|
853
|
+
}
|
|
854
|
+
organizationLicenseOfferSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Offer', '_search'); }
|
|
855
|
+
organizationLicenseOfferSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Offer', '_search-response'); }
|
|
856
|
+
organizationLicenseOrderSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Order', '_search'); }
|
|
857
|
+
organizationLicenseOrderSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Order', '_search-response'); }
|
|
544
858
|
employeePurgePath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', GwCoreLifecycleAction.Purge); }
|
|
545
859
|
employeePurgePollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', `${GwCoreLifecycleAction.Purge}-response`); }
|
|
546
860
|
individualFamilyOrganizationBatchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.Batch); }
|
|
@@ -551,14 +865,24 @@ export class HttpRuntimeClient {
|
|
|
551
865
|
individualFamilyOrganizationDisablePollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', `${GwCoreLifecycleAction.Disable}-response`); }
|
|
552
866
|
individualFamilyOrganizationPurgePath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.Purge); }
|
|
553
867
|
individualFamilyOrganizationPurgePollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', `${GwCoreLifecycleAction.Purge}-response`); }
|
|
868
|
+
individualLicenseSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'License', '_search'); }
|
|
869
|
+
individualLicenseSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'License', '_search-response'); }
|
|
870
|
+
individualLicenseOfferSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Offer', '_search'); }
|
|
871
|
+
individualLicenseOfferSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Offer', '_search-response'); }
|
|
872
|
+
individualLicenseOrderSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Order', '_search'); }
|
|
873
|
+
individualLicenseOrderSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Order', '_search-response'); }
|
|
554
874
|
individualFamilyOrderBatchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Order', '_batch'); }
|
|
555
875
|
individualFamilyOrderPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Order', '_batch-response'); }
|
|
556
876
|
individualRelatedPersonBatchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'RelatedPerson', '_batch'); }
|
|
557
877
|
individualRelatedPersonPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'RelatedPerson', '_batch-response'); }
|
|
878
|
+
individualRelatedPersonPurgePath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'RelatedPerson', '_purge'); }
|
|
879
|
+
individualRelatedPersonPurgePollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'RelatedPerson', '_purge-response'); }
|
|
558
880
|
individualConsentR4BatchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Consent', '_batch'); }
|
|
559
881
|
individualConsentR4PollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Consent', '_batch-response'); }
|
|
560
882
|
individualCommunicationBatchPath(ctx, format) { return this.v1Path(ctx, 'individual', format, 'Communication', '_batch'); }
|
|
561
883
|
individualCommunicationPollPath(ctx, format) { return this.v1Path(ctx, 'individual', format, 'Communication', '_batch-response'); }
|
|
884
|
+
individualCommunicationSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Communication', '_search'); }
|
|
885
|
+
individualCommunicationSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Communication', '_search-response'); }
|
|
562
886
|
individualBundleSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Bundle', '_search'); }
|
|
563
887
|
individualBundleSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Bundle', '_search-response'); }
|
|
564
888
|
identityTokenExchangePath(ctx) {
|
|
@@ -573,19 +897,6 @@ export class HttpRuntimeClient {
|
|
|
573
897
|
identityOpenIdSmartTokenPollPath(ctx) {
|
|
574
898
|
return `/${encodeURIComponent(ctx.tenantId)}/cds-${encodeURIComponent(ctx.jurisdiction)}/v1/${encodeURIComponent(ctx.sector)}/identity/openid/smart/_batch-response`;
|
|
575
899
|
}
|
|
576
|
-
extractOfferId(body) {
|
|
577
|
-
const root = body || {};
|
|
578
|
-
const bodyNode = root.body || root;
|
|
579
|
-
const data = bodyNode.data || [];
|
|
580
|
-
const first = data[0] || {};
|
|
581
|
-
const firstMeta = first.meta || {};
|
|
582
|
-
const resource = first.resource || {};
|
|
583
|
-
const resourceMeta = resource.meta || {};
|
|
584
|
-
const claims = firstMeta.claims
|
|
585
|
-
|| resourceMeta.claims
|
|
586
|
-
|| {};
|
|
587
|
-
return String(claims['org.schema.Offer.identifier'] || '').trim() || undefined;
|
|
588
|
-
}
|
|
589
900
|
appendHttpTrace(entry) {
|
|
590
901
|
if (!this.httpTraceFile)
|
|
591
902
|
return;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type { ControllerBindingInput } from 'gdc-common-utils-ts/models';
|
|
2
|
+
import type { LegalOrganizationVerificationTransactionInput } from 'gdc-common-utils-ts/utils/legal-organization-verification-transaction';
|
|
3
|
+
import type { OrganizationDidBindingInput } from 'gdc-sdk-core-ts';
|
|
4
|
+
import type { LicenseListRuntimeSearchInput, LicenseOfferRuntimeSearchInput, LicenseOrderRuntimeSearchInput } from '../resource-operations.js';
|
|
2
5
|
import type { AsyncPollRequest, OrganizationActivationServiceOptions, PollOptions, PollResult, SubmitAndPollResult, SubmitPayload, SubmitResponse } from 'gdc-sdk-core-ts';
|
|
3
6
|
export type { AsyncPollRequest, PollOptions, PollResult, SubmitAndPollResult, SubmitPayload, SubmitResponse, } from 'gdc-sdk-core-ts';
|
|
4
7
|
import type { EmployeeDeviceActivationResult, EmployeeDeviceActivationRequestInput } from '../device-activation.js';
|
|
5
|
-
import type { HostRouteContext, LegalOrganizationOrderInput } from '../host-onboarding.js';
|
|
8
|
+
import type { HostRouteContext, HostedTenantLifecycleInput, LegalOrganizationOrderInput } from '../host-onboarding.js';
|
|
6
9
|
import type { IndividualOrganizationConfirmOrderInput, RouteContext } from '../individual-onboarding.js';
|
|
7
10
|
import type { IndividualOrganizationBootstrapInput, IndividualOrganizationStartResult } from '../individual-start.js';
|
|
11
|
+
import type { OrganizationLicenseOrderConfirmInput } from '../organization-license-order.js';
|
|
8
12
|
import type { SmartTokenExchangeResult, SmartTokenRequestInput } from '../smart-token.js';
|
|
9
|
-
import type { CommunicationIngestionInput, ClinicalBundleSearchInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IndividualMemberLifecycleInput, IndividualOrganizationLifecycleInput, IpsOrFhirImportInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput, RelatedPersonUpsertInput } from '../resource-operations.js';
|
|
13
|
+
import type { CommunicationIngestionInput, CommunicationParticipantRuntimeSearchInput, ClinicalBundleSearchInput, DigitalTwinGenerationInput, GrantProfessionalAccessInput, GrantProfessionalAccessResult, IndividualMemberLifecycleInput, IndividualOrganizationLifecycleInput, IpsOrFhirImportInput, OrganizationEmployeeCreationInput, OrganizationEmployeeLifecycleInput, OrganizationEmployeeSearchInput, RelatedPersonUpsertInput } from '../resource-operations.js';
|
|
10
14
|
/**
|
|
11
15
|
* Shared node-runtime activation input.
|
|
12
16
|
*
|
|
@@ -19,6 +23,25 @@ export type NodeOrganizationActivationInput = {
|
|
|
19
23
|
service?: OrganizationActivationServiceOptions;
|
|
20
24
|
additionalClaims?: Record<string, unknown>;
|
|
21
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Shared node-runtime input for the first host-side legal-organization
|
|
28
|
+
* verification step.
|
|
29
|
+
*
|
|
30
|
+
* The business payload is owned by shared SDK/common packages:
|
|
31
|
+
* - transport/runtime communication keys stay outside this contract
|
|
32
|
+
* - controller business key binding remains in `controller.*`
|
|
33
|
+
* - GW CORE host routing/polling stays in the runtime adapter
|
|
34
|
+
*/
|
|
35
|
+
export type NodeLegalOrganizationVerificationTransactionInput = LegalOrganizationVerificationTransactionInput;
|
|
36
|
+
/**
|
|
37
|
+
* Shared node-runtime input for the organization DID binding operation.
|
|
38
|
+
*
|
|
39
|
+
* Binding contract:
|
|
40
|
+
* - tenant identity is resolved from the route path
|
|
41
|
+
* - `organization.url` carries one or more public aliases/domains
|
|
42
|
+
* - `controller.sameAs` is optional corroborating identity evidence
|
|
43
|
+
*/
|
|
44
|
+
export type NodeOrganizationDidBindingInput = OrganizationDidBindingInput;
|
|
22
45
|
/**
|
|
23
46
|
* Runtime-neutral actor/application client contract as exposed by the Node SDK.
|
|
24
47
|
*
|
|
@@ -27,10 +50,23 @@ export type NodeOrganizationActivationInput = {
|
|
|
27
50
|
* converge across runtimes.
|
|
28
51
|
*/
|
|
29
52
|
export type RuntimeClient = {
|
|
53
|
+
submitLegalOrganizationVerificationTransaction?: (hostCtx: HostRouteContext, input: NodeLegalOrganizationVerificationTransactionInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
54
|
+
submitOrganizationDidBinding?: (ctx: RouteContext, input: NodeOrganizationDidBindingInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
30
55
|
activateOrganizationInGatewayFromIcaProof?: (hostCtx: HostRouteContext, input: NodeOrganizationActivationInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
31
56
|
confirmLegalOrganizationOrder?: (hostCtx: HostRouteContext, input: LegalOrganizationOrderInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
57
|
+
disableHost?: (hostCtx: HostRouteContext, input: HostedTenantLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
58
|
+
purgeHost?: (hostCtx: HostRouteContext, input: HostedTenantLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
59
|
+
disableTenant?: (hostCtx: HostRouteContext, input: HostedTenantLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
60
|
+
purgeTenant?: (hostCtx: HostRouteContext, input: HostedTenantLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
32
61
|
createOrganizationEmployee?: (ctx: RouteContext, input: OrganizationEmployeeCreationInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
33
62
|
searchOrganizationEmployees?: (ctx: RouteContext, input: OrganizationEmployeeSearchInput) => Promise<SubmitAndPollResult>;
|
|
63
|
+
searchOrganizationLicenses?: (ctx: RouteContext, input: LicenseListRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
64
|
+
listOrganizationLicenses?: (ctx: RouteContext, input?: LicenseListRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
65
|
+
searchOrganizationLicenseOffers?: (ctx: RouteContext, input: LicenseOfferRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
66
|
+
listOrganizationLicenseOffers?: (ctx: RouteContext, input?: LicenseOfferRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
67
|
+
searchOrganizationLicenseOrders?: (ctx: RouteContext, input: LicenseOrderRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
68
|
+
listOrganizationLicenseOrders?: (ctx: RouteContext, input?: LicenseOrderRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
69
|
+
confirmOrganizationLicenseOrder?: (ctx: RouteContext, input: OrganizationLicenseOrderConfirmInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
34
70
|
disableEmployee?: (ctx: RouteContext, input: OrganizationEmployeeLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
35
71
|
purgeEmployee?: (ctx: RouteContext, input: OrganizationEmployeeLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
36
72
|
disableOrganizationEmployee?: (ctx: RouteContext, input: OrganizationEmployeeLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
@@ -46,12 +82,20 @@ export type RuntimeClient = {
|
|
|
46
82
|
disableIndividualOrganization?: (ctx: RouteContext, input: IndividualOrganizationLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
47
83
|
purgeIndividualOrganization?: (ctx: RouteContext, input: IndividualOrganizationLifecycleInput, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
48
84
|
ingestCommunicationAndUpdateIndex?: (ctx: RouteContext, input: CommunicationIngestionInput) => Promise<SubmitAndPollResult>;
|
|
85
|
+
searchCommunicationParticipants?: (ctx: RouteContext, input: CommunicationParticipantRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
49
86
|
grantProfessionalAccess?: (ctx: RouteContext, input: GrantProfessionalAccessInput) => Promise<GrantProfessionalAccessResult>;
|
|
87
|
+
searchIndividualLicenses?: (ctx: RouteContext, input: LicenseListRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
88
|
+
listIndividualLicenses?: (ctx: RouteContext, input?: LicenseListRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
89
|
+
searchIndividualLicenseOffers?: (ctx: RouteContext, input: LicenseOfferRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
90
|
+
listIndividualLicenseOffers?: (ctx: RouteContext, input?: LicenseOfferRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
91
|
+
searchIndividualLicenseOrders?: (ctx: RouteContext, input: LicenseOrderRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
92
|
+
listIndividualLicenseOrders?: (ctx: RouteContext, input?: LicenseOrderRuntimeSearchInput) => Promise<SubmitAndPollResult>;
|
|
50
93
|
bootstrapIndividualOrganization?: (input: IndividualOrganizationBootstrapInput) => Promise<IndividualOrganizationStartResult>;
|
|
51
94
|
importIpsOrFhirAndUpdateIndex?: (ctx: RouteContext, input: IpsOrFhirImportInput) => Promise<SubmitAndPollResult>;
|
|
52
95
|
upsertRelatedPersonAndPoll?: (ctx: RouteContext, input: RelatedPersonUpsertInput) => Promise<SubmitAndPollResult>;
|
|
53
96
|
generateDigitalTwinFromSubjectData?: (ctx: RouteContext, input: DigitalTwinGenerationInput) => Promise<SubmitAndPollResult>;
|
|
54
97
|
searchClinicalBundle?: (ctx: RouteContext, input: ClinicalBundleSearchInput) => Promise<SubmitAndPollResult>;
|
|
98
|
+
getLatestIps?: (ctx: RouteContext, input: Omit<ClinicalBundleSearchInput, 'includedTypes'>) => Promise<SubmitAndPollResult>;
|
|
55
99
|
submitBatch?: (submitPath: string, payload: SubmitPayload) => Promise<SubmitResponse>;
|
|
56
100
|
pollUntilComplete?: (pollPath: string, request: AsyncPollRequest, pollOptions?: PollOptions) => Promise<PollResult>;
|
|
57
101
|
submitAndPoll?: (submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions) => Promise<SubmitAndPollResult>;
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { HostRouteContext, LegalOrganizationOrderInput } from '../host-onboarding.js';
|
|
3
|
-
|
|
1
|
+
import { type NodeRuntimeClient, type NodeOrganizationActivationInput, type PollOptions, type SubmitAndPollResult, type SubmitPayload } from './client-port.js';
|
|
2
|
+
import type { HostingControllerFacade, HostLifecycleInput, HostRouteContext, LegalOrganizationOrderInput } from '../host-onboarding.js';
|
|
3
|
+
import type { NodeCapability } from '../session.js';
|
|
4
|
+
export declare class HostOnboardingSdk implements HostingControllerFacade {
|
|
4
5
|
private readonly client;
|
|
5
|
-
|
|
6
|
+
private readonly capabilities;
|
|
7
|
+
constructor(client: NodeRuntimeClient, capabilities?: readonly NodeCapability[]);
|
|
6
8
|
/**
|
|
7
9
|
* Submits the legal organization activation proof and required declared
|
|
8
10
|
* service capabilities to GW CORE.
|
|
9
11
|
*/
|
|
10
12
|
activateOrganizationInGatewayFromIcaProof(hostCtx: HostRouteContext, input: NodeOrganizationActivationInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
11
13
|
confirmLegalOrganizationOrder(hostCtx: HostRouteContext, input: LegalOrganizationOrderInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
14
|
+
/**
|
|
15
|
+
* Disables the host registration after all hosted tenants have already been
|
|
16
|
+
* purged and the hosting operator should stop publishing discovery services.
|
|
17
|
+
*/
|
|
18
|
+
disableHost(hostCtx: HostRouteContext, input: HostLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
19
|
+
/**
|
|
20
|
+
* Purges the already-disabled host registration once no hosted tenants
|
|
21
|
+
* remain in the registry.
|
|
22
|
+
*/
|
|
23
|
+
purgeHost(hostCtx: HostRouteContext, input: HostLifecycleInput, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
12
24
|
submitAndPoll(submitPath: string, pollPath: string, payload: SubmitPayload, pollOptions?: PollOptions): Promise<SubmitAndPollResult>;
|
|
13
25
|
}
|