gdc-sdk-front-ts 2.1.2 → 2.3.0
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 +9 -3
- package/dist/ClientSDK.d.ts +11 -1
- package/dist/ClientSDK.js +13 -1
- package/dist/ProfileManager.js +6 -3
- package/dist/front-clinical-runtime-client.d.ts +69 -0
- package/dist/front-clinical-runtime-client.js +214 -0
- package/dist/frontend-profile-workspace.d.ts +62 -0
- package/dist/frontend-profile-workspace.js +129 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/individual-controller-frontend-runtime.d.ts +9 -3
- package/dist/individual-controller-frontend-runtime.js +7 -6
- package/dist/orchestration/client-port.d.ts +21 -3
- package/dist/orchestration/individual-member-sdk.d.ts +11 -1
- package/dist/orchestration/individual-member-sdk.js +12 -0
- package/dist/orchestration/professional-sdk.d.ts +7 -1
- package/dist/orchestration/professional-sdk.js +6 -0
- package/package.json +3 -3
- package/dist/discovery/HttpDataspaceDiscoveryClient.d.ts +0 -34
- package/dist/discovery/HttpDataspaceDiscoveryClient.js +0 -47
- package/dist/gdc-common-utils-ts/src/AesManager.d.ts +0 -27
- package/dist/gdc-common-utils-ts/src/AesManager.js +0 -64
- package/dist/gdc-common-utils-ts/src/CryptographyService.d.ts +0 -76
- package/dist/gdc-common-utils-ts/src/CryptographyService.js +0 -401
- package/dist/gdc-common-utils-ts/src/constants/actor-session.d.ts +0 -40
- package/dist/gdc-common-utils-ts/src/constants/actor-session.js +0 -40
- package/dist/gdc-common-utils-ts/src/constants/communication.d.ts +0 -28
- package/dist/gdc-common-utils-ts/src/constants/communication.js +0 -14
- package/dist/gdc-common-utils-ts/src/constants/cryptography.d.ts +0 -58
- package/dist/gdc-common-utils-ts/src/constants/cryptography.js +0 -49
- package/dist/gdc-common-utils-ts/src/constants/dataspace-discovery.d.ts +0 -11
- package/dist/gdc-common-utils-ts/src/constants/dataspace-discovery.js +0 -11
- package/dist/gdc-common-utils-ts/src/constants/dataspace-protocol.d.ts +0 -27
- package/dist/gdc-common-utils-ts/src/constants/dataspace-protocol.js +0 -27
- package/dist/gdc-common-utils-ts/src/constants/device.d.ts +0 -16
- package/dist/gdc-common-utils-ts/src/constants/device.js +0 -15
- package/dist/gdc-common-utils-ts/src/constants/did-services.d.ts +0 -42
- package/dist/gdc-common-utils-ts/src/constants/did-services.js +0 -40
- package/dist/gdc-common-utils-ts/src/constants/eu-countries.d.ts +0 -36
- package/dist/gdc-common-utils-ts/src/constants/eu-countries.js +0 -69
- package/dist/gdc-common-utils-ts/src/constants/fhir-code-systems.d.ts +0 -12
- package/dist/gdc-common-utils-ts/src/constants/fhir-code-systems.js +0 -12
- package/dist/gdc-common-utils-ts/src/constants/fhir-resource-types.d.ts +0 -52
- package/dist/gdc-common-utils-ts/src/constants/fhir-resource-types.js +0 -33
- package/dist/gdc-common-utils-ts/src/constants/fhir-versions.d.ts +0 -10
- package/dist/gdc-common-utils-ts/src/constants/fhir-versions.js +0 -10
- package/dist/gdc-common-utils-ts/src/constants/healthcare.d.ts +0 -496
- package/dist/gdc-common-utils-ts/src/constants/healthcare.js +0 -274
- package/dist/gdc-common-utils-ts/src/constants/hl7-roles.d.ts +0 -44
- package/dist/gdc-common-utils-ts/src/constants/hl7-roles.js +0 -208
- package/dist/gdc-common-utils-ts/src/constants/index.d.ts +0 -21
- package/dist/gdc-common-utils-ts/src/constants/index.js +0 -21
- package/dist/gdc-common-utils-ts/src/constants/network.d.ts +0 -25
- package/dist/gdc-common-utils-ts/src/constants/network.js +0 -17
- package/dist/gdc-common-utils-ts/src/constants/schemaorg.d.ts +0 -175
- package/dist/gdc-common-utils-ts/src/constants/schemaorg.js +0 -261
- package/dist/gdc-common-utils-ts/src/constants/sectors.d.ts +0 -24
- package/dist/gdc-common-utils-ts/src/constants/sectors.js +0 -24
- package/dist/gdc-common-utils-ts/src/constants/service-capabilities.d.ts +0 -82
- package/dist/gdc-common-utils-ts/src/constants/service-capabilities.js +0 -105
- package/dist/gdc-common-utils-ts/src/constants/smart.d.ts +0 -12
- package/dist/gdc-common-utils-ts/src/constants/smart.js +0 -12
- package/dist/gdc-common-utils-ts/src/constants/urn.d.ts +0 -11
- package/dist/gdc-common-utils-ts/src/constants/urn.js +0 -11
- package/dist/gdc-common-utils-ts/src/constants/verifiable-credentials.d.ts +0 -34
- package/dist/gdc-common-utils-ts/src/constants/verifiable-credentials.js +0 -42
- package/dist/gdc-common-utils-ts/src/constants/vital-signs.d.ts +0 -75
- package/dist/gdc-common-utils-ts/src/constants/vital-signs.js +0 -33
- package/dist/gdc-common-utils-ts/src/examples/api-flow-examples.d.ts +0 -15
- package/dist/gdc-common-utils-ts/src/examples/api-flow-examples.js +0 -16
- package/dist/gdc-common-utils-ts/src/examples/communication-bundle-session.d.ts +0 -22
- package/dist/gdc-common-utils-ts/src/examples/communication-bundle-session.js +0 -81
- package/dist/gdc-common-utils-ts/src/examples/consent-access.d.ts +0 -30
- package/dist/gdc-common-utils-ts/src/examples/consent-access.js +0 -121
- package/dist/gdc-common-utils-ts/src/examples/contract-examples.d.ts +0 -15
- package/dist/gdc-common-utils-ts/src/examples/contract-examples.js +0 -16
- package/dist/gdc-common-utils-ts/src/examples/dataspace-discovery.d.ts +0 -98
- package/dist/gdc-common-utils-ts/src/examples/dataspace-discovery.js +0 -141
- package/dist/gdc-common-utils-ts/src/examples/frontend-session.d.ts +0 -13
- package/dist/gdc-common-utils-ts/src/examples/frontend-session.js +0 -24
- package/dist/gdc-common-utils-ts/src/examples/ica-activation-proof.d.ts +0 -64
- package/dist/gdc-common-utils-ts/src/examples/ica-activation-proof.js +0 -77
- package/dist/gdc-common-utils-ts/src/examples/index.d.ts +0 -14
- package/dist/gdc-common-utils-ts/src/examples/index.js +0 -14
- package/dist/gdc-common-utils-ts/src/examples/individual-controller.d.ts +0 -100
- package/dist/gdc-common-utils-ts/src/examples/individual-controller.js +0 -71
- package/dist/gdc-common-utils-ts/src/examples/lifecycle.d.ts +0 -505
- package/dist/gdc-common-utils-ts/src/examples/lifecycle.js +0 -291
- package/dist/gdc-common-utils-ts/src/examples/organization-controller.d.ts +0 -163
- package/dist/gdc-common-utils-ts/src/examples/organization-controller.js +0 -93
- package/dist/gdc-common-utils-ts/src/examples/professional.d.ts +0 -228
- package/dist/gdc-common-utils-ts/src/examples/professional.js +0 -324
- package/dist/gdc-common-utils-ts/src/examples/related-person.d.ts +0 -10
- package/dist/gdc-common-utils-ts/src/examples/related-person.js +0 -13
- package/dist/gdc-common-utils-ts/src/examples/relationship-access.d.ts +0 -11
- package/dist/gdc-common-utils-ts/src/examples/relationship-access.js +0 -96
- package/dist/gdc-common-utils-ts/src/examples/shared.d.ts +0 -220
- package/dist/gdc-common-utils-ts/src/examples/shared.js +0 -191
- package/dist/gdc-common-utils-ts/src/hmac.d.ts +0 -14
- package/dist/gdc-common-utils-ts/src/hmac.js +0 -24
- package/dist/gdc-common-utils-ts/src/i18n/clinical-sections.i18n.d.ts +0 -6
- package/dist/gdc-common-utils-ts/src/i18n/clinical-sections.i18n.js +0 -15
- package/dist/gdc-common-utils-ts/src/i18n/role-codes.i18n.d.ts +0 -4
- package/dist/gdc-common-utils-ts/src/i18n/role-codes.i18n.js +0 -13
- package/dist/gdc-common-utils-ts/src/index.d.ts +0 -10
- package/dist/gdc-common-utils-ts/src/index.js +0 -10
- package/dist/gdc-common-utils-ts/src/interfaces/Cryptography.types.d.ts +0 -139
- package/dist/gdc-common-utils-ts/src/interfaces/Cryptography.types.js +0 -8
- package/dist/gdc-common-utils-ts/src/interfaces/ICryptoHelper.d.ts +0 -28
- package/dist/gdc-common-utils-ts/src/interfaces/ICryptoHelper.js +0 -3
- package/dist/gdc-common-utils-ts/src/interfaces/ICryptography.d.ts +0 -154
- package/dist/gdc-common-utils-ts/src/interfaces/ICryptography.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/actor-session.d.ts +0 -9
- package/dist/gdc-common-utils-ts/src/models/actor-session.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/aes.d.ts +0 -85
- package/dist/gdc-common-utils-ts/src/models/aes.js +0 -10
- package/dist/gdc-common-utils-ts/src/models/auth.d.ts +0 -35
- package/dist/gdc-common-utils-ts/src/models/auth.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/bundle.d.ts +0 -153
- package/dist/gdc-common-utils-ts/src/models/bundle.js +0 -25
- package/dist/gdc-common-utils-ts/src/models/clinical-sections.d.ts +0 -36
- package/dist/gdc-common-utils-ts/src/models/clinical-sections.en.d.ts +0 -150
- package/dist/gdc-common-utils-ts/src/models/clinical-sections.en.js +0 -104
- package/dist/gdc-common-utils-ts/src/models/clinical-sections.js +0 -32
- package/dist/gdc-common-utils-ts/src/models/clinical-workbook-summary.d.ts +0 -126
- package/dist/gdc-common-utils-ts/src/models/clinical-workbook-summary.js +0 -67
- package/dist/gdc-common-utils-ts/src/models/comm.d.ts +0 -56
- package/dist/gdc-common-utils-ts/src/models/comm.js +0 -4
- package/dist/gdc-common-utils-ts/src/models/confidential-job.d.ts +0 -78
- package/dist/gdc-common-utils-ts/src/models/confidential-job.js +0 -20
- package/dist/gdc-common-utils-ts/src/models/confidential-message.d.ts +0 -97
- package/dist/gdc-common-utils-ts/src/models/confidential-message.js +0 -4
- package/dist/gdc-common-utils-ts/src/models/confidential-storage.d.ts +0 -134
- package/dist/gdc-common-utils-ts/src/models/confidential-storage.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/consent-access.d.ts +0 -79
- package/dist/gdc-common-utils-ts/src/models/consent-access.js +0 -2
- package/dist/gdc-common-utils-ts/src/models/consent-rule.d.ts +0 -122
- package/dist/gdc-common-utils-ts/src/models/consent-rule.js +0 -22
- package/dist/gdc-common-utils-ts/src/models/crypto.d.ts +0 -35
- package/dist/gdc-common-utils-ts/src/models/crypto.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/dataspace-discovery-defaults.d.ts +0 -79
- package/dist/gdc-common-utils-ts/src/models/dataspace-discovery-defaults.js +0 -2
- package/dist/gdc-common-utils-ts/src/models/dataspace-discovery.d.ts +0 -68
- package/dist/gdc-common-utils-ts/src/models/dataspace-discovery.js +0 -9
- package/dist/gdc-common-utils-ts/src/models/dataspace-protocol.d.ts +0 -14
- package/dist/gdc-common-utils-ts/src/models/dataspace-protocol.js +0 -2
- package/dist/gdc-common-utils-ts/src/models/device-license.d.ts +0 -134
- package/dist/gdc-common-utils-ts/src/models/device-license.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/did.d.ts +0 -108
- package/dist/gdc-common-utils-ts/src/models/did.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/fhir-documents.d.ts +0 -101
- package/dist/gdc-common-utils-ts/src/models/fhir-documents.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/identity-bootstrap.d.ts +0 -104
- package/dist/gdc-common-utils-ts/src/models/identity-bootstrap.js +0 -2
- package/dist/gdc-common-utils-ts/src/models/index.d.ts +0 -42
- package/dist/gdc-common-utils-ts/src/models/index.js +0 -42
- package/dist/gdc-common-utils-ts/src/models/indexing.d.ts +0 -11
- package/dist/gdc-common-utils-ts/src/models/indexing.js +0 -18
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/allergy-intolerance-claims.d.ts +0 -24
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/allergy-intolerance-claims.js +0 -36
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/communication-claims.d.ts +0 -53
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/communication-claims.js +0 -55
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/condition-claims.d.ts +0 -14
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/condition-claims.js +0 -25
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/device-use-statement-claims.d.ts +0 -13
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/device-use-statement-claims.js +0 -23
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/document-reference-claims.d.ts +0 -36
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/document-reference-claims.js +0 -89
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/medication-statement-claims.d.ts +0 -341
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/medication-statement-claims.js +0 -204
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/types.d.ts +0 -9
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/types.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims.d.ts +0 -5
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims.js +0 -7
- package/dist/gdc-common-utils-ts/src/models/issue.d.ts +0 -57
- package/dist/gdc-common-utils-ts/src/models/issue.js +0 -75
- package/dist/gdc-common-utils-ts/src/models/jsonapi.d.ts +0 -13
- package/dist/gdc-common-utils-ts/src/models/jsonapi.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/jwe.d.ts +0 -120
- package/dist/gdc-common-utils-ts/src/models/jwe.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/jwk.d.ts +0 -39
- package/dist/gdc-common-utils-ts/src/models/jwk.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/jws.d.ts +0 -35
- package/dist/gdc-common-utils-ts/src/models/jws.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/jwt.d.ts +0 -9
- package/dist/gdc-common-utils-ts/src/models/jwt.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/loinc-document-ontology.d.ts +0 -55
- package/dist/gdc-common-utils-ts/src/models/loinc-document-ontology.js +0 -58
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.common.model.d.ts +0 -33
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.common.model.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.document.model.d.ts +0 -50
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.document.model.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.electronicRecord.model.d.ts +0 -67
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.electronicRecord.model.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.evidence.model.d.ts +0 -51
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.evidence.model.js +0 -5
- package/dist/gdc-common-utils-ts/src/models/openid-device.d.ts +0 -119
- package/dist/gdc-common-utils-ts/src/models/openid-device.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/operation-outcome.d.ts +0 -26
- package/dist/gdc-common-utils-ts/src/models/operation-outcome.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/params.d.ts +0 -133
- package/dist/gdc-common-utils-ts/src/models/params.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/relationship-access.d.ts +0 -160
- package/dist/gdc-common-utils-ts/src/models/relationship-access.js +0 -21
- package/dist/gdc-common-utils-ts/src/models/resource-document.d.ts +0 -14
- package/dist/gdc-common-utils-ts/src/models/resource-document.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/response.d.ts +0 -1
- package/dist/gdc-common-utils-ts/src/models/response.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/urlPath.d.ts +0 -58
- package/dist/gdc-common-utils-ts/src/models/urlPath.js +0 -76
- package/dist/gdc-common-utils-ts/src/models/verifiable-credential.d.ts +0 -45
- package/dist/gdc-common-utils-ts/src/models/verifiable-credential.js +0 -8
- package/dist/gdc-common-utils-ts/src/storage/IVaultRepository.d.ts +0 -53
- package/dist/gdc-common-utils-ts/src/storage/IVaultRepository.js +0 -25
- package/dist/gdc-common-utils-ts/src/storage/VaultMemRepository.d.ts +0 -30
- package/dist/gdc-common-utils-ts/src/storage/VaultMemRepository.js +0 -81
- package/dist/gdc-common-utils-ts/src/storage/index.d.ts +0 -3
- package/dist/gdc-common-utils-ts/src/storage/index.js +0 -4
- package/dist/gdc-common-utils-ts/src/utils/activation-policy.d.ts +0 -86
- package/dist/gdc-common-utils-ts/src/utils/activation-policy.js +0 -218
- package/dist/gdc-common-utils-ts/src/utils/activation-request.d.ts +0 -81
- package/dist/gdc-common-utils-ts/src/utils/activation-request.js +0 -99
- package/dist/gdc-common-utils-ts/src/utils/actor.d.ts +0 -18
- package/dist/gdc-common-utils-ts/src/utils/actor.js +0 -36
- package/dist/gdc-common-utils-ts/src/utils/base-convert.d.ts +0 -60
- package/dist/gdc-common-utils-ts/src/utils/base-convert.js +0 -104
- package/dist/gdc-common-utils-ts/src/utils/baseN.d.ts +0 -35
- package/dist/gdc-common-utils-ts/src/utils/baseN.js +0 -174
- package/dist/gdc-common-utils-ts/src/utils/bundle-query.d.ts +0 -35
- package/dist/gdc-common-utils-ts/src/utils/bundle-query.js +0 -177
- package/dist/gdc-common-utils-ts/src/utils/bundle.d.ts +0 -13
- package/dist/gdc-common-utils-ts/src/utils/bundle.js +0 -39
- package/dist/gdc-common-utils-ts/src/utils/clinical-resource-converters.d.ts +0 -64
- package/dist/gdc-common-utils-ts/src/utils/clinical-resource-converters.js +0 -279
- package/dist/gdc-common-utils-ts/src/utils/clinical-resource-view.d.ts +0 -55
- package/dist/gdc-common-utils-ts/src/utils/clinical-resource-view.js +0 -291
- package/dist/gdc-common-utils-ts/src/utils/communication-bundle-session.d.ts +0 -110
- package/dist/gdc-common-utils-ts/src/utils/communication-bundle-session.js +0 -326
- package/dist/gdc-common-utils-ts/src/utils/communication-document-reference.d.ts +0 -41
- package/dist/gdc-common-utils-ts/src/utils/communication-document-reference.js +0 -170
- package/dist/gdc-common-utils-ts/src/utils/communication-fhir-r4.d.ts +0 -41
- package/dist/gdc-common-utils-ts/src/utils/communication-fhir-r4.js +0 -215
- package/dist/gdc-common-utils-ts/src/utils/communication-identity.d.ts +0 -152
- package/dist/gdc-common-utils-ts/src/utils/communication-identity.js +0 -121
- package/dist/gdc-common-utils-ts/src/utils/consent-claim-helpers.d.ts +0 -79
- package/dist/gdc-common-utils-ts/src/utils/consent-claim-helpers.js +0 -213
- package/dist/gdc-common-utils-ts/src/utils/consent.d.ts +0 -218
- package/dist/gdc-common-utils-ts/src/utils/consent.js +0 -679
- package/dist/gdc-common-utils-ts/src/utils/content.d.ts +0 -55
- package/dist/gdc-common-utils-ts/src/utils/content.js +0 -60
- package/dist/gdc-common-utils-ts/src/utils/dataspace-discovery-defaults.d.ts +0 -130
- package/dist/gdc-common-utils-ts/src/utils/dataspace-discovery-defaults.js +0 -307
- package/dist/gdc-common-utils-ts/src/utils/dataspace-discovery.d.ts +0 -235
- package/dist/gdc-common-utils-ts/src/utils/dataspace-discovery.js +0 -482
- package/dist/gdc-common-utils-ts/src/utils/dataspace-protocol.d.ts +0 -66
- package/dist/gdc-common-utils-ts/src/utils/dataspace-protocol.js +0 -109
- package/dist/gdc-common-utils-ts/src/utils/did-resolution.d.ts +0 -60
- package/dist/gdc-common-utils-ts/src/utils/did-resolution.js +0 -173
- package/dist/gdc-common-utils-ts/src/utils/did.d.ts +0 -124
- package/dist/gdc-common-utils-ts/src/utils/did.js +0 -204
- package/dist/gdc-common-utils-ts/src/utils/didcomm-submit-policy.d.ts +0 -10
- package/dist/gdc-common-utils-ts/src/utils/didcomm-submit-policy.js +0 -15
- package/dist/gdc-common-utils-ts/src/utils/didcomm-submit.d.ts +0 -48
- package/dist/gdc-common-utils-ts/src/utils/didcomm-submit.js +0 -81
- package/dist/gdc-common-utils-ts/src/utils/didcomm.d.ts +0 -60
- package/dist/gdc-common-utils-ts/src/utils/didcomm.js +0 -78
- package/dist/gdc-common-utils-ts/src/utils/discovery-normalization.d.ts +0 -28
- package/dist/gdc-common-utils-ts/src/utils/discovery-normalization.js +0 -64
- package/dist/gdc-common-utils-ts/src/utils/fhir-cid.d.ts +0 -60
- package/dist/gdc-common-utils-ts/src/utils/fhir-cid.js +0 -152
- package/dist/gdc-common-utils-ts/src/utils/fhir-validator.d.ts +0 -61
- package/dist/gdc-common-utils-ts/src/utils/fhir-validator.js +0 -91
- package/dist/gdc-common-utils-ts/src/utils/format-converter.d.ts +0 -21
- package/dist/gdc-common-utils-ts/src/utils/format-converter.js +0 -109
- package/dist/gdc-common-utils-ts/src/utils/index.d.ts +0 -39
- package/dist/gdc-common-utils-ts/src/utils/index.js +0 -39
- package/dist/gdc-common-utils-ts/src/utils/individual-form-pdf.d.ts +0 -55
- package/dist/gdc-common-utils-ts/src/utils/individual-form-pdf.js +0 -191
- package/dist/gdc-common-utils-ts/src/utils/jwt.d.ts +0 -53
- package/dist/gdc-common-utils-ts/src/utils/jwt.js +0 -154
- package/dist/gdc-common-utils-ts/src/utils/manager-error.d.ts +0 -15
- package/dist/gdc-common-utils-ts/src/utils/manager-error.js +0 -21
- package/dist/gdc-common-utils-ts/src/utils/medication-claim-helpers.d.ts +0 -56
- package/dist/gdc-common-utils-ts/src/utils/medication-claim-helpers.js +0 -127
- package/dist/gdc-common-utils-ts/src/utils/multibase58.d.ts +0 -13
- package/dist/gdc-common-utils-ts/src/utils/multibase58.js +0 -40
- package/dist/gdc-common-utils-ts/src/utils/multibasehash.d.ts +0 -8
- package/dist/gdc-common-utils-ts/src/utils/multibasehash.js +0 -23
- package/dist/gdc-common-utils-ts/src/utils/normalize-uuid.d.ts +0 -1
- package/dist/gdc-common-utils-ts/src/utils/normalize-uuid.js +0 -35
- package/dist/gdc-common-utils-ts/src/utils/normalize.d.ts +0 -16
- package/dist/gdc-common-utils-ts/src/utils/normalize.js +0 -40
- package/dist/gdc-common-utils-ts/src/utils/object-convert.d.ts +0 -20
- package/dist/gdc-common-utils-ts/src/utils/object-convert.js +0 -51
- package/dist/gdc-common-utils-ts/src/utils/smart-scope.d.ts +0 -28
- package/dist/gdc-common-utils-ts/src/utils/smart-scope.js +0 -29
- package/dist/gdc-common-utils-ts/src/utils/string-convert.d.ts +0 -24
- package/dist/gdc-common-utils-ts/src/utils/string-convert.js +0 -62
- package/dist/gdc-common-utils-ts/src/utils/string-utils.d.ts +0 -25
- package/dist/gdc-common-utils-ts/src/utils/string-utils.js +0 -66
- package/dist/gdc-common-utils-ts/src/utils/url.d.ts +0 -26
- package/dist/gdc-common-utils-ts/src/utils/url.js +0 -44
- package/dist/gdc-common-utils-ts/src/utils/vp-token.d.ts +0 -139
- package/dist/gdc-common-utils-ts/src/utils/vp-token.js +0 -256
- package/dist/gdc-sdk-core-ts/src/actor-model.d.ts +0 -56
- package/dist/gdc-sdk-core-ts/src/actor-model.js +0 -112
- package/dist/gdc-sdk-core-ts/src/app-identity.d.ts +0 -80
- package/dist/gdc-sdk-core-ts/src/app-identity.js +0 -147
- package/dist/gdc-sdk-core-ts/src/bootstrap-facade.d.ts +0 -165
- package/dist/gdc-sdk-core-ts/src/bootstrap-facade.js +0 -191
- package/dist/gdc-sdk-core-ts/src/communication-bundle-contracts.d.ts +0 -112
- package/dist/gdc-sdk-core-ts/src/communication-bundle-contracts.js +0 -185
- package/dist/gdc-sdk-core-ts/src/communication-bundle-resources.d.ts +0 -32
- package/dist/gdc-sdk-core-ts/src/communication-bundle-resources.js +0 -215
- package/dist/gdc-sdk-core-ts/src/communication-consent-mutation-contract.d.ts +0 -55
- package/dist/gdc-sdk-core-ts/src/communication-consent-mutation-contract.js +0 -190
- package/dist/gdc-sdk-core-ts/src/communication-document-facade.d.ts +0 -55
- package/dist/gdc-sdk-core-ts/src/communication-document-facade.js +0 -194
- package/dist/gdc-sdk-core-ts/src/communication-draft.d.ts +0 -104
- package/dist/gdc-sdk-core-ts/src/communication-draft.js +0 -143
- package/dist/gdc-sdk-core-ts/src/communication-outbox.d.ts +0 -49
- package/dist/gdc-sdk-core-ts/src/communication-outbox.js +0 -62
- package/dist/gdc-sdk-core-ts/src/communication-resource-helpers.d.ts +0 -180
- package/dist/gdc-sdk-core-ts/src/communication-resource-helpers.js +0 -455
- package/dist/gdc-sdk-core-ts/src/consent-access.d.ts +0 -73
- package/dist/gdc-sdk-core-ts/src/consent-access.js +0 -109
- package/dist/gdc-sdk-core-ts/src/consent-claim-helpers.d.ts +0 -5
- package/dist/gdc-sdk-core-ts/src/consent-claim-helpers.js +0 -6
- package/dist/gdc-sdk-core-ts/src/consent-communication-operations.d.ts +0 -82
- package/dist/gdc-sdk-core-ts/src/consent-communication-operations.js +0 -135
- package/dist/gdc-sdk-core-ts/src/did-resolution-session.d.ts +0 -33
- package/dist/gdc-sdk-core-ts/src/did-resolution-session.js +0 -56
- package/dist/gdc-sdk-core-ts/src/discovery-facade.d.ts +0 -84
- package/dist/gdc-sdk-core-ts/src/discovery-facade.js +0 -24
- package/dist/gdc-sdk-core-ts/src/identity-model.d.ts +0 -46
- package/dist/gdc-sdk-core-ts/src/identity-model.js +0 -2
- package/dist/gdc-sdk-core-ts/src/identity-store.d.ts +0 -83
- package/dist/gdc-sdk-core-ts/src/identity-store.js +0 -51
- package/dist/gdc-sdk-core-ts/src/index.d.ts +0 -23
- package/dist/gdc-sdk-core-ts/src/index.js +0 -24
- package/dist/gdc-sdk-core-ts/src/medication-claim-helpers.d.ts +0 -5
- package/dist/gdc-sdk-core-ts/src/medication-claim-helpers.js +0 -6
- package/dist/gdc-sdk-core-ts/src/polling-model.d.ts +0 -35
- package/dist/gdc-sdk-core-ts/src/polling-model.js +0 -24
- package/dist/gdc-sdk-core-ts/src/relationship-access.d.ts +0 -40
- package/dist/gdc-sdk-core-ts/src/relationship-access.js +0 -150
- package/dist/gdc-sdk-core-ts/src/session-model.d.ts +0 -134
- package/dist/gdc-sdk-core-ts/src/session-model.js +0 -2
- package/dist/gdc-sdk-core-ts/src/smart-endpoint-resolver.d.ts +0 -19
- package/dist/gdc-sdk-core-ts/src/smart-endpoint-resolver.js +0 -19
- package/dist/gdc-sdk-core-ts/src/vital-signs.d.ts +0 -38
- package/dist/gdc-sdk-core-ts/src/vital-signs.js +0 -155
- package/dist/gdc-sdk-front-ts/src/ClientSDK.d.ts +0 -99
- package/dist/gdc-sdk-front-ts/src/ClientSDK.js +0 -177
- package/dist/gdc-sdk-front-ts/src/ProfileManager.d.ts +0 -140
- package/dist/gdc-sdk-front-ts/src/ProfileManager.js +0 -76
- package/dist/gdc-sdk-front-ts/src/ProfileRegistry.d.ts +0 -11
- package/dist/gdc-sdk-front-ts/src/ProfileRegistry.js +0 -26
- package/dist/gdc-sdk-front-ts/src/VerifierService.d.ts +0 -6
- package/dist/gdc-sdk-front-ts/src/VerifierService.js +0 -10
- package/dist/gdc-sdk-front-ts/src/actor-session.d.ts +0 -2
- package/dist/gdc-sdk-front-ts/src/actor-session.js +0 -2
- package/dist/gdc-sdk-front-ts/src/capabilityMapper.d.ts +0 -8
- package/dist/gdc-sdk-front-ts/src/capabilityMapper.js +0 -28
- package/dist/gdc-sdk-front-ts/src/consent-claim-helpers.d.ts +0 -4
- package/dist/gdc-sdk-front-ts/src/consent-claim-helpers.js +0 -5
- package/dist/gdc-sdk-front-ts/src/discovery/DataspaceDiscoveryClient.d.ts +0 -54
- package/dist/gdc-sdk-front-ts/src/discovery/DataspaceDiscoveryClient.js +0 -85
- package/dist/gdc-sdk-front-ts/src/discovery/index.d.ts +0 -3
- package/dist/gdc-sdk-front-ts/src/discovery/index.js +0 -4
- package/dist/gdc-sdk-front-ts/src/discovery/mappers.d.ts +0 -29
- package/dist/gdc-sdk-front-ts/src/discovery/mappers.js +0 -60
- package/dist/gdc-sdk-front-ts/src/discovery/types.d.ts +0 -83
- package/dist/gdc-sdk-front-ts/src/discovery/types.js +0 -2
- package/dist/gdc-sdk-front-ts/src/index.d.ts +0 -15
- package/dist/gdc-sdk-front-ts/src/index.js +0 -16
- package/dist/gdc-sdk-front-ts/src/medication-claim-helpers.d.ts +0 -4
- package/dist/gdc-sdk-front-ts/src/medication-claim-helpers.js +0 -5
- package/dist/gdc-sdk-front-ts/src/roleRegistry.d.ts +0 -19
- package/dist/gdc-sdk-front-ts/src/roleRegistry.js +0 -2
- package/dist/gdc-sdk-front-ts/src/runtime-contracts.d.ts +0 -22
- package/dist/gdc-sdk-front-ts/src/runtime-contracts.js +0 -7
- package/dist/gdc-sdk-front-ts/src/services.d.ts +0 -167
- package/dist/gdc-sdk-front-ts/src/services.js +0 -78
- package/dist/gdc-sdk-front-ts/src/session-descriptor.d.ts +0 -11
- package/dist/gdc-sdk-front-ts/src/session-descriptor.js +0 -8
- package/dist/gdc-sdk-front-ts/src/types.d.ts +0 -11
- package/dist/gdc-sdk-front-ts/src/types.js +0 -1
- package/dist/lifecycle-examples.d.ts +0 -6
- package/dist/lifecycle-examples.js +0 -7
- package/dist/medication-claim-helpers.d.ts +0 -4
- package/dist/medication-claim-helpers.js +0 -5
- package/dist/orchestration/facades.d.ts +0 -65
- package/dist/orchestration/facades.js +0 -142
package/README.md
CHANGED
|
@@ -7,8 +7,11 @@ profile/session runtime logic, or orchestration tests.
|
|
|
7
7
|
Short rule:
|
|
8
8
|
|
|
9
9
|
- `101` tests must stay didactic and step by step
|
|
10
|
-
-
|
|
11
|
-
|
|
10
|
+
- `gdc-common-utils-ts` owns the canonical step-by-step editors/readers,
|
|
11
|
+
shared fixtures, and reusable payload examples
|
|
12
|
+
- `gdc-sdk-front-ts` starts at `ProfileRuntime -> loadProfile(...) ->
|
|
13
|
+
workspace/session -> actor facade` and only then handles frontend runtime
|
|
14
|
+
orchestration
|
|
12
15
|
|
|
13
16
|
Frontend runtime package for consuming the shared GDC SDK contracts in web or
|
|
14
17
|
mobile apps.
|
|
@@ -39,7 +42,8 @@ If you are integrating this package for the first time, open these in order:
|
|
|
39
42
|
Why `core`, `node`, and `front` are separate packages, what each one owns,
|
|
40
43
|
and why frontend facades should mirror backend actor boundaries.
|
|
41
44
|
1. [docs/101-SDK_INTEGRATION.md](./docs/101-SDK_INTEGRATION.md)
|
|
42
|
-
Real frontend/native setup,
|
|
45
|
+
Real frontend/native setup, injected runtime adapters, `loadProfile(...)`
|
|
46
|
+
into one loaded workspace/session, `new ClientSDK(...)`,
|
|
43
47
|
`initializeCommunicationIdentity(...)`, `initializeSession(...)`, and the
|
|
44
48
|
public actor entrypoints exposed by `ProfileManager.asXxx()`.
|
|
45
49
|
2. [gdc-sdk-core-ts/docs/101-SDK_FLOWS.md](https://github.com/Global-DataCare/gdc-sdk-core-ts/blob/main/docs/101-SDK_FLOWS.md)
|
|
@@ -72,6 +76,8 @@ If you need the shortest path:
|
|
|
72
76
|
[`ClientSDK`](src/ClientSDK.ts)
|
|
73
77
|
- profile/session bootstrap:
|
|
74
78
|
[`initializeSession(...)`](./docs/101-SDK_INTEGRATION.md)
|
|
79
|
+
- loaded profile workspace bootstrap:
|
|
80
|
+
`new ProfileRuntime(...).loadProfile(...)`
|
|
75
81
|
- first public actor entrypoints:
|
|
76
82
|
`session.asHostOnboarding()`, `session.asOrganizationController()`,
|
|
77
83
|
`session.asIndividualController()`, `session.asProfessional()`
|
package/dist/ClientSDK.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ProfileManager } from './ProfileManager.js';
|
|
2
2
|
import { ProfileRegistry } from './ProfileRegistry.js';
|
|
3
3
|
import type { AppInfo, InitializeSessionParams, IVerifier, IVaultRepository, ProfileRegistryEntry, SdkConfig } from './types.js';
|
|
4
|
-
import { type ResolvedAppInfo } from 'gdc-sdk-core-ts';
|
|
4
|
+
import { type AuthorityResolution, type AuthorityResolutionInput, type AuthorityResolver, type ResolvedAppInfo } from 'gdc-sdk-core-ts';
|
|
5
5
|
/**
|
|
6
6
|
* Frontend-facing SDK entry point for profile/session bootstrapping, lightweight
|
|
7
7
|
* provider discovery, and role-scoped session creation.
|
|
@@ -94,6 +94,16 @@ export declare class ClientSDK {
|
|
|
94
94
|
* Clears the current in-memory session reference.
|
|
95
95
|
*/
|
|
96
96
|
shutdownSession(): void;
|
|
97
|
+
/**
|
|
98
|
+
* Resolves one technical host/authority descriptor from business tenant
|
|
99
|
+
* context or one already-known subject/public identifier.
|
|
100
|
+
*
|
|
101
|
+
* Convenience rule:
|
|
102
|
+
* - browser/native callers should not have to handcraft `did:web`
|
|
103
|
+
* - pass a shared resolver when your app already preloaded one
|
|
104
|
+
* - without a resolver, the SDK falls back to the shared static/legacy rules
|
|
105
|
+
*/
|
|
106
|
+
resolveAuthority(input: AuthorityResolutionInput, resolver?: AuthorityResolver): Promise<AuthorityResolution>;
|
|
97
107
|
private resolveBaseUrl;
|
|
98
108
|
}
|
|
99
109
|
export type { InitializeSessionParams, ProfileRegistryEntry, };
|
package/dist/ClientSDK.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
2
|
import { ProfileManager } from './ProfileManager.js';
|
|
3
3
|
import { ProfileRegistry } from './ProfileRegistry.js';
|
|
4
|
-
import { buildAppHeaders, resolveAppInfo, } from 'gdc-sdk-core-ts';
|
|
4
|
+
import { StaticAuthorityResolver, buildAppHeaders, resolveAppInfo, } from 'gdc-sdk-core-ts';
|
|
5
5
|
/**
|
|
6
6
|
* Frontend-facing SDK entry point for profile/session bootstrapping, lightweight
|
|
7
7
|
* provider discovery, and role-scoped session creation.
|
|
@@ -154,6 +154,18 @@ export class ClientSDK {
|
|
|
154
154
|
shutdownSession() {
|
|
155
155
|
this.currentSession = null;
|
|
156
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Resolves one technical host/authority descriptor from business tenant
|
|
159
|
+
* context or one already-known subject/public identifier.
|
|
160
|
+
*
|
|
161
|
+
* Convenience rule:
|
|
162
|
+
* - browser/native callers should not have to handcraft `did:web`
|
|
163
|
+
* - pass a shared resolver when your app already preloaded one
|
|
164
|
+
* - without a resolver, the SDK falls back to the shared static/legacy rules
|
|
165
|
+
*/
|
|
166
|
+
async resolveAuthority(input, resolver = new StaticAuthorityResolver()) {
|
|
167
|
+
return resolver.resolveAuthority(input);
|
|
168
|
+
}
|
|
157
169
|
async resolveBaseUrl(source) {
|
|
158
170
|
const raw = String(source || '').trim();
|
|
159
171
|
if (!raw)
|
package/dist/ProfileManager.js
CHANGED
|
@@ -199,15 +199,18 @@ export class ProfileManager {
|
|
|
199
199
|
return this.individual.service.upsertRelatedPersonAndPoll(input.relatedPersonPayload, ctx.providerDid, ctx.requiredScope || '', ctx.idToken);
|
|
200
200
|
},
|
|
201
201
|
ingestCommunicationAndUpdateIndex: (ctx, input) => {
|
|
202
|
+
const communicationInput = input.communicationJob || input.communicationPayload;
|
|
203
|
+
if (!communicationInput)
|
|
204
|
+
throw new Error('Clinical ingestion requires communicationJob.');
|
|
202
205
|
if (this.professional?.physician) {
|
|
203
|
-
return this.professional.physician.ingestCommunicationAndUpdateIndex(
|
|
206
|
+
return this.professional.physician.ingestCommunicationAndUpdateIndex(communicationInput, ctx.providerDid, ctx.requiredScope || '', ctx.idToken, input.pathFormatSegment);
|
|
204
207
|
}
|
|
205
208
|
if (this.professional?.paramedic) {
|
|
206
|
-
return this.professional.paramedic.ingestCommunicationAndUpdateIndex(
|
|
209
|
+
return this.professional.paramedic.ingestCommunicationAndUpdateIndex(communicationInput, ctx.providerDid, ctx.requiredScope || '', ctx.idToken, input.pathFormatSegment);
|
|
207
210
|
}
|
|
208
211
|
if (!this.individual?.service)
|
|
209
212
|
throw new Error('individual.service is not available for this profile.');
|
|
210
|
-
return this.individual.service.ingestCommunicationAndUpdateIndex(
|
|
213
|
+
return this.individual.service.ingestCommunicationAndUpdateIndex(communicationInput, ctx.providerDid, ctx.requiredScope || '', ctx.idToken, input.pathFormatSegment);
|
|
211
214
|
},
|
|
212
215
|
generateDigitalTwinFromSubjectData: (ctx, input) => {
|
|
213
216
|
if (!this.individual?.service)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type RenderedTransportRequest, type CommunicationClinicalFormatRenderers, type SecureDidcommTransportAdapter, type SubmitAndPollResult, type TransportProfile } from 'gdc-sdk-core-ts';
|
|
2
|
+
import type { FrontClinicalBundleSearchInput, FrontCommunicationIngestionInput, FrontRouteContext, FrontRuntimeClient } from './orchestration/client-port.js';
|
|
3
|
+
export type FrontClinicalCarrierResponse = Readonly<{
|
|
4
|
+
status: number;
|
|
5
|
+
body: unknown;
|
|
6
|
+
location?: string;
|
|
7
|
+
retryAfterMs?: number;
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* Carrier-neutral request. HTTP, an offline sync queue, Bluetooth or another
|
|
11
|
+
* local link receives the same already-rendered protected message.
|
|
12
|
+
*/
|
|
13
|
+
export type FrontClinicalCarrierRequest = Readonly<{
|
|
14
|
+
phase: 'submit' | 'poll';
|
|
15
|
+
path: string;
|
|
16
|
+
authorization: string;
|
|
17
|
+
message: RenderedTransportRequest;
|
|
18
|
+
}>;
|
|
19
|
+
export type FrontClinicalCarrier = Readonly<{
|
|
20
|
+
/** Deliver an already-rendered message without decrypting or rebuilding it. */
|
|
21
|
+
send(request: FrontClinicalCarrierRequest): Promise<FrontClinicalCarrierResponse>;
|
|
22
|
+
}>;
|
|
23
|
+
export type FrontClinicalRuntimeClientOptions = Readonly<{
|
|
24
|
+
carrier: FrontClinicalCarrier;
|
|
25
|
+
transportProfile?: TransportProfile;
|
|
26
|
+
secureTransportAdapter?: SecureDidcommTransportAdapter;
|
|
27
|
+
/** Product-supplied projections not owned by the generic frontend runtime. */
|
|
28
|
+
communicationFormatRenderers?: CommunicationClinicalFormatRenderers;
|
|
29
|
+
accessToken?: string;
|
|
30
|
+
pollIntervalMs?: number;
|
|
31
|
+
pollTimeoutMs?: number;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Direct browser/mobile implementation of the canonical Node clinical surface.
|
|
35
|
+
*
|
|
36
|
+
* The client owns message rendering, SMART bearer use, thread correlation and
|
|
37
|
+
* polling. The carrier owns delivery only. An offline-first carrier persists
|
|
38
|
+
* `request.message` byte-for-byte with its `thid`; a Bluetooth carrier relays
|
|
39
|
+
* that persisted JWE without seeing FHIR or wallet keys.
|
|
40
|
+
*
|
|
41
|
+
* A native confidential app must inject an unlocked wallet-backed
|
|
42
|
+
* `secureTransportAdapter`. It should protect that wallet with the same
|
|
43
|
+
* PIN-plus-device envelope described by the Node profile contract, replacing
|
|
44
|
+
* Cloud KMS with Keychain/Keystore rather than weakening the KDF.
|
|
45
|
+
*/
|
|
46
|
+
export declare class FrontClinicalRuntimeClient implements FrontRuntimeClient {
|
|
47
|
+
private readonly options;
|
|
48
|
+
private readonly profile;
|
|
49
|
+
constructor(options: FrontClinicalRuntimeClientOptions);
|
|
50
|
+
ingestCommunicationAndUpdateIndex(ctx: FrontRouteContext, input: FrontCommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
51
|
+
searchClinicalBundle(ctx: FrontRouteContext, input: FrontClinicalBundleSearchInput): Promise<SubmitAndPollResult & {
|
|
52
|
+
thid: string;
|
|
53
|
+
}>;
|
|
54
|
+
getLatestIps(ctx: FrontRouteContext, subject: string): Promise<SubmitAndPollResult & {
|
|
55
|
+
thid: string;
|
|
56
|
+
}>;
|
|
57
|
+
private sendAndPoll;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Create the online HTTP carrier.
|
|
61
|
+
*
|
|
62
|
+
* Expo should inject a durable outbox carrier instead. That carrier may choose
|
|
63
|
+
* HTTP or Bluetooth at delivery time, but must preserve the rendered content
|
|
64
|
+
* type, exact form-encoded JWE and thread id.
|
|
65
|
+
*/
|
|
66
|
+
export declare function createFetchFrontClinicalCarrier(input: Readonly<{
|
|
67
|
+
baseUrl: string;
|
|
68
|
+
fetchImpl?: typeof fetch;
|
|
69
|
+
}>): FrontClinicalCarrier;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { TransportProfiles, decodeTransportResponse, renderCommunicationOutboxRequest, renderGatewayMessageRequest, renderTransportPollRequest, } from 'gdc-sdk-core-ts';
|
|
3
|
+
/**
|
|
4
|
+
* Direct browser/mobile implementation of the canonical Node clinical surface.
|
|
5
|
+
*
|
|
6
|
+
* The client owns message rendering, SMART bearer use, thread correlation and
|
|
7
|
+
* polling. The carrier owns delivery only. An offline-first carrier persists
|
|
8
|
+
* `request.message` byte-for-byte with its `thid`; a Bluetooth carrier relays
|
|
9
|
+
* that persisted JWE without seeing FHIR or wallet keys.
|
|
10
|
+
*
|
|
11
|
+
* A native confidential app must inject an unlocked wallet-backed
|
|
12
|
+
* `secureTransportAdapter`. It should protect that wallet with the same
|
|
13
|
+
* PIN-plus-device envelope described by the Node profile contract, replacing
|
|
14
|
+
* Cloud KMS with Keychain/Keystore rather than weakening the KDF.
|
|
15
|
+
*/
|
|
16
|
+
export class FrontClinicalRuntimeClient {
|
|
17
|
+
constructor(options) {
|
|
18
|
+
this.options = options;
|
|
19
|
+
this.profile = options.transportProfile || TransportProfiles.DidcommPlainJson;
|
|
20
|
+
}
|
|
21
|
+
async ingestCommunicationAndUpdateIndex(ctx, input) {
|
|
22
|
+
if (!input.communicationJob) {
|
|
23
|
+
throw new Error('Direct clinical ingestion requires communicationJob.');
|
|
24
|
+
}
|
|
25
|
+
const route = requireDirectRoute(ctx);
|
|
26
|
+
const format = normalizeFormat(input.clinicalFormat || input.pathFormatSegment);
|
|
27
|
+
const profile = input.transportProfile || this.profile;
|
|
28
|
+
const submit = await renderCommunicationOutboxRequest(input.communicationJob, profile, this.options.secureTransportAdapter, {
|
|
29
|
+
clinicalFormat: input.clinicalFormat || input.pathFormatSegment || 'api',
|
|
30
|
+
formatRenderers: this.options.communicationFormatRenderers,
|
|
31
|
+
});
|
|
32
|
+
return this.sendAndPoll(ctx, resourcePath(route, format, 'Communication', '_batch'), resourcePath(route, format, 'Communication', '_batch-response'), submit, profile, input.pollOptions);
|
|
33
|
+
}
|
|
34
|
+
async searchClinicalBundle(ctx, input) {
|
|
35
|
+
const route = requireDirectRoute(ctx);
|
|
36
|
+
const profile = input.transportProfile || this.profile;
|
|
37
|
+
const thid = input.requestThid || `bundle-search-${runtimeUuid()}`;
|
|
38
|
+
const message = await renderGatewayMessageRequest({
|
|
39
|
+
thid,
|
|
40
|
+
body: {
|
|
41
|
+
resourceType: 'Bundle',
|
|
42
|
+
type: 'batch',
|
|
43
|
+
entry: [{ request: { method: 'GET', url: buildBundleSearchQuery(input) } }],
|
|
44
|
+
},
|
|
45
|
+
}, profile, this.options.secureTransportAdapter);
|
|
46
|
+
const result = await this.sendAndPoll(ctx, resourcePath(route, 'org.hl7.fhir.r4', 'Bundle', '_search'), resourcePath(route, 'org.hl7.fhir.r4', 'Bundle', '_search-response'), message, profile, input.pollOptions);
|
|
47
|
+
return { thid, ...result };
|
|
48
|
+
}
|
|
49
|
+
getLatestIps(ctx, subject) {
|
|
50
|
+
return this.searchClinicalBundle(ctx, {
|
|
51
|
+
subject,
|
|
52
|
+
section: 'LOINC|60591-5',
|
|
53
|
+
includedTypes: ['Composition', 'DocumentReference'],
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
async sendAndPoll(ctx, submitPath, pollPath, submitMessage, profile, pollOptions) {
|
|
57
|
+
const authorization = requireSmartBearer(ctx, this.options.accessToken);
|
|
58
|
+
const submitted = await this.options.carrier.send({
|
|
59
|
+
phase: 'submit',
|
|
60
|
+
path: submitPath,
|
|
61
|
+
authorization,
|
|
62
|
+
message: submitMessage,
|
|
63
|
+
});
|
|
64
|
+
const submit = { status: submitted.status, location: submitted.location, body: submitted.body };
|
|
65
|
+
if (submitted.status !== 202) {
|
|
66
|
+
const body = await decodeTransportResponse(submitted.body, profile, this.options.secureTransportAdapter);
|
|
67
|
+
return { submit, poll: { status: submitted.status, body, attempts: 1 } };
|
|
68
|
+
}
|
|
69
|
+
const started = Date.now();
|
|
70
|
+
const timeoutMs = pollOptions?.timeoutMs ?? this.options.pollTimeoutMs ?? 30000;
|
|
71
|
+
const intervalMs = pollOptions?.intervalMs ?? this.options.pollIntervalMs ?? 500;
|
|
72
|
+
let attempts = 0;
|
|
73
|
+
while (Date.now() - started <= timeoutMs) {
|
|
74
|
+
attempts += 1;
|
|
75
|
+
const pollMessage = await renderTransportPollRequest(submitMessage.thid, profile, this.options.secureTransportAdapter);
|
|
76
|
+
const response = await this.options.carrier.send({
|
|
77
|
+
phase: 'poll',
|
|
78
|
+
path: pollPath,
|
|
79
|
+
authorization,
|
|
80
|
+
message: pollMessage,
|
|
81
|
+
});
|
|
82
|
+
if (response.status !== 202) {
|
|
83
|
+
return {
|
|
84
|
+
submit,
|
|
85
|
+
poll: {
|
|
86
|
+
status: response.status,
|
|
87
|
+
body: await decodeTransportResponse(response.body, profile, this.options.secureTransportAdapter),
|
|
88
|
+
attempts,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
await delay(response.retryAfterMs ?? intervalMs);
|
|
93
|
+
}
|
|
94
|
+
throw new Error(`Clinical transport polling timed out for thread '${submitMessage.thid}'.`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Create the online HTTP carrier.
|
|
99
|
+
*
|
|
100
|
+
* Expo should inject a durable outbox carrier instead. That carrier may choose
|
|
101
|
+
* HTTP or Bluetooth at delivery time, but must preserve the rendered content
|
|
102
|
+
* type, exact form-encoded JWE and thread id.
|
|
103
|
+
*/
|
|
104
|
+
export function createFetchFrontClinicalCarrier(input) {
|
|
105
|
+
const baseUrl = input.baseUrl.replace(/\/$/, '');
|
|
106
|
+
const fetchImpl = input.fetchImpl || fetch;
|
|
107
|
+
return {
|
|
108
|
+
async send(request) {
|
|
109
|
+
const response = await fetchImpl(`${baseUrl}${request.path}`, {
|
|
110
|
+
method: 'POST',
|
|
111
|
+
headers: {
|
|
112
|
+
Authorization: request.authorization,
|
|
113
|
+
'Content-Type': request.message.contentType,
|
|
114
|
+
Accept: request.message.accept,
|
|
115
|
+
},
|
|
116
|
+
body: typeof request.message.body === 'string'
|
|
117
|
+
? request.message.body
|
|
118
|
+
: JSON.stringify(request.message.body),
|
|
119
|
+
});
|
|
120
|
+
const text = await response.text();
|
|
121
|
+
return {
|
|
122
|
+
status: response.status,
|
|
123
|
+
body: parseCarrierBody(text),
|
|
124
|
+
location: response.headers.get('location') || undefined,
|
|
125
|
+
retryAfterMs: parseRetryAfter(response.headers.get('retry-after')),
|
|
126
|
+
};
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function requireDirectRoute(ctx) {
|
|
131
|
+
const tenantId = String(ctx.tenantId || '').trim();
|
|
132
|
+
const jurisdiction = String(ctx.jurisdiction || '').trim();
|
|
133
|
+
const sector = String(ctx.sector || '').trim();
|
|
134
|
+
if (!tenantId || !jurisdiction || !sector) {
|
|
135
|
+
throw new Error('Direct frontend clinical transport requires tenantId, jurisdiction and sector.');
|
|
136
|
+
}
|
|
137
|
+
return { tenantId, jurisdiction, sector };
|
|
138
|
+
}
|
|
139
|
+
function requireSmartBearer(ctx, fallback) {
|
|
140
|
+
const token = String(ctx.accessToken || fallback || '').trim();
|
|
141
|
+
if (!token)
|
|
142
|
+
throw new Error('Direct frontend clinical transport requires a SMART access token.');
|
|
143
|
+
return `Bearer ${token}`;
|
|
144
|
+
}
|
|
145
|
+
function resourcePath(route, format, resourceType, action) {
|
|
146
|
+
return `/${encodeURIComponent(route.tenantId)}/cds-${encodeURIComponent(route.jurisdiction)}/v1/${encodeURIComponent(route.sector)}/individual/${encodeURIComponent(format)}/${encodeURIComponent(resourceType)}/${encodeURIComponent(action)}`;
|
|
147
|
+
}
|
|
148
|
+
function normalizeFormat(value) {
|
|
149
|
+
const normalized = String(value || '').trim().toLowerCase();
|
|
150
|
+
if (!normalized || normalized === 'api' || normalized === 'org.hl7.fhir.api')
|
|
151
|
+
return 'org.hl7.fhir.api';
|
|
152
|
+
if (normalized === 'r4' || normalized === 'fhir.r4' || normalized === 'org.hl7.fhir.r4')
|
|
153
|
+
return 'org.hl7.fhir.r4';
|
|
154
|
+
if (/^org\.hl7\.fhir\.[a-z0-9.-]+$/.test(normalized))
|
|
155
|
+
return normalized;
|
|
156
|
+
throw new Error(`Unsupported Communication clinical format '${String(value || '')}'.`);
|
|
157
|
+
}
|
|
158
|
+
function buildBundleSearchQuery(input) {
|
|
159
|
+
const params = new URLSearchParams();
|
|
160
|
+
params.set('type', 'document');
|
|
161
|
+
params.set('subject', input.subject);
|
|
162
|
+
setCsv(params, 'composition.section', input.section);
|
|
163
|
+
setCsv(params, '_type', input.includedTypes);
|
|
164
|
+
if (input.date?.start)
|
|
165
|
+
params.set('start', input.date.start);
|
|
166
|
+
if (input.date?.end)
|
|
167
|
+
params.set('end', input.date.end);
|
|
168
|
+
setCsv(params, 'code', input.code);
|
|
169
|
+
setCsv(params, 'category', input.category);
|
|
170
|
+
setCsv(params, 'author', input.author);
|
|
171
|
+
if (input.thid)
|
|
172
|
+
params.set('thid', input.thid);
|
|
173
|
+
if (input.pthid)
|
|
174
|
+
params.set('pthid', input.pthid);
|
|
175
|
+
if (input.channelId)
|
|
176
|
+
params.set('channelId', input.channelId);
|
|
177
|
+
if (input.partOf)
|
|
178
|
+
params.set('part-of', input.partOf);
|
|
179
|
+
for (const [key, value] of Object.entries(input.extraSearchParams || {})) {
|
|
180
|
+
if (value !== undefined && value !== null && String(value).trim())
|
|
181
|
+
params.set(key, String(value));
|
|
182
|
+
}
|
|
183
|
+
return `Bundle?${params.toString()}`;
|
|
184
|
+
}
|
|
185
|
+
function setCsv(params, key, value) {
|
|
186
|
+
const normalized = (Array.isArray(value) ? value : value ? [value] : [])
|
|
187
|
+
.map((item) => String(item).trim())
|
|
188
|
+
.filter(Boolean)
|
|
189
|
+
.join(',');
|
|
190
|
+
if (normalized)
|
|
191
|
+
params.set(key, normalized);
|
|
192
|
+
}
|
|
193
|
+
function parseCarrierBody(value) {
|
|
194
|
+
if (!value)
|
|
195
|
+
return undefined;
|
|
196
|
+
try {
|
|
197
|
+
return JSON.parse(value);
|
|
198
|
+
}
|
|
199
|
+
catch {
|
|
200
|
+
return value;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function parseRetryAfter(value) {
|
|
204
|
+
if (!value)
|
|
205
|
+
return undefined;
|
|
206
|
+
const seconds = Number(value);
|
|
207
|
+
return Number.isFinite(seconds) ? seconds * 1000 : undefined;
|
|
208
|
+
}
|
|
209
|
+
function runtimeUuid() {
|
|
210
|
+
return globalThis.crypto?.randomUUID?.() || `${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
211
|
+
}
|
|
212
|
+
function delay(ms) {
|
|
213
|
+
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
214
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { LoadedActorProfile, ProfileLoadRequest, SubjectIndexCompositionRequest, SubjectIndexConnectionRequest, TrustedDeviceRegistrationRequest } from 'gdc-sdk-core-ts';
|
|
2
|
+
import { ProfileManager } from './ProfileManager.js';
|
|
3
|
+
import type { FrontendProfileRuntimeClient, FrontendSubjectIndexCompositionResult, FrontendSubjectIndexConnectionResult, FrontendTrustedDeviceRegistrationResult } from './frontend-profile-runtime.js';
|
|
4
|
+
import { HostOnboardingSdk } from './orchestration/host-onboarding-sdk.js';
|
|
5
|
+
import { IndividualControllerSdk } from './orchestration/individual-controller-sdk.js';
|
|
6
|
+
import { IndividualMemberSdk } from './orchestration/individual-member-sdk.js';
|
|
7
|
+
import { OrganizationControllerSdk } from './orchestration/organization-controller-sdk.js';
|
|
8
|
+
import { OrganizationEmployeeSdk } from './orchestration/organization-employee-sdk.js';
|
|
9
|
+
import { PersonalSdk } from './orchestration/personal-sdk.js';
|
|
10
|
+
import { ProfessionalSdk } from './orchestration/professional-sdk.js';
|
|
11
|
+
import type { FrontRuntimeClient } from './orchestration/client-port.js';
|
|
12
|
+
export type FrontendLoadedActorProfile = LoadedActorProfile & {
|
|
13
|
+
actorSession: ProfileManager;
|
|
14
|
+
};
|
|
15
|
+
export type LoadedProfile = FrontendLoadedActorProfile;
|
|
16
|
+
/**
|
|
17
|
+
* Frontend loaded-profile workspace that keeps the login/profile bootstrap
|
|
18
|
+
* steps explicit and then exposes actor-scoped facades from that loaded
|
|
19
|
+
* profile.
|
|
20
|
+
*/
|
|
21
|
+
export declare class LoadedProfileWorkspace {
|
|
22
|
+
readonly profile: FrontendLoadedActorProfile;
|
|
23
|
+
readonly actorSession: ProfileManager;
|
|
24
|
+
private readonly profileRuntime;
|
|
25
|
+
private readonly facadeClient?;
|
|
26
|
+
constructor(profileRuntime: FrontendProfileRuntimeClient, loadedProfile: LoadedActorProfile, facadeClient?: FrontRuntimeClient);
|
|
27
|
+
registerTrustedDevice(input: TrustedDeviceRegistrationRequest): Promise<FrontendTrustedDeviceRegistrationResult>;
|
|
28
|
+
connectToSubjectIndex(input: SubjectIndexConnectionRequest): Promise<FrontendSubjectIndexConnectionResult>;
|
|
29
|
+
getSubjectIndexComposition(input: SubjectIndexCompositionRequest): Promise<FrontendSubjectIndexCompositionResult>;
|
|
30
|
+
asHostOnboarding(): HostOnboardingSdk;
|
|
31
|
+
asOrganizationController(): OrganizationControllerSdk;
|
|
32
|
+
asOrganizationEmployee(): OrganizationEmployeeSdk;
|
|
33
|
+
asIndividualController(): IndividualControllerSdk;
|
|
34
|
+
asIndividualMember(): IndividualMemberSdk;
|
|
35
|
+
asPersonal(): PersonalSdk;
|
|
36
|
+
asProfessional(): ProfessionalSdk;
|
|
37
|
+
private requireFacadeClient;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Frontend counterpart to the backend loaded-profile runtime:
|
|
41
|
+
* inject adapters once, load one protected profile, then work from the
|
|
42
|
+
* returned workspace/session facade instead of one-off helper calls.
|
|
43
|
+
*/
|
|
44
|
+
export declare class ProfileRuntime {
|
|
45
|
+
private readonly profileRuntime;
|
|
46
|
+
private readonly facadeClient?;
|
|
47
|
+
constructor(profileRuntime: FrontendProfileRuntimeClient, facadeClient?: FrontRuntimeClient | undefined);
|
|
48
|
+
loadProfile(input: ProfileLoadRequest): Promise<LoadedProfileWorkspace>;
|
|
49
|
+
}
|
|
50
|
+
export declare function createLoadedProfileWorkspace(profileRuntime: FrontendProfileRuntimeClient, loadedProfile: LoadedActorProfile, facadeClient?: FrontRuntimeClient): LoadedProfileWorkspace;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated Prefer `LoadedProfileWorkspace`.
|
|
53
|
+
*/
|
|
54
|
+
export { LoadedProfileWorkspace as FrontendProfileWorkspace };
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Prefer `ProfileRuntime`.
|
|
57
|
+
*/
|
|
58
|
+
export { ProfileRuntime as FrontendProfileWorkspaceRuntime };
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated Prefer `createLoadedProfileWorkspace`.
|
|
61
|
+
*/
|
|
62
|
+
export { createLoadedProfileWorkspace as createFrontendProfileWorkspace };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { ActorKinds, } from 'gdc-common-utils-ts/constants/actor-session';
|
|
3
|
+
import { ProfileAppTypes } from 'gdc-common-utils-ts/constants';
|
|
4
|
+
import { ProfileManager } from './ProfileManager.js';
|
|
5
|
+
import { getFrontendSubjectIndexComposition, loadFrontendProfile, connectFrontendToSubjectIndex, registerFrontendTrustedDevice, } from './frontend-profile-runtime.js';
|
|
6
|
+
import { HostOnboardingSdk } from './orchestration/host-onboarding-sdk.js';
|
|
7
|
+
import { IndividualControllerSdk } from './orchestration/individual-controller-sdk.js';
|
|
8
|
+
import { IndividualMemberSdk } from './orchestration/individual-member-sdk.js';
|
|
9
|
+
import { OrganizationControllerSdk } from './orchestration/organization-controller-sdk.js';
|
|
10
|
+
import { OrganizationEmployeeSdk } from './orchestration/organization-employee-sdk.js';
|
|
11
|
+
import { PersonalSdk } from './orchestration/personal-sdk.js';
|
|
12
|
+
import { ProfessionalSdk } from './orchestration/professional-sdk.js';
|
|
13
|
+
function toSessionProfile(profile) {
|
|
14
|
+
const descriptor = profile.descriptor || {};
|
|
15
|
+
const id = String(descriptor.profileId
|
|
16
|
+
|| descriptor.profileDid
|
|
17
|
+
|| descriptor.subjectDid
|
|
18
|
+
|| descriptor.providerDid
|
|
19
|
+
|| 'frontend-profile').trim();
|
|
20
|
+
return {
|
|
21
|
+
id,
|
|
22
|
+
email: String(descriptor.email || '').trim(),
|
|
23
|
+
role: String(descriptor.actorRole || '').trim(),
|
|
24
|
+
providerDid: String(descriptor.providerDid || '').trim(),
|
|
25
|
+
appType: descriptor.appType || ProfileAppTypes.Family,
|
|
26
|
+
createdAt: new Date().toISOString(),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function requireActorKind(profile, actorKind) {
|
|
30
|
+
if (!profile.session.actorKinds.includes(actorKind)) {
|
|
31
|
+
throw new Error(`Loaded frontend profile does not expose actor kind '${actorKind}'.`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function requirePersonalCapability(profile) {
|
|
35
|
+
if (profile.session.actorKinds.includes(ActorKinds.IndividualController)
|
|
36
|
+
|| profile.session.actorKinds.includes(ActorKinds.IndividualMember)) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
throw new Error('Loaded frontend profile does not expose one personal-capable actor kind.');
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Frontend loaded-profile workspace that keeps the login/profile bootstrap
|
|
43
|
+
* steps explicit and then exposes actor-scoped facades from that loaded
|
|
44
|
+
* profile.
|
|
45
|
+
*/
|
|
46
|
+
export class LoadedProfileWorkspace {
|
|
47
|
+
constructor(profileRuntime, loadedProfile, facadeClient) {
|
|
48
|
+
this.profileRuntime = profileRuntime;
|
|
49
|
+
this.facadeClient = facadeClient;
|
|
50
|
+
this.actorSession = new ProfileManager(toSessionProfile(loadedProfile), String(loadedProfile.descriptor.providerDid || ''));
|
|
51
|
+
this.profile = {
|
|
52
|
+
...loadedProfile,
|
|
53
|
+
actorSession: this.actorSession,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
registerTrustedDevice(input) {
|
|
57
|
+
return registerFrontendTrustedDevice(this.profileRuntime, input);
|
|
58
|
+
}
|
|
59
|
+
connectToSubjectIndex(input) {
|
|
60
|
+
return connectFrontendToSubjectIndex(this.profileRuntime, input);
|
|
61
|
+
}
|
|
62
|
+
getSubjectIndexComposition(input) {
|
|
63
|
+
return getFrontendSubjectIndexComposition(this.profileRuntime, input);
|
|
64
|
+
}
|
|
65
|
+
asHostOnboarding() {
|
|
66
|
+
requireActorKind(this.profile, ActorKinds.HostOnboarding);
|
|
67
|
+
return new HostOnboardingSdk(this.requireFacadeClient('HostOnboardingSdk'));
|
|
68
|
+
}
|
|
69
|
+
asOrganizationController() {
|
|
70
|
+
requireActorKind(this.profile, ActorKinds.OrganizationController);
|
|
71
|
+
return new OrganizationControllerSdk(this.requireFacadeClient('OrganizationControllerSdk'));
|
|
72
|
+
}
|
|
73
|
+
asOrganizationEmployee() {
|
|
74
|
+
requireActorKind(this.profile, ActorKinds.OrganizationEmployee);
|
|
75
|
+
return new OrganizationEmployeeSdk(this.requireFacadeClient('OrganizationEmployeeSdk'));
|
|
76
|
+
}
|
|
77
|
+
asIndividualController() {
|
|
78
|
+
requireActorKind(this.profile, ActorKinds.IndividualController);
|
|
79
|
+
return new IndividualControllerSdk(this.requireFacadeClient('IndividualControllerSdk'));
|
|
80
|
+
}
|
|
81
|
+
asIndividualMember() {
|
|
82
|
+
requireActorKind(this.profile, ActorKinds.IndividualMember);
|
|
83
|
+
return new IndividualMemberSdk(this.requireFacadeClient('IndividualMemberSdk'));
|
|
84
|
+
}
|
|
85
|
+
asPersonal() {
|
|
86
|
+
requirePersonalCapability(this.profile);
|
|
87
|
+
return new PersonalSdk(this.requireFacadeClient('PersonalSdk'));
|
|
88
|
+
}
|
|
89
|
+
asProfessional() {
|
|
90
|
+
requireActorKind(this.profile, ActorKinds.Professional);
|
|
91
|
+
return new ProfessionalSdk(this.requireFacadeClient('ProfessionalSdk'));
|
|
92
|
+
}
|
|
93
|
+
requireFacadeClient(name) {
|
|
94
|
+
if (!this.facadeClient) {
|
|
95
|
+
throw new Error(`${name} requires one FrontRuntimeClient on the loaded frontend profile workspace.`);
|
|
96
|
+
}
|
|
97
|
+
return this.facadeClient;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Frontend counterpart to the backend loaded-profile runtime:
|
|
102
|
+
* inject adapters once, load one protected profile, then work from the
|
|
103
|
+
* returned workspace/session facade instead of one-off helper calls.
|
|
104
|
+
*/
|
|
105
|
+
export class ProfileRuntime {
|
|
106
|
+
constructor(profileRuntime, facadeClient) {
|
|
107
|
+
this.profileRuntime = profileRuntime;
|
|
108
|
+
this.facadeClient = facadeClient;
|
|
109
|
+
}
|
|
110
|
+
async loadProfile(input) {
|
|
111
|
+
const profile = await loadFrontendProfile(this.profileRuntime, input);
|
|
112
|
+
return new LoadedProfileWorkspace(this.profileRuntime, profile, this.facadeClient);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
export function createLoadedProfileWorkspace(profileRuntime, loadedProfile, facadeClient) {
|
|
116
|
+
return new LoadedProfileWorkspace(profileRuntime, loadedProfile, facadeClient);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* @deprecated Prefer `LoadedProfileWorkspace`.
|
|
120
|
+
*/
|
|
121
|
+
export { LoadedProfileWorkspace as FrontendProfileWorkspace };
|
|
122
|
+
/**
|
|
123
|
+
* @deprecated Prefer `ProfileRuntime`.
|
|
124
|
+
*/
|
|
125
|
+
export { ProfileRuntime as FrontendProfileWorkspaceRuntime };
|
|
126
|
+
/**
|
|
127
|
+
* @deprecated Prefer `createLoadedProfileWorkspace`.
|
|
128
|
+
*/
|
|
129
|
+
export { createLoadedProfileWorkspace as createFrontendProfileWorkspace };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,9 @@ export * from './ProfileRegistry.js';
|
|
|
13
13
|
export * from './UserProfileIndexStore.js';
|
|
14
14
|
export * from './ClientSDK.js';
|
|
15
15
|
export * from './frontend-profile-runtime.js';
|
|
16
|
+
export * from './frontend-profile-workspace.js';
|
|
16
17
|
export * from './individual-controller-frontend-runtime.js';
|
|
18
|
+
export * from './front-clinical-runtime-client.js';
|
|
17
19
|
export * from './discovery/index.js';
|
|
18
20
|
export * from './orchestration/client-port.js';
|
|
19
21
|
export * from './orchestration/host-onboarding-sdk.js';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,9 @@ export * from './ProfileRegistry.js';
|
|
|
14
14
|
export * from './UserProfileIndexStore.js';
|
|
15
15
|
export * from './ClientSDK.js';
|
|
16
16
|
export * from './frontend-profile-runtime.js';
|
|
17
|
+
export * from './frontend-profile-workspace.js';
|
|
17
18
|
export * from './individual-controller-frontend-runtime.js';
|
|
19
|
+
export * from './front-clinical-runtime-client.js';
|
|
18
20
|
export * from './discovery/index.js';
|
|
19
21
|
export * from './orchestration/client-port.js';
|
|
20
22
|
export * from './orchestration/host-onboarding-sdk.js';
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import type { SubmitAndPollResult } from 'gdc-sdk-core-ts';
|
|
2
2
|
import type { ProfileLoadRequest } from 'gdc-sdk-core-ts';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { ProfileManager } from './ProfileManager.js';
|
|
4
|
+
import { type LoadedProfileWorkspace } from './frontend-profile-workspace.js';
|
|
5
|
+
import type { FrontendProfileRuntimeClient } from './frontend-profile-runtime.js';
|
|
6
|
+
import type { IndividualControllerSdk } from './orchestration/individual-controller-sdk.js';
|
|
5
7
|
import type { FrontClinicalBundleSearchInput, FrontIndividualOrganizationBootstrapInput, FrontIndividualOrganizationConfirmOrderInput, FrontIndividualOrganizationStartResult, FrontRouteContext, FrontRuntimeClient } from './orchestration/client-port.js';
|
|
6
8
|
import type { LoadedActorProfile } from 'gdc-sdk-core-ts';
|
|
7
9
|
export type FrontendIndividualControllerProfile = {
|
|
8
|
-
profile: LoadedActorProfile
|
|
10
|
+
profile: LoadedActorProfile & {
|
|
11
|
+
actorSession: ProfileManager;
|
|
12
|
+
};
|
|
13
|
+
workspace: LoadedProfileWorkspace;
|
|
14
|
+
actorSession: ProfileManager;
|
|
9
15
|
sdk: IndividualControllerSdk;
|
|
10
16
|
};
|
|
11
17
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
2
|
import { ActorKinds } from 'gdc-common-utils-ts/constants/actor-session';
|
|
3
|
-
import {
|
|
4
|
-
import { IndividualControllerSdk } from './orchestration/individual-controller-sdk.js';
|
|
3
|
+
import { ProfileRuntime, } from './frontend-profile-workspace.js';
|
|
5
4
|
/**
|
|
6
5
|
* First pragmatic frontend use-case wrapper on top of the generic v2 profile
|
|
7
6
|
* runtime.
|
|
@@ -20,13 +19,15 @@ export class IndividualControllerFrontendRuntime {
|
|
|
20
19
|
* actor capability before materializing the facade.
|
|
21
20
|
*/
|
|
22
21
|
async loadProfile(input) {
|
|
23
|
-
const
|
|
24
|
-
if (!profile.session.actorKinds.includes(ActorKinds.IndividualController)) {
|
|
22
|
+
const workspace = await new ProfileRuntime(this.profileRuntime, this.facadeClient).loadProfile(input);
|
|
23
|
+
if (!workspace.profile.session.actorKinds.includes(ActorKinds.IndividualController)) {
|
|
25
24
|
throw new Error('Loaded frontend profile does not expose actor kind \'individual_controller\'.');
|
|
26
25
|
}
|
|
27
26
|
return {
|
|
28
|
-
profile,
|
|
29
|
-
|
|
27
|
+
profile: workspace.profile,
|
|
28
|
+
workspace,
|
|
29
|
+
actorSession: workspace.actorSession,
|
|
30
|
+
sdk: workspace.asIndividualController(),
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
/**
|