gdc-sdk-front-ts 2.1.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/dist/ClientSDK.d.ts +11 -1
- package/dist/ClientSDK.js +13 -1
- package/dist/ProfileManager.js +6 -3
- package/dist/front-clinical-runtime-client.d.ts +69 -0
- package/dist/front-clinical-runtime-client.js +214 -0
- package/dist/frontend-profile-workspace.d.ts +62 -0
- package/dist/frontend-profile-workspace.js +129 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/individual-controller-frontend-runtime.d.ts +9 -3
- package/dist/individual-controller-frontend-runtime.js +7 -6
- package/dist/orchestration/client-port.d.ts +21 -3
- package/dist/orchestration/individual-member-sdk.d.ts +11 -1
- package/dist/orchestration/individual-member-sdk.js +12 -0
- package/dist/orchestration/professional-sdk.d.ts +7 -1
- package/dist/orchestration/professional-sdk.js +6 -0
- package/package.json +3 -3
- package/dist/discovery/HttpDataspaceDiscoveryClient.d.ts +0 -34
- package/dist/discovery/HttpDataspaceDiscoveryClient.js +0 -47
- package/dist/gdc-common-utils-ts/src/AesManager.d.ts +0 -27
- package/dist/gdc-common-utils-ts/src/AesManager.js +0 -64
- package/dist/gdc-common-utils-ts/src/CryptographyService.d.ts +0 -76
- package/dist/gdc-common-utils-ts/src/CryptographyService.js +0 -401
- package/dist/gdc-common-utils-ts/src/constants/actor-session.d.ts +0 -40
- package/dist/gdc-common-utils-ts/src/constants/actor-session.js +0 -40
- package/dist/gdc-common-utils-ts/src/constants/communication.d.ts +0 -28
- package/dist/gdc-common-utils-ts/src/constants/communication.js +0 -14
- package/dist/gdc-common-utils-ts/src/constants/cryptography.d.ts +0 -58
- package/dist/gdc-common-utils-ts/src/constants/cryptography.js +0 -49
- package/dist/gdc-common-utils-ts/src/constants/dataspace-discovery.d.ts +0 -11
- package/dist/gdc-common-utils-ts/src/constants/dataspace-discovery.js +0 -11
- package/dist/gdc-common-utils-ts/src/constants/dataspace-protocol.d.ts +0 -27
- package/dist/gdc-common-utils-ts/src/constants/dataspace-protocol.js +0 -27
- package/dist/gdc-common-utils-ts/src/constants/device.d.ts +0 -16
- package/dist/gdc-common-utils-ts/src/constants/device.js +0 -15
- package/dist/gdc-common-utils-ts/src/constants/did-services.d.ts +0 -42
- package/dist/gdc-common-utils-ts/src/constants/did-services.js +0 -40
- package/dist/gdc-common-utils-ts/src/constants/eu-countries.d.ts +0 -36
- package/dist/gdc-common-utils-ts/src/constants/eu-countries.js +0 -69
- package/dist/gdc-common-utils-ts/src/constants/fhir-code-systems.d.ts +0 -12
- package/dist/gdc-common-utils-ts/src/constants/fhir-code-systems.js +0 -12
- package/dist/gdc-common-utils-ts/src/constants/fhir-resource-types.d.ts +0 -52
- package/dist/gdc-common-utils-ts/src/constants/fhir-resource-types.js +0 -33
- package/dist/gdc-common-utils-ts/src/constants/fhir-versions.d.ts +0 -10
- package/dist/gdc-common-utils-ts/src/constants/fhir-versions.js +0 -10
- package/dist/gdc-common-utils-ts/src/constants/healthcare.d.ts +0 -496
- package/dist/gdc-common-utils-ts/src/constants/healthcare.js +0 -274
- package/dist/gdc-common-utils-ts/src/constants/hl7-roles.d.ts +0 -44
- package/dist/gdc-common-utils-ts/src/constants/hl7-roles.js +0 -208
- package/dist/gdc-common-utils-ts/src/constants/index.d.ts +0 -21
- package/dist/gdc-common-utils-ts/src/constants/index.js +0 -21
- package/dist/gdc-common-utils-ts/src/constants/network.d.ts +0 -25
- package/dist/gdc-common-utils-ts/src/constants/network.js +0 -17
- package/dist/gdc-common-utils-ts/src/constants/schemaorg.d.ts +0 -175
- package/dist/gdc-common-utils-ts/src/constants/schemaorg.js +0 -261
- package/dist/gdc-common-utils-ts/src/constants/sectors.d.ts +0 -24
- package/dist/gdc-common-utils-ts/src/constants/sectors.js +0 -24
- package/dist/gdc-common-utils-ts/src/constants/service-capabilities.d.ts +0 -82
- package/dist/gdc-common-utils-ts/src/constants/service-capabilities.js +0 -105
- package/dist/gdc-common-utils-ts/src/constants/smart.d.ts +0 -12
- package/dist/gdc-common-utils-ts/src/constants/smart.js +0 -12
- package/dist/gdc-common-utils-ts/src/constants/urn.d.ts +0 -11
- package/dist/gdc-common-utils-ts/src/constants/urn.js +0 -11
- package/dist/gdc-common-utils-ts/src/constants/verifiable-credentials.d.ts +0 -34
- package/dist/gdc-common-utils-ts/src/constants/verifiable-credentials.js +0 -42
- package/dist/gdc-common-utils-ts/src/constants/vital-signs.d.ts +0 -75
- package/dist/gdc-common-utils-ts/src/constants/vital-signs.js +0 -33
- package/dist/gdc-common-utils-ts/src/examples/api-flow-examples.d.ts +0 -15
- package/dist/gdc-common-utils-ts/src/examples/api-flow-examples.js +0 -16
- package/dist/gdc-common-utils-ts/src/examples/communication-bundle-session.d.ts +0 -22
- package/dist/gdc-common-utils-ts/src/examples/communication-bundle-session.js +0 -81
- package/dist/gdc-common-utils-ts/src/examples/consent-access.d.ts +0 -30
- package/dist/gdc-common-utils-ts/src/examples/consent-access.js +0 -121
- package/dist/gdc-common-utils-ts/src/examples/contract-examples.d.ts +0 -15
- package/dist/gdc-common-utils-ts/src/examples/contract-examples.js +0 -16
- package/dist/gdc-common-utils-ts/src/examples/dataspace-discovery.d.ts +0 -98
- package/dist/gdc-common-utils-ts/src/examples/dataspace-discovery.js +0 -141
- package/dist/gdc-common-utils-ts/src/examples/frontend-session.d.ts +0 -13
- package/dist/gdc-common-utils-ts/src/examples/frontend-session.js +0 -24
- package/dist/gdc-common-utils-ts/src/examples/ica-activation-proof.d.ts +0 -64
- package/dist/gdc-common-utils-ts/src/examples/ica-activation-proof.js +0 -77
- package/dist/gdc-common-utils-ts/src/examples/index.d.ts +0 -14
- package/dist/gdc-common-utils-ts/src/examples/index.js +0 -14
- package/dist/gdc-common-utils-ts/src/examples/individual-controller.d.ts +0 -100
- package/dist/gdc-common-utils-ts/src/examples/individual-controller.js +0 -71
- package/dist/gdc-common-utils-ts/src/examples/lifecycle.d.ts +0 -505
- package/dist/gdc-common-utils-ts/src/examples/lifecycle.js +0 -291
- package/dist/gdc-common-utils-ts/src/examples/organization-controller.d.ts +0 -163
- package/dist/gdc-common-utils-ts/src/examples/organization-controller.js +0 -93
- package/dist/gdc-common-utils-ts/src/examples/professional.d.ts +0 -228
- package/dist/gdc-common-utils-ts/src/examples/professional.js +0 -324
- package/dist/gdc-common-utils-ts/src/examples/related-person.d.ts +0 -10
- package/dist/gdc-common-utils-ts/src/examples/related-person.js +0 -13
- package/dist/gdc-common-utils-ts/src/examples/relationship-access.d.ts +0 -11
- package/dist/gdc-common-utils-ts/src/examples/relationship-access.js +0 -96
- package/dist/gdc-common-utils-ts/src/examples/shared.d.ts +0 -220
- package/dist/gdc-common-utils-ts/src/examples/shared.js +0 -191
- package/dist/gdc-common-utils-ts/src/hmac.d.ts +0 -14
- package/dist/gdc-common-utils-ts/src/hmac.js +0 -24
- package/dist/gdc-common-utils-ts/src/i18n/clinical-sections.i18n.d.ts +0 -6
- package/dist/gdc-common-utils-ts/src/i18n/clinical-sections.i18n.js +0 -15
- package/dist/gdc-common-utils-ts/src/i18n/role-codes.i18n.d.ts +0 -4
- package/dist/gdc-common-utils-ts/src/i18n/role-codes.i18n.js +0 -13
- package/dist/gdc-common-utils-ts/src/index.d.ts +0 -10
- package/dist/gdc-common-utils-ts/src/index.js +0 -10
- package/dist/gdc-common-utils-ts/src/interfaces/Cryptography.types.d.ts +0 -139
- package/dist/gdc-common-utils-ts/src/interfaces/Cryptography.types.js +0 -8
- package/dist/gdc-common-utils-ts/src/interfaces/ICryptoHelper.d.ts +0 -28
- package/dist/gdc-common-utils-ts/src/interfaces/ICryptoHelper.js +0 -3
- package/dist/gdc-common-utils-ts/src/interfaces/ICryptography.d.ts +0 -154
- package/dist/gdc-common-utils-ts/src/interfaces/ICryptography.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/actor-session.d.ts +0 -9
- package/dist/gdc-common-utils-ts/src/models/actor-session.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/aes.d.ts +0 -85
- package/dist/gdc-common-utils-ts/src/models/aes.js +0 -10
- package/dist/gdc-common-utils-ts/src/models/auth.d.ts +0 -35
- package/dist/gdc-common-utils-ts/src/models/auth.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/bundle.d.ts +0 -153
- package/dist/gdc-common-utils-ts/src/models/bundle.js +0 -25
- package/dist/gdc-common-utils-ts/src/models/clinical-sections.d.ts +0 -36
- package/dist/gdc-common-utils-ts/src/models/clinical-sections.en.d.ts +0 -150
- package/dist/gdc-common-utils-ts/src/models/clinical-sections.en.js +0 -104
- package/dist/gdc-common-utils-ts/src/models/clinical-sections.js +0 -32
- package/dist/gdc-common-utils-ts/src/models/clinical-workbook-summary.d.ts +0 -126
- package/dist/gdc-common-utils-ts/src/models/clinical-workbook-summary.js +0 -67
- package/dist/gdc-common-utils-ts/src/models/comm.d.ts +0 -56
- package/dist/gdc-common-utils-ts/src/models/comm.js +0 -4
- package/dist/gdc-common-utils-ts/src/models/confidential-job.d.ts +0 -78
- package/dist/gdc-common-utils-ts/src/models/confidential-job.js +0 -20
- package/dist/gdc-common-utils-ts/src/models/confidential-message.d.ts +0 -97
- package/dist/gdc-common-utils-ts/src/models/confidential-message.js +0 -4
- package/dist/gdc-common-utils-ts/src/models/confidential-storage.d.ts +0 -134
- package/dist/gdc-common-utils-ts/src/models/confidential-storage.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/consent-access.d.ts +0 -79
- package/dist/gdc-common-utils-ts/src/models/consent-access.js +0 -2
- package/dist/gdc-common-utils-ts/src/models/consent-rule.d.ts +0 -122
- package/dist/gdc-common-utils-ts/src/models/consent-rule.js +0 -22
- package/dist/gdc-common-utils-ts/src/models/crypto.d.ts +0 -35
- package/dist/gdc-common-utils-ts/src/models/crypto.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/dataspace-discovery-defaults.d.ts +0 -79
- package/dist/gdc-common-utils-ts/src/models/dataspace-discovery-defaults.js +0 -2
- package/dist/gdc-common-utils-ts/src/models/dataspace-discovery.d.ts +0 -68
- package/dist/gdc-common-utils-ts/src/models/dataspace-discovery.js +0 -9
- package/dist/gdc-common-utils-ts/src/models/dataspace-protocol.d.ts +0 -14
- package/dist/gdc-common-utils-ts/src/models/dataspace-protocol.js +0 -2
- package/dist/gdc-common-utils-ts/src/models/device-license.d.ts +0 -134
- package/dist/gdc-common-utils-ts/src/models/device-license.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/did.d.ts +0 -108
- package/dist/gdc-common-utils-ts/src/models/did.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/fhir-documents.d.ts +0 -101
- package/dist/gdc-common-utils-ts/src/models/fhir-documents.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/identity-bootstrap.d.ts +0 -104
- package/dist/gdc-common-utils-ts/src/models/identity-bootstrap.js +0 -2
- package/dist/gdc-common-utils-ts/src/models/index.d.ts +0 -42
- package/dist/gdc-common-utils-ts/src/models/index.js +0 -42
- package/dist/gdc-common-utils-ts/src/models/indexing.d.ts +0 -11
- package/dist/gdc-common-utils-ts/src/models/indexing.js +0 -18
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/allergy-intolerance-claims.d.ts +0 -24
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/allergy-intolerance-claims.js +0 -36
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/communication-claims.d.ts +0 -53
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/communication-claims.js +0 -55
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/condition-claims.d.ts +0 -14
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/condition-claims.js +0 -25
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/device-use-statement-claims.d.ts +0 -13
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/device-use-statement-claims.js +0 -23
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/document-reference-claims.d.ts +0 -36
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/document-reference-claims.js +0 -89
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/medication-statement-claims.d.ts +0 -341
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/medication-statement-claims.js +0 -204
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/types.d.ts +0 -9
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims/types.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims.d.ts +0 -5
- package/dist/gdc-common-utils-ts/src/models/interoperable-claims.js +0 -7
- package/dist/gdc-common-utils-ts/src/models/issue.d.ts +0 -57
- package/dist/gdc-common-utils-ts/src/models/issue.js +0 -75
- package/dist/gdc-common-utils-ts/src/models/jsonapi.d.ts +0 -13
- package/dist/gdc-common-utils-ts/src/models/jsonapi.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/jwe.d.ts +0 -120
- package/dist/gdc-common-utils-ts/src/models/jwe.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/jwk.d.ts +0 -39
- package/dist/gdc-common-utils-ts/src/models/jwk.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/jws.d.ts +0 -35
- package/dist/gdc-common-utils-ts/src/models/jws.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/jwt.d.ts +0 -9
- package/dist/gdc-common-utils-ts/src/models/jwt.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/loinc-document-ontology.d.ts +0 -55
- package/dist/gdc-common-utils-ts/src/models/loinc-document-ontology.js +0 -58
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.common.model.d.ts +0 -33
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.common.model.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.document.model.d.ts +0 -50
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.document.model.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.electronicRecord.model.d.ts +0 -67
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.electronicRecord.model.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.evidence.model.d.ts +0 -51
- package/dist/gdc-common-utils-ts/src/models/oidc4ida.evidence.model.js +0 -5
- package/dist/gdc-common-utils-ts/src/models/openid-device.d.ts +0 -119
- package/dist/gdc-common-utils-ts/src/models/openid-device.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/operation-outcome.d.ts +0 -26
- package/dist/gdc-common-utils-ts/src/models/operation-outcome.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/params.d.ts +0 -133
- package/dist/gdc-common-utils-ts/src/models/params.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/relationship-access.d.ts +0 -160
- package/dist/gdc-common-utils-ts/src/models/relationship-access.js +0 -21
- package/dist/gdc-common-utils-ts/src/models/resource-document.d.ts +0 -14
- package/dist/gdc-common-utils-ts/src/models/resource-document.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/response.d.ts +0 -1
- package/dist/gdc-common-utils-ts/src/models/response.js +0 -3
- package/dist/gdc-common-utils-ts/src/models/urlPath.d.ts +0 -58
- package/dist/gdc-common-utils-ts/src/models/urlPath.js +0 -76
- package/dist/gdc-common-utils-ts/src/models/verifiable-credential.d.ts +0 -45
- package/dist/gdc-common-utils-ts/src/models/verifiable-credential.js +0 -8
- package/dist/gdc-common-utils-ts/src/storage/IVaultRepository.d.ts +0 -53
- package/dist/gdc-common-utils-ts/src/storage/IVaultRepository.js +0 -25
- package/dist/gdc-common-utils-ts/src/storage/VaultMemRepository.d.ts +0 -30
- package/dist/gdc-common-utils-ts/src/storage/VaultMemRepository.js +0 -81
- package/dist/gdc-common-utils-ts/src/storage/index.d.ts +0 -3
- package/dist/gdc-common-utils-ts/src/storage/index.js +0 -4
- package/dist/gdc-common-utils-ts/src/utils/activation-policy.d.ts +0 -86
- package/dist/gdc-common-utils-ts/src/utils/activation-policy.js +0 -218
- package/dist/gdc-common-utils-ts/src/utils/activation-request.d.ts +0 -81
- package/dist/gdc-common-utils-ts/src/utils/activation-request.js +0 -99
- package/dist/gdc-common-utils-ts/src/utils/actor.d.ts +0 -18
- package/dist/gdc-common-utils-ts/src/utils/actor.js +0 -36
- package/dist/gdc-common-utils-ts/src/utils/base-convert.d.ts +0 -60
- package/dist/gdc-common-utils-ts/src/utils/base-convert.js +0 -104
- package/dist/gdc-common-utils-ts/src/utils/baseN.d.ts +0 -35
- package/dist/gdc-common-utils-ts/src/utils/baseN.js +0 -174
- package/dist/gdc-common-utils-ts/src/utils/bundle-query.d.ts +0 -35
- package/dist/gdc-common-utils-ts/src/utils/bundle-query.js +0 -177
- package/dist/gdc-common-utils-ts/src/utils/bundle.d.ts +0 -13
- package/dist/gdc-common-utils-ts/src/utils/bundle.js +0 -39
- package/dist/gdc-common-utils-ts/src/utils/clinical-resource-converters.d.ts +0 -64
- package/dist/gdc-common-utils-ts/src/utils/clinical-resource-converters.js +0 -279
- package/dist/gdc-common-utils-ts/src/utils/clinical-resource-view.d.ts +0 -55
- package/dist/gdc-common-utils-ts/src/utils/clinical-resource-view.js +0 -291
- package/dist/gdc-common-utils-ts/src/utils/communication-bundle-session.d.ts +0 -110
- package/dist/gdc-common-utils-ts/src/utils/communication-bundle-session.js +0 -326
- package/dist/gdc-common-utils-ts/src/utils/communication-document-reference.d.ts +0 -41
- package/dist/gdc-common-utils-ts/src/utils/communication-document-reference.js +0 -170
- package/dist/gdc-common-utils-ts/src/utils/communication-fhir-r4.d.ts +0 -41
- package/dist/gdc-common-utils-ts/src/utils/communication-fhir-r4.js +0 -215
- package/dist/gdc-common-utils-ts/src/utils/communication-identity.d.ts +0 -152
- package/dist/gdc-common-utils-ts/src/utils/communication-identity.js +0 -121
- package/dist/gdc-common-utils-ts/src/utils/consent-claim-helpers.d.ts +0 -79
- package/dist/gdc-common-utils-ts/src/utils/consent-claim-helpers.js +0 -213
- package/dist/gdc-common-utils-ts/src/utils/consent.d.ts +0 -218
- package/dist/gdc-common-utils-ts/src/utils/consent.js +0 -679
- package/dist/gdc-common-utils-ts/src/utils/content.d.ts +0 -55
- package/dist/gdc-common-utils-ts/src/utils/content.js +0 -60
- package/dist/gdc-common-utils-ts/src/utils/dataspace-discovery-defaults.d.ts +0 -130
- package/dist/gdc-common-utils-ts/src/utils/dataspace-discovery-defaults.js +0 -307
- package/dist/gdc-common-utils-ts/src/utils/dataspace-discovery.d.ts +0 -235
- package/dist/gdc-common-utils-ts/src/utils/dataspace-discovery.js +0 -482
- package/dist/gdc-common-utils-ts/src/utils/dataspace-protocol.d.ts +0 -66
- package/dist/gdc-common-utils-ts/src/utils/dataspace-protocol.js +0 -109
- package/dist/gdc-common-utils-ts/src/utils/did-resolution.d.ts +0 -60
- package/dist/gdc-common-utils-ts/src/utils/did-resolution.js +0 -173
- package/dist/gdc-common-utils-ts/src/utils/did.d.ts +0 -124
- package/dist/gdc-common-utils-ts/src/utils/did.js +0 -204
- package/dist/gdc-common-utils-ts/src/utils/didcomm-submit-policy.d.ts +0 -10
- package/dist/gdc-common-utils-ts/src/utils/didcomm-submit-policy.js +0 -15
- package/dist/gdc-common-utils-ts/src/utils/didcomm-submit.d.ts +0 -48
- package/dist/gdc-common-utils-ts/src/utils/didcomm-submit.js +0 -81
- package/dist/gdc-common-utils-ts/src/utils/didcomm.d.ts +0 -60
- package/dist/gdc-common-utils-ts/src/utils/didcomm.js +0 -78
- package/dist/gdc-common-utils-ts/src/utils/discovery-normalization.d.ts +0 -28
- package/dist/gdc-common-utils-ts/src/utils/discovery-normalization.js +0 -64
- package/dist/gdc-common-utils-ts/src/utils/fhir-cid.d.ts +0 -60
- package/dist/gdc-common-utils-ts/src/utils/fhir-cid.js +0 -152
- package/dist/gdc-common-utils-ts/src/utils/fhir-validator.d.ts +0 -61
- package/dist/gdc-common-utils-ts/src/utils/fhir-validator.js +0 -91
- package/dist/gdc-common-utils-ts/src/utils/format-converter.d.ts +0 -21
- package/dist/gdc-common-utils-ts/src/utils/format-converter.js +0 -109
- package/dist/gdc-common-utils-ts/src/utils/index.d.ts +0 -39
- package/dist/gdc-common-utils-ts/src/utils/index.js +0 -39
- package/dist/gdc-common-utils-ts/src/utils/individual-form-pdf.d.ts +0 -55
- package/dist/gdc-common-utils-ts/src/utils/individual-form-pdf.js +0 -191
- package/dist/gdc-common-utils-ts/src/utils/jwt.d.ts +0 -53
- package/dist/gdc-common-utils-ts/src/utils/jwt.js +0 -154
- package/dist/gdc-common-utils-ts/src/utils/manager-error.d.ts +0 -15
- package/dist/gdc-common-utils-ts/src/utils/manager-error.js +0 -21
- package/dist/gdc-common-utils-ts/src/utils/medication-claim-helpers.d.ts +0 -56
- package/dist/gdc-common-utils-ts/src/utils/medication-claim-helpers.js +0 -127
- package/dist/gdc-common-utils-ts/src/utils/multibase58.d.ts +0 -13
- package/dist/gdc-common-utils-ts/src/utils/multibase58.js +0 -40
- package/dist/gdc-common-utils-ts/src/utils/multibasehash.d.ts +0 -8
- package/dist/gdc-common-utils-ts/src/utils/multibasehash.js +0 -23
- package/dist/gdc-common-utils-ts/src/utils/normalize-uuid.d.ts +0 -1
- package/dist/gdc-common-utils-ts/src/utils/normalize-uuid.js +0 -35
- package/dist/gdc-common-utils-ts/src/utils/normalize.d.ts +0 -16
- package/dist/gdc-common-utils-ts/src/utils/normalize.js +0 -40
- package/dist/gdc-common-utils-ts/src/utils/object-convert.d.ts +0 -20
- package/dist/gdc-common-utils-ts/src/utils/object-convert.js +0 -51
- package/dist/gdc-common-utils-ts/src/utils/smart-scope.d.ts +0 -28
- package/dist/gdc-common-utils-ts/src/utils/smart-scope.js +0 -29
- package/dist/gdc-common-utils-ts/src/utils/string-convert.d.ts +0 -24
- package/dist/gdc-common-utils-ts/src/utils/string-convert.js +0 -62
- package/dist/gdc-common-utils-ts/src/utils/string-utils.d.ts +0 -25
- package/dist/gdc-common-utils-ts/src/utils/string-utils.js +0 -66
- package/dist/gdc-common-utils-ts/src/utils/url.d.ts +0 -26
- package/dist/gdc-common-utils-ts/src/utils/url.js +0 -44
- package/dist/gdc-common-utils-ts/src/utils/vp-token.d.ts +0 -139
- package/dist/gdc-common-utils-ts/src/utils/vp-token.js +0 -256
- package/dist/gdc-sdk-core-ts/src/actor-model.d.ts +0 -56
- package/dist/gdc-sdk-core-ts/src/actor-model.js +0 -112
- package/dist/gdc-sdk-core-ts/src/app-identity.d.ts +0 -80
- package/dist/gdc-sdk-core-ts/src/app-identity.js +0 -147
- package/dist/gdc-sdk-core-ts/src/bootstrap-facade.d.ts +0 -165
- package/dist/gdc-sdk-core-ts/src/bootstrap-facade.js +0 -191
- package/dist/gdc-sdk-core-ts/src/communication-bundle-contracts.d.ts +0 -112
- package/dist/gdc-sdk-core-ts/src/communication-bundle-contracts.js +0 -185
- package/dist/gdc-sdk-core-ts/src/communication-bundle-resources.d.ts +0 -32
- package/dist/gdc-sdk-core-ts/src/communication-bundle-resources.js +0 -215
- package/dist/gdc-sdk-core-ts/src/communication-consent-mutation-contract.d.ts +0 -55
- package/dist/gdc-sdk-core-ts/src/communication-consent-mutation-contract.js +0 -190
- package/dist/gdc-sdk-core-ts/src/communication-document-facade.d.ts +0 -55
- package/dist/gdc-sdk-core-ts/src/communication-document-facade.js +0 -194
- package/dist/gdc-sdk-core-ts/src/communication-draft.d.ts +0 -104
- package/dist/gdc-sdk-core-ts/src/communication-draft.js +0 -143
- package/dist/gdc-sdk-core-ts/src/communication-outbox.d.ts +0 -49
- package/dist/gdc-sdk-core-ts/src/communication-outbox.js +0 -62
- package/dist/gdc-sdk-core-ts/src/communication-resource-helpers.d.ts +0 -180
- package/dist/gdc-sdk-core-ts/src/communication-resource-helpers.js +0 -455
- package/dist/gdc-sdk-core-ts/src/consent-access.d.ts +0 -73
- package/dist/gdc-sdk-core-ts/src/consent-access.js +0 -109
- package/dist/gdc-sdk-core-ts/src/consent-claim-helpers.d.ts +0 -5
- package/dist/gdc-sdk-core-ts/src/consent-claim-helpers.js +0 -6
- package/dist/gdc-sdk-core-ts/src/consent-communication-operations.d.ts +0 -82
- package/dist/gdc-sdk-core-ts/src/consent-communication-operations.js +0 -135
- package/dist/gdc-sdk-core-ts/src/did-resolution-session.d.ts +0 -33
- package/dist/gdc-sdk-core-ts/src/did-resolution-session.js +0 -56
- package/dist/gdc-sdk-core-ts/src/discovery-facade.d.ts +0 -84
- package/dist/gdc-sdk-core-ts/src/discovery-facade.js +0 -24
- package/dist/gdc-sdk-core-ts/src/identity-model.d.ts +0 -46
- package/dist/gdc-sdk-core-ts/src/identity-model.js +0 -2
- package/dist/gdc-sdk-core-ts/src/identity-store.d.ts +0 -83
- package/dist/gdc-sdk-core-ts/src/identity-store.js +0 -51
- package/dist/gdc-sdk-core-ts/src/index.d.ts +0 -23
- package/dist/gdc-sdk-core-ts/src/index.js +0 -24
- package/dist/gdc-sdk-core-ts/src/medication-claim-helpers.d.ts +0 -5
- package/dist/gdc-sdk-core-ts/src/medication-claim-helpers.js +0 -6
- package/dist/gdc-sdk-core-ts/src/polling-model.d.ts +0 -35
- package/dist/gdc-sdk-core-ts/src/polling-model.js +0 -24
- package/dist/gdc-sdk-core-ts/src/relationship-access.d.ts +0 -40
- package/dist/gdc-sdk-core-ts/src/relationship-access.js +0 -150
- package/dist/gdc-sdk-core-ts/src/session-model.d.ts +0 -134
- package/dist/gdc-sdk-core-ts/src/session-model.js +0 -2
- package/dist/gdc-sdk-core-ts/src/smart-endpoint-resolver.d.ts +0 -19
- package/dist/gdc-sdk-core-ts/src/smart-endpoint-resolver.js +0 -19
- package/dist/gdc-sdk-core-ts/src/vital-signs.d.ts +0 -38
- package/dist/gdc-sdk-core-ts/src/vital-signs.js +0 -155
- package/dist/gdc-sdk-front-ts/src/ClientSDK.d.ts +0 -99
- package/dist/gdc-sdk-front-ts/src/ClientSDK.js +0 -177
- package/dist/gdc-sdk-front-ts/src/ProfileManager.d.ts +0 -140
- package/dist/gdc-sdk-front-ts/src/ProfileManager.js +0 -76
- package/dist/gdc-sdk-front-ts/src/ProfileRegistry.d.ts +0 -11
- package/dist/gdc-sdk-front-ts/src/ProfileRegistry.js +0 -26
- package/dist/gdc-sdk-front-ts/src/VerifierService.d.ts +0 -6
- package/dist/gdc-sdk-front-ts/src/VerifierService.js +0 -10
- package/dist/gdc-sdk-front-ts/src/actor-session.d.ts +0 -2
- package/dist/gdc-sdk-front-ts/src/actor-session.js +0 -2
- package/dist/gdc-sdk-front-ts/src/capabilityMapper.d.ts +0 -8
- package/dist/gdc-sdk-front-ts/src/capabilityMapper.js +0 -28
- package/dist/gdc-sdk-front-ts/src/consent-claim-helpers.d.ts +0 -4
- package/dist/gdc-sdk-front-ts/src/consent-claim-helpers.js +0 -5
- package/dist/gdc-sdk-front-ts/src/discovery/DataspaceDiscoveryClient.d.ts +0 -54
- package/dist/gdc-sdk-front-ts/src/discovery/DataspaceDiscoveryClient.js +0 -85
- package/dist/gdc-sdk-front-ts/src/discovery/index.d.ts +0 -3
- package/dist/gdc-sdk-front-ts/src/discovery/index.js +0 -4
- package/dist/gdc-sdk-front-ts/src/discovery/mappers.d.ts +0 -29
- package/dist/gdc-sdk-front-ts/src/discovery/mappers.js +0 -60
- package/dist/gdc-sdk-front-ts/src/discovery/types.d.ts +0 -83
- package/dist/gdc-sdk-front-ts/src/discovery/types.js +0 -2
- package/dist/gdc-sdk-front-ts/src/index.d.ts +0 -15
- package/dist/gdc-sdk-front-ts/src/index.js +0 -16
- package/dist/gdc-sdk-front-ts/src/medication-claim-helpers.d.ts +0 -4
- package/dist/gdc-sdk-front-ts/src/medication-claim-helpers.js +0 -5
- package/dist/gdc-sdk-front-ts/src/roleRegistry.d.ts +0 -19
- package/dist/gdc-sdk-front-ts/src/roleRegistry.js +0 -2
- package/dist/gdc-sdk-front-ts/src/runtime-contracts.d.ts +0 -22
- package/dist/gdc-sdk-front-ts/src/runtime-contracts.js +0 -7
- package/dist/gdc-sdk-front-ts/src/services.d.ts +0 -167
- package/dist/gdc-sdk-front-ts/src/services.js +0 -78
- package/dist/gdc-sdk-front-ts/src/session-descriptor.d.ts +0 -11
- package/dist/gdc-sdk-front-ts/src/session-descriptor.js +0 -8
- package/dist/gdc-sdk-front-ts/src/types.d.ts +0 -11
- package/dist/gdc-sdk-front-ts/src/types.js +0 -1
- package/dist/lifecycle-examples.d.ts +0 -6
- package/dist/lifecycle-examples.js +0 -7
- package/dist/medication-claim-helpers.d.ts +0 -4
- package/dist/medication-claim-helpers.js +0 -5
- package/dist/orchestration/facades.d.ts +0 -65
- package/dist/orchestration/facades.js +0 -142
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
export type AttachmentObj = {
|
|
2
|
-
id?: string;
|
|
3
|
-
contentType?: string;
|
|
4
|
-
title?: string;
|
|
5
|
-
dataBase64?: string;
|
|
6
|
-
url?: string;
|
|
7
|
-
contentHash?: string;
|
|
8
|
-
};
|
|
9
|
-
export type CommunicationInput = {
|
|
10
|
-
thid?: string;
|
|
11
|
-
pthid?: string;
|
|
12
|
-
channelId?: string;
|
|
13
|
-
partOf?: string;
|
|
14
|
-
subject: string;
|
|
15
|
-
sender?: string;
|
|
16
|
-
recipient?: string | string[];
|
|
17
|
-
sent?: string;
|
|
18
|
-
category?: string | string[];
|
|
19
|
-
text?: string;
|
|
20
|
-
attachments?: AttachmentObj[];
|
|
21
|
-
contentReference?: string | string[];
|
|
22
|
-
claims?: Record<string, unknown>;
|
|
23
|
-
payload?: Record<string, unknown>;
|
|
24
|
-
};
|
|
25
|
-
export type CommMsgExtendedInput = {
|
|
26
|
-
thid?: string;
|
|
27
|
-
pthid?: string;
|
|
28
|
-
channelId?: string;
|
|
29
|
-
partOf?: string;
|
|
30
|
-
from?: string;
|
|
31
|
-
to?: string[];
|
|
32
|
-
subject?: string;
|
|
33
|
-
body?: Record<string, unknown>;
|
|
34
|
-
claims?: Record<string, unknown>;
|
|
35
|
-
};
|
|
36
|
-
export type DateRange = {
|
|
37
|
-
start?: string;
|
|
38
|
-
end?: string;
|
|
39
|
-
};
|
|
40
|
-
export type SectionFilter = {
|
|
41
|
-
anyOf?: string[];
|
|
42
|
-
allOf?: string[];
|
|
43
|
-
};
|
|
44
|
-
declare const includedResourceTypes: readonly ["Communication", "Composition", "DocumentReference", "AllergyIntolerance", "Condition", "MedicationStatement", "Observation", "Procedure", "Immunization", "RelatedPerson", "DiagnosticReport", "CarePlan", "Encounter", "AdverseEvent", "Consent", "Appointment"];
|
|
45
|
-
export type IncludedResourceType = typeof includedResourceTypes[number];
|
|
46
|
-
export type BundleSearchQuery = {
|
|
47
|
-
subject: string;
|
|
48
|
-
section?: SectionFilter;
|
|
49
|
-
date?: DateRange;
|
|
50
|
-
includedTypes?: IncludedResourceType[];
|
|
51
|
-
code?: string | string[];
|
|
52
|
-
category?: string | string[];
|
|
53
|
-
author?: string | string[];
|
|
54
|
-
thid?: string;
|
|
55
|
-
pthid?: string;
|
|
56
|
-
channelId?: string;
|
|
57
|
-
partOf?: string;
|
|
58
|
-
searchParams?: Record<string, string | number | boolean | undefined>;
|
|
59
|
-
};
|
|
60
|
-
export type CompositionSearchQuery = {
|
|
61
|
-
subject: string;
|
|
62
|
-
section?: SectionFilter;
|
|
63
|
-
date?: DateRange;
|
|
64
|
-
type?: string | string[];
|
|
65
|
-
author?: string | string[];
|
|
66
|
-
searchParams?: Record<string, string | number | boolean | undefined>;
|
|
67
|
-
};
|
|
68
|
-
export type ProjectedResourceSummary = {
|
|
69
|
-
resourceType: IncludedResourceType | string;
|
|
70
|
-
id: string;
|
|
71
|
-
subject?: string;
|
|
72
|
-
effectiveDateTime?: string;
|
|
73
|
-
code?: string;
|
|
74
|
-
category?: string;
|
|
75
|
-
sourceCommunicationId?: string;
|
|
76
|
-
};
|
|
77
|
-
export type BundleSearchResult = {
|
|
78
|
-
total: number;
|
|
79
|
-
entries: ProjectedResourceSummary[];
|
|
80
|
-
bundle?: Record<string, unknown>;
|
|
81
|
-
};
|
|
82
|
-
export type CommunicationAuditRecord = {
|
|
83
|
-
communicationId: string;
|
|
84
|
-
thid?: string;
|
|
85
|
-
pthid?: string;
|
|
86
|
-
channelId?: string;
|
|
87
|
-
partOf?: string;
|
|
88
|
-
subject: string;
|
|
89
|
-
sender?: string;
|
|
90
|
-
recipient?: string | string[];
|
|
91
|
-
createdAt: string;
|
|
92
|
-
resourceIds?: string[];
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* Validates the shape of a runtime-neutral `CommunicationInput`.
|
|
96
|
-
*
|
|
97
|
-
* @param value Candidate value to validate.
|
|
98
|
-
*/
|
|
99
|
-
export declare function assertCommunicationInput(value: unknown): asserts value is CommunicationInput;
|
|
100
|
-
/**
|
|
101
|
-
* Validates the shape of a runtime-neutral `CommMsgExtendedInput`.
|
|
102
|
-
*
|
|
103
|
-
* @param value Candidate value to validate.
|
|
104
|
-
*/
|
|
105
|
-
export declare function assertCommMsgExtendedInput(value: unknown): asserts value is CommMsgExtendedInput;
|
|
106
|
-
/**
|
|
107
|
-
* Validates the shape of a canonical clinical `BundleSearchQuery`.
|
|
108
|
-
*
|
|
109
|
-
* @param value Candidate value to validate.
|
|
110
|
-
*/
|
|
111
|
-
export declare function assertBundleSearchQuery(value: unknown): asserts value is BundleSearchQuery;
|
|
112
|
-
export {};
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
import { ResourceTypesFhirR4 } from 'gdc-common-utils-ts/constants/fhir-resource-types';
|
|
3
|
-
const includedResourceTypes = [
|
|
4
|
-
ResourceTypesFhirR4.Communication,
|
|
5
|
-
ResourceTypesFhirR4.Composition,
|
|
6
|
-
ResourceTypesFhirR4.DocumentReference,
|
|
7
|
-
ResourceTypesFhirR4.AllergyIntolerance,
|
|
8
|
-
ResourceTypesFhirR4.Condition,
|
|
9
|
-
ResourceTypesFhirR4.MedicationStatement,
|
|
10
|
-
ResourceTypesFhirR4.Observation,
|
|
11
|
-
ResourceTypesFhirR4.Procedure,
|
|
12
|
-
ResourceTypesFhirR4.Immunization,
|
|
13
|
-
ResourceTypesFhirR4.RelatedPerson,
|
|
14
|
-
ResourceTypesFhirR4.DiagnosticReport,
|
|
15
|
-
ResourceTypesFhirR4.CarePlan,
|
|
16
|
-
ResourceTypesFhirR4.Encounter,
|
|
17
|
-
ResourceTypesFhirR4.AdverseEvent,
|
|
18
|
-
ResourceTypesFhirR4.Consent,
|
|
19
|
-
ResourceTypesFhirR4.Appointment,
|
|
20
|
-
];
|
|
21
|
-
function assertPlainObject(value, name) {
|
|
22
|
-
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
23
|
-
throw new TypeError(`${name} must be a plain object`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function assertOptionalStringField(value, fieldName) {
|
|
27
|
-
if (value[fieldName] !== undefined && typeof value[fieldName] !== 'string') {
|
|
28
|
-
throw new TypeError(`${fieldName} must be a string`);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function assertStringField(value, fieldName) {
|
|
32
|
-
if (typeof value[fieldName] !== 'string') {
|
|
33
|
-
throw new TypeError(`${fieldName} must be a string`);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function assertStringArrayField(value, fieldName) {
|
|
37
|
-
const candidate = value[fieldName];
|
|
38
|
-
if (!Array.isArray(candidate) || candidate.some(item => typeof item !== 'string')) {
|
|
39
|
-
throw new TypeError(`${fieldName} must be an array of strings`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function assertThreadFields(value) {
|
|
43
|
-
assertOptionalStringField(value, 'thid');
|
|
44
|
-
assertOptionalStringField(value, 'pthid');
|
|
45
|
-
assertOptionalStringField(value, 'channelId');
|
|
46
|
-
assertOptionalStringField(value, 'partOf');
|
|
47
|
-
}
|
|
48
|
-
function assertStringOrStringArrayField(value, fieldName) {
|
|
49
|
-
const candidate = value[fieldName];
|
|
50
|
-
if (candidate === undefined) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
if (typeof candidate === 'string') {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
if (Array.isArray(candidate) && candidate.every(item => typeof item === 'string')) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
throw new TypeError(`${fieldName} must be a string or an array of strings`);
|
|
60
|
-
}
|
|
61
|
-
function assertAttachmentObject(value, index) {
|
|
62
|
-
assertPlainObject(value, `attachments[${index}]`);
|
|
63
|
-
assertOptionalStringField(value, 'id');
|
|
64
|
-
assertOptionalStringField(value, 'contentType');
|
|
65
|
-
assertOptionalStringField(value, 'title');
|
|
66
|
-
assertOptionalStringField(value, 'dataBase64');
|
|
67
|
-
assertOptionalStringField(value, 'url');
|
|
68
|
-
assertOptionalStringField(value, 'contentHash');
|
|
69
|
-
}
|
|
70
|
-
function assertSectionFilter(value) {
|
|
71
|
-
assertPlainObject(value, 'section');
|
|
72
|
-
if (value.anyOf !== undefined) {
|
|
73
|
-
assertStringArrayField({ 'section.anyOf': value.anyOf }, 'section.anyOf');
|
|
74
|
-
}
|
|
75
|
-
if (value.allOf !== undefined) {
|
|
76
|
-
assertStringArrayField({ 'section.allOf': value.allOf }, 'section.allOf');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
function assertDateRange(value) {
|
|
80
|
-
assertPlainObject(value, 'date');
|
|
81
|
-
assertOptionalStringField({ 'date.start': value.start }, 'date.start');
|
|
82
|
-
assertOptionalStringField({ 'date.end': value.end }, 'date.end');
|
|
83
|
-
}
|
|
84
|
-
const includedResourceTypeSet = new Set(includedResourceTypes);
|
|
85
|
-
function assertIncludedTypes(value) {
|
|
86
|
-
if (!Array.isArray(value) || value.some(item => typeof item !== 'string' || !includedResourceTypeSet.has(item))) {
|
|
87
|
-
throw new TypeError('includedTypes must be an array of supported resource types');
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
function assertPrimitiveSearchParams(value) {
|
|
91
|
-
for (const [key, candidate] of Object.entries(value)) {
|
|
92
|
-
if (candidate !== undefined &&
|
|
93
|
-
typeof candidate !== 'string' &&
|
|
94
|
-
typeof candidate !== 'number' &&
|
|
95
|
-
typeof candidate !== 'boolean') {
|
|
96
|
-
throw new TypeError(`searchParams.${key} must be a string, number, boolean, or undefined`);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
function assertStringOrStringArrayValue(value, fieldName) {
|
|
101
|
-
if (value === undefined) {
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
if (typeof value === 'string') {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
if (Array.isArray(value) && value.every(item => typeof item === 'string')) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
throw new TypeError(`${fieldName} must be a string or an array of strings`);
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Validates the shape of a runtime-neutral `CommunicationInput`.
|
|
114
|
-
*
|
|
115
|
-
* @param value Candidate value to validate.
|
|
116
|
-
*/
|
|
117
|
-
export function assertCommunicationInput(value) {
|
|
118
|
-
assertPlainObject(value, 'CommunicationInput');
|
|
119
|
-
assertStringField(value, 'subject');
|
|
120
|
-
assertThreadFields(value);
|
|
121
|
-
assertOptionalStringField(value, 'sender');
|
|
122
|
-
assertStringOrStringArrayValue(value.recipient, 'recipient');
|
|
123
|
-
assertOptionalStringField(value, 'sent');
|
|
124
|
-
assertStringOrStringArrayValue(value.category, 'category');
|
|
125
|
-
assertOptionalStringField(value, 'text');
|
|
126
|
-
if (value.attachments !== undefined) {
|
|
127
|
-
if (!Array.isArray(value.attachments)) {
|
|
128
|
-
throw new TypeError('attachments must be an array');
|
|
129
|
-
}
|
|
130
|
-
value.attachments.forEach((attachment, index) => assertAttachmentObject(attachment, index));
|
|
131
|
-
}
|
|
132
|
-
assertStringOrStringArrayValue(value.contentReference, 'contentReference');
|
|
133
|
-
if (value.claims !== undefined) {
|
|
134
|
-
assertPlainObject(value.claims, 'claims');
|
|
135
|
-
}
|
|
136
|
-
if (value.payload !== undefined) {
|
|
137
|
-
assertPlainObject(value.payload, 'payload');
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Validates the shape of a runtime-neutral `CommMsgExtendedInput`.
|
|
142
|
-
*
|
|
143
|
-
* @param value Candidate value to validate.
|
|
144
|
-
*/
|
|
145
|
-
export function assertCommMsgExtendedInput(value) {
|
|
146
|
-
assertPlainObject(value, 'CommMsgExtendedInput');
|
|
147
|
-
assertThreadFields(value);
|
|
148
|
-
assertOptionalStringField(value, 'from');
|
|
149
|
-
if (value.to !== undefined) {
|
|
150
|
-
assertStringArrayField(value, 'to');
|
|
151
|
-
}
|
|
152
|
-
assertOptionalStringField(value, 'subject');
|
|
153
|
-
if (value.body !== undefined) {
|
|
154
|
-
assertPlainObject(value.body, 'body');
|
|
155
|
-
}
|
|
156
|
-
if (value.claims !== undefined) {
|
|
157
|
-
assertPlainObject(value.claims, 'claims');
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Validates the shape of a canonical clinical `BundleSearchQuery`.
|
|
162
|
-
*
|
|
163
|
-
* @param value Candidate value to validate.
|
|
164
|
-
*/
|
|
165
|
-
export function assertBundleSearchQuery(value) {
|
|
166
|
-
assertPlainObject(value, 'BundleSearchQuery');
|
|
167
|
-
assertStringField(value, 'subject');
|
|
168
|
-
assertThreadFields(value);
|
|
169
|
-
if (value.section !== undefined) {
|
|
170
|
-
assertSectionFilter(value.section);
|
|
171
|
-
}
|
|
172
|
-
if (value.date !== undefined) {
|
|
173
|
-
assertDateRange(value.date);
|
|
174
|
-
}
|
|
175
|
-
if (value.includedTypes !== undefined) {
|
|
176
|
-
assertIncludedTypes(value.includedTypes);
|
|
177
|
-
}
|
|
178
|
-
assertStringOrStringArrayValue(value.code, 'code');
|
|
179
|
-
assertStringOrStringArrayValue(value.category, 'category');
|
|
180
|
-
assertStringOrStringArrayValue(value.author, 'author');
|
|
181
|
-
if (value.searchParams !== undefined) {
|
|
182
|
-
assertPlainObject(value.searchParams, 'searchParams');
|
|
183
|
-
assertPrimitiveSearchParams(value.searchParams);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { FhirResourceLike } from './communication-resource-helpers.js';
|
|
2
|
-
export type BundleResourceDateFilter = Readonly<{
|
|
3
|
-
start?: string;
|
|
4
|
-
end?: string;
|
|
5
|
-
}>;
|
|
6
|
-
export type BundleResourceFilter = Readonly<{
|
|
7
|
-
sections?: string | string[];
|
|
8
|
-
types?: string | string[];
|
|
9
|
-
date?: BundleResourceDateFilter;
|
|
10
|
-
}>;
|
|
11
|
-
export type BundleResourceMutationOptions = Readonly<{
|
|
12
|
-
sections?: string | string[];
|
|
13
|
-
}>;
|
|
14
|
-
/**
|
|
15
|
-
* Returns resources from the bundle embedded in a Communication (or from a raw
|
|
16
|
-
* Bundle) filtered by section, type, and date.
|
|
17
|
-
*/
|
|
18
|
-
export declare function getResources(communicationOrBundle: FhirResourceLike, filter?: BundleResourceFilter): FhirResourceLike[];
|
|
19
|
-
/**
|
|
20
|
-
* Adds resources into the bundle embedded in a Communication (or raw Bundle)
|
|
21
|
-
* and optionally links them to one or more Composition sections.
|
|
22
|
-
*/
|
|
23
|
-
export declare function addResources(communicationOrBundle: FhirResourceLike, resources: FhirResourceLike[], options?: BundleResourceMutationOptions): FhirResourceLike;
|
|
24
|
-
/**
|
|
25
|
-
* Replaces resources matching the provided filter and appends the given new
|
|
26
|
-
* resources, returning the updated bundle.
|
|
27
|
-
*/
|
|
28
|
-
export declare function setResources(communicationOrBundle: FhirResourceLike, filter: BundleResourceFilter, resources: FhirResourceLike[], options?: BundleResourceMutationOptions): FhirResourceLike;
|
|
29
|
-
/**
|
|
30
|
-
* Removes resources matching the provided filter.
|
|
31
|
-
*/
|
|
32
|
-
export declare function removeResources(communicationOrBundle: FhirResourceLike, filter: BundleResourceFilter): FhirResourceLike;
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
import { ResourceTypesFhirR4 } from 'gdc-common-utils-ts/constants/fhir-resource-types';
|
|
3
|
-
import { getFirstBundleDocumentFromCommunication } from './communication-resource-helpers.js';
|
|
4
|
-
function toArray(value) {
|
|
5
|
-
if (!value)
|
|
6
|
-
return [];
|
|
7
|
-
return (Array.isArray(value) ? value : [value])
|
|
8
|
-
.map((item) => String(item || '').trim())
|
|
9
|
-
.filter(Boolean);
|
|
10
|
-
}
|
|
11
|
-
function clone(value) {
|
|
12
|
-
return JSON.parse(JSON.stringify(value));
|
|
13
|
-
}
|
|
14
|
-
function getBundleFromInput(input) {
|
|
15
|
-
if (input.resourceType === ResourceTypesFhirR4.Bundle)
|
|
16
|
-
return input;
|
|
17
|
-
return getFirstBundleDocumentFromCommunication(input);
|
|
18
|
-
}
|
|
19
|
-
function ensureBundle(input) {
|
|
20
|
-
const bundle = getBundleFromInput(input);
|
|
21
|
-
if (bundle)
|
|
22
|
-
return clone(bundle);
|
|
23
|
-
return {
|
|
24
|
-
resourceType: ResourceTypesFhirR4.Bundle,
|
|
25
|
-
type: 'document',
|
|
26
|
-
entry: [],
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function getCanonicalDate(resource) {
|
|
30
|
-
const candidates = [
|
|
31
|
-
resource.effectiveDateTime,
|
|
32
|
-
resource.issued,
|
|
33
|
-
resource.authoredOn,
|
|
34
|
-
resource.performedDateTime,
|
|
35
|
-
resource.recordedDate,
|
|
36
|
-
resource.date,
|
|
37
|
-
resource.sent,
|
|
38
|
-
];
|
|
39
|
-
for (const candidate of candidates) {
|
|
40
|
-
if (typeof candidate === 'string' && candidate.trim())
|
|
41
|
-
return candidate.trim();
|
|
42
|
-
}
|
|
43
|
-
return undefined;
|
|
44
|
-
}
|
|
45
|
-
function normalizeSectionToken(value) {
|
|
46
|
-
const token = String(value || '').trim();
|
|
47
|
-
if (!token)
|
|
48
|
-
return '';
|
|
49
|
-
if (token.includes('|')) {
|
|
50
|
-
const parts = token.split('|');
|
|
51
|
-
return String(parts[parts.length - 1] || '').trim().toLowerCase();
|
|
52
|
-
}
|
|
53
|
-
return token.toLowerCase();
|
|
54
|
-
}
|
|
55
|
-
function buildSectionReferenceSet(bundle, sections) {
|
|
56
|
-
const normalized = new Set(sections.map(normalizeSectionToken).filter(Boolean));
|
|
57
|
-
const ids = new Set();
|
|
58
|
-
const entries = Array.isArray(bundle.entry) ? bundle.entry : [];
|
|
59
|
-
for (const entry of entries) {
|
|
60
|
-
const resource = entry?.resource;
|
|
61
|
-
if (!resource || resource.resourceType !== ResourceTypesFhirR4.Composition)
|
|
62
|
-
continue;
|
|
63
|
-
const sectionList = Array.isArray(resource.section) ? resource.section : [];
|
|
64
|
-
for (const section of sectionList) {
|
|
65
|
-
const sectionObject = section;
|
|
66
|
-
const code = sectionObject.code?.coding?.find((coding) => typeof coding?.code === 'string');
|
|
67
|
-
const codeValue = normalizeSectionToken(String(code?.code || ''));
|
|
68
|
-
if (!codeValue || !normalized.has(codeValue))
|
|
69
|
-
continue;
|
|
70
|
-
const refs = Array.isArray(sectionObject.entry) ? sectionObject.entry : [];
|
|
71
|
-
for (const reference of refs) {
|
|
72
|
-
const value = String(reference?.reference || '').trim();
|
|
73
|
-
if (!value)
|
|
74
|
-
continue;
|
|
75
|
-
ids.add(value);
|
|
76
|
-
if (value.includes('/'))
|
|
77
|
-
ids.add(value.split('/').pop() || value);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return ids;
|
|
82
|
-
}
|
|
83
|
-
function ensureComposition(bundle) {
|
|
84
|
-
const entries = Array.isArray(bundle.entry) ? bundle.entry : [];
|
|
85
|
-
const existing = entries
|
|
86
|
-
.map((entry) => entry?.resource)
|
|
87
|
-
.find((resource) => resource?.resourceType === ResourceTypesFhirR4.Composition);
|
|
88
|
-
if (existing)
|
|
89
|
-
return existing;
|
|
90
|
-
const composition = {
|
|
91
|
-
resourceType: ResourceTypesFhirR4.Composition,
|
|
92
|
-
id: `composition-${entries.length + 1}`,
|
|
93
|
-
section: [],
|
|
94
|
-
};
|
|
95
|
-
entries.push({ resource: composition });
|
|
96
|
-
bundle.entry = entries;
|
|
97
|
-
return composition;
|
|
98
|
-
}
|
|
99
|
-
function ensureSectionOnComposition(composition, sectionCode) {
|
|
100
|
-
const sections = Array.isArray(composition.section) ? composition.section : [];
|
|
101
|
-
const targetCode = normalizeSectionToken(sectionCode);
|
|
102
|
-
const existing = sections.find((section) => {
|
|
103
|
-
const coding = section.code?.coding?.find((item) => typeof item?.code === 'string');
|
|
104
|
-
return normalizeSectionToken(String(coding?.code || '')) === targetCode;
|
|
105
|
-
});
|
|
106
|
-
if (existing)
|
|
107
|
-
return existing;
|
|
108
|
-
const created = {
|
|
109
|
-
code: {
|
|
110
|
-
coding: [{ code: sectionCode.includes('|') ? sectionCode.split('|').pop() : sectionCode }],
|
|
111
|
-
},
|
|
112
|
-
entry: [],
|
|
113
|
-
};
|
|
114
|
-
sections.push(created);
|
|
115
|
-
composition.section = sections;
|
|
116
|
-
return created;
|
|
117
|
-
}
|
|
118
|
-
function matchesType(resource, types) {
|
|
119
|
-
if (types.length === 0)
|
|
120
|
-
return true;
|
|
121
|
-
return types.includes(String(resource.resourceType || ''));
|
|
122
|
-
}
|
|
123
|
-
function matchesDate(resource, date) {
|
|
124
|
-
if (!date?.start && !date?.end)
|
|
125
|
-
return true;
|
|
126
|
-
const value = getCanonicalDate(resource);
|
|
127
|
-
if (!value)
|
|
128
|
-
return false;
|
|
129
|
-
if (date.start && value < date.start)
|
|
130
|
-
return false;
|
|
131
|
-
if (date.end && value > date.end)
|
|
132
|
-
return false;
|
|
133
|
-
return true;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Returns resources from the bundle embedded in a Communication (or from a raw
|
|
137
|
-
* Bundle) filtered by section, type, and date.
|
|
138
|
-
*/
|
|
139
|
-
export function getResources(communicationOrBundle, filter = {}) {
|
|
140
|
-
const bundle = getBundleFromInput(communicationOrBundle);
|
|
141
|
-
if (!bundle || !Array.isArray(bundle.entry))
|
|
142
|
-
return [];
|
|
143
|
-
const sectionTokens = toArray(filter.sections);
|
|
144
|
-
const sectionRefs = sectionTokens.length ? buildSectionReferenceSet(bundle, sectionTokens) : undefined;
|
|
145
|
-
const types = toArray(filter.types);
|
|
146
|
-
return bundle.entry
|
|
147
|
-
.map((entry) => entry?.resource)
|
|
148
|
-
.filter((resource) => Boolean(resource))
|
|
149
|
-
.filter((resource) => {
|
|
150
|
-
if (!sectionRefs)
|
|
151
|
-
return true;
|
|
152
|
-
const resourceId = String(resource.id || '').trim();
|
|
153
|
-
const fullRef = `${resource.resourceType}/${resourceId}`;
|
|
154
|
-
return sectionRefs.has(resourceId) || sectionRefs.has(fullRef);
|
|
155
|
-
})
|
|
156
|
-
.filter((resource) => matchesType(resource, types))
|
|
157
|
-
.filter((resource) => matchesDate(resource, filter.date));
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Adds resources into the bundle embedded in a Communication (or raw Bundle)
|
|
161
|
-
* and optionally links them to one or more Composition sections.
|
|
162
|
-
*/
|
|
163
|
-
export function addResources(communicationOrBundle, resources, options = {}) {
|
|
164
|
-
const bundle = ensureBundle(communicationOrBundle);
|
|
165
|
-
const entries = Array.isArray(bundle.entry) ? bundle.entry : [];
|
|
166
|
-
const sectionTokens = toArray(options.sections);
|
|
167
|
-
const composition = sectionTokens.length ? ensureComposition(bundle) : undefined;
|
|
168
|
-
const sectionObjects = composition
|
|
169
|
-
? sectionTokens.map((section) => ensureSectionOnComposition(composition, section))
|
|
170
|
-
: [];
|
|
171
|
-
resources.forEach((resource, index) => {
|
|
172
|
-
const nextResource = clone(resource);
|
|
173
|
-
if (!nextResource.id) {
|
|
174
|
-
nextResource.id = `resource-${entries.length + index + 1}`;
|
|
175
|
-
}
|
|
176
|
-
entries.push({ resource: nextResource });
|
|
177
|
-
if (sectionObjects.length) {
|
|
178
|
-
const reference = `${nextResource.resourceType}/${nextResource.id}`;
|
|
179
|
-
for (const section of sectionObjects) {
|
|
180
|
-
const refs = Array.isArray(section.entry) ? section.entry : [];
|
|
181
|
-
if (!refs.some((item) => item.reference === reference)) {
|
|
182
|
-
refs.push({ reference });
|
|
183
|
-
}
|
|
184
|
-
section.entry = refs;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
bundle.entry = entries;
|
|
189
|
-
return bundle;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Replaces resources matching the provided filter and appends the given new
|
|
193
|
-
* resources, returning the updated bundle.
|
|
194
|
-
*/
|
|
195
|
-
export function setResources(communicationOrBundle, filter, resources, options = {}) {
|
|
196
|
-
const bundle = ensureBundle(communicationOrBundle);
|
|
197
|
-
const toReplace = new Set(getResources(bundle, filter)
|
|
198
|
-
.map((resource) => String(resource.id || '').trim())
|
|
199
|
-
.filter(Boolean));
|
|
200
|
-
const entries = Array.isArray(bundle.entry) ? bundle.entry : [];
|
|
201
|
-
bundle.entry = entries.filter((entry) => {
|
|
202
|
-
const resource = entry.resource;
|
|
203
|
-
if (!resource)
|
|
204
|
-
return true;
|
|
205
|
-
const id = String(resource.id || '').trim();
|
|
206
|
-
return !id || !toReplace.has(id);
|
|
207
|
-
});
|
|
208
|
-
return addResources(bundle, resources, options);
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Removes resources matching the provided filter.
|
|
212
|
-
*/
|
|
213
|
-
export function removeResources(communicationOrBundle, filter) {
|
|
214
|
-
return setResources(communicationOrBundle, filter, []);
|
|
215
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { CommunicationInput } from './communication-bundle-contracts.js';
|
|
2
|
-
import { type BundleResourceFilter, type BundleResourceMutationOptions } from './communication-bundle-resources.js';
|
|
3
|
-
import type { FhirResourceLike } from './communication-resource-helpers.js';
|
|
4
|
-
import { type ConsentCommunicationOperationInput, type ConsentCommunicationOperationKind, type ConsentCommunicationTargetKind } from './consent-communication-operations.js';
|
|
5
|
-
export type UniformMutationContract<TContainer, TItem, TFilter, TAddOptions = undefined, TSetOptions = undefined> = Readonly<{
|
|
6
|
-
getX: (container: TContainer, filter?: TFilter) => TItem[];
|
|
7
|
-
setX: (container: TContainer, filter: TFilter, items: TItem[], options?: TSetOptions) => TContainer;
|
|
8
|
-
addX: (container: TContainer, items: TItem[], options?: TAddOptions) => TContainer;
|
|
9
|
-
enableX: (container: TContainer, filter: TFilter) => TContainer;
|
|
10
|
-
disableX: (container: TContainer, filter: TFilter) => TContainer;
|
|
11
|
-
removeX: (container: TContainer, filter: TFilter) => TContainer;
|
|
12
|
-
}>;
|
|
13
|
-
export type ConsentOperationMutationSurface = Readonly<{
|
|
14
|
-
getConsentOperations: (input: CommunicationInput, filter?: ConsentCommunicationOperationFilter) => ConsentCommunicationOperationInput[];
|
|
15
|
-
setConsentOperations: (input: CommunicationInput, filter: ConsentCommunicationOperationFilter, operations: ConsentCommunicationOperationInput[]) => CommunicationInput;
|
|
16
|
-
addConsentOperations: (input: CommunicationInput, operations: ConsentCommunicationOperationInput[]) => CommunicationInput;
|
|
17
|
-
enableConsentOperations: (input: CommunicationInput, filter: ConsentCommunicationOperationFilter) => CommunicationInput;
|
|
18
|
-
disableConsentOperations: (input: CommunicationInput, filter: ConsentCommunicationOperationFilter) => CommunicationInput;
|
|
19
|
-
removeConsentOperations: (input: CommunicationInput, filter: ConsentCommunicationOperationFilter) => CommunicationInput;
|
|
20
|
-
}>;
|
|
21
|
-
export type CommunicationResourceMutationSurface = Readonly<{
|
|
22
|
-
getCommunicationResources: (communicationOrBundle: FhirResourceLike, filter?: BundleResourceFilter) => FhirResourceLike[];
|
|
23
|
-
setCommunicationResources: (communicationOrBundle: FhirResourceLike, filter: BundleResourceFilter, resources: FhirResourceLike[], options?: BundleResourceMutationOptions) => FhirResourceLike;
|
|
24
|
-
addCommunicationResources: (communicationOrBundle: FhirResourceLike, resources: FhirResourceLike[], options?: BundleResourceMutationOptions) => FhirResourceLike;
|
|
25
|
-
enableCommunicationResources: (communicationOrBundle: FhirResourceLike, filter: BundleResourceFilter) => FhirResourceLike;
|
|
26
|
-
disableCommunicationResources: (communicationOrBundle: FhirResourceLike, filter: BundleResourceFilter) => FhirResourceLike;
|
|
27
|
-
removeCommunicationResources: (communicationOrBundle: FhirResourceLike, filter: BundleResourceFilter) => FhirResourceLike;
|
|
28
|
-
}>;
|
|
29
|
-
export type ConsentCommunicationOperationFilter = Readonly<{
|
|
30
|
-
operationIds?: string | string[];
|
|
31
|
-
operationKinds?: ConsentCommunicationOperationKind | ConsentCommunicationOperationKind[];
|
|
32
|
-
targetKinds?: ConsentCommunicationTargetKind | ConsentCommunicationTargetKind[];
|
|
33
|
-
sections?: string | string[];
|
|
34
|
-
purposes?: string | string[];
|
|
35
|
-
types?: string | string[];
|
|
36
|
-
date?: Readonly<{
|
|
37
|
-
start?: string;
|
|
38
|
-
end?: string;
|
|
39
|
-
}>;
|
|
40
|
-
}>;
|
|
41
|
-
export declare const CommunicationResourceLifecycleTagSystem: "org.gdc.resource.lifecycle";
|
|
42
|
-
export declare const CommunicationResourceLifecycleTagCode: Readonly<{
|
|
43
|
-
readonly Enabled: "enabled";
|
|
44
|
-
readonly Disabled: "disabled";
|
|
45
|
-
}>;
|
|
46
|
-
export declare function getConsentOperations(input: CommunicationInput, filter?: ConsentCommunicationOperationFilter): ConsentCommunicationOperationInput[];
|
|
47
|
-
export declare function addConsentOperations(input: CommunicationInput, operations: ConsentCommunicationOperationInput[]): CommunicationInput;
|
|
48
|
-
export declare function setConsentOperations(input: CommunicationInput, filter: ConsentCommunicationOperationFilter, operations: ConsentCommunicationOperationInput[]): CommunicationInput;
|
|
49
|
-
export declare function enableConsentOperations(input: CommunicationInput, filter: ConsentCommunicationOperationFilter): CommunicationInput;
|
|
50
|
-
export declare function disableConsentOperations(input: CommunicationInput, filter: ConsentCommunicationOperationFilter): CommunicationInput;
|
|
51
|
-
export declare function removeConsentOperations(input: CommunicationInput, filter: ConsentCommunicationOperationFilter): CommunicationInput;
|
|
52
|
-
export declare function enableCommunicationResources(communicationOrBundle: FhirResourceLike, filter: BundleResourceFilter): FhirResourceLike;
|
|
53
|
-
export declare function disableCommunicationResources(communicationOrBundle: FhirResourceLike, filter: BundleResourceFilter): FhirResourceLike;
|
|
54
|
-
export declare const ConsentOperationMutationContract: ConsentOperationMutationSurface & UniformMutationContract<CommunicationInput, ConsentCommunicationOperationInput, ConsentCommunicationOperationFilter>;
|
|
55
|
-
export declare const CommunicationResourceMutationContract: CommunicationResourceMutationSurface & UniformMutationContract<FhirResourceLike, FhirResourceLike, BundleResourceFilter, BundleResourceMutationOptions, BundleResourceMutationOptions>;
|