gdc-sdk-front-ts 2.2.1 → 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/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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- 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
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
// Always create JSDoc, do not use strings inline in keys nor values, use types instead, and reuse the data test examples.
|
|
2
|
-
import { CommunicationClaim } from '../models/interoperable-claims/communication-claims';
|
|
3
|
-
import { validateFhirResource } from './fhir-validator';
|
|
4
|
-
/**
|
|
5
|
-
* Validates a FHIR R4 `Communication` resource through the configured validator pipeline.
|
|
6
|
-
*
|
|
7
|
-
* @param resource Candidate FHIR R4 `Communication` resource.
|
|
8
|
-
*/
|
|
9
|
-
export async function validateCommunicationResourceFhirR4(resource) {
|
|
10
|
-
return validateFhirResource(resource, 'r4');
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Transforms canonical communication claims into FHIR R4 `Communication` resources.
|
|
14
|
-
*
|
|
15
|
-
* @param communicationClaims Flat canonical claims rows to convert.
|
|
16
|
-
* @param options.mode `strict` throws on ambiguous/invalid shapes, `normalize` keeps best-effort output.
|
|
17
|
-
* @param options.defaultStatus Default FHIR status when none is provided.
|
|
18
|
-
*/
|
|
19
|
-
export function transformCommunicationClaimsToResourceFhirR4(communicationClaims, options = {}) {
|
|
20
|
-
// Good practice note:
|
|
21
|
-
// use `CommunicationClaim` for canonical claim keys whenever this helper
|
|
22
|
-
// writes or reads reusable Communication claims. Keep string literals only
|
|
23
|
-
// for explicit legacy-compatibility aliases such as `Communication.partOf`.
|
|
24
|
-
const mode = options.mode ?? 'strict';
|
|
25
|
-
const defaultStatus = options.defaultStatus ?? 'completed';
|
|
26
|
-
const warnings = [];
|
|
27
|
-
const resources = communicationClaims.map((claims, index) => {
|
|
28
|
-
const payloadAttachmentData = toStringOrUndefined(claims[CommunicationClaim.ContentAttachmentData]);
|
|
29
|
-
const payloadAttachmentType = toStringOrUndefined(claims[CommunicationClaim.ContentAttachmentType]);
|
|
30
|
-
const payloadAttachmentTitle = toStringOrUndefined(claims[CommunicationClaim.ContentAttachmentTitle]);
|
|
31
|
-
const payloadAttachmentUrl = toStringOrUndefined(claims[CommunicationClaim.ContentAttachmentUrl]);
|
|
32
|
-
const payloadReference = toStringOrUndefined(claims[CommunicationClaim.ContentReference]);
|
|
33
|
-
const payloadCodeRaw = toStringOrUndefined(claims[CommunicationClaim.ContentCode]);
|
|
34
|
-
const hasAttachment = Boolean(payloadAttachmentData || payloadAttachmentType || payloadAttachmentTitle || payloadAttachmentUrl);
|
|
35
|
-
const hasReference = Boolean(payloadReference);
|
|
36
|
-
const hasCode = Boolean(payloadCodeRaw);
|
|
37
|
-
const payloadKinds = [hasAttachment, hasReference, hasCode].filter(Boolean).length;
|
|
38
|
-
if (payloadKinds > 1) {
|
|
39
|
-
const msg = `Communication[${index}] has more than one payload kind (attachment/reference/code).`;
|
|
40
|
-
if (mode === 'strict')
|
|
41
|
-
throw new Error(msg);
|
|
42
|
-
warnings.push(`${msg} Keeping attachment > reference > code.`);
|
|
43
|
-
}
|
|
44
|
-
const noteValues = normalizeNoteValues(claims[CommunicationClaim.NoteText]
|
|
45
|
-
?? claims['Communication.note']
|
|
46
|
-
?? claims[CommunicationClaim.Text]);
|
|
47
|
-
if (noteValues.length > 1) {
|
|
48
|
-
const msg = `Communication[${index}] has more than one note.`;
|
|
49
|
-
if (mode === 'strict')
|
|
50
|
-
throw new Error(msg);
|
|
51
|
-
warnings.push(`${msg} Keeping first note only.`);
|
|
52
|
-
}
|
|
53
|
-
const payload = buildPayload({
|
|
54
|
-
hasAttachment,
|
|
55
|
-
hasReference,
|
|
56
|
-
hasCode,
|
|
57
|
-
payloadAttachmentData,
|
|
58
|
-
payloadAttachmentType,
|
|
59
|
-
payloadAttachmentTitle,
|
|
60
|
-
payloadAttachmentUrl,
|
|
61
|
-
payloadReference,
|
|
62
|
-
payloadCodeRaw,
|
|
63
|
-
});
|
|
64
|
-
const partOf = toStringOrUndefined(claims[CommunicationClaim.PartOf] ?? claims['Communication.partOf']);
|
|
65
|
-
if (claims['Communication.partOf'] !== undefined) {
|
|
66
|
-
const msg = `Communication[${index}] uses legacy key 'Communication.partOf'. Use 'Communication.part-of'.`;
|
|
67
|
-
if (mode === 'strict')
|
|
68
|
-
throw new Error(msg);
|
|
69
|
-
warnings.push(msg);
|
|
70
|
-
}
|
|
71
|
-
const resource = {
|
|
72
|
-
resourceType: 'Communication',
|
|
73
|
-
status: toStringOrUndefined(claims[CommunicationClaim.Status]) || defaultStatus,
|
|
74
|
-
meta: {
|
|
75
|
-
claims: { ...claims },
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
const identifier = toStringOrUndefined(claims[CommunicationClaim.Identifier]);
|
|
79
|
-
if (identifier)
|
|
80
|
-
resource['identifier'] = [{ value: identifier }];
|
|
81
|
-
const sent = toStringOrUndefined(claims[CommunicationClaim.Sent]);
|
|
82
|
-
if (sent)
|
|
83
|
-
resource['sent'] = sent;
|
|
84
|
-
const category = toStringOrUndefined(claims[CommunicationClaim.Category]);
|
|
85
|
-
if (category)
|
|
86
|
-
resource['category'] = [{ coding: [parseSystemCode(category)] }];
|
|
87
|
-
const subject = toStringOrUndefined(claims[CommunicationClaim.Subject]);
|
|
88
|
-
if (subject)
|
|
89
|
-
resource['subject'] = { reference: subject };
|
|
90
|
-
const recipient = toStringOrUndefined(claims[CommunicationClaim.Recipient]);
|
|
91
|
-
if (recipient)
|
|
92
|
-
resource['recipient'] = [{ reference: recipient }];
|
|
93
|
-
const sender = toStringOrUndefined(claims[CommunicationClaim.Sender]);
|
|
94
|
-
if (sender)
|
|
95
|
-
resource['sender'] = { reference: sender };
|
|
96
|
-
if (partOf)
|
|
97
|
-
resource['partOf'] = [{ reference: partOf }];
|
|
98
|
-
if (payload)
|
|
99
|
-
resource['payload'] = [payload];
|
|
100
|
-
if (noteValues.length)
|
|
101
|
-
resource['note'] = [{ text: noteValues[0] }];
|
|
102
|
-
return resource;
|
|
103
|
-
});
|
|
104
|
-
return { resources, warnings };
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Extracts canonical communication claims from a FHIR R4 `Communication` resource.
|
|
108
|
-
*
|
|
109
|
-
* @param resource FHIR R4 `Communication` resource.
|
|
110
|
-
* @param options.preferMetaClaims When true, existing `resource.meta.claims` wins over structural extraction.
|
|
111
|
-
*/
|
|
112
|
-
export function extractCommunicationClaimsFromResourceFhirR4(resource, options = {}) {
|
|
113
|
-
const preferMetaClaims = options.preferMetaClaims !== false;
|
|
114
|
-
const existingClaims = resource?.meta?.claims;
|
|
115
|
-
if (preferMetaClaims && existingClaims && typeof existingClaims === 'object') {
|
|
116
|
-
return { ...existingClaims };
|
|
117
|
-
}
|
|
118
|
-
const claims = {};
|
|
119
|
-
claims['@context'] = 'org.hl7.fhir.r4';
|
|
120
|
-
const identifierValue = resource?.identifier?.[0]?.value;
|
|
121
|
-
const status = resource?.status;
|
|
122
|
-
const sent = resource?.sent;
|
|
123
|
-
const subjectRef = resource?.subject?.reference;
|
|
124
|
-
const recipientRef = resource?.recipient?.[0]?.reference;
|
|
125
|
-
const senderRef = resource?.sender?.reference;
|
|
126
|
-
const partOfRef = resource?.partOf?.[0]?.reference;
|
|
127
|
-
const noteText = resource?.note?.[0]?.text;
|
|
128
|
-
const categoryCoding = resource?.category?.[0]?.coding?.[0];
|
|
129
|
-
const payload = resource?.payload?.[0];
|
|
130
|
-
const contentReference = payload?.contentReference?.reference;
|
|
131
|
-
const contentAttachment = payload?.contentAttachment;
|
|
132
|
-
const contentCodeableConcept = payload?.contentCodeableConcept?.coding?.[0];
|
|
133
|
-
setIf(claims, CommunicationClaim.Identifier, identifierValue);
|
|
134
|
-
setIf(claims, CommunicationClaim.Status, status);
|
|
135
|
-
setIf(claims, CommunicationClaim.Sent, sent);
|
|
136
|
-
setIf(claims, CommunicationClaim.Subject, subjectRef);
|
|
137
|
-
setIf(claims, CommunicationClaim.Recipient, recipientRef);
|
|
138
|
-
setIf(claims, CommunicationClaim.Sender, senderRef);
|
|
139
|
-
setIf(claims, CommunicationClaim.PartOf, partOfRef);
|
|
140
|
-
setIf(claims, CommunicationClaim.NoteText, noteText);
|
|
141
|
-
setIf(claims, CommunicationClaim.Text, noteText);
|
|
142
|
-
if (categoryCoding) {
|
|
143
|
-
const system = toStringOrUndefined(categoryCoding.system);
|
|
144
|
-
const code = toStringOrUndefined(categoryCoding.code);
|
|
145
|
-
if (system && code)
|
|
146
|
-
claims[CommunicationClaim.Category] = `${system}|${code}`;
|
|
147
|
-
else if (code)
|
|
148
|
-
claims[CommunicationClaim.Category] = code;
|
|
149
|
-
}
|
|
150
|
-
setIf(claims, CommunicationClaim.ContentReference, contentReference);
|
|
151
|
-
if (contentAttachment) {
|
|
152
|
-
setIf(claims, CommunicationClaim.ContentAttachmentData, contentAttachment.data);
|
|
153
|
-
setIf(claims, CommunicationClaim.ContentAttachmentType, contentAttachment.contentType);
|
|
154
|
-
setIf(claims, CommunicationClaim.ContentAttachmentTitle, contentAttachment.title);
|
|
155
|
-
setIf(claims, CommunicationClaim.ContentAttachmentUrl, contentAttachment.url);
|
|
156
|
-
}
|
|
157
|
-
if (contentCodeableConcept) {
|
|
158
|
-
const system = toStringOrUndefined(contentCodeableConcept.system);
|
|
159
|
-
const code = toStringOrUndefined(contentCodeableConcept.code);
|
|
160
|
-
if (system && code)
|
|
161
|
-
claims[CommunicationClaim.ContentCode] = `${system}|${code}`;
|
|
162
|
-
else if (code)
|
|
163
|
-
claims[CommunicationClaim.ContentCode] = code;
|
|
164
|
-
}
|
|
165
|
-
return claims;
|
|
166
|
-
}
|
|
167
|
-
function setIf(claims, key, value) {
|
|
168
|
-
const text = toStringOrUndefined(value);
|
|
169
|
-
if (text)
|
|
170
|
-
claims[key] = text;
|
|
171
|
-
}
|
|
172
|
-
function normalizeNoteValues(raw) {
|
|
173
|
-
if (typeof raw === 'string' && raw.trim())
|
|
174
|
-
return [raw.trim()];
|
|
175
|
-
if (Array.isArray(raw)) {
|
|
176
|
-
return raw.map((item) => (typeof item === 'string' ? item.trim() : '')).filter(Boolean);
|
|
177
|
-
}
|
|
178
|
-
return [];
|
|
179
|
-
}
|
|
180
|
-
function buildPayload(input) {
|
|
181
|
-
const { hasAttachment, hasReference, hasCode, payloadAttachmentData, payloadAttachmentType, payloadAttachmentTitle, payloadAttachmentUrl, payloadReference, payloadCodeRaw, } = input;
|
|
182
|
-
if (hasAttachment) {
|
|
183
|
-
const value = {};
|
|
184
|
-
if (payloadAttachmentData)
|
|
185
|
-
value['data'] = payloadAttachmentData;
|
|
186
|
-
if (payloadAttachmentType)
|
|
187
|
-
value['contentType'] = payloadAttachmentType;
|
|
188
|
-
if (payloadAttachmentTitle)
|
|
189
|
-
value['title'] = payloadAttachmentTitle;
|
|
190
|
-
if (payloadAttachmentUrl)
|
|
191
|
-
value['url'] = payloadAttachmentUrl;
|
|
192
|
-
return { contentAttachment: value };
|
|
193
|
-
}
|
|
194
|
-
if (hasReference)
|
|
195
|
-
return { contentReference: { reference: payloadReference } };
|
|
196
|
-
if (hasCode && payloadCodeRaw)
|
|
197
|
-
return { contentCodeableConcept: { coding: [parseSystemCode(payloadCodeRaw)] } };
|
|
198
|
-
return undefined;
|
|
199
|
-
}
|
|
200
|
-
function parseSystemCode(value) {
|
|
201
|
-
const trimmed = String(value || '').trim();
|
|
202
|
-
const separatorIndex = trimmed.indexOf('|');
|
|
203
|
-
if (separatorIndex > 0) {
|
|
204
|
-
const system = trimmed.slice(0, separatorIndex).trim();
|
|
205
|
-
const code = trimmed.slice(separatorIndex + 1).trim();
|
|
206
|
-
return { system, code };
|
|
207
|
-
}
|
|
208
|
-
return { code: trimmed };
|
|
209
|
-
}
|
|
210
|
-
function toStringOrUndefined(value) {
|
|
211
|
-
if (value === undefined || value === null)
|
|
212
|
-
return undefined;
|
|
213
|
-
const text = String(value).trim();
|
|
214
|
-
return text || undefined;
|
|
215
|
-
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { ICryptography } from '../interfaces/ICryptography';
|
|
2
|
-
import { MlkemPublicJwk, MldsaAlg, MldsaPublicJwk, MlkemCurve } from '../interfaces/Cryptography.types';
|
|
3
|
-
import { ProtectedHeadersJWE } from '../models/jwe';
|
|
4
|
-
import { JwsHeader } from '../models/jws';
|
|
5
|
-
import { JwkKeyUses } from '../constants/cryptography';
|
|
6
|
-
export type CommunicationIdentityBootstrapMode = 'deterministic' | 'random';
|
|
7
|
-
export interface CommunicationIdentityBootstrapOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Stable logical identifier of the technical communication profile.
|
|
10
|
-
*
|
|
11
|
-
* This is not the legal organization id, not the tenant id, and not the
|
|
12
|
-
* human controller identity.
|
|
13
|
-
*
|
|
14
|
-
* Treat it as the id of the technical channel/runtime/device profile that
|
|
15
|
-
* owns the communication keys for this app/service.
|
|
16
|
-
*
|
|
17
|
-
* Good examples:
|
|
18
|
-
* - `portal.acme.org:acme-id:web-channel`
|
|
19
|
-
* - `portal.acme.org:acme-id:backend-runtime`
|
|
20
|
-
* - `mobile.acme.app:user-42:device-primary`
|
|
21
|
-
*
|
|
22
|
-
* This value is metadata for the caller. It is not used as implicit seed
|
|
23
|
-
* material.
|
|
24
|
-
*/
|
|
25
|
-
entityId: string;
|
|
26
|
-
/**
|
|
27
|
-
* Raw seed material used as the deterministic bootstrap source.
|
|
28
|
-
*
|
|
29
|
-
* Use this when the device/app/portal keeps an explicit seed in a wallet or
|
|
30
|
-
* secure store and wants communication keys to be derived from that seed.
|
|
31
|
-
*
|
|
32
|
-
* When omitted, the helper defaults to random key generation unless the
|
|
33
|
-
* caller explicitly requests `mode = deterministic`, in which case an error
|
|
34
|
-
* is thrown.
|
|
35
|
-
*/
|
|
36
|
-
seedMaterial?: string | Uint8Array;
|
|
37
|
-
/**
|
|
38
|
-
* Stateless crypto engine implementation used to derive ML-DSA and ML-KEM keys.
|
|
39
|
-
*/
|
|
40
|
-
cryptography: ICryptography;
|
|
41
|
-
/**
|
|
42
|
-
* Bootstrap mode.
|
|
43
|
-
*
|
|
44
|
-
* - `deterministic` requires `seedMaterial`
|
|
45
|
-
* - `random` delegates seed generation to the cryptography engine
|
|
46
|
-
*
|
|
47
|
-
* When omitted:
|
|
48
|
-
* - `seedMaterial` present => `deterministic`
|
|
49
|
-
* - `seedMaterial` absent => `random`
|
|
50
|
-
*/
|
|
51
|
-
mode?: CommunicationIdentityBootstrapMode;
|
|
52
|
-
/**
|
|
53
|
-
* Include a separate VC signing key pair in addition to the communication
|
|
54
|
-
* signing and encryption keys.
|
|
55
|
-
*/
|
|
56
|
-
includeVcSigningKey?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Override the communication signing algorithm when needed.
|
|
59
|
-
*/
|
|
60
|
-
communicationSigningAlg?: MldsaAlg;
|
|
61
|
-
/**
|
|
62
|
-
* Override the VC signing algorithm when needed.
|
|
63
|
-
*/
|
|
64
|
-
vcSigningAlg?: MldsaAlg;
|
|
65
|
-
/**
|
|
66
|
-
* Override the communication encryption curve when needed.
|
|
67
|
-
*/
|
|
68
|
-
encryptionCurve?: MlkemCurve;
|
|
69
|
-
}
|
|
70
|
-
export interface ManagedMldsaKeyPair {
|
|
71
|
-
/**
|
|
72
|
-
* Public ML-DSA JWK enriched with canonical JOSE `use` and logical `purpose`.
|
|
73
|
-
*/
|
|
74
|
-
publicJWKey: MldsaPublicJwk & {
|
|
75
|
-
kid: string;
|
|
76
|
-
use: typeof JwkKeyUses.Signature;
|
|
77
|
-
purpose: string;
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* Private ML-DSA bytes kept in memory by the caller or wallet layer.
|
|
81
|
-
*/
|
|
82
|
-
secretKeyBytes: Uint8Array;
|
|
83
|
-
}
|
|
84
|
-
export interface ManagedMlkemKeyPair {
|
|
85
|
-
/**
|
|
86
|
-
* Public ML-KEM JWK enriched with canonical JOSE `use`.
|
|
87
|
-
*/
|
|
88
|
-
publicJWKey: MlkemPublicJwk & {
|
|
89
|
-
kid: string;
|
|
90
|
-
use: typeof JwkKeyUses.Encryption;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* Private ML-KEM bytes kept in memory by the caller or wallet layer.
|
|
94
|
-
*/
|
|
95
|
-
secretKeyBytes: Uint8Array;
|
|
96
|
-
}
|
|
97
|
-
export interface CommunicationIdentityBootstrapResult {
|
|
98
|
-
/**
|
|
99
|
-
* Technical signing key pair for communication envelopes.
|
|
100
|
-
*/
|
|
101
|
-
commSigningKeyPair: ManagedMldsaKeyPair;
|
|
102
|
-
/**
|
|
103
|
-
* Optional separate signing key pair for VC issuance/verification workflows.
|
|
104
|
-
*/
|
|
105
|
-
vcSigningKeyPair?: ManagedMldsaKeyPair;
|
|
106
|
-
/**
|
|
107
|
-
* Technical encryption key pair for communication envelopes.
|
|
108
|
-
*/
|
|
109
|
-
commEncryptionKeyPair: ManagedMlkemKeyPair;
|
|
110
|
-
/**
|
|
111
|
-
* Ready-to-use JOSE header templates matching the current DIDComm metadata
|
|
112
|
-
* nesting used by GDC (`meta.jws.protected` and `meta.jwe.header`).
|
|
113
|
-
*/
|
|
114
|
-
headers: {
|
|
115
|
-
jwsProtected: JwsHeader;
|
|
116
|
-
jweHeader: ProtectedHeadersJWE;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Bootstraps the technical communication identity for a portal, device, or app
|
|
121
|
-
* profile from an explicit seed source. This supports deterministic derivation
|
|
122
|
-
* when a caller provides seed material, while also supporting random mode for
|
|
123
|
-
* production runtimes.
|
|
124
|
-
*
|
|
125
|
-
* This helper creates transport identity only. It does not bootstrap the
|
|
126
|
-
* human/person signing identity used for controller/professional/individual
|
|
127
|
-
* authorization decisions.
|
|
128
|
-
*
|
|
129
|
-
* Conceptual split:
|
|
130
|
-
* - `appId` identifies the application towards GW CORE headers/policy
|
|
131
|
-
* - `entityId` identifies the local technical communication profile that owns
|
|
132
|
-
* transport keys
|
|
133
|
-
* - controller/professional/subject DIDs identify domain actors
|
|
134
|
-
*
|
|
135
|
-
* The returned JOSE header templates match the current DIDComm metadata contract:
|
|
136
|
-
* `meta.jws.protected` and `meta.jwe.header`.
|
|
137
|
-
*
|
|
138
|
-
* @param options.entityId Stable logical identity of the technical
|
|
139
|
-
* communication profile or channel runtime.
|
|
140
|
-
* @param options.seedMaterial Explicit seed material for deterministic derivation.
|
|
141
|
-
* @param options.cryptography Stateless crypto engine implementation.
|
|
142
|
-
* @param options.mode Deterministic or random seed derivation mode.
|
|
143
|
-
* @param options.includeVcSigningKey Whether to derive a separate VC signing key pair.
|
|
144
|
-
* @param options.communicationSigningAlg Optional override for the communication ML-DSA algorithm.
|
|
145
|
-
* @param options.vcSigningAlg Optional override for the VC ML-DSA algorithm.
|
|
146
|
-
* @param options.encryptionCurve Optional override for the communication ML-KEM curve.
|
|
147
|
-
*/
|
|
148
|
-
export declare function initializeCommunicationIdentity(options: CommunicationIdentityBootstrapOptions): Promise<CommunicationIdentityBootstrapResult>;
|
|
149
|
-
/**
|
|
150
|
-
* @deprecated Use `initializeCommunicationIdentity(...)`.
|
|
151
|
-
*/
|
|
152
|
-
export declare const initializeCommunicationIdentityFromSeed: typeof initializeCommunicationIdentity;
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { sha256, sha512 } from '@noble/hashes/sha2.js';
|
|
2
|
-
import { Content } from './content';
|
|
3
|
-
import { CommunicationKeyPurposes, DefaultEncryptionCurves, DefaultSigningAlgorithms, JoseContentEncryptionAlgorithms, JwkKeyUses, } from '../constants/cryptography';
|
|
4
|
-
/**
|
|
5
|
-
* Bootstraps the technical communication identity for a portal, device, or app
|
|
6
|
-
* profile from an explicit seed source. This supports deterministic derivation
|
|
7
|
-
* when a caller provides seed material, while also supporting random mode for
|
|
8
|
-
* production runtimes.
|
|
9
|
-
*
|
|
10
|
-
* This helper creates transport identity only. It does not bootstrap the
|
|
11
|
-
* human/person signing identity used for controller/professional/individual
|
|
12
|
-
* authorization decisions.
|
|
13
|
-
*
|
|
14
|
-
* Conceptual split:
|
|
15
|
-
* - `appId` identifies the application towards GW CORE headers/policy
|
|
16
|
-
* - `entityId` identifies the local technical communication profile that owns
|
|
17
|
-
* transport keys
|
|
18
|
-
* - controller/professional/subject DIDs identify domain actors
|
|
19
|
-
*
|
|
20
|
-
* The returned JOSE header templates match the current DIDComm metadata contract:
|
|
21
|
-
* `meta.jws.protected` and `meta.jwe.header`.
|
|
22
|
-
*
|
|
23
|
-
* @param options.entityId Stable logical identity of the technical
|
|
24
|
-
* communication profile or channel runtime.
|
|
25
|
-
* @param options.seedMaterial Explicit seed material for deterministic derivation.
|
|
26
|
-
* @param options.cryptography Stateless crypto engine implementation.
|
|
27
|
-
* @param options.mode Deterministic or random seed derivation mode.
|
|
28
|
-
* @param options.includeVcSigningKey Whether to derive a separate VC signing key pair.
|
|
29
|
-
* @param options.communicationSigningAlg Optional override for the communication ML-DSA algorithm.
|
|
30
|
-
* @param options.vcSigningAlg Optional override for the VC ML-DSA algorithm.
|
|
31
|
-
* @param options.encryptionCurve Optional override for the communication ML-KEM curve.
|
|
32
|
-
*/
|
|
33
|
-
export async function initializeCommunicationIdentity(options) {
|
|
34
|
-
const mode = options.mode ?? (options.seedMaterial !== undefined ? 'deterministic' : 'random');
|
|
35
|
-
const deterministicSource = resolveDeterministicSource(options.seedMaterial, mode);
|
|
36
|
-
const communicationSigningAlg = options.communicationSigningAlg ?? DefaultSigningAlgorithms.Communication;
|
|
37
|
-
const vcSigningAlg = options.vcSigningAlg ?? DefaultSigningAlgorithms.VerifiableCredential;
|
|
38
|
-
const encryptionCurve = options.encryptionCurve ?? DefaultEncryptionCurves.Communication;
|
|
39
|
-
const commSigningSeed = mode === 'deterministic' && deterministicSource
|
|
40
|
-
? deriveSeed32WithSuffix(deterministicSource, '-dsa-comm')
|
|
41
|
-
: undefined;
|
|
42
|
-
const vcSigningSeed = mode === 'deterministic' && deterministicSource && options.includeVcSigningKey
|
|
43
|
-
? deriveSeed32WithSuffix(deterministicSource, '-dsa-vc')
|
|
44
|
-
: undefined;
|
|
45
|
-
const encryptionSeed = mode === 'deterministic' && deterministicSource
|
|
46
|
-
? deriveSeed64WithSuffix(deterministicSource, '-kem')
|
|
47
|
-
: undefined;
|
|
48
|
-
const commSigningRaw = await options.cryptography.generateKeyPairMlDsa(commSigningSeed, communicationSigningAlg);
|
|
49
|
-
const encryptionRaw = await options.cryptography.generateKeyPairMlKem(encryptionSeed, encryptionCurve);
|
|
50
|
-
const vcSigningRaw = options.includeVcSigningKey
|
|
51
|
-
? await options.cryptography.generateKeyPairMlDsa(vcSigningSeed, vcSigningAlg)
|
|
52
|
-
: undefined;
|
|
53
|
-
const commSigningKeyPair = {
|
|
54
|
-
publicJWKey: {
|
|
55
|
-
...commSigningRaw.publicJWKey,
|
|
56
|
-
use: JwkKeyUses.Signature,
|
|
57
|
-
purpose: CommunicationKeyPurposes.CommunicationSignature,
|
|
58
|
-
},
|
|
59
|
-
secretKeyBytes: commSigningRaw.secretKeyBytes,
|
|
60
|
-
};
|
|
61
|
-
const commEncryptionKeyPair = {
|
|
62
|
-
publicJWKey: {
|
|
63
|
-
...encryptionRaw.publicJWKey,
|
|
64
|
-
use: JwkKeyUses.Encryption,
|
|
65
|
-
},
|
|
66
|
-
secretKeyBytes: encryptionRaw.secretKeyBytes,
|
|
67
|
-
};
|
|
68
|
-
const vcSigningKeyPair = vcSigningRaw
|
|
69
|
-
? {
|
|
70
|
-
publicJWKey: {
|
|
71
|
-
...vcSigningRaw.publicJWKey,
|
|
72
|
-
use: JwkKeyUses.Signature,
|
|
73
|
-
purpose: CommunicationKeyPurposes.VerifiableCredentialSignature,
|
|
74
|
-
},
|
|
75
|
-
secretKeyBytes: vcSigningRaw.secretKeyBytes,
|
|
76
|
-
}
|
|
77
|
-
: undefined;
|
|
78
|
-
return {
|
|
79
|
-
commSigningKeyPair,
|
|
80
|
-
vcSigningKeyPair,
|
|
81
|
-
commEncryptionKeyPair,
|
|
82
|
-
headers: {
|
|
83
|
-
jwsProtected: {
|
|
84
|
-
alg: commSigningKeyPair.publicJWKey.alg,
|
|
85
|
-
kid: commSigningKeyPair.publicJWKey.kid,
|
|
86
|
-
},
|
|
87
|
-
jweHeader: {
|
|
88
|
-
alg: commEncryptionKeyPair.publicJWKey.crv,
|
|
89
|
-
enc: JoseContentEncryptionAlgorithms.Aes256Gcm,
|
|
90
|
-
skid: commEncryptionKeyPair.publicJWKey.kid,
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
function resolveDeterministicSource(seedMaterial, mode) {
|
|
96
|
-
if (mode !== 'deterministic')
|
|
97
|
-
return undefined;
|
|
98
|
-
if (seedMaterial instanceof Uint8Array)
|
|
99
|
-
return seedMaterial;
|
|
100
|
-
if (typeof seedMaterial === 'string' && seedMaterial.length > 0) {
|
|
101
|
-
return Content.stringToBytesUTF8(seedMaterial);
|
|
102
|
-
}
|
|
103
|
-
throw new Error('initializeCommunicationIdentity requires seedMaterial when mode="deterministic".');
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* @deprecated Use `initializeCommunicationIdentity(...)`.
|
|
107
|
-
*/
|
|
108
|
-
export const initializeCommunicationIdentityFromSeed = initializeCommunicationIdentity;
|
|
109
|
-
function deriveSeed32WithSuffix(source, suffix) {
|
|
110
|
-
return sha256(concatSeedSource(source, suffix)).subarray(0, 32);
|
|
111
|
-
}
|
|
112
|
-
function deriveSeed64WithSuffix(source, suffix) {
|
|
113
|
-
return sha512(concatSeedSource(source, suffix)).subarray(0, 64);
|
|
114
|
-
}
|
|
115
|
-
function concatSeedSource(source, suffix) {
|
|
116
|
-
const suffixBytes = Content.stringToBytesUTF8(suffix);
|
|
117
|
-
const result = new Uint8Array(source.length + suffixBytes.length);
|
|
118
|
-
result.set(source, 0);
|
|
119
|
-
result.set(suffixBytes, source.length);
|
|
120
|
-
return result;
|
|
121
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export type InteroperableClaims = Record<string, unknown>;
|
|
2
|
-
/**
|
|
3
|
-
* Returns the tokenized values for a claims field stored as CSV.
|
|
4
|
-
*/
|
|
5
|
-
export declare function getClaimValues(claims: InteroperableClaims, claimKey: string): string[];
|
|
6
|
-
/**
|
|
7
|
-
* Replaces a claims CSV field with the provided values.
|
|
8
|
-
*/
|
|
9
|
-
export declare function setClaimValues(claims: InteroperableClaims, claimKey: string, values: string | readonly string[]): InteroperableClaims;
|
|
10
|
-
/**
|
|
11
|
-
* Adds one or many values into a claims CSV field while preserving uniqueness.
|
|
12
|
-
*/
|
|
13
|
-
export declare function addClaimValues(claims: InteroperableClaims, claimKey: string, values: string | readonly string[]): InteroperableClaims;
|
|
14
|
-
/**
|
|
15
|
-
* Removes one or many values from a claims CSV field while preserving uniqueness.
|
|
16
|
-
*/
|
|
17
|
-
export declare function removeClaimValues(claims: InteroperableClaims, claimKey: string, values: string | readonly string[]): InteroperableClaims;
|
|
18
|
-
export declare function getActors(claims: InteroperableClaims): string[];
|
|
19
|
-
/**
|
|
20
|
-
* Returns actor identifiers as array instead of CSV.
|
|
21
|
-
*/
|
|
22
|
-
export declare function getActorIdentifierList(claims: InteroperableClaims): string[];
|
|
23
|
-
export declare function setActors(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
24
|
-
/**
|
|
25
|
-
* Stores actor identifiers from array/string input as canonical CSV claim.
|
|
26
|
-
*/
|
|
27
|
-
export declare function setActorIdentifierList(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
28
|
-
export declare function addActors(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
29
|
-
export declare function removeActors(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
30
|
-
export declare function addActorIdentifierList(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
31
|
-
export declare function removeActorIdentifierList(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
32
|
-
export declare function getRoles(claims: InteroperableClaims): string[];
|
|
33
|
-
/**
|
|
34
|
-
* Returns actor roles as array instead of CSV.
|
|
35
|
-
*/
|
|
36
|
-
export declare function getActorRoleList(claims: InteroperableClaims): string[];
|
|
37
|
-
export declare function setRoles(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
38
|
-
export declare function setActorRoleList(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
39
|
-
export declare function addRoles(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
40
|
-
export declare function removeRoles(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
41
|
-
export declare function addActorRoleList(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
42
|
-
export declare function removeActorRoleList(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
43
|
-
export declare function getPurposes(claims: InteroperableClaims): string[];
|
|
44
|
-
export declare function getPurposeList(claims: InteroperableClaims): string[];
|
|
45
|
-
export declare function setPurposes(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
46
|
-
export declare function setPurposeList(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
47
|
-
export declare function addPurposes(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
48
|
-
export declare function removePurposes(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
49
|
-
export declare function addPurposeList(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
50
|
-
export declare function removePurposeList(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
51
|
-
/**
|
|
52
|
-
* Consent category as array instead of CSV.
|
|
53
|
-
*/
|
|
54
|
-
export declare function getCategories(claims: InteroperableClaims): string[];
|
|
55
|
-
export declare function getCategoryList(claims: InteroperableClaims): string[];
|
|
56
|
-
export declare function setCategories(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
57
|
-
export declare function setCategoryList(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
58
|
-
export declare function addCategories(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
59
|
-
export declare function removeCategories(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
60
|
-
export declare function addCategoryList(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
61
|
-
export declare function removeCategoryList(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
62
|
-
export declare function getSections(claims: InteroperableClaims): string[];
|
|
63
|
-
export declare function setSections(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
64
|
-
export declare function addSections(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
65
|
-
export declare function removeSections(claims: InteroperableClaims, values: string | readonly string[]): InteroperableClaims;
|
|
66
|
-
/**
|
|
67
|
-
* Reads the canonical consent date claim.
|
|
68
|
-
*/
|
|
69
|
-
export declare function getConsentDate(claims: InteroperableClaims): string;
|
|
70
|
-
/**
|
|
71
|
-
* Sets the canonical consent date claim.
|
|
72
|
-
*/
|
|
73
|
-
export declare function setConsentDate(claims: InteroperableClaims, value: string): InteroperableClaims;
|
|
74
|
-
export declare function getConsentPeriodStart(claims: InteroperableClaims): string;
|
|
75
|
-
export declare function setConsentPeriodStart(claims: InteroperableClaims, value: string): InteroperableClaims;
|
|
76
|
-
export declare function getConsentPeriodEnd(claims: InteroperableClaims): string;
|
|
77
|
-
export declare function setConsentPeriodEnd(claims: InteroperableClaims, value: string): InteroperableClaims;
|
|
78
|
-
export declare function getConsentIdentifier(claims: InteroperableClaims): string;
|
|
79
|
-
export declare function setConsentIdentifier(claims: InteroperableClaims, value: string): InteroperableClaims;
|