gdc-sdk-front-ts 2.2.1 → 2.3.1
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,112 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
import { ActorCapabilities, ActorKinds, } from 'gdc-common-utils-ts/constants/actor-session';
|
|
3
|
-
export { ActorCapabilities, ActorKinds };
|
|
4
|
-
const actorCapabilityMatrix = {
|
|
5
|
-
[ActorKinds.HostOnboarding]: [],
|
|
6
|
-
[ActorKinds.OrganizationController]: [
|
|
7
|
-
ActorCapabilities.OrganizationCreateEmployee,
|
|
8
|
-
ActorCapabilities.OrganizationDisableEmployee,
|
|
9
|
-
ActorCapabilities.OrganizationPurgeEmployee,
|
|
10
|
-
ActorCapabilities.OrganizationRequestSmartToken,
|
|
11
|
-
],
|
|
12
|
-
[ActorKinds.OrganizationEmployee]: [
|
|
13
|
-
ActorCapabilities.OrganizationIssueActivationCode,
|
|
14
|
-
ActorCapabilities.OrganizationRequestSmartToken,
|
|
15
|
-
],
|
|
16
|
-
[ActorKinds.IndividualController]: [
|
|
17
|
-
ActorCapabilities.IndividualBootstrap,
|
|
18
|
-
ActorCapabilities.IndividualDisable,
|
|
19
|
-
ActorCapabilities.IndividualPurge,
|
|
20
|
-
ActorCapabilities.IndividualMemberDisable,
|
|
21
|
-
ActorCapabilities.IndividualMemberPurge,
|
|
22
|
-
ActorCapabilities.ConsentGrantProfessionalAccess,
|
|
23
|
-
],
|
|
24
|
-
[ActorKinds.IndividualMember]: [
|
|
25
|
-
ActorCapabilities.IndividualImportIps,
|
|
26
|
-
ActorCapabilities.IndividualGenerateDigitalTwin,
|
|
27
|
-
],
|
|
28
|
-
[ActorKinds.Professional]: [
|
|
29
|
-
ActorCapabilities.ProfessionalMedication,
|
|
30
|
-
ActorCapabilities.ProfessionalAppointment,
|
|
31
|
-
ActorCapabilities.ProfessionalRequestSmartToken,
|
|
32
|
-
],
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Filters a capability list so that only capabilities valid for the given actor remain.
|
|
36
|
-
*
|
|
37
|
-
* @param actorKind Actor role to evaluate against the capability matrix.
|
|
38
|
-
* @param capabilities Candidate capabilities to filter.
|
|
39
|
-
*/
|
|
40
|
-
export function filterCapabilitiesForActor(actorKind, capabilities) {
|
|
41
|
-
const allowed = new Set(actorCapabilityMatrix[actorKind]);
|
|
42
|
-
return [...new Set(capabilities.filter(capability => allowed.has(capability)))];
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Expands a composite actor session descriptor into one facade descriptor per actor kind.
|
|
46
|
-
*
|
|
47
|
-
* Each resulting facade keeps only the capabilities that belong to its actor kind.
|
|
48
|
-
*
|
|
49
|
-
* @param descriptor Composite descriptor that may contain multiple actor kinds.
|
|
50
|
-
*/
|
|
51
|
-
export function expandActorSessionDescriptorToFacades(descriptor) {
|
|
52
|
-
return [...new Set(descriptor.actorKinds)].map(actorKind => ({
|
|
53
|
-
actorKind,
|
|
54
|
-
capabilities: filterCapabilitiesForActor(actorKind, descriptor.capabilities),
|
|
55
|
-
appType: descriptor.appType,
|
|
56
|
-
profileId: descriptor.profileId,
|
|
57
|
-
profileDid: descriptor.profileDid,
|
|
58
|
-
role: descriptor.role,
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Builds a normalized actor session descriptor from boolean actor flags.
|
|
63
|
-
*
|
|
64
|
-
* @param input Session metadata plus actor flags used to derive actor kinds and capabilities.
|
|
65
|
-
*/
|
|
66
|
-
export function buildActorSessionDescriptorFromActorFlags(input) {
|
|
67
|
-
const actorKinds = new Set();
|
|
68
|
-
const capabilities = new Set();
|
|
69
|
-
if (input.actorFlags.organizationController) {
|
|
70
|
-
actorKinds.add(ActorKinds.OrganizationController);
|
|
71
|
-
capabilities.add(ActorCapabilities.OrganizationCreateEmployee);
|
|
72
|
-
capabilities.add(ActorCapabilities.OrganizationDisableEmployee);
|
|
73
|
-
capabilities.add(ActorCapabilities.OrganizationPurgeEmployee);
|
|
74
|
-
}
|
|
75
|
-
if (input.actorFlags.organizationEmployee) {
|
|
76
|
-
actorKinds.add(ActorKinds.OrganizationEmployee);
|
|
77
|
-
capabilities.add(ActorCapabilities.OrganizationIssueActivationCode);
|
|
78
|
-
}
|
|
79
|
-
if (input.actorFlags.individualController) {
|
|
80
|
-
actorKinds.add(ActorKinds.IndividualController);
|
|
81
|
-
capabilities.add(ActorCapabilities.IndividualBootstrap);
|
|
82
|
-
capabilities.add(ActorCapabilities.IndividualDisable);
|
|
83
|
-
capabilities.add(ActorCapabilities.IndividualPurge);
|
|
84
|
-
capabilities.add(ActorCapabilities.IndividualMemberDisable);
|
|
85
|
-
capabilities.add(ActorCapabilities.IndividualMemberPurge);
|
|
86
|
-
capabilities.add(ActorCapabilities.ConsentGrantProfessionalAccess);
|
|
87
|
-
}
|
|
88
|
-
if (input.actorFlags.individualMember) {
|
|
89
|
-
actorKinds.add(ActorKinds.IndividualMember);
|
|
90
|
-
capabilities.add(ActorCapabilities.IndividualImportIps);
|
|
91
|
-
capabilities.add(ActorCapabilities.IndividualGenerateDigitalTwin);
|
|
92
|
-
}
|
|
93
|
-
if (input.actorFlags.professionalPhysician) {
|
|
94
|
-
actorKinds.add(ActorKinds.Professional);
|
|
95
|
-
capabilities.add(ActorCapabilities.ProfessionalAppointment);
|
|
96
|
-
capabilities.add(ActorCapabilities.ProfessionalMedication);
|
|
97
|
-
capabilities.add(ActorCapabilities.ProfessionalRequestSmartToken);
|
|
98
|
-
}
|
|
99
|
-
if (input.actorFlags.professionalParamedic) {
|
|
100
|
-
actorKinds.add(ActorKinds.Professional);
|
|
101
|
-
capabilities.add(ActorCapabilities.ProfessionalMedication);
|
|
102
|
-
capabilities.add(ActorCapabilities.ProfessionalRequestSmartToken);
|
|
103
|
-
}
|
|
104
|
-
return {
|
|
105
|
-
actorKinds: [...actorKinds],
|
|
106
|
-
capabilities: [...capabilities],
|
|
107
|
-
appType: input.appType,
|
|
108
|
-
profileId: input.profileId,
|
|
109
|
-
profileDid: input.profileDid,
|
|
110
|
-
role: input.role,
|
|
111
|
-
};
|
|
112
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import type { AppInfo } from './session-model.js';
|
|
2
|
-
export declare const DEFAULT_APP_VERSION = "v1.0";
|
|
3
|
-
export type ResolvedAppInfo = Omit<AppInfo, 'appVersion'> & {
|
|
4
|
-
appVersion: string;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Resolves the host app identity into the canonical form expected by GW CORE.
|
|
8
|
-
*
|
|
9
|
-
* Rules:
|
|
10
|
-
* - `appId` is mandatory
|
|
11
|
-
* - URL/domain inputs are normalized to reverse-DNS using only the hostname
|
|
12
|
-
* - `appVersion` defaults to `v1.0`
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const resolved = resolveAppInfo({
|
|
17
|
-
* appId: 'https://globaldatacare.es/portal',
|
|
18
|
-
* appType: 'Family',
|
|
19
|
-
* sector: 'health-care',
|
|
20
|
-
* });
|
|
21
|
-
*
|
|
22
|
-
* console.log(resolved.appId);
|
|
23
|
-
* // es.globaldatacare
|
|
24
|
-
*
|
|
25
|
-
* console.log(resolved.appVersion);
|
|
26
|
-
* // v1.0
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export declare function resolveAppInfo(appInfo: AppInfo): ResolvedAppInfo;
|
|
30
|
-
/**
|
|
31
|
-
* Normalizes a GW CORE app identifier.
|
|
32
|
-
*
|
|
33
|
-
* When the input is a URL or bare hostname, the hostname is converted to
|
|
34
|
-
* reverse-DNS. Otherwise the trimmed literal value is preserved.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* normalizeAppId('https://globaldatacare.es/app');
|
|
39
|
-
* // 'es.globaldatacare'
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```ts
|
|
44
|
-
* normalizeAppId('globaldatacare.es');
|
|
45
|
-
* // 'es.globaldatacare'
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```ts
|
|
50
|
-
* normalizeAppId('es.globaldatacare.portal');
|
|
51
|
-
* // 'es.globaldatacare.portal'
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
export declare function normalizeAppId(input: string): string;
|
|
55
|
-
/**
|
|
56
|
-
* Returns the canonical GW CORE app version.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* normalizeAppVersion(undefined);
|
|
61
|
-
* // 'v1.0'
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
export declare function normalizeAppVersion(input?: string): string;
|
|
65
|
-
/**
|
|
66
|
-
* Builds the standard GW CORE request headers for the host app identity.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```ts
|
|
70
|
-
* const headers = buildAppHeaders({
|
|
71
|
-
* appId: 'https://globaldatacare.es',
|
|
72
|
-
* appType: 'Family',
|
|
73
|
-
* sector: 'health-care',
|
|
74
|
-
* });
|
|
75
|
-
*
|
|
76
|
-
* console.log(headers);
|
|
77
|
-
* // { AppId: 'es.globaldatacare', AppVersion: 'v1.0' }
|
|
78
|
-
* ```
|
|
79
|
-
*/
|
|
80
|
-
export declare function buildAppHeaders(appInfo: AppInfo): Record<'AppId' | 'AppVersion', string>;
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
export const DEFAULT_APP_VERSION = 'v1.0';
|
|
3
|
-
/**
|
|
4
|
-
* Resolves the host app identity into the canonical form expected by GW CORE.
|
|
5
|
-
*
|
|
6
|
-
* Rules:
|
|
7
|
-
* - `appId` is mandatory
|
|
8
|
-
* - URL/domain inputs are normalized to reverse-DNS using only the hostname
|
|
9
|
-
* - `appVersion` defaults to `v1.0`
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const resolved = resolveAppInfo({
|
|
14
|
-
* appId: 'https://globaldatacare.es/portal',
|
|
15
|
-
* appType: 'Family',
|
|
16
|
-
* sector: 'health-care',
|
|
17
|
-
* });
|
|
18
|
-
*
|
|
19
|
-
* console.log(resolved.appId);
|
|
20
|
-
* // es.globaldatacare
|
|
21
|
-
*
|
|
22
|
-
* console.log(resolved.appVersion);
|
|
23
|
-
* // v1.0
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export function resolveAppInfo(appInfo) {
|
|
27
|
-
return {
|
|
28
|
-
...appInfo,
|
|
29
|
-
appId: normalizeAppId(appInfo.appId),
|
|
30
|
-
appVersion: normalizeAppVersion(appInfo.appVersion),
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Normalizes a GW CORE app identifier.
|
|
35
|
-
*
|
|
36
|
-
* When the input is a URL or bare hostname, the hostname is converted to
|
|
37
|
-
* reverse-DNS. Otherwise the trimmed literal value is preserved.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* normalizeAppId('https://globaldatacare.es/app');
|
|
42
|
-
* // 'es.globaldatacare'
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```ts
|
|
47
|
-
* normalizeAppId('globaldatacare.es');
|
|
48
|
-
* // 'es.globaldatacare'
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```ts
|
|
53
|
-
* normalizeAppId('es.globaldatacare.portal');
|
|
54
|
-
* // 'es.globaldatacare.portal'
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
export function normalizeAppId(input) {
|
|
58
|
-
const raw = String(input || '').trim();
|
|
59
|
-
if (!raw) {
|
|
60
|
-
throw new Error('AppInfo.appId is required.');
|
|
61
|
-
}
|
|
62
|
-
const lowerRaw = raw.toLowerCase();
|
|
63
|
-
const hostname = tryExtractHostname(raw);
|
|
64
|
-
if (!hostname) {
|
|
65
|
-
return raw;
|
|
66
|
-
}
|
|
67
|
-
const normalizedHost = hostname
|
|
68
|
-
.trim()
|
|
69
|
-
.toLowerCase()
|
|
70
|
-
.replace(/\.+/g, '.')
|
|
71
|
-
.replace(/^\.+|\.+$/g, '');
|
|
72
|
-
if (!normalizedHost) {
|
|
73
|
-
throw new Error('AppInfo.appId must contain a valid hostname or stable identifier.');
|
|
74
|
-
}
|
|
75
|
-
if (!looksLikeReversibleHostname(normalizedHost)) {
|
|
76
|
-
return raw;
|
|
77
|
-
}
|
|
78
|
-
if (!shouldReverseHostname(lowerRaw, normalizedHost)) {
|
|
79
|
-
return normalizedHost;
|
|
80
|
-
}
|
|
81
|
-
return normalizedHost.split('.').reverse().join('.');
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Returns the canonical GW CORE app version.
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* normalizeAppVersion(undefined);
|
|
89
|
-
* // 'v1.0'
|
|
90
|
-
* ```
|
|
91
|
-
*/
|
|
92
|
-
export function normalizeAppVersion(input) {
|
|
93
|
-
const version = String(input || '').trim();
|
|
94
|
-
return version || DEFAULT_APP_VERSION;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Builds the standard GW CORE request headers for the host app identity.
|
|
98
|
-
*
|
|
99
|
-
* @example
|
|
100
|
-
* ```ts
|
|
101
|
-
* const headers = buildAppHeaders({
|
|
102
|
-
* appId: 'https://globaldatacare.es',
|
|
103
|
-
* appType: 'Family',
|
|
104
|
-
* sector: 'health-care',
|
|
105
|
-
* });
|
|
106
|
-
*
|
|
107
|
-
* console.log(headers);
|
|
108
|
-
* // { AppId: 'es.globaldatacare', AppVersion: 'v1.0' }
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
export function buildAppHeaders(appInfo) {
|
|
112
|
-
const resolved = resolveAppInfo(appInfo);
|
|
113
|
-
return {
|
|
114
|
-
AppId: resolved.appId,
|
|
115
|
-
AppVersion: resolved.appVersion,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function tryExtractHostname(raw) {
|
|
119
|
-
const candidate = raw.includes('://') ? raw : `https://${raw}`;
|
|
120
|
-
try {
|
|
121
|
-
const parsed = new URL(candidate);
|
|
122
|
-
return parsed.hostname || undefined;
|
|
123
|
-
}
|
|
124
|
-
catch {
|
|
125
|
-
return undefined;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
function looksLikeReversibleHostname(hostname) {
|
|
129
|
-
if (!hostname.includes('.')) {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
if (/^\d{1,3}(\.\d{1,3}){3}$/.test(hostname)) {
|
|
133
|
-
return false;
|
|
134
|
-
}
|
|
135
|
-
return hostname.split('.').every((label) => /^[a-z0-9-]+$/i.test(label) && !label.startsWith('-') && !label.endsWith('-'));
|
|
136
|
-
}
|
|
137
|
-
function shouldReverseHostname(raw, hostname) {
|
|
138
|
-
if (raw.includes('://') || raw.includes('/') || raw.includes(':')) {
|
|
139
|
-
return true;
|
|
140
|
-
}
|
|
141
|
-
const labels = hostname.split('.');
|
|
142
|
-
const lastLabel = labels[labels.length - 1];
|
|
143
|
-
if (lastLabel.length === 2) {
|
|
144
|
-
return true;
|
|
145
|
-
}
|
|
146
|
-
return ['com', 'org', 'net', 'edu', 'gov', 'mil', 'info', 'biz', 'io', 'app', 'dev'].includes(lastLabel);
|
|
147
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { ServiceCapability, type ServiceCapabilityValue, type ServiceCapabilityTokenValue } from 'gdc-common-utils-ts/constants/service-capabilities';
|
|
2
|
-
import { ActorIdentityState } from './identity-model.js';
|
|
3
|
-
export { ServiceCapability };
|
|
4
|
-
export type { ServiceCapabilityValue, ServiceCapabilityTokenValue };
|
|
5
|
-
/**
|
|
6
|
-
* Validation issue emitted by canonical activation/bootstrap validation.
|
|
7
|
-
*/
|
|
8
|
-
export type BootstrapValidationIssue = {
|
|
9
|
-
severity: 'error' | 'warning';
|
|
10
|
-
code: string;
|
|
11
|
-
message: string;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Runtime-neutral canonical `_activate` payload shape.
|
|
15
|
-
*
|
|
16
|
-
* Contract priority:
|
|
17
|
-
* - `vp_token` is canonical proof
|
|
18
|
-
* - `controller.*` is explicit key binding
|
|
19
|
-
* - legacy credential side-fields are compatibility only
|
|
20
|
-
*/
|
|
21
|
-
export type OrganizationActivationPayload = {
|
|
22
|
-
vp_token?: string;
|
|
23
|
-
controller?: {
|
|
24
|
-
did?: string;
|
|
25
|
-
sameAs?: string;
|
|
26
|
-
publicKeyJwk?: unknown;
|
|
27
|
-
jwks?: {
|
|
28
|
-
keys: Array<unknown>;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
organization?: {
|
|
32
|
-
did?: string;
|
|
33
|
-
url?: string;
|
|
34
|
-
publicKeyJwk?: unknown;
|
|
35
|
-
jwks?: {
|
|
36
|
-
keys: Array<unknown>;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
organizationCredential?: unknown;
|
|
40
|
-
representativeCredential?: unknown;
|
|
41
|
-
data?: Array<Record<string, unknown>>;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Declarative service capabilities persisted through
|
|
45
|
-
* `org.schema.Service.*` activation claims.
|
|
46
|
-
*/
|
|
47
|
-
export type OrganizationActivationServiceOptions = {
|
|
48
|
-
url?: string;
|
|
49
|
-
capabilities?: ReadonlyArray<ServiceCapabilityValue | ServiceCapabilityTokenValue | string>;
|
|
50
|
-
additionalClaims?: Record<string, unknown>;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Public activation input used by SDK runtimes when submitting a legal
|
|
54
|
-
* organization activation backed by an ICA proof.
|
|
55
|
-
*
|
|
56
|
-
* Service capabilities are mandatory in the teaching contract even if legacy
|
|
57
|
-
* compatibility paths still allow omitting them at runtime.
|
|
58
|
-
*/
|
|
59
|
-
export type OrganizationActivationInput = {
|
|
60
|
-
vpToken: string;
|
|
61
|
-
controller?: OrganizationActivationPayload['controller'];
|
|
62
|
-
organization?: OrganizationActivationPayload['organization'];
|
|
63
|
-
data?: Array<Record<string, unknown>>;
|
|
64
|
-
organizationCredential?: unknown;
|
|
65
|
-
representativeCredential?: unknown;
|
|
66
|
-
service?: OrganizationActivationServiceOptions;
|
|
67
|
-
additionalClaims?: Record<string, unknown>;
|
|
68
|
-
};
|
|
69
|
-
export interface OrganizationActivationDraft {
|
|
70
|
-
addServiceCapability(capability: ServiceCapabilityValue | ServiceCapabilityTokenValue | string): OrganizationActivationDraft;
|
|
71
|
-
addServiceCapabilities(capabilities: ReadonlyArray<ServiceCapabilityValue | ServiceCapabilityTokenValue | string>): OrganizationActivationDraft;
|
|
72
|
-
setServiceUrl(url: string): OrganizationActivationDraft;
|
|
73
|
-
mergeAdditionalClaims(claims: Record<string, unknown>): OrganizationActivationDraft;
|
|
74
|
-
buildServiceClaims(): Record<string, unknown>;
|
|
75
|
-
build(): OrganizationActivationPayload;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Runtime-neutral bootstrap facade.
|
|
79
|
-
*
|
|
80
|
-
* Implemented here:
|
|
81
|
-
* - payload builders
|
|
82
|
-
* - controller identity binding helper
|
|
83
|
-
* - canonical-vs-legacy validation
|
|
84
|
-
*
|
|
85
|
-
* Still pending in higher runtimes:
|
|
86
|
-
* - remote submission to GW/ICA
|
|
87
|
-
* - persistence side effects
|
|
88
|
-
* - DID publication orchestration
|
|
89
|
-
*/
|
|
90
|
-
export interface BootstrapFacade {
|
|
91
|
-
/**
|
|
92
|
-
* Builds the canonical organization activation payload.
|
|
93
|
-
*/
|
|
94
|
-
buildOrganizationActivationRequest(input: {
|
|
95
|
-
vpToken: string;
|
|
96
|
-
controller?: OrganizationActivationPayload['controller'];
|
|
97
|
-
organization?: OrganizationActivationPayload['organization'];
|
|
98
|
-
data?: Array<Record<string, unknown>>;
|
|
99
|
-
organizationCredential?: unknown;
|
|
100
|
-
representativeCredential?: unknown;
|
|
101
|
-
}): OrganizationActivationPayload;
|
|
102
|
-
/**
|
|
103
|
-
* Builds the canonical `org.schema.Service.*` claims block for activation.
|
|
104
|
-
*/
|
|
105
|
-
buildOrganizationActivationServiceClaims(input: OrganizationActivationServiceOptions): Record<string, unknown>;
|
|
106
|
-
/**
|
|
107
|
-
* Creates an activation draft builder that can be enriched incrementally
|
|
108
|
-
* before serializing the final `_activate` payload.
|
|
109
|
-
*/
|
|
110
|
-
createOrganizationActivationDraft(input: {
|
|
111
|
-
vpToken: string;
|
|
112
|
-
controller?: OrganizationActivationPayload['controller'];
|
|
113
|
-
organization?: OrganizationActivationPayload['organization'];
|
|
114
|
-
data?: Array<Record<string, unknown>>;
|
|
115
|
-
organizationCredential?: unknown;
|
|
116
|
-
representativeCredential?: unknown;
|
|
117
|
-
service?: OrganizationActivationServiceOptions;
|
|
118
|
-
additionalClaims?: Record<string, unknown>;
|
|
119
|
-
}): OrganizationActivationDraft;
|
|
120
|
-
/**
|
|
121
|
-
* Preferred public alias for the activation builder.
|
|
122
|
-
*
|
|
123
|
-
* Keep `createOrganizationActivationDraft(...)` for compatibility while new
|
|
124
|
-
* documentation and SDK onboarding examples teach this clearer name.
|
|
125
|
-
*/
|
|
126
|
-
createOrganizationActivation(input: OrganizationActivationInput): OrganizationActivationDraft;
|
|
127
|
-
/**
|
|
128
|
-
* Builds the canonical individual activation/bootstrap payload.
|
|
129
|
-
*/
|
|
130
|
-
buildIndividualActivationRequest(input: {
|
|
131
|
-
vpToken: string;
|
|
132
|
-
controller?: OrganizationActivationPayload['controller'];
|
|
133
|
-
data?: Array<Record<string, unknown>>;
|
|
134
|
-
}): OrganizationActivationPayload;
|
|
135
|
-
/**
|
|
136
|
-
* Normalizes explicit controller binding input into actor identity state.
|
|
137
|
-
*/
|
|
138
|
-
bindControllerIdentity(input: {
|
|
139
|
-
did: string;
|
|
140
|
-
sameAs?: string;
|
|
141
|
-
publicKeyJwk?: unknown;
|
|
142
|
-
jwks?: {
|
|
143
|
-
keys: Array<unknown>;
|
|
144
|
-
};
|
|
145
|
-
}): ActorIdentityState;
|
|
146
|
-
/**
|
|
147
|
-
* Validates canonical activation payload priority and reports warnings for
|
|
148
|
-
* deprecated compatibility fields.
|
|
149
|
-
*/
|
|
150
|
-
validateActivationRequest(payload: OrganizationActivationPayload): {
|
|
151
|
-
ok: boolean;
|
|
152
|
-
errors: BootstrapValidationIssue[];
|
|
153
|
-
warnings: BootstrapValidationIssue[];
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Factory for the runtime-neutral bootstrap facade.
|
|
158
|
-
*
|
|
159
|
-
* Naming contract:
|
|
160
|
-
* - SDK builder API: `serviceCapabilities`
|
|
161
|
-
* - persisted claim: `org.schema.Service.serviceType`
|
|
162
|
-
* - frontend UX/runtime facets remain a separate layer and must not be treated
|
|
163
|
-
* as the persisted activation claim vocabulary
|
|
164
|
-
*/
|
|
165
|
-
export declare function createBootstrapFacade(): BootstrapFacade;
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
// Always create JSDoc, do not use strings inline in keys nor values, use types instead, and reuse the data test examples.
|
|
3
|
-
import { ClaimsServiceSchemaorg, } from 'gdc-common-utils-ts/constants/schemaorg';
|
|
4
|
-
import { ActorKinds } from 'gdc-common-utils-ts/constants/actor-session';
|
|
5
|
-
import { serializeServiceCapabilityTokens, ServiceCapability, } from 'gdc-common-utils-ts/constants/service-capabilities';
|
|
6
|
-
export { ServiceCapability };
|
|
7
|
-
/**
|
|
8
|
-
* Factory for the runtime-neutral bootstrap facade.
|
|
9
|
-
*
|
|
10
|
-
* Naming contract:
|
|
11
|
-
* - SDK builder API: `serviceCapabilities`
|
|
12
|
-
* - persisted claim: `org.schema.Service.serviceType`
|
|
13
|
-
* - frontend UX/runtime facets remain a separate layer and must not be treated
|
|
14
|
-
* as the persisted activation claim vocabulary
|
|
15
|
-
*/
|
|
16
|
-
export function createBootstrapFacade() {
|
|
17
|
-
function buildOrganizationActivationPayload(input) {
|
|
18
|
-
return {
|
|
19
|
-
vp_token: input.vpToken,
|
|
20
|
-
...(input.controller ? { controller: input.controller } : {}),
|
|
21
|
-
...(input.organization ? { organization: input.organization } : {}),
|
|
22
|
-
...(input.data ? { data: input.data } : {}),
|
|
23
|
-
...(input.organizationCredential !== undefined ? { organizationCredential: input.organizationCredential } : {}),
|
|
24
|
-
...(input.representativeCredential !== undefined ? { representativeCredential: input.representativeCredential } : {}),
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function buildOrganizationActivationServiceClaims(input) {
|
|
28
|
-
const claims = {
|
|
29
|
-
...(input.additionalClaims || {}),
|
|
30
|
-
};
|
|
31
|
-
if (String(input.url || '').trim()) {
|
|
32
|
-
claims[ClaimsServiceSchemaorg.url] = String(input.url).trim();
|
|
33
|
-
}
|
|
34
|
-
const serializedCapabilities = serializeServiceCapabilityTokens(input.capabilities || []);
|
|
35
|
-
if (serializedCapabilities) {
|
|
36
|
-
claims[ClaimsServiceSchemaorg.serviceType] = serializedCapabilities;
|
|
37
|
-
}
|
|
38
|
-
return claims;
|
|
39
|
-
}
|
|
40
|
-
function validateActivationRequest(payload) {
|
|
41
|
-
const issues = [];
|
|
42
|
-
if (!String(payload.vp_token || '').trim()) {
|
|
43
|
-
issues.push({
|
|
44
|
-
severity: 'error',
|
|
45
|
-
code: 'missing-vp-token',
|
|
46
|
-
message: 'Canonical activation proof must be carried in vp_token.',
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
if (payload.organizationCredential !== undefined) {
|
|
50
|
-
issues.push({
|
|
51
|
-
severity: 'warning',
|
|
52
|
-
code: 'deprecated-organization-credential',
|
|
53
|
-
message: 'organizationCredential is deprecated compatibility input.',
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
if (payload.representativeCredential !== undefined) {
|
|
57
|
-
issues.push({
|
|
58
|
-
severity: 'warning',
|
|
59
|
-
code: 'deprecated-representative-credential',
|
|
60
|
-
message: 'representativeCredential is deprecated compatibility input.',
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
const controller = payload.controller;
|
|
64
|
-
if (controller && (controller.did || controller.sameAs) && !(controller.publicKeyJwk || controller.jwks?.keys?.length)) {
|
|
65
|
-
issues.push({
|
|
66
|
-
severity: 'error',
|
|
67
|
-
code: 'incomplete-controller-binding',
|
|
68
|
-
message: 'controller.did/controller.sameAs requires public key material.',
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
ok: !issues.some((issue) => issue.severity === 'error'),
|
|
73
|
-
errors: issues.filter((issue) => issue.severity === 'error'),
|
|
74
|
-
warnings: issues.filter((issue) => issue.severity === 'warning'),
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
function createOrganizationActivationDraft(input) {
|
|
78
|
-
const state = {
|
|
79
|
-
serviceUrl: input.service?.url,
|
|
80
|
-
capabilities: [...(input.service?.capabilities || [])].map((item) => String(item).trim()).filter(Boolean),
|
|
81
|
-
additionalClaims: {
|
|
82
|
-
...(input.additionalClaims || {}),
|
|
83
|
-
...(input.service?.additionalClaims || {}),
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
const builder = {
|
|
87
|
-
addServiceCapability(capability) {
|
|
88
|
-
const normalized = String(capability || '').trim();
|
|
89
|
-
if (normalized && !state.capabilities.includes(normalized)) {
|
|
90
|
-
state.capabilities.push(normalized);
|
|
91
|
-
}
|
|
92
|
-
return builder;
|
|
93
|
-
},
|
|
94
|
-
addServiceCapabilities(capabilities) {
|
|
95
|
-
for (const capability of capabilities) {
|
|
96
|
-
builder.addServiceCapability(capability);
|
|
97
|
-
}
|
|
98
|
-
return builder;
|
|
99
|
-
},
|
|
100
|
-
setServiceUrl(url) {
|
|
101
|
-
state.serviceUrl = String(url || '').trim() || undefined;
|
|
102
|
-
return builder;
|
|
103
|
-
},
|
|
104
|
-
mergeAdditionalClaims(claims) {
|
|
105
|
-
state.additionalClaims = {
|
|
106
|
-
...state.additionalClaims,
|
|
107
|
-
...(claims || {}),
|
|
108
|
-
};
|
|
109
|
-
return builder;
|
|
110
|
-
},
|
|
111
|
-
buildServiceClaims() {
|
|
112
|
-
return buildOrganizationActivationServiceClaims({
|
|
113
|
-
url: state.serviceUrl,
|
|
114
|
-
capabilities: state.capabilities,
|
|
115
|
-
additionalClaims: state.additionalClaims,
|
|
116
|
-
});
|
|
117
|
-
},
|
|
118
|
-
build() {
|
|
119
|
-
const serviceClaims = builder.buildServiceClaims();
|
|
120
|
-
const data = Array.isArray(input.data) && input.data.length
|
|
121
|
-
? input.data.map((entry) => {
|
|
122
|
-
const currentMetaClaims = entry?.meta?.claims || {};
|
|
123
|
-
const currentResourceClaims = entry?.resource?.meta?.claims || {};
|
|
124
|
-
return {
|
|
125
|
-
...entry,
|
|
126
|
-
meta: {
|
|
127
|
-
...(entry?.meta || {}),
|
|
128
|
-
claims: {
|
|
129
|
-
...currentMetaClaims,
|
|
130
|
-
...serviceClaims,
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
resource: {
|
|
134
|
-
...(entry?.resource || {}),
|
|
135
|
-
meta: {
|
|
136
|
-
...(entry?.resource?.meta || {}),
|
|
137
|
-
claims: {
|
|
138
|
-
...currentResourceClaims,
|
|
139
|
-
...serviceClaims,
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
};
|
|
144
|
-
})
|
|
145
|
-
: undefined;
|
|
146
|
-
return buildOrganizationActivationPayload({
|
|
147
|
-
vpToken: input.vpToken,
|
|
148
|
-
controller: input.controller,
|
|
149
|
-
organization: input.organization,
|
|
150
|
-
data,
|
|
151
|
-
organizationCredential: input.organizationCredential,
|
|
152
|
-
representativeCredential: input.representativeCredential,
|
|
153
|
-
});
|
|
154
|
-
},
|
|
155
|
-
};
|
|
156
|
-
return builder;
|
|
157
|
-
}
|
|
158
|
-
return {
|
|
159
|
-
buildOrganizationActivationServiceClaims,
|
|
160
|
-
createOrganizationActivationDraft,
|
|
161
|
-
createOrganizationActivation(input) {
|
|
162
|
-
return createOrganizationActivationDraft(input);
|
|
163
|
-
},
|
|
164
|
-
buildOrganizationActivationRequest(input) {
|
|
165
|
-
return buildOrganizationActivationPayload(input);
|
|
166
|
-
},
|
|
167
|
-
buildIndividualActivationRequest(input) {
|
|
168
|
-
return {
|
|
169
|
-
vp_token: input.vpToken,
|
|
170
|
-
...(input.controller ? { controller: input.controller } : {}),
|
|
171
|
-
...(input.data ? { data: input.data } : {}),
|
|
172
|
-
};
|
|
173
|
-
},
|
|
174
|
-
bindControllerIdentity(input) {
|
|
175
|
-
const normalizedPublicKeyJwk = input.publicKeyJwk && typeof input.publicKeyJwk === 'object'
|
|
176
|
-
? input.publicKeyJwk
|
|
177
|
-
: undefined;
|
|
178
|
-
const normalizedJwks = input.jwks?.keys?.length
|
|
179
|
-
? { keys: input.jwks.keys.filter((item) => !!item && typeof item === 'object') }
|
|
180
|
-
: undefined;
|
|
181
|
-
return {
|
|
182
|
-
did: input.did,
|
|
183
|
-
kind: ActorKinds.OrganizationController,
|
|
184
|
-
...(input.sameAs ? { sameAs: input.sameAs } : {}),
|
|
185
|
-
...(normalizedPublicKeyJwk ? { publicKeyJwk: normalizedPublicKeyJwk } : {}),
|
|
186
|
-
...(normalizedJwks ? { jwks: normalizedJwks } : {}),
|
|
187
|
-
};
|
|
188
|
-
},
|
|
189
|
-
validateActivationRequest,
|
|
190
|
-
};
|
|
191
|
-
}
|