gdc-sdk-node-ts 2.1.1 → 2.2.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.
Files changed (43) hide show
  1. package/README.md +11 -5
  2. package/dist/backend-profile-workspace.d.ts +48 -0
  3. package/dist/backend-profile-workspace.js +91 -0
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +1 -0
  6. package/dist/individual-controller-backend-runtime.d.ts +6 -1
  7. package/dist/individual-controller-backend-runtime.js +7 -0
  8. package/dist/node-runtime-client.d.ts +18 -27
  9. package/dist/node-runtime-client.js +230 -461
  10. package/dist/orchestration/client-port.d.ts +4 -2
  11. package/dist/orchestration/individual-controller-sdk.d.ts +42 -9
  12. package/dist/orchestration/individual-controller-sdk.js +48 -8
  13. package/dist/orchestration/individual-member-sdk.d.ts +25 -0
  14. package/dist/orchestration/individual-member-sdk.js +29 -0
  15. package/dist/orchestration/personal-sdk.d.ts +3 -1
  16. package/dist/orchestration/personal-sdk.js +4 -0
  17. package/dist/orchestration/professional-sdk.d.ts +36 -1
  18. package/dist/orchestration/professional-sdk.js +43 -0
  19. package/dist/professional-backend-runtime.d.ts +6 -1
  20. package/dist/professional-backend-runtime.js +7 -0
  21. package/dist/profile-workspace.d.ts +12 -0
  22. package/dist/profile-workspace.js +15 -0
  23. package/dist/resource-operations.d.ts +82 -25
  24. package/dist/resource-operations.js +190 -3
  25. package/dist/runtime-client-paths.d.ts +81 -0
  26. package/dist/runtime-client-paths.js +95 -0
  27. package/dist/runtime-consent.d.ts +7 -0
  28. package/dist/runtime-consent.js +21 -0
  29. package/dist/runtime-host-submission.d.ts +62 -0
  30. package/dist/runtime-host-submission.js +82 -0
  31. package/dist/runtime-http-trace.d.ts +4 -0
  32. package/dist/runtime-http-trace.js +44 -0
  33. package/dist/runtime-message.d.ts +10 -0
  34. package/dist/runtime-message.js +19 -0
  35. package/dist/runtime-paths.d.ts +12 -0
  36. package/dist/runtime-paths.js +41 -0
  37. package/dist/runtime-route-context.d.ts +20 -0
  38. package/dist/runtime-route-context.js +68 -0
  39. package/dist/runtime-transport.d.ts +22 -0
  40. package/dist/runtime-transport.js +91 -0
  41. package/dist/smart-token.d.ts +8 -29
  42. package/dist/smart-token.js +28 -3
  43. package/package.json +3 -3
@@ -1,11 +1,7 @@
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
- import fs from 'node:fs';
4
- import path from 'node:path';
5
- import { DIDCOMM_DEFAULT_ACCEPT_HEADER, DIDCOMM_PLAINTEXT_JSON_MEDIA_TYPE, } from 'gdc-common-utils-ts/utils/didcomm-submit';
6
- import { buildLegalOrganizationVerificationGatewayRequestBundle, buildOrganizationDidBindingBundle, buildAppHeaders, createBootstrapFacade, resolveAppInfo, } from 'gdc-sdk-core-ts';
7
- import { buildConsentClaimsSimpleWithCid } from 'gdc-common-utils-ts/utils/consent';
8
- import { buildDidcommPlaintextTransportMetadata } from 'gdc-common-utils-ts/utils/activation-request';
3
+ import { DIDCOMM_PLAINTEXT_JSON_MEDIA_TYPE, } from 'gdc-common-utils-ts/utils/didcomm-submit';
4
+ import { buildAppHeaders, createBootstrapFacade, resolveAppInfo, } from 'gdc-sdk-core-ts';
9
5
  import { pollUntilCompleteWithMethod } from './async-polling.js';
10
6
  import { confirmLegalOrganizationOrderWithDeps, HostLifecycleRequestType, HostedTenantLifecycleRequestType, submitHostedTenantLifecycleWithDeps, } from './host-onboarding.js';
11
7
  import { confirmIndividualOrganizationOrderWithDeps, } from './individual-onboarding.js';
@@ -15,9 +11,13 @@ import { requestSmartTokenWithDeps } from './smart-token.js';
15
11
  import { extractOfferIdFromResponseBody, extractOfferPreviewFromResponseBody, } from './order-offer-summary.js';
16
12
  import { confirmOrganizationLicenseOrderWithDeps } from './organization-license-order.js';
17
13
  import { startIndividualOrganizationWithDeps } from './individual-start.js';
18
- import { createOrganizationEmployeeWithDeps, disableIndividualMemberWithDeps, disableIndividualOrganizationWithDeps, disableOrganizationEmployeeWithDeps, listIndividualLicenseOffersWithDeps, listIndividualLicenseOrdersWithDeps, listIndividualLicensesWithDeps, listOrganizationLicenseOffersWithDeps, listOrganizationLicenseOrdersWithDeps, listOrganizationLicensesWithDeps, grantProfessionalAccessWithDeps, ingestCommunicationAndUpdateIndexWithDeps, revokeProfessionalAccessWithDeps, searchCommunicationParticipantsWithDeps, purgeIndividualMemberWithDeps, purgeIndividualOrganizationWithDeps, purgeOrganizationEmployeeWithDeps, searchIndividualLicensesWithDeps, searchIndividualLicenseOffersWithDeps, searchIndividualLicenseOrdersWithDeps, searchOrganizationLicensesWithDeps, searchOrganizationLicenseOffersWithDeps, searchOrganizationLicenseOrdersWithDeps, searchOrganizationEmployeesWithDeps, searchClinicalBundleWithDeps, searchLatestIpsWithDeps, upsertRelatedPersonAndPollWithDeps, } from './resource-operations.js';
14
+ import { createOrganizationEmployeeWithDeps, disableIndividualMemberWithDeps, disableIndividualOrganizationWithDeps, disableOrganizationEmployeeWithDeps, listIndividualLicenseOffersWithDeps, listIndividualLicenseOrdersWithDeps, listIndividualLicensesWithDeps, listOrganizationLicenseOffersWithDeps, listOrganizationLicenseOrdersWithDeps, listOrganizationLicensesWithDeps, grantProfessionalAccessWithDeps, ingestCommunicationAndUpdateIndexWithDeps, buildVitalSignBatchCommunicationFromSearchResponse, registerBlockchainArtifactAndUpdateIndexWithDeps, revokeProfessionalAccessWithDeps, searchCommunicationParticipantsWithDeps, purgeIndividualMemberWithDeps, purgeIndividualOrganizationWithDeps, purgeOrganizationEmployeeWithDeps, searchIndividualLicensesWithDeps, searchIndividualLicenseOffersWithDeps, searchIndividualLicenseOrdersWithDeps, searchOrganizationLicensesWithDeps, searchOrganizationLicenseOffersWithDeps, searchOrganizationLicenseOrdersWithDeps, searchOrganizationEmployeesWithDeps, searchClinicalBundleWithDeps, searchLatestIpsWithDeps, upsertRelatedPersonAndPollWithDeps, } from './resource-operations.js';
19
15
  import { submitAndPollWithMethods } from './orchestration/client-port.js';
20
- import { GwCoreLifecycleAction } from './constants/lifecycle.js';
16
+ import { buildRuntimeHeaders, fetchWithTimeout, parseResponseBody, pollBatchResponseWithRuntimeConfig, postJsonWithRuntimeConfig, } from './runtime-transport.js';
17
+ import { activateOrganizationInGatewayFromIcaProofWithDeps, submitLegalOrganizationIssueWithDeps, submitLegalOrganizationVerificationTransactionWithDeps, submitOrganizationDidBindingWithDeps, } from './runtime-host-submission.js';
18
+ import { buildGrantProfessionalAccessClaimsWithCid } from './runtime-consent.js';
19
+ import { RuntimeClientPaths } from './runtime-client-paths.js';
20
+ import { runtimeUuid, wrapBundleAsGatewayTransactionMessage } from './runtime-message.js';
21
21
  const bootstrapFacade = createBootstrapFacade();
22
22
  /**
23
23
  * Runtime-oriented HTTP client for Node backends, BFFs, and workers that need
@@ -28,6 +28,15 @@ const bootstrapFacade = createBootstrapFacade();
28
28
  * re-exported from `gdc-sdk-core-ts`.
29
29
  */
30
30
  export class HttpRuntimeClient {
31
+ get transportConfig() {
32
+ return {
33
+ baseUrl: this.baseUrl,
34
+ bearerToken: this.bearerToken,
35
+ defaultHeaders: this.defaultHeaders,
36
+ requestTimeoutMs: this.requestTimeoutMs,
37
+ httpTraceFile: this.httpTraceFile,
38
+ };
39
+ }
31
40
  /**
32
41
  * @param options.baseUrl Gateway base URL without trailing slash.
33
42
  * @param options.interopMode Optional runtime interoperability mode from the SDK config layer (`demo`, `compat`, `strict`).
@@ -41,7 +50,6 @@ export class HttpRuntimeClient {
41
50
  */
42
51
  constructor(options) {
43
52
  this.tokenCache = new Map();
44
- this.warnedDefaultHostNetwork = false;
45
53
  this.baseUrl = String(options.baseUrl || '').replace(/\/+$/, '');
46
54
  this.runtimeVpToken = String(options.runtimeVpToken || '').trim() || undefined;
47
55
  this.bearerToken = String(options.bearerToken || '').trim()
@@ -55,6 +63,7 @@ export class HttpRuntimeClient {
55
63
  };
56
64
  this.requestTimeoutMs = Math.max(1, Math.floor(options.requestTimeoutMs ?? 15000));
57
65
  this.httpTraceFile = String(process.env.SDK_HTTP_TRACE_FILE || '').trim() || undefined;
66
+ this.paths = new RuntimeClientPaths(this.ctx);
58
67
  }
59
68
  /**
60
69
  * Returns the canonical GW CORE app identity resolved by the Node client.
@@ -80,8 +89,7 @@ export class HttpRuntimeClient {
80
89
  * Builds a canonical GDC v1 resource/action path from a route context.
81
90
  */
82
91
  v1Path(ctx, section, format, resourceType, action) {
83
- const routeCtx = this.requireRouteContext(ctx);
84
- return `/${encodeURIComponent(routeCtx.tenantId)}/cds-${encodeURIComponent(routeCtx.jurisdiction)}/v1/${encodeURIComponent(routeCtx.sector)}/${encodeURIComponent(section)}/${encodeURIComponent(format)}/${encodeURIComponent(resourceType)}/${encodeURIComponent(action)}`;
92
+ return this.paths.v1Path(ctx, section, format, resourceType, action);
85
93
  }
86
94
  /**
87
95
  * Submits a batch payload to a gateway batch endpoint.
@@ -122,16 +130,16 @@ export class HttpRuntimeClient {
122
130
  * `confirmLegalOrganizationOrder(...)`
123
131
  */
124
132
  async submitLegalOrganizationVerificationTransaction(hostCtx, input, pollOptions) {
125
- const thid = `organization-verification-transaction-${runtimeUuid()}`;
126
- const jti = `organization-verification-transaction-jti-${runtimeUuid()}`;
127
- const verificationBundle = buildLegalOrganizationVerificationGatewayRequestBundle(input);
128
- const payload = this.wrapBundleAsGatewayTransactionMessage({
129
- thid,
130
- jti,
133
+ return submitLegalOrganizationVerificationTransactionWithDeps({
131
134
  hostCtx,
132
- bundle: verificationBundle,
135
+ verificationInput: input,
136
+ pollOptions,
137
+ createRuntimeUuid: runtimeUuid,
138
+ wrapBundleAsGatewayTransactionMessage: this.wrapBundleAsGatewayTransactionMessage.bind(this),
139
+ submitPath: this.hostRegistryOrganizationTransactionPath.bind(this),
140
+ pollPath: this.hostRegistryOrganizationTransactionPollPath.bind(this),
141
+ submitAndPoll: this.submitAndPoll.bind(this),
133
142
  });
134
- return this.submitAndPoll(this.hostRegistryOrganizationTransactionPath(hostCtx), this.hostRegistryOrganizationTransactionPollPath(hostCtx), payload, pollOptions);
135
143
  }
136
144
  /**
137
145
  * Starts the host-side existing-tenant legal-organization reissue flow that
@@ -144,16 +152,16 @@ export class HttpRuntimeClient {
144
152
  * - do not call `confirmLegalOrganizationOrder(...)` after this flow
145
153
  */
146
154
  async submitLegalOrganizationIssue(hostCtx, input, pollOptions) {
147
- const thid = `organization-issue-${runtimeUuid()}`;
148
- const jti = `organization-issue-jti-${runtimeUuid()}`;
149
- const verificationBundle = buildLegalOrganizationVerificationGatewayRequestBundle(input);
150
- const payload = this.wrapBundleAsGatewayTransactionMessage({
151
- thid,
152
- jti,
155
+ return submitLegalOrganizationIssueWithDeps({
153
156
  hostCtx,
154
- bundle: verificationBundle,
157
+ verificationInput: input,
158
+ pollOptions,
159
+ createRuntimeUuid: runtimeUuid,
160
+ wrapBundleAsGatewayTransactionMessage: this.wrapBundleAsGatewayTransactionMessage.bind(this),
161
+ submitPath: this.hostRegistryOrganizationIssuePath.bind(this),
162
+ pollPath: this.hostRegistryOrganizationIssuePollPath.bind(this),
163
+ submitAndPoll: this.submitAndPoll.bind(this),
155
164
  });
156
- return this.submitAndPoll(this.hostRegistryOrganizationIssuePath(hostCtx), this.hostRegistryOrganizationIssuePollPath(hostCtx), payload, pollOptions);
157
165
  }
158
166
  /**
159
167
  * Submits one tenant-scoped DID document binding request.
@@ -165,15 +173,15 @@ export class HttpRuntimeClient {
165
173
  * - the flow does not rotate or replace organization public keys
166
174
  */
167
175
  async submitOrganizationDidBinding(ctx, input, pollOptions) {
168
- const thid = `organization-did-binding-${runtimeUuid()}`;
169
- const jti = `organization-did-binding-jti-${runtimeUuid()}`;
170
- const payload = {
171
- jti,
172
- thid,
173
- type: 'application/api+json',
174
- body: buildOrganizationDidBindingBundle(input),
175
- };
176
- return this.submitAndPoll(this.organizationDidBindingPath(ctx), this.organizationDidBindingPollPath(ctx), payload, pollOptions);
176
+ return submitOrganizationDidBindingWithDeps({
177
+ routeCtx: ctx,
178
+ bindingInput: input,
179
+ pollOptions,
180
+ createRuntimeUuid: runtimeUuid,
181
+ organizationDidBindingPath: this.organizationDidBindingPath.bind(this),
182
+ organizationDidBindingPollPath: this.organizationDidBindingPollPath.bind(this),
183
+ submitAndPoll: this.submitAndPoll.bind(this),
184
+ });
177
185
  }
178
186
  /**
179
187
  * Activates a legal organization in the gateway host registry using an ICA
@@ -198,49 +206,16 @@ export class HttpRuntimeClient {
198
206
  * `confirmLegalOrganizationOrder(...)`
199
207
  */
200
208
  async activateOrganizationInGatewayFromIcaProof(hostCtx, input, pollOptions) {
201
- const thid = `activate-org-${runtimeUuid()}`;
202
- const activationDraft = bootstrapFacade.createOrganizationActivationDraft({
203
- vpToken: input.vpToken,
204
- controller: input.controller,
205
- service: input.service,
206
- additionalClaims: input.additionalClaims,
207
- });
208
- const serviceClaims = activationDraft.buildServiceClaims();
209
- const transportMeta = buildDidcommPlaintextTransportMetadata({
210
- controller: input.controller,
211
- contentType: 'application/didcomm-plain+json',
209
+ return activateOrganizationInGatewayFromIcaProofWithDeps({
210
+ hostCtx,
211
+ activationInput: input,
212
+ pollOptions,
213
+ createRuntimeUuid: runtimeUuid,
214
+ activationDraftFactory: (draftInput) => bootstrapFacade.createOrganizationActivationDraft(draftInput),
215
+ submitPath: this.hostRegistryOrganizationActivatePath.bind(this),
216
+ pollPath: this.hostRegistryOrganizationActivatePollPath.bind(this),
217
+ submitAndPoll: this.submitAndPoll.bind(this),
212
218
  });
213
- const payload = {
214
- thid,
215
- iss: String(hostCtx.controllerDid || '').trim() || undefined,
216
- aud: String(hostCtx.hostDid || '').trim() || undefined,
217
- type: 'application/api+json',
218
- ...(transportMeta ? { meta: transportMeta } : {}),
219
- body: {
220
- vp_token: input.vpToken,
221
- ...(input.controller ? { controller: input.controller } : {}),
222
- data: [{
223
- type: 'Organization-activation-request-v1.0',
224
- meta: {
225
- claims: {
226
- '@context': 'org.schema',
227
- ...serviceClaims,
228
- ...(input.additionalClaims || {}),
229
- },
230
- },
231
- resource: {
232
- meta: {
233
- claims: {
234
- '@context': 'org.schema',
235
- ...serviceClaims,
236
- ...(input.additionalClaims || {}),
237
- },
238
- },
239
- },
240
- }],
241
- },
242
- };
243
- return this.submitAndPoll(this.hostRegistryOrganizationActivatePath(hostCtx), this.hostRegistryOrganizationActivatePollPath(hostCtx), payload, pollOptions);
244
219
  }
245
220
  /**
246
221
  * Confirms a host-side legal organization order after the initial activation.
@@ -252,8 +227,8 @@ export class HttpRuntimeClient {
252
227
  return confirmLegalOrganizationOrderWithDeps({
253
228
  input,
254
229
  hostCtx,
255
- hostRegistryOrderBatchPath: this.hostRegistryOrderBatchPath.bind(this),
256
- hostRegistryOrderPollPath: this.hostRegistryOrderPollPath.bind(this),
230
+ hostRegistryOrderBatchPath: this.paths.hostRegistryOrderBatchPath.bind(this.paths),
231
+ hostRegistryOrderPollPath: this.paths.hostRegistryOrderPollPath.bind(this.paths),
257
232
  submitAndPoll: this.submitAndPoll.bind(this),
258
233
  defaultTimeoutMs: pollOptions?.timeoutMs,
259
234
  defaultIntervalMs: pollOptions?.intervalMs,
@@ -268,8 +243,8 @@ export class HttpRuntimeClient {
268
243
  hostCtx,
269
244
  input,
270
245
  requestType: HostLifecycleRequestType.Disable,
271
- submitPath: this.hostRegistryOrganizationDisablePath.bind(this),
272
- pollPath: this.hostRegistryOrganizationDisablePollPath.bind(this),
246
+ submitPath: this.paths.hostRegistryOrganizationDisablePath.bind(this.paths),
247
+ pollPath: this.paths.hostRegistryOrganizationDisablePollPath.bind(this.paths),
273
248
  thidPrefix: 'host-disable',
274
249
  submitAndPoll: this.submitAndPoll.bind(this),
275
250
  defaultTimeoutMs: pollOptions?.timeoutMs,
@@ -285,8 +260,8 @@ export class HttpRuntimeClient {
285
260
  hostCtx,
286
261
  input,
287
262
  requestType: HostLifecycleRequestType.Purge,
288
- submitPath: this.hostRegistryOrganizationPurgePath.bind(this),
289
- pollPath: this.hostRegistryOrganizationPurgePollPath.bind(this),
263
+ submitPath: this.paths.hostRegistryOrganizationPurgePath.bind(this.paths),
264
+ pollPath: this.paths.hostRegistryOrganizationPurgePollPath.bind(this.paths),
290
265
  thidPrefix: 'host-purge',
291
266
  submitAndPoll: this.submitAndPoll.bind(this),
292
267
  defaultTimeoutMs: pollOptions?.timeoutMs,
@@ -302,8 +277,8 @@ export class HttpRuntimeClient {
302
277
  hostCtx,
303
278
  input,
304
279
  requestType: HostedTenantLifecycleRequestType.Disable,
305
- submitPath: this.hostRegistryOrganizationDisablePath.bind(this),
306
- pollPath: this.hostRegistryOrganizationDisablePollPath.bind(this),
280
+ submitPath: this.paths.hostRegistryOrganizationDisablePath.bind(this.paths),
281
+ pollPath: this.paths.hostRegistryOrganizationDisablePollPath.bind(this.paths),
307
282
  thidPrefix: 'tenant-disable',
308
283
  submitAndPoll: this.submitAndPoll.bind(this),
309
284
  defaultTimeoutMs: pollOptions?.timeoutMs,
@@ -318,8 +293,8 @@ export class HttpRuntimeClient {
318
293
  hostCtx,
319
294
  input,
320
295
  requestType: HostedTenantLifecycleRequestType.Purge,
321
- submitPath: this.hostRegistryOrganizationPurgePath.bind(this),
322
- pollPath: this.hostRegistryOrganizationPurgePollPath.bind(this),
296
+ submitPath: this.paths.hostRegistryOrganizationPurgePath.bind(this.paths),
297
+ pollPath: this.paths.hostRegistryOrganizationPurgePollPath.bind(this.paths),
323
298
  thidPrefix: 'tenant-purge',
324
299
  submitAndPoll: this.submitAndPoll.bind(this),
325
300
  defaultTimeoutMs: pollOptions?.timeoutMs,
@@ -331,8 +306,8 @@ export class HttpRuntimeClient {
331
306
  */
332
307
  async createOrganizationEmployee(ctx, input, pollOptions) {
333
308
  return createOrganizationEmployeeWithDeps(ctx, input, pollOptions, {
334
- employeeBatchPath: this.employeeBatchPath.bind(this),
335
- employeePollPath: this.employeePollPath.bind(this),
309
+ employeeBatchPath: this.paths.employeeBatchPath.bind(this.paths),
310
+ employeePollPath: this.paths.employeePollPath.bind(this.paths),
336
311
  submitAndPoll: this.submitAndPoll.bind(this),
337
312
  });
338
313
  }
@@ -344,8 +319,8 @@ export class HttpRuntimeClient {
344
319
  */
345
320
  async disableOrganizationEmployee(ctx, input, pollOptions) {
346
321
  return disableOrganizationEmployeeWithDeps(ctx, input, pollOptions, {
347
- employeeBatchPath: this.employeeBatchPath.bind(this),
348
- employeePollPath: this.employeePollPath.bind(this),
322
+ employeeBatchPath: this.paths.employeeBatchPath.bind(this.paths),
323
+ employeePollPath: this.paths.employeePollPath.bind(this.paths),
349
324
  submitAndPoll: this.submitAndPoll.bind(this),
350
325
  });
351
326
  }
@@ -363,8 +338,8 @@ export class HttpRuntimeClient {
363
338
  */
364
339
  async purgeOrganizationEmployee(ctx, input, pollOptions) {
365
340
  return purgeOrganizationEmployeeWithDeps(ctx, input, pollOptions, {
366
- employeePurgePath: this.employeePurgePath.bind(this),
367
- employeePurgePollPath: this.employeePurgePollPath.bind(this),
341
+ employeePurgePath: this.paths.employeePurgePath.bind(this.paths),
342
+ employeePurgePollPath: this.paths.employeePurgePollPath.bind(this.paths),
368
343
  submitAndPoll: this.submitAndPoll.bind(this),
369
344
  });
370
345
  }
@@ -379,8 +354,8 @@ export class HttpRuntimeClient {
379
354
  */
380
355
  async searchOrganizationEmployees(ctx, input) {
381
356
  return searchOrganizationEmployeesWithDeps(ctx, input, {
382
- employeeSearchPath: this.employeeSearchPath.bind(this),
383
- employeeSearchPollPath: this.employeeSearchPollPath.bind(this),
357
+ employeeSearchPath: this.paths.employeeSearchPath.bind(this.paths),
358
+ employeeSearchPollPath: this.paths.employeeSearchPollPath.bind(this.paths),
384
359
  submitAndPoll: this.submitAndPoll.bind(this),
385
360
  });
386
361
  }
@@ -390,8 +365,8 @@ export class HttpRuntimeClient {
390
365
  */
391
366
  async searchOrganizationLicenses(ctx, input) {
392
367
  return searchOrganizationLicensesWithDeps(ctx, input, {
393
- organizationLicenseSearchPath: this.organizationLicenseSearchPath.bind(this),
394
- organizationLicenseSearchPollPath: this.organizationLicenseSearchPollPath.bind(this),
368
+ organizationLicenseSearchPath: this.paths.organizationLicenseSearchPath.bind(this.paths),
369
+ organizationLicenseSearchPollPath: this.paths.organizationLicenseSearchPollPath.bind(this.paths),
395
370
  submitAndPoll: this.submitAndPoll.bind(this),
396
371
  });
397
372
  }
@@ -401,36 +376,36 @@ export class HttpRuntimeClient {
401
376
  */
402
377
  async listOrganizationLicenses(ctx, input = {}) {
403
378
  return listOrganizationLicensesWithDeps(ctx, input, {
404
- organizationLicenseSearchPath: this.organizationLicenseSearchPath.bind(this),
405
- organizationLicenseSearchPollPath: this.organizationLicenseSearchPollPath.bind(this),
379
+ organizationLicenseSearchPath: this.paths.organizationLicenseSearchPath.bind(this.paths),
380
+ organizationLicenseSearchPollPath: this.paths.organizationLicenseSearchPollPath.bind(this.paths),
406
381
  submitAndPoll: this.submitAndPoll.bind(this),
407
382
  });
408
383
  }
409
384
  async searchOrganizationLicenseOffers(ctx, input) {
410
385
  return searchOrganizationLicenseOffersWithDeps(ctx, input, {
411
- organizationLicenseOfferSearchPath: this.organizationLicenseOfferSearchPath.bind(this),
412
- organizationLicenseOfferSearchPollPath: this.organizationLicenseOfferSearchPollPath.bind(this),
386
+ organizationLicenseOfferSearchPath: this.paths.organizationLicenseOfferSearchPath.bind(this.paths),
387
+ organizationLicenseOfferSearchPollPath: this.paths.organizationLicenseOfferSearchPollPath.bind(this.paths),
413
388
  submitAndPoll: this.submitAndPoll.bind(this),
414
389
  });
415
390
  }
416
391
  async listOrganizationLicenseOffers(ctx, input = {}) {
417
392
  return listOrganizationLicenseOffersWithDeps(ctx, input, {
418
- organizationLicenseOfferSearchPath: this.organizationLicenseOfferSearchPath.bind(this),
419
- organizationLicenseOfferSearchPollPath: this.organizationLicenseOfferSearchPollPath.bind(this),
393
+ organizationLicenseOfferSearchPath: this.paths.organizationLicenseOfferSearchPath.bind(this.paths),
394
+ organizationLicenseOfferSearchPollPath: this.paths.organizationLicenseOfferSearchPollPath.bind(this.paths),
420
395
  submitAndPoll: this.submitAndPoll.bind(this),
421
396
  });
422
397
  }
423
398
  async searchOrganizationLicenseOrders(ctx, input) {
424
399
  return searchOrganizationLicenseOrdersWithDeps(ctx, input, {
425
- organizationLicenseOrderSearchPath: this.organizationLicenseOrderSearchPath.bind(this),
426
- organizationLicenseOrderSearchPollPath: this.organizationLicenseOrderSearchPollPath.bind(this),
400
+ organizationLicenseOrderSearchPath: this.paths.organizationLicenseOrderSearchPath.bind(this.paths),
401
+ organizationLicenseOrderSearchPollPath: this.paths.organizationLicenseOrderSearchPollPath.bind(this.paths),
427
402
  submitAndPoll: this.submitAndPoll.bind(this),
428
403
  });
429
404
  }
430
405
  async listOrganizationLicenseOrders(ctx, input = {}) {
431
406
  return listOrganizationLicenseOrdersWithDeps(ctx, input, {
432
- organizationLicenseOrderSearchPath: this.organizationLicenseOrderSearchPath.bind(this),
433
- organizationLicenseOrderSearchPollPath: this.organizationLicenseOrderSearchPollPath.bind(this),
407
+ organizationLicenseOrderSearchPath: this.paths.organizationLicenseOrderSearchPath.bind(this.paths),
408
+ organizationLicenseOrderSearchPollPath: this.paths.organizationLicenseOrderSearchPollPath.bind(this.paths),
434
409
  submitAndPoll: this.submitAndPoll.bind(this),
435
410
  });
436
411
  }
@@ -450,8 +425,8 @@ export class HttpRuntimeClient {
450
425
  input,
451
426
  defaultTimeoutMs: pollOptions?.timeoutMs,
452
427
  defaultIntervalMs: pollOptions?.intervalMs,
453
- hostRegistryOrderBatchPath: this.hostRegistryOrderBatchPath.bind(this),
454
- hostRegistryOrderPollPath: this.hostRegistryOrderPollPath.bind(this),
428
+ hostRegistryOrderBatchPath: this.paths.hostRegistryOrderBatchPath.bind(this.paths),
429
+ hostRegistryOrderPollPath: this.paths.hostRegistryOrderPollPath.bind(this.paths),
455
430
  submitAndPoll: this.submitAndPoll.bind(this),
456
431
  });
457
432
  }
@@ -468,12 +443,12 @@ export class HttpRuntimeClient {
468
443
  * GW CORE that may persist an individual record without minting an Offer.
469
444
  */
470
445
  async startIndividualOrganization(input) {
471
- const routeCtx = this.routeCtxFromInput(input);
446
+ const routeCtx = this.paths.routeCtxFromInput(input);
472
447
  return startIndividualOrganizationWithDeps({
473
448
  input,
474
449
  routeCtx,
475
- individualFamilyOrganizationBatchPath: this.individualFamilyOrganizationTransactionPath.bind(this),
476
- individualFamilyOrganizationPollPath: this.individualFamilyOrganizationTransactionPollPath.bind(this),
450
+ individualFamilyOrganizationBatchPath: this.paths.individualFamilyOrganizationTransactionPath.bind(this.paths),
451
+ individualFamilyOrganizationPollPath: this.paths.individualFamilyOrganizationTransactionPollPath.bind(this.paths),
477
452
  submitAndPoll: this.submitAndPoll.bind(this),
478
453
  getOfferIdFromResponse: (result) => extractOfferIdFromResponseBody(result.poll.body),
479
454
  getOfferPreviewFromResponse: (result) => extractOfferPreviewFromResponseBody(result.poll.body),
@@ -489,8 +464,8 @@ export class HttpRuntimeClient {
489
464
  input,
490
465
  defaultTimeoutMs: 20000,
491
466
  defaultIntervalMs: 1000,
492
- individualFamilyOrganizationSearchPath: this.individualFamilyOrganizationSearchPath.bind(this),
493
- individualFamilyOrganizationSearchPollPath: this.individualFamilyOrganizationSearchPollPath.bind(this),
467
+ individualFamilyOrganizationSearchPath: this.paths.individualFamilyOrganizationSearchPath.bind(this.paths),
468
+ individualFamilyOrganizationSearchPollPath: this.paths.individualFamilyOrganizationSearchPollPath.bind(this.paths),
494
469
  submitAndPoll: this.submitAndPoll.bind(this),
495
470
  });
496
471
  }
@@ -504,10 +479,10 @@ export class HttpRuntimeClient {
504
479
  input,
505
480
  defaultTimeoutMs: 20000,
506
481
  defaultIntervalMs: 1000,
507
- individualFamilyOrganizationSearchPath: this.individualFamilyOrganizationSearchPath.bind(this),
508
- individualFamilyOrganizationSearchPollPath: this.individualFamilyOrganizationSearchPollPath.bind(this),
509
- individualFamilyOrganizationBatchPath: this.individualFamilyOrganizationTransactionPath.bind(this),
510
- individualFamilyOrganizationPollPath: this.individualFamilyOrganizationTransactionPollPath.bind(this),
482
+ individualFamilyOrganizationSearchPath: this.paths.individualFamilyOrganizationSearchPath.bind(this.paths),
483
+ individualFamilyOrganizationSearchPollPath: this.paths.individualFamilyOrganizationSearchPollPath.bind(this.paths),
484
+ individualFamilyOrganizationBatchPath: this.paths.individualFamilyOrganizationTransactionPath.bind(this.paths),
485
+ individualFamilyOrganizationPollPath: this.paths.individualFamilyOrganizationTransactionPollPath.bind(this.paths),
511
486
  submitAndPoll: this.submitAndPoll.bind(this),
512
487
  });
513
488
  }
@@ -515,12 +490,12 @@ export class HttpRuntimeClient {
515
490
  * Confirms the order returned by `startIndividualOrganization(...)`.
516
491
  */
517
492
  async confirmIndividualOrganizationOrder(input) {
518
- const routeCtx = this.routeCtxFromInput(input);
493
+ const routeCtx = this.paths.routeCtxFromInput(input);
519
494
  return confirmIndividualOrganizationOrderWithDeps({
520
495
  input,
521
496
  routeCtx,
522
- individualFamilyOrderBatchPath: this.individualFamilyOrderBatchPath.bind(this),
523
- individualFamilyOrderPollPath: this.individualFamilyOrderPollPath.bind(this),
497
+ individualFamilyOrderBatchPath: this.paths.individualFamilyOrderBatchPath.bind(this.paths),
498
+ individualFamilyOrderPollPath: this.paths.individualFamilyOrderPollPath.bind(this.paths),
524
499
  submitAndPoll: this.submitAndPoll.bind(this),
525
500
  });
526
501
  }
@@ -532,8 +507,8 @@ export class HttpRuntimeClient {
532
507
  */
533
508
  async disableIndividualOrganization(ctx, input, pollOptions) {
534
509
  return disableIndividualOrganizationWithDeps(ctx, input, pollOptions, {
535
- individualOrganizationDisablePath: this.individualFamilyOrganizationDisablePath.bind(this),
536
- individualOrganizationDisablePollPath: this.individualFamilyOrganizationDisablePollPath.bind(this),
510
+ individualOrganizationDisablePath: this.paths.individualFamilyOrganizationDisablePath.bind(this.paths),
511
+ individualOrganizationDisablePollPath: this.paths.individualFamilyOrganizationDisablePollPath.bind(this.paths),
537
512
  submitAndPoll: this.submitAndPoll.bind(this),
538
513
  });
539
514
  }
@@ -551,8 +526,8 @@ export class HttpRuntimeClient {
551
526
  */
552
527
  async purgeIndividualOrganization(ctx, input, pollOptions) {
553
528
  return purgeIndividualOrganizationWithDeps(ctx, input, pollOptions, {
554
- individualOrganizationPurgePath: this.individualFamilyOrganizationPurgePath.bind(this),
555
- individualOrganizationPurgePollPath: this.individualFamilyOrganizationPurgePollPath.bind(this),
529
+ individualOrganizationPurgePath: this.paths.individualFamilyOrganizationPurgePath.bind(this.paths),
530
+ individualOrganizationPurgePollPath: this.paths.individualFamilyOrganizationPurgePollPath.bind(this.paths),
556
531
  submitAndPoll: this.submitAndPoll.bind(this),
557
532
  });
558
533
  }
@@ -568,8 +543,8 @@ export class HttpRuntimeClient {
568
543
  */
569
544
  async disableIndividualMember(ctx, input, pollOptions) {
570
545
  return disableIndividualMemberWithDeps(ctx, input, pollOptions, {
571
- individualRelatedPersonBatchPath: this.individualRelatedPersonBatchPath.bind(this),
572
- individualRelatedPersonPollPath: this.individualRelatedPersonPollPath.bind(this),
546
+ individualRelatedPersonBatchPath: this.paths.individualRelatedPersonBatchPath.bind(this.paths),
547
+ individualRelatedPersonPollPath: this.paths.individualRelatedPersonPollPath.bind(this.paths),
573
548
  submitAndPoll: this.submitAndPoll.bind(this),
574
549
  });
575
550
  }
@@ -579,8 +554,8 @@ export class HttpRuntimeClient {
579
554
  */
580
555
  async searchIndividualLicenses(ctx, input) {
581
556
  return searchIndividualLicensesWithDeps(ctx, input, {
582
- individualLicenseSearchPath: this.individualLicenseSearchPath.bind(this),
583
- individualLicenseSearchPollPath: this.individualLicenseSearchPollPath.bind(this),
557
+ individualLicenseSearchPath: this.paths.individualLicenseSearchPath.bind(this.paths),
558
+ individualLicenseSearchPollPath: this.paths.individualLicenseSearchPollPath.bind(this.paths),
584
559
  submitAndPoll: this.submitAndPoll.bind(this),
585
560
  });
586
561
  }
@@ -590,49 +565,47 @@ export class HttpRuntimeClient {
590
565
  */
591
566
  async listIndividualLicenses(ctx, input = {}) {
592
567
  return listIndividualLicensesWithDeps(ctx, input, {
593
- individualLicenseSearchPath: this.individualLicenseSearchPath.bind(this),
594
- individualLicenseSearchPollPath: this.individualLicenseSearchPollPath.bind(this),
568
+ individualLicenseSearchPath: this.paths.individualLicenseSearchPath.bind(this.paths),
569
+ individualLicenseSearchPollPath: this.paths.individualLicenseSearchPollPath.bind(this.paths),
595
570
  submitAndPoll: this.submitAndPoll.bind(this),
596
571
  });
597
572
  }
598
573
  async searchIndividualLicenseOffers(ctx, input) {
599
574
  return searchIndividualLicenseOffersWithDeps(ctx, input, {
600
- individualLicenseOfferSearchPath: this.individualLicenseOfferSearchPath.bind(this),
601
- individualLicenseOfferSearchPollPath: this.individualLicenseOfferSearchPollPath.bind(this),
575
+ individualLicenseOfferSearchPath: this.paths.individualLicenseOfferSearchPath.bind(this.paths),
576
+ individualLicenseOfferSearchPollPath: this.paths.individualLicenseOfferSearchPollPath.bind(this.paths),
602
577
  submitAndPoll: this.submitAndPoll.bind(this),
603
578
  });
604
579
  }
605
580
  async listIndividualLicenseOffers(ctx, input = {}) {
606
581
  return listIndividualLicenseOffersWithDeps(ctx, input, {
607
- individualLicenseOfferSearchPath: this.individualLicenseOfferSearchPath.bind(this),
608
- individualLicenseOfferSearchPollPath: this.individualLicenseOfferSearchPollPath.bind(this),
582
+ individualLicenseOfferSearchPath: this.paths.individualLicenseOfferSearchPath.bind(this.paths),
583
+ individualLicenseOfferSearchPollPath: this.paths.individualLicenseOfferSearchPollPath.bind(this.paths),
609
584
  submitAndPoll: this.submitAndPoll.bind(this),
610
585
  });
611
586
  }
612
587
  async searchIndividualLicenseOrders(ctx, input) {
613
588
  return searchIndividualLicenseOrdersWithDeps(ctx, input, {
614
- individualLicenseOrderSearchPath: this.individualLicenseOrderSearchPath.bind(this),
615
- individualLicenseOrderSearchPollPath: this.individualLicenseOrderSearchPollPath.bind(this),
589
+ individualLicenseOrderSearchPath: this.paths.individualLicenseOrderSearchPath.bind(this.paths),
590
+ individualLicenseOrderSearchPollPath: this.paths.individualLicenseOrderSearchPollPath.bind(this.paths),
616
591
  submitAndPoll: this.submitAndPoll.bind(this),
617
592
  });
618
593
  }
619
594
  async listIndividualLicenseOrders(ctx, input = {}) {
620
595
  return listIndividualLicenseOrdersWithDeps(ctx, input, {
621
- individualLicenseOrderSearchPath: this.individualLicenseOrderSearchPath.bind(this),
622
- individualLicenseOrderSearchPollPath: this.individualLicenseOrderSearchPollPath.bind(this),
596
+ individualLicenseOrderSearchPath: this.paths.individualLicenseOrderSearchPath.bind(this.paths),
597
+ individualLicenseOrderSearchPollPath: this.paths.individualLicenseOrderSearchPollPath.bind(this.paths),
623
598
  submitAndPoll: this.submitAndPoll.bind(this),
624
599
  });
625
600
  }
626
601
  /**
627
- * Placeholder for a future GW CORE member/caregiver lifecycle contract.
628
- *
629
- * Current GW CORE does not yet expose a stable lifecycle route for
630
- * `RelatedPerson` / individual-member purge.
602
+ * Purges one previously disabled `RelatedPerson` membership/contact through
603
+ * the explicit public purge path.
631
604
  */
632
605
  async purgeIndividualMember(ctx, input, pollOptions) {
633
606
  return purgeIndividualMemberWithDeps(ctx, input, pollOptions, {
634
- individualRelatedPersonPurgePath: this.individualRelatedPersonPurgePath.bind(this),
635
- individualRelatedPersonPurgePollPath: this.individualRelatedPersonPurgePollPath.bind(this),
607
+ individualRelatedPersonPurgePath: this.paths.individualRelatedPersonPurgePath.bind(this.paths),
608
+ individualRelatedPersonPurgePollPath: this.paths.individualRelatedPersonPurgePollPath.bind(this.paths),
636
609
  submitAndPoll: this.submitAndPoll.bind(this),
637
610
  });
638
611
  }
@@ -642,8 +615,8 @@ export class HttpRuntimeClient {
642
615
  async grantProfessionalAccess(ctx, input) {
643
616
  return grantProfessionalAccessWithDeps(ctx, input, {
644
617
  buildConsentClaimsWithCid: this.buildConsentClaimsWithCid.bind(this),
645
- individualConsentR4BatchPath: this.individualConsentR4BatchPath.bind(this),
646
- individualConsentR4PollPath: this.individualConsentR4PollPath.bind(this),
618
+ individualConsentR4BatchPath: this.paths.individualConsentR4BatchPath.bind(this.paths),
619
+ individualConsentR4PollPath: this.paths.individualConsentR4PollPath.bind(this.paths),
647
620
  submitAndPoll: this.submitAndPoll.bind(this),
648
621
  });
649
622
  }
@@ -653,8 +626,8 @@ export class HttpRuntimeClient {
653
626
  */
654
627
  async revokeProfessionalAccess(ctx, input) {
655
628
  return revokeProfessionalAccessWithDeps(ctx, input, {
656
- individualConsentR4BatchPath: this.individualConsentR4BatchPath.bind(this),
657
- individualConsentR4PollPath: this.individualConsentR4PollPath.bind(this),
629
+ individualConsentR4BatchPath: this.paths.individualConsentR4BatchPath.bind(this.paths),
630
+ individualConsentR4PollPath: this.paths.individualConsentR4PollPath.bind(this.paths),
658
631
  submitAndPoll: this.submitAndPoll.bind(this),
659
632
  });
660
633
  }
@@ -667,17 +640,17 @@ export class HttpRuntimeClient {
667
640
  * the default client route context configured in the constructor.
668
641
  */
669
642
  async requestSmartToken(input) {
670
- const routeCtx = this.routeCtxFromInput(input);
643
+ const routeCtx = this.paths.routeCtxFromInput(input);
671
644
  return requestSmartTokenWithDeps({
672
645
  input,
673
646
  routeCtx,
674
647
  baseUrl: this.baseUrl,
675
648
  defaultTimeoutMs: undefined,
676
649
  defaultIntervalMs: undefined,
677
- identityTokenExchangePath: this.identityTokenExchangePath.bind(this),
678
- identityTokenExchangePollPath: this.identityTokenExchangePollPath.bind(this),
679
- identityOpenIdSmartTokenPath: this.identityOpenIdSmartTokenPath.bind(this),
680
- identityOpenIdSmartTokenPollPath: this.identityOpenIdSmartTokenPollPath.bind(this),
650
+ identityTokenExchangePath: this.paths.identityTokenExchangePath.bind(this.paths),
651
+ identityTokenExchangePollPath: this.paths.identityTokenExchangePollPath.bind(this.paths),
652
+ identityOpenIdSmartTokenPath: this.paths.identityOpenIdSmartTokenPath.bind(this.paths),
653
+ identityOpenIdSmartTokenPollPath: this.paths.identityOpenIdSmartTokenPollPath.bind(this.paths),
681
654
  submitAndPoll: this.submitAndPoll.bind(this),
682
655
  setTokenCache: (tokenCacheKey, token) => this.tokenCache.set(tokenCacheKey, token),
683
656
  });
@@ -688,8 +661,8 @@ export class HttpRuntimeClient {
688
661
  */
689
662
  async upsertRelatedPersonAndPoll(ctx, input) {
690
663
  return upsertRelatedPersonAndPollWithDeps(ctx, input, {
691
- individualRelatedPersonBatchPath: this.individualRelatedPersonBatchPath.bind(this),
692
- individualRelatedPersonPollPath: this.individualRelatedPersonPollPath.bind(this),
664
+ individualRelatedPersonBatchPath: this.paths.individualRelatedPersonBatchPath.bind(this.paths),
665
+ individualRelatedPersonPollPath: this.paths.individualRelatedPersonPollPath.bind(this.paths),
693
666
  submitAndPoll: this.submitAndPoll.bind(this),
694
667
  });
695
668
  }
@@ -702,8 +675,30 @@ export class HttpRuntimeClient {
702
675
  */
703
676
  async ingestCommunicationAndUpdateIndex(ctx, input) {
704
677
  return ingestCommunicationAndUpdateIndexWithDeps(ctx, input, {
705
- individualCommunicationBatchPath: this.individualCommunicationBatchPath.bind(this),
706
- individualCommunicationPollPath: this.individualCommunicationPollPath.bind(this),
678
+ individualCommunicationBatchPath: this.paths.individualCommunicationBatchPath.bind(this.paths),
679
+ individualCommunicationPollPath: this.paths.individualCommunicationPollPath.bind(this.paths),
680
+ submitAndPoll: this.submitAndPoll.bind(this),
681
+ });
682
+ }
683
+ /**
684
+ * Registers one FHIR resource or raw artifact on blockchain and waits until
685
+ * GW has indexed the resulting DocumentReference projection.
686
+ */
687
+ async registerBlockchainArtifactAndUpdateIndex(ctx, input) {
688
+ return registerBlockchainArtifactAndUpdateIndexWithDeps(ctx, input, {
689
+ individualDocumentReferenceBatchPath: this.paths.individualDocumentReferenceBatchPath.bind(this.paths),
690
+ individualDocumentReferencePollPath: this.paths.individualDocumentReferencePollPath.bind(this.paths),
691
+ submitAndPoll: this.submitAndPoll.bind(this),
692
+ });
693
+ }
694
+ /**
695
+ * Builds and submits a Communication carrying the selected vital-sign day
696
+ * batch artifacts from a paginated search response.
697
+ */
698
+ async submitVitalSignBatchCommunicationFromSearchResponse(ctx, input) {
699
+ return ingestCommunicationAndUpdateIndexWithDeps(ctx, buildVitalSignBatchCommunicationFromSearchResponse(input), {
700
+ individualCommunicationBatchPath: this.paths.individualCommunicationBatchPath.bind(this.paths),
701
+ individualCommunicationPollPath: this.paths.individualCommunicationPollPath.bind(this.paths),
707
702
  submitAndPoll: this.submitAndPoll.bind(this),
708
703
  });
709
704
  }
@@ -713,8 +708,8 @@ export class HttpRuntimeClient {
713
708
  */
714
709
  async searchCommunicationParticipants(ctx, input) {
715
710
  return searchCommunicationParticipantsWithDeps(ctx, input, {
716
- communicationSearchPath: this.individualCommunicationSearchPath.bind(this),
717
- communicationSearchPollPath: this.individualCommunicationSearchPollPath.bind(this),
711
+ communicationSearchPath: this.paths.individualCommunicationSearchPath.bind(this.paths),
712
+ communicationSearchPollPath: this.paths.individualCommunicationSearchPollPath.bind(this.paths),
718
713
  submitAndPoll: this.submitAndPoll.bind(this),
719
714
  });
720
715
  }
@@ -735,8 +730,8 @@ export class HttpRuntimeClient {
735
730
  */
736
731
  async searchClinicalBundle(ctx, input) {
737
732
  return searchClinicalBundleWithDeps(ctx, input, {
738
- bundleSearchPath: this.individualBundleSearchPath.bind(this),
739
- bundleSearchPollPath: this.individualBundleSearchPollPath.bind(this),
733
+ bundleSearchPath: this.paths.individualBundleSearchPath.bind(this.paths),
734
+ bundleSearchPollPath: this.paths.individualBundleSearchPollPath.bind(this.paths),
740
735
  submitAndPoll: this.submitAndPoll.bind(this),
741
736
  });
742
737
  }
@@ -773,323 +768,97 @@ export class HttpRuntimeClient {
773
768
  });
774
769
  }
775
770
  buildConsentClaimsWithCid(input) {
776
- return buildConsentClaimsSimpleWithCid({
777
- subjectDid: input.subjectDid,
778
- subjectPhone: input.subjectPhone,
779
- subjectGivenName: input.subjectGivenName,
780
- actor: input.actorId ?? input.actor ?? '',
781
- actorRole: String(input?.actorRole || ''),
782
- purpose: String(input?.purpose || ''),
783
- actions: Array.isArray(input?.actions) ? input.actions : [],
784
- consentIdentifier: input.consentIdentifier,
785
- consentDate: input.consentDate,
786
- decision: input.decision,
787
- attachmentContentType: input.attachmentContentType,
788
- attachmentBase64: input.attachmentBase64,
789
- }, {
790
- errorPrefix: 'grantProfessionalAccess:',
791
- consentIdentifierFactory: () => `urn:uuid:${runtimeUuid()}`,
792
- });
771
+ return buildGrantProfessionalAccessClaimsWithCid(input, runtimeUuid);
793
772
  }
794
773
  async pollBatchResponse(path, request) {
795
- const response = await this.fetchWithTimeout(path, {
796
- method: 'POST',
797
- headers: this.buildHeaders('application/json'),
798
- body: JSON.stringify(request),
799
- });
800
- const retryAfter = Number(response.headers.get('retry-after'));
801
- return {
802
- status: response.status,
803
- body: await this.parseResponseBody(response),
804
- retryAfterMs: Number.isFinite(retryAfter) ? retryAfter * 1000 : undefined,
805
- };
774
+ return pollBatchResponseWithRuntimeConfig(this.transportConfig, path, request);
806
775
  }
807
776
  async postJson(path, payload, contentType) {
808
- const response = await this.fetchWithTimeout(path, {
809
- method: 'POST',
810
- headers: this.buildHeaders(contentType),
811
- body: JSON.stringify(payload),
812
- });
813
- return { status: response.status, location: response.headers.get('location') || undefined, body: await this.parseResponseBody(response) };
777
+ return postJsonWithRuntimeConfig(this.transportConfig, path, payload, contentType);
814
778
  }
815
779
  buildHeaders(contentType) {
816
- const headers = {
817
- ...this.defaultHeaders,
818
- 'Content-Type': contentType,
819
- Accept: DIDCOMM_DEFAULT_ACCEPT_HEADER,
820
- };
821
- if (this.bearerToken)
822
- headers.Authorization = `Bearer ${this.bearerToken}`;
823
- return headers;
780
+ return buildRuntimeHeaders(this.transportConfig, contentType);
824
781
  }
825
782
  async fetchWithTimeout(path, init) {
826
- const controller = new AbortController();
827
- const timeout = setTimeout(() => controller.abort(), this.requestTimeoutMs);
828
- const url = /^https?:\/\//.test(path) ? path : `${this.baseUrl}${path.startsWith('/') ? path : `/${path}`}`;
829
- const requestBody = this.parseTraceBody(init.body);
830
- const traceBase = {
831
- ts: new Date().toISOString(),
832
- request: {
833
- url,
834
- method: String(init.method || 'GET').toUpperCase(),
835
- headers: this.redactTraceValue(init.headers || {}),
836
- body: this.redactTraceValue(requestBody),
837
- },
838
- };
839
- try {
840
- const response = await fetch(url, { ...init, signal: controller.signal });
841
- const responseClone = response.clone();
842
- const responseRaw = await responseClone.text();
843
- this.appendHttpTrace({
844
- ...traceBase,
845
- response: {
846
- status: response.status,
847
- headers: this.redactTraceValue(Object.fromEntries(response.headers.entries())),
848
- body: this.redactTraceValue(this.parseTraceRawText(responseRaw)),
849
- },
850
- });
851
- return response;
852
- }
853
- catch (error) {
854
- this.appendHttpTrace({
855
- ...traceBase,
856
- error: {
857
- name: error instanceof Error ? error.name : 'Error',
858
- message: error instanceof Error ? error.message : String(error),
859
- },
860
- });
861
- throw error;
862
- }
863
- finally {
864
- clearTimeout(timeout);
865
- }
783
+ return fetchWithTimeout(this.transportConfig, path, init);
866
784
  }
867
785
  async parseResponseBody(response) {
868
- const raw = await response.text();
869
- if (!raw)
870
- return {};
871
- try {
872
- return JSON.parse(raw);
873
- }
874
- catch {
875
- return raw;
876
- }
877
- }
878
- requireRouteContext(ctx) {
879
- const resolved = ctx || this.ctx;
880
- const tenantId = String(resolved?.tenantId || '').trim();
881
- const jurisdiction = String(resolved?.jurisdiction || '').trim();
882
- const sector = String(resolved?.sector || '').trim();
883
- if (!tenantId || !jurisdiction || !sector) {
884
- throw new Error('Route context is required.');
885
- }
886
- return { tenantId, jurisdiction, sector };
887
- }
888
- routeCtxFromInput(input) {
889
- const tenantId = String(input.serviceProviderDid || input.tenantId || '').trim();
890
- return this.requireRouteContext(tenantId && input.jurisdiction && input.sector
891
- ? { tenantId, jurisdiction: input.jurisdiction, sector: input.sector }
892
- : undefined);
786
+ return parseResponseBody(response);
893
787
  }
894
788
  /**
895
789
  * Reuses the shared bundle business contract while keeping attachment
896
790
  * transport fields at the DIDComm/plaintext message layer expected by GW.
897
791
  */
898
792
  wrapBundleAsGatewayTransactionMessage(input) {
899
- const rawBundle = (input.bundle || {});
900
- const attachments = Array.isArray(rawBundle.attachments) ? rawBundle.attachments : undefined;
901
- const { attachments: _ignoredAttachments, ...body } = rawBundle;
902
- return {
903
- jti: input.jti,
904
- thid: input.thid,
905
- iss: String(input.hostCtx.controllerDid || '').trim() || undefined,
906
- aud: String(input.hostCtx.hostDid || '').trim() || undefined,
907
- type: 'application/api+json',
908
- body,
909
- ...(attachments && attachments.length > 0 ? { attachments } : {}),
910
- };
911
- }
912
- hostRegistryPath(ctx, resourceType, action) {
913
- const hostCtx = this.requireHostRouteContext(ctx);
914
- return `/host/cds-${encodeURIComponent(hostCtx.jurisdiction)}/v1/${encodeURIComponent(hostCtx.hostNetwork || '')}/registry/org.schema/${encodeURIComponent(resourceType)}/${encodeURIComponent(action)}`;
915
- }
916
- /**
917
- * Resolves the host route segment without allowing tenant-route `sector`
918
- * semantics to leak into host onboarding.
919
- *
920
- * Step by step:
921
- * - host routes use `/host/cds-{jurisdiction}/v1/{host-network}`
922
- * - tenant routes use `/{tenantId}/cds-{jurisdiction}/v1/{tenant-sector}`
923
- * - passing the host segment under `sector` is rejected because that name is
924
- * reserved for tenant business sectors such as `health-care`
925
- * - compatibility code may still pass `hostNetworkOrTenantSector`, but the
926
- * value must still be one of the allowed host runtime/network selectors
927
- */
928
- requireHostRouteContext(ctx) {
929
- const hostCtx = (ctx || {});
930
- const runtimeCtx = (this.ctx || {});
931
- const jurisdiction = String(hostCtx.jurisdiction || this.ctx?.jurisdiction || '').trim();
932
- const explicitHostNetwork = String(hostCtx.hostNetwork || runtimeCtx.hostNetwork || '').trim();
933
- const compatibilityHostNetwork = String(hostCtx.hostNetworkOrTenantSector
934
- || runtimeCtx.hostNetworkOrTenantSector
935
- || '').trim();
936
- const deprecatedSector = String(hostCtx.sector || '').trim();
937
- if (!explicitHostNetwork && !compatibilityHostNetwork && deprecatedSector) {
938
- throw new Error(`Host route context must use 'hostNetwork', not 'sector'. Received deprecated sector='${deprecatedSector}'.`);
939
- }
940
- const hostNetwork = String(explicitHostNetwork
941
- || compatibilityHostNetwork
942
- || '').trim();
943
- if (!jurisdiction)
944
- throw new Error('Host route context is required.');
945
- if (!hostNetwork) {
946
- if (!this.warnedDefaultHostNetwork) {
947
- this.warnedDefaultHostNetwork = true;
948
- console.warn("[gdc-sdk-node-ts] Missing hostNetwork in host route context. Defaulting to 'test'. Pass hostNetwork explicitly to avoid environment drift.");
949
- }
950
- return { jurisdiction, hostNetwork: 'test' };
951
- }
952
- if (!this.isSupportedHostNetwork(hostNetwork)) {
953
- throw new Error(`Invalid hostNetwork '${hostNetwork}'. Allowed values: test, local-network, test-network, network.`);
954
- }
955
- return { jurisdiction, hostNetwork };
956
- }
957
- isSupportedHostNetwork(value) {
958
- return (value === 'test'
959
- || value === 'local-network'
960
- || value === 'test-network'
961
- || value === 'network');
962
- }
963
- hostRegistryOrganizationTransactionPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.Transaction); }
964
- hostRegistryOrganizationTransactionPollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.TransactionResponse); }
965
- hostRegistryOrganizationIssuePath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.Issue); }
966
- hostRegistryOrganizationIssuePollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.IssueResponse); }
967
- hostRegistryOrganizationActivatePath(ctx) { return this.hostRegistryPath(ctx, 'Organization', '_activate'); }
968
- hostRegistryOrganizationActivatePollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', '_activate-response'); }
969
- hostRegistryOrganizationDisablePath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.Disable); }
970
- hostRegistryOrganizationDisablePollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', `${GwCoreLifecycleAction.Disable}-response`); }
971
- hostRegistryOrganizationPurgePath(ctx) { return this.hostRegistryPath(ctx, 'Organization', GwCoreLifecycleAction.Purge); }
972
- hostRegistryOrganizationPurgePollPath(ctx) { return this.hostRegistryPath(ctx, 'Organization', `${GwCoreLifecycleAction.Purge}-response`); }
973
- hostRegistryOrderBatchPath(ctx) { return this.hostRegistryPath(ctx, 'Order', '_batch'); }
974
- hostRegistryOrderPollPath(ctx) { return this.hostRegistryPath(ctx, 'Order', '_batch-response'); }
975
- employeeBatchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', GwCoreLifecycleAction.Batch); }
976
- employeePollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', GwCoreLifecycleAction.BatchResponse); }
977
- employeeSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', '_search'); }
978
- employeeSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', '_search-response'); }
979
- organizationLicenseSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'License', '_search'); }
980
- organizationLicenseSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'License', '_search-response'); }
981
- organizationDidBindingPath(ctx) {
982
- const resolved = this.requireRouteContext(ctx);
983
- return `/${encodeURIComponent(resolved.tenantId)}/cds-${encodeURIComponent(resolved.jurisdiction)}/v1/${encodeURIComponent(resolved.sector)}/did/document/_binding`;
984
- }
985
- organizationDidBindingPollPath(ctx) {
986
- const resolved = this.requireRouteContext(ctx);
987
- return `/${encodeURIComponent(resolved.tenantId)}/cds-${encodeURIComponent(resolved.jurisdiction)}/v1/${encodeURIComponent(resolved.sector)}/did/document/_binding-response`;
988
- }
989
- organizationLicenseOfferSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Offer', '_search'); }
990
- organizationLicenseOfferSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Offer', '_search-response'); }
991
- organizationLicenseOrderSearchPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Order', '_search'); }
992
- organizationLicenseOrderSearchPollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Order', '_search-response'); }
993
- employeePurgePath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', GwCoreLifecycleAction.Purge); }
994
- employeePurgePollPath(ctx) { return this.v1Path(ctx, 'entity', 'org.schema', 'Employee', `${GwCoreLifecycleAction.Purge}-response`); }
995
- individualFamilyOrganizationBatchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.Batch); }
996
- individualFamilyOrganizationPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.BatchResponse); }
997
- individualFamilyOrganizationSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', '_search'); }
998
- individualFamilyOrganizationSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', '_search-response'); }
999
- individualFamilyOrganizationTransactionPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.Transaction); }
1000
- individualFamilyOrganizationTransactionPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.TransactionResponse); }
1001
- individualFamilyOrganizationDisablePath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.Disable); }
1002
- individualFamilyOrganizationDisablePollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', `${GwCoreLifecycleAction.Disable}-response`); }
1003
- individualFamilyOrganizationPurgePath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', GwCoreLifecycleAction.Purge); }
1004
- individualFamilyOrganizationPurgePollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Organization', `${GwCoreLifecycleAction.Purge}-response`); }
1005
- individualLicenseSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'License', '_search'); }
1006
- individualLicenseSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'License', '_search-response'); }
1007
- individualLicenseOfferSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Offer', '_search'); }
1008
- individualLicenseOfferSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Offer', '_search-response'); }
1009
- individualLicenseOrderSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Order', '_search'); }
1010
- individualLicenseOrderSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Order', '_search-response'); }
1011
- individualFamilyOrderBatchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Order', '_batch'); }
1012
- individualFamilyOrderPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.schema', 'Order', '_batch-response'); }
1013
- individualRelatedPersonBatchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'RelatedPerson', '_batch'); }
1014
- individualRelatedPersonPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'RelatedPerson', '_batch-response'); }
1015
- individualRelatedPersonPurgePath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'RelatedPerson', '_purge'); }
1016
- individualRelatedPersonPurgePollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'RelatedPerson', '_purge-response'); }
1017
- individualConsentR4BatchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Consent', '_batch'); }
1018
- individualConsentR4PollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Consent', '_batch-response'); }
1019
- individualCommunicationBatchPath(ctx, format) { return this.v1Path(ctx, 'individual', format, 'Communication', '_batch'); }
1020
- individualCommunicationPollPath(ctx, format) { return this.v1Path(ctx, 'individual', format, 'Communication', '_batch-response'); }
1021
- individualCommunicationSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Communication', '_search'); }
1022
- individualCommunicationSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Communication', '_search-response'); }
1023
- individualBundleSearchPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Bundle', '_search'); }
1024
- individualBundleSearchPollPath(ctx) { return this.v1Path(ctx, 'individual', 'org.hl7.fhir.r4', 'Bundle', '_search-response'); }
1025
- identityTokenExchangePath(ctx) {
1026
- return `/${encodeURIComponent('host')}/cds-${encodeURIComponent(ctx.jurisdiction)}/v1/${encodeURIComponent(ctx.sector)}/${encodeURIComponent(ctx.tenantId)}/identity/auth/_exchange`;
1027
- }
1028
- identityTokenExchangePollPath(ctx) {
1029
- return `/${encodeURIComponent('host')}/cds-${encodeURIComponent(ctx.jurisdiction)}/v1/${encodeURIComponent(ctx.sector)}/${encodeURIComponent(ctx.tenantId)}/identity/auth/_exchange-response`;
1030
- }
1031
- identityDeviceDcrPath(ctx) {
1032
- return `/${encodeURIComponent('host')}/cds-${encodeURIComponent(ctx.jurisdiction)}/v1/${encodeURIComponent(ctx.sector)}/${encodeURIComponent(ctx.tenantId)}/identity/auth/_dcr`;
1033
- }
1034
- identityDeviceDcrPollPath(ctx) {
1035
- return `/${encodeURIComponent('host')}/cds-${encodeURIComponent(ctx.jurisdiction)}/v1/${encodeURIComponent(ctx.sector)}/${encodeURIComponent(ctx.tenantId)}/identity/auth/_dcr-response`;
1036
- }
1037
- identityOpenIdSmartTokenPath(ctx) {
1038
- return `/${encodeURIComponent(ctx.tenantId)}/cds-${encodeURIComponent(ctx.jurisdiction)}/v1/${encodeURIComponent(ctx.sector)}/identity/openid/smart/token`;
1039
- }
1040
- identityOpenIdSmartTokenPollPath(ctx) {
1041
- return `/${encodeURIComponent(ctx.tenantId)}/cds-${encodeURIComponent(ctx.jurisdiction)}/v1/${encodeURIComponent(ctx.sector)}/identity/openid/smart/_batch-response`;
1042
- }
1043
- appendHttpTrace(entry) {
1044
- if (!this.httpTraceFile)
1045
- return;
1046
- try {
1047
- fs.mkdirSync(path.dirname(this.httpTraceFile), { recursive: true });
1048
- fs.appendFileSync(this.httpTraceFile, `${JSON.stringify(entry)}\n`);
1049
- }
1050
- catch {
1051
- // Tracing must never break runtime requests.
1052
- }
1053
- }
1054
- parseTraceBody(body) {
1055
- if (body == null)
1056
- return undefined;
1057
- if (typeof body === 'string')
1058
- return this.parseTraceRawText(body);
1059
- if (body instanceof URLSearchParams)
1060
- return Object.fromEntries(body.entries());
1061
- return '[non-text-body]';
1062
- }
1063
- parseTraceRawText(raw) {
1064
- if (!raw)
1065
- return '';
1066
- try {
1067
- return JSON.parse(raw);
1068
- }
1069
- catch {
1070
- return raw;
1071
- }
1072
- }
1073
- redactTraceValue(value) {
1074
- if (value === undefined)
1075
- return value;
1076
- const serialized = JSON.stringify(value, (key, nestedValue) => {
1077
- if (/token|authorization|secret|password/i.test(String(key || ''))) {
1078
- return '[redacted]';
1079
- }
1080
- return nestedValue;
1081
- });
1082
- return serialized === undefined ? value : JSON.parse(serialized);
1083
- }
793
+ return wrapBundleAsGatewayTransactionMessage(input);
794
+ }
795
+ hostRegistryOrganizationTransactionPath(ctx) { return this.paths.hostRegistryOrganizationTransactionPath(ctx); }
796
+ hostRegistryOrganizationTransactionPollPath(ctx) { return this.paths.hostRegistryOrganizationTransactionPollPath(ctx); }
797
+ hostRegistryOrganizationIssuePath(ctx) { return this.paths.hostRegistryOrganizationIssuePath(ctx); }
798
+ hostRegistryOrganizationIssuePollPath(ctx) { return this.paths.hostRegistryOrganizationIssuePollPath(ctx); }
799
+ hostRegistryOrganizationActivatePath(ctx) { return this.paths.hostRegistryOrganizationActivatePath(ctx); }
800
+ hostRegistryOrganizationActivatePollPath(ctx) { return this.paths.hostRegistryOrganizationActivatePollPath(ctx); }
801
+ hostRegistryOrganizationDisablePath(ctx) { return this.paths.hostRegistryOrganizationDisablePath(ctx); }
802
+ hostRegistryOrganizationDisablePollPath(ctx) { return this.paths.hostRegistryOrganizationDisablePollPath(ctx); }
803
+ hostRegistryOrganizationPurgePath(ctx) { return this.paths.hostRegistryOrganizationPurgePath(ctx); }
804
+ hostRegistryOrganizationPurgePollPath(ctx) { return this.paths.hostRegistryOrganizationPurgePollPath(ctx); }
805
+ hostRegistryOrderBatchPath(ctx) { return this.paths.hostRegistryOrderBatchPath(ctx); }
806
+ hostRegistryOrderPollPath(ctx) { return this.paths.hostRegistryOrderPollPath(ctx); }
807
+ employeeBatchPath(ctx) { return this.paths.employeeBatchPath(ctx); }
808
+ employeePollPath(ctx) { return this.paths.employeePollPath(ctx); }
809
+ employeeSearchPath(ctx) { return this.paths.employeeSearchPath(ctx); }
810
+ employeeSearchPollPath(ctx) { return this.paths.employeeSearchPollPath(ctx); }
811
+ organizationLicenseSearchPath(ctx) { return this.paths.organizationLicenseSearchPath(ctx); }
812
+ organizationLicenseSearchPollPath(ctx) { return this.paths.organizationLicenseSearchPollPath(ctx); }
813
+ organizationDidBindingPath(ctx) { return this.paths.organizationDidBindingPath(ctx); }
814
+ organizationDidBindingPollPath(ctx) { return this.paths.organizationDidBindingPollPath(ctx); }
815
+ organizationLicenseOfferSearchPath(ctx) { return this.paths.organizationLicenseOfferSearchPath(ctx); }
816
+ organizationLicenseOfferSearchPollPath(ctx) { return this.paths.organizationLicenseOfferSearchPollPath(ctx); }
817
+ organizationLicenseOrderSearchPath(ctx) { return this.paths.organizationLicenseOrderSearchPath(ctx); }
818
+ organizationLicenseOrderSearchPollPath(ctx) { return this.paths.organizationLicenseOrderSearchPollPath(ctx); }
819
+ employeePurgePath(ctx) { return this.paths.employeePurgePath(ctx); }
820
+ employeePurgePollPath(ctx) { return this.paths.employeePurgePollPath(ctx); }
821
+ individualFamilyOrganizationBatchPath(ctx) { return this.paths.individualFamilyOrganizationBatchPath(ctx); }
822
+ individualFamilyOrganizationPollPath(ctx) { return this.paths.individualFamilyOrganizationPollPath(ctx); }
823
+ individualFamilyOrganizationSearchPath(ctx) { return this.paths.individualFamilyOrganizationSearchPath(ctx); }
824
+ individualFamilyOrganizationSearchPollPath(ctx) { return this.paths.individualFamilyOrganizationSearchPollPath(ctx); }
825
+ individualFamilyOrganizationTransactionPath(ctx) { return this.paths.individualFamilyOrganizationTransactionPath(ctx); }
826
+ individualFamilyOrganizationTransactionPollPath(ctx) { return this.paths.individualFamilyOrganizationTransactionPollPath(ctx); }
827
+ individualFamilyOrganizationDisablePath(ctx) { return this.paths.individualFamilyOrganizationDisablePath(ctx); }
828
+ individualFamilyOrganizationDisablePollPath(ctx) { return this.paths.individualFamilyOrganizationDisablePollPath(ctx); }
829
+ individualFamilyOrganizationPurgePath(ctx) { return this.paths.individualFamilyOrganizationPurgePath(ctx); }
830
+ individualFamilyOrganizationPurgePollPath(ctx) { return this.paths.individualFamilyOrganizationPurgePollPath(ctx); }
831
+ individualLicenseSearchPath(ctx) { return this.paths.individualLicenseSearchPath(ctx); }
832
+ individualLicenseSearchPollPath(ctx) { return this.paths.individualLicenseSearchPollPath(ctx); }
833
+ individualLicenseOfferSearchPath(ctx) { return this.paths.individualLicenseOfferSearchPath(ctx); }
834
+ individualLicenseOfferSearchPollPath(ctx) { return this.paths.individualLicenseOfferSearchPollPath(ctx); }
835
+ individualLicenseOrderSearchPath(ctx) { return this.paths.individualLicenseOrderSearchPath(ctx); }
836
+ individualLicenseOrderSearchPollPath(ctx) { return this.paths.individualLicenseOrderSearchPollPath(ctx); }
837
+ individualFamilyOrderBatchPath(ctx) { return this.paths.individualFamilyOrderBatchPath(ctx); }
838
+ individualFamilyOrderPollPath(ctx) { return this.paths.individualFamilyOrderPollPath(ctx); }
839
+ individualRelatedPersonBatchPath(ctx) { return this.paths.individualRelatedPersonBatchPath(ctx); }
840
+ individualRelatedPersonPollPath(ctx) { return this.paths.individualRelatedPersonPollPath(ctx); }
841
+ individualRelatedPersonPurgePath(ctx) { return this.paths.individualRelatedPersonPurgePath(ctx); }
842
+ individualRelatedPersonPurgePollPath(ctx) { return this.paths.individualRelatedPersonPurgePollPath(ctx); }
843
+ individualConsentR4BatchPath(ctx) { return this.paths.individualConsentR4BatchPath(ctx); }
844
+ individualConsentR4PollPath(ctx) { return this.paths.individualConsentR4PollPath(ctx); }
845
+ individualCommunicationBatchPath(ctx, format) { return this.paths.individualCommunicationBatchPath(ctx, format); }
846
+ individualCommunicationPollPath(ctx, format) { return this.paths.individualCommunicationPollPath(ctx, format); }
847
+ individualCommunicationSearchPath(ctx) { return this.paths.individualCommunicationSearchPath(ctx); }
848
+ individualCommunicationSearchPollPath(ctx) { return this.paths.individualCommunicationSearchPollPath(ctx); }
849
+ individualDocumentReferenceBatchPath(ctx) { return this.paths.individualDocumentReferenceBatchPath(ctx); }
850
+ individualDocumentReferencePollPath(ctx) { return this.paths.individualDocumentReferencePollPath(ctx); }
851
+ individualBundleSearchPath(ctx) { return this.paths.individualBundleSearchPath(ctx); }
852
+ individualBundleSearchPollPath(ctx) { return this.paths.individualBundleSearchPollPath(ctx); }
853
+ identityTokenExchangePath(ctx) { return this.paths.identityTokenExchangePath(ctx); }
854
+ identityTokenExchangePollPath(ctx) { return this.paths.identityTokenExchangePollPath(ctx); }
855
+ identityDeviceDcrPath(ctx) { return this.paths.identityDeviceDcrPath(ctx); }
856
+ identityDeviceDcrPollPath(ctx) { return this.paths.identityDeviceDcrPollPath(ctx); }
857
+ identityOpenIdSmartTokenPath(ctx) { return this.paths.identityOpenIdSmartTokenPath(ctx); }
858
+ identityOpenIdSmartTokenPollPath(ctx) { return this.paths.identityOpenIdSmartTokenPollPath(ctx); }
1084
859
  }
1085
860
  /**
1086
861
  * @deprecated Prefer `HttpRuntimeClient`.
1087
862
  */
1088
863
  export class NodeHttpClient extends HttpRuntimeClient {
1089
864
  }
1090
- function runtimeUuid() {
1091
- const fromCrypto = globalThis.crypto?.randomUUID?.();
1092
- if (fromCrypto)
1093
- return fromCrypto;
1094
- return `fallback-${Date.now()}-${Math.random().toString(16).slice(2)}`;
1095
- }