uhc-sdk-front-ts 0.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 +51 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +12 -0
- package/dist/runtime-descriptor.d.ts +12 -0
- package/dist/runtime-descriptor.js +11 -0
- package/dist/uhc-core-extensions.d.ts +7 -0
- package/dist/uhc-core-extensions.js +8 -0
- package/dist/uhc-front-clinical-runtime-client.d.ts +7 -0
- package/dist/uhc-front-clinical-runtime-client.js +24 -0
- package/package.json +26 -0
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# uhc-sdk-front-ts
|
|
2
|
+
|
|
3
|
+
Frontend/runtime extension for UHC/UNID applications.
|
|
4
|
+
|
|
5
|
+
This package extends:
|
|
6
|
+
|
|
7
|
+
- `uhc-sdk-core-ts`
|
|
8
|
+
- `gdc-sdk-front-ts`
|
|
9
|
+
|
|
10
|
+
Use it when a frontend, Expo app, or web portal needs:
|
|
11
|
+
|
|
12
|
+
- the standard GDC frontend SDK
|
|
13
|
+
- UHC extension contracts/examples
|
|
14
|
+
- a stable place for future phone-first and notification-driven UX helpers
|
|
15
|
+
- one package that extends the GDC frontend surface without forcing callers to
|
|
16
|
+
import `uhc-sdk-core-ts` directly
|
|
17
|
+
|
|
18
|
+
## Current exports
|
|
19
|
+
|
|
20
|
+
- everything from `gdc-sdk-front-ts`
|
|
21
|
+
- explicit UHC extension exports bridged from `uhc-sdk-core-ts`
|
|
22
|
+
- `createUhcFrontSdkDescriptor(...)`
|
|
23
|
+
|
|
24
|
+
The frontend package mirrors the node-side rule: it only bridges additive UHC
|
|
25
|
+
symbols and does not re-export the full `uhc-sdk-core-ts` barrel, because the
|
|
26
|
+
base frontend SDK already re-exports the shared GDC core surface.
|
|
27
|
+
|
|
28
|
+
## Pending
|
|
29
|
+
|
|
30
|
+
- controller permission-request UX helpers
|
|
31
|
+
- phone verification UI helpers
|
|
32
|
+
- profile/session helpers for UHC-specific contact routing
|
|
33
|
+
|
|
34
|
+
## Current UHC bridge exports
|
|
35
|
+
|
|
36
|
+
- `UhcConsentTargetKinds`
|
|
37
|
+
- `createUhcConsentTargetDescriptor(...)`
|
|
38
|
+
- `createUhcMissingPermissionRequest(...)`
|
|
39
|
+
- `createUhcPhoneVerifyStartInput(...)`
|
|
40
|
+
- `createUhcPhoneVerifyConfirmInput(...)`
|
|
41
|
+
- `createUhcFamilyContactRegistrationInput(...)`
|
|
42
|
+
- `buildUhcPermissionRequestNotificationExample(...)`
|
|
43
|
+
- `buildUhcMissingPermissionRequestExample(...)`
|
|
44
|
+
- `buildUhcPhoneVerifyStartInputExample(...)`
|
|
45
|
+
- `buildUhcPhoneVerifyConfirmInputExample(...)`
|
|
46
|
+
- `buildUhcFamilyMultiEmailRegistrationInputExample(...)`
|
|
47
|
+
- `buildUhcFamilyMultiPhoneRegistrationInputExample(...)`
|
|
48
|
+
|
|
49
|
+
See also:
|
|
50
|
+
|
|
51
|
+
- [101-SDK_INTEGRATION.md](101-SDK_INTEGRATION.md)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UHC frontend SDK surface.
|
|
3
|
+
*
|
|
4
|
+
* This package extends the GDC frontend SDK with UHC-specific contracts and
|
|
5
|
+
* reusable examples without re-exporting the full UHC core barrel, avoiding the
|
|
6
|
+
* duplicate runtime-neutral exports already provided by `gdc-sdk-front-ts`.
|
|
7
|
+
*/
|
|
8
|
+
export * from 'gdc-sdk-front-ts';
|
|
9
|
+
export * from './runtime-descriptor.js';
|
|
10
|
+
export * from './uhc-core-extensions.js';
|
|
11
|
+
export * from './uhc-front-clinical-runtime-client.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright 2025 Connecting Solution & Applications Ltd under the Apache License, Version 2.0.
|
|
2
|
+
/**
|
|
3
|
+
* UHC frontend SDK surface.
|
|
4
|
+
*
|
|
5
|
+
* This package extends the GDC frontend SDK with UHC-specific contracts and
|
|
6
|
+
* reusable examples without re-exporting the full UHC core barrel, avoiding the
|
|
7
|
+
* duplicate runtime-neutral exports already provided by `gdc-sdk-front-ts`.
|
|
8
|
+
*/
|
|
9
|
+
export * from 'gdc-sdk-front-ts';
|
|
10
|
+
export * from './runtime-descriptor.js';
|
|
11
|
+
export * from './uhc-core-extensions.js';
|
|
12
|
+
export * from './uhc-front-clinical-runtime-client.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight descriptor for UHC frontend runtime consumers.
|
|
3
|
+
*/
|
|
4
|
+
export type UhcFrontSdkDescriptor = Readonly<{
|
|
5
|
+
runtime: 'front';
|
|
6
|
+
family: 'uhc';
|
|
7
|
+
packageName: 'uhc-sdk-front-ts';
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the canonical runtime descriptor for UHC frontend apps.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createUhcFrontSdkDescriptor(): UhcFrontSdkDescriptor;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright 2025 Connecting Solution & Applications Ltd under the Apache License, Version 2.0.
|
|
2
|
+
/**
|
|
3
|
+
* Returns the canonical runtime descriptor for UHC frontend apps.
|
|
4
|
+
*/
|
|
5
|
+
export function createUhcFrontSdkDescriptor() {
|
|
6
|
+
return {
|
|
7
|
+
runtime: 'front',
|
|
8
|
+
family: 'uhc',
|
|
9
|
+
packageName: 'uhc-sdk-front-ts',
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Explicit bridge exports from `uhc-sdk-core-ts` for frontend consumers.
|
|
3
|
+
*
|
|
4
|
+
* Frontend packages already receive GDC runtime-neutral exports from
|
|
5
|
+
* `gdc-sdk-front-ts`. This additive bridge only exposes the UHC-specific layer.
|
|
6
|
+
*/
|
|
7
|
+
export { createUhcClinicalAccessRequest, UhcConsentTargetKinds, createUhcChannelInvitationInput, createUhcChannelInvitationSummary, createUhcChannelOtpStartInput, createUhcChannelOtpConfirmInput, createUhcChannelOtpChallengeSummary, createUhcRelationshipPinPolicy, createUhcRelationshipPinSetInput, createUhcRelationshipPinVerifyInput, createUhcRelationshipLocalKeyEnvelope, UhcReminderActorKinds, UhcReminderChannels, UhcReminderEntityKinds, UhcReminderActions, createUhcConsentTargetDescriptor, createUhcMissingPermissionRequest, createUhcPhoneVerifyStartInput, createUhcPhoneVerifyConfirmInput, createUhcFamilyContactRegistrationInput, createUhcReminderPermissionBundle, encodeUhcReminderPermissionBundle, decodeUhcReminderPermissionBundle, evaluateUhcReminderRuntimeAccess, evaluateUhcReminderAccess, buildUhcReminderPermissionRequestCommunication, renderUhcCommMsgExtendedFhirR5Body, transformUhcCommunicationClaimsToResourceFhirR5, UhcCommunicationClinicalFormatRenderers, EXAMPLE_UHC_PERMISSION_REQUEST_NOTIFICATION, EXAMPLE_UHC_MISSING_PERMISSION_REQUEST, EXAMPLE_UHC_PHONE_VERIFY_START_INPUT, EXAMPLE_UHC_PHONE_VERIFY_CONFIRM_INPUT, EXAMPLE_UHC_PHONE_CHANNEL_INVITATION_INPUT, EXAMPLE_UHC_VETERINARY_PHONE_CHANNEL_INVITATION_INPUT, EXAMPLE_UHC_CHANNEL_INVITATION_SUMMARY, EXAMPLE_UHC_CHANNEL_OTP_START_INPUT, EXAMPLE_UHC_CHANNEL_OTP_CONFIRM_INPUT, EXAMPLE_UHC_CHANNEL_OTP_CHALLENGE_SUMMARY, EXAMPLE_UHC_RELATIONSHIP_PIN_POLICY, EXAMPLE_UHC_RELATIONSHIP_PIN_SET_INPUT, EXAMPLE_UHC_RELATIONSHIP_PIN_VERIFY_INPUT, EXAMPLE_UHC_RELATIONSHIP_LOCAL_KEY_ENVELOPE, EXAMPLE_UHC_FAMILY_MULTI_EMAIL_REGISTRATION_INPUT, EXAMPLE_UHC_FAMILY_MULTI_PHONE_REGISTRATION_INPUT, EXAMPLE_UHC_REMINDER_PERMISSION_BUNDLE, buildUhcPermissionRequestNotificationExample, buildUhcMissingPermissionRequestExample, buildUhcPhoneVerifyStartInputExample, buildUhcPhoneVerifyConfirmInputExample, buildUhcPhoneChannelInvitationInputExample, buildUhcVeterinaryPhoneChannelInvitationInputExample, buildUhcChannelInvitationSummaryExample, buildUhcChannelOtpStartInputExample, buildUhcChannelOtpConfirmInputExample, buildUhcChannelOtpChallengeSummaryExample, buildUhcRelationshipPinPolicyExample, buildUhcRelationshipPinSetInputExample, buildUhcRelationshipPinVerifyInputExample, buildUhcRelationshipLocalKeyEnvelopeExample, buildUhcFamilyMultiEmailRegistrationInputExample, buildUhcFamilyMultiPhoneRegistrationInputExample, buildUhcReminderPermissionBundleExample, type UhcConsentTargetDescriptor, type UhcClinicalAccessPort, type UhcClinicalResource, type UhcSmartAccessRequest, type UhcChannelEnrollmentChannel, type UhcSubjectKind, type UhcAccessActorKind, type UhcInvitationStatus, type UhcOtpDeliveryChannel, type UhcRelationshipPinKdf, type UhcMissingPermissionRequest, type UhcPhoneVerifyStartInput, type UhcPhoneVerifyConfirmInput, type UhcChannelInvitationInput, type UhcChannelInvitationSummary, type UhcChannelOtpStartInput, type UhcChannelOtpConfirmInput, type UhcChannelOtpChallengeSummary, type UhcRelationshipPinPolicy, type UhcRelationshipPinSetInput, type UhcRelationshipPinVerifyInput, type UhcRelationshipLocalKeyEnvelope, type UhcFamilyContactRegistrationInput, type UhcReminderActorKind, type UhcReminderChannel, type UhcReminderEntityKind, type UhcReminderAction, type UhcReminderPermissionBundle, type UhcReminderPermissionRule, type UhcReminderRuntimeAccessRequest, type UhcReminderRuntimeAccessEvaluation, type UhcReminderAccessRequest, type UhcReminderAccessEvaluation, } from 'uhc-sdk-core-ts';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright 2025 Connecting Solution & Applications Ltd under the Apache License, Version 2.0.
|
|
2
|
+
/**
|
|
3
|
+
* Explicit bridge exports from `uhc-sdk-core-ts` for frontend consumers.
|
|
4
|
+
*
|
|
5
|
+
* Frontend packages already receive GDC runtime-neutral exports from
|
|
6
|
+
* `gdc-sdk-front-ts`. This additive bridge only exposes the UHC-specific layer.
|
|
7
|
+
*/
|
|
8
|
+
export { createUhcClinicalAccessRequest, UhcConsentTargetKinds, createUhcChannelInvitationInput, createUhcChannelInvitationSummary, createUhcChannelOtpStartInput, createUhcChannelOtpConfirmInput, createUhcChannelOtpChallengeSummary, createUhcRelationshipPinPolicy, createUhcRelationshipPinSetInput, createUhcRelationshipPinVerifyInput, createUhcRelationshipLocalKeyEnvelope, UhcReminderActorKinds, UhcReminderChannels, UhcReminderEntityKinds, UhcReminderActions, createUhcConsentTargetDescriptor, createUhcMissingPermissionRequest, createUhcPhoneVerifyStartInput, createUhcPhoneVerifyConfirmInput, createUhcFamilyContactRegistrationInput, createUhcReminderPermissionBundle, encodeUhcReminderPermissionBundle, decodeUhcReminderPermissionBundle, evaluateUhcReminderRuntimeAccess, evaluateUhcReminderAccess, buildUhcReminderPermissionRequestCommunication, renderUhcCommMsgExtendedFhirR5Body, transformUhcCommunicationClaimsToResourceFhirR5, UhcCommunicationClinicalFormatRenderers, EXAMPLE_UHC_PERMISSION_REQUEST_NOTIFICATION, EXAMPLE_UHC_MISSING_PERMISSION_REQUEST, EXAMPLE_UHC_PHONE_VERIFY_START_INPUT, EXAMPLE_UHC_PHONE_VERIFY_CONFIRM_INPUT, EXAMPLE_UHC_PHONE_CHANNEL_INVITATION_INPUT, EXAMPLE_UHC_VETERINARY_PHONE_CHANNEL_INVITATION_INPUT, EXAMPLE_UHC_CHANNEL_INVITATION_SUMMARY, EXAMPLE_UHC_CHANNEL_OTP_START_INPUT, EXAMPLE_UHC_CHANNEL_OTP_CONFIRM_INPUT, EXAMPLE_UHC_CHANNEL_OTP_CHALLENGE_SUMMARY, EXAMPLE_UHC_RELATIONSHIP_PIN_POLICY, EXAMPLE_UHC_RELATIONSHIP_PIN_SET_INPUT, EXAMPLE_UHC_RELATIONSHIP_PIN_VERIFY_INPUT, EXAMPLE_UHC_RELATIONSHIP_LOCAL_KEY_ENVELOPE, EXAMPLE_UHC_FAMILY_MULTI_EMAIL_REGISTRATION_INPUT, EXAMPLE_UHC_FAMILY_MULTI_PHONE_REGISTRATION_INPUT, EXAMPLE_UHC_REMINDER_PERMISSION_BUNDLE, buildUhcPermissionRequestNotificationExample, buildUhcMissingPermissionRequestExample, buildUhcPhoneVerifyStartInputExample, buildUhcPhoneVerifyConfirmInputExample, buildUhcPhoneChannelInvitationInputExample, buildUhcVeterinaryPhoneChannelInvitationInputExample, buildUhcChannelInvitationSummaryExample, buildUhcChannelOtpStartInputExample, buildUhcChannelOtpConfirmInputExample, buildUhcChannelOtpChallengeSummaryExample, buildUhcRelationshipPinPolicyExample, buildUhcRelationshipPinSetInputExample, buildUhcRelationshipPinVerifyInputExample, buildUhcRelationshipLocalKeyEnvelopeExample, buildUhcFamilyMultiEmailRegistrationInputExample, buildUhcFamilyMultiPhoneRegistrationInputExample, buildUhcReminderPermissionBundleExample, } from 'uhc-sdk-core-ts';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FrontClinicalRuntimeClient } from 'gdc-sdk-front-ts';
|
|
2
|
+
import type { FrontClinicalRuntimeClientOptions, FrontCommunicationIngestionInput, FrontRouteContext, SubmitAndPollResult } from 'gdc-sdk-front-ts';
|
|
3
|
+
/** Browser/mobile clinical runtime with UHC-owned formats such as FHIR R5. */
|
|
4
|
+
export declare class UhcFrontClinicalRuntimeClient extends FrontClinicalRuntimeClient {
|
|
5
|
+
constructor(options: FrontClinicalRuntimeClientOptions);
|
|
6
|
+
ingestCommunicationAndUpdateIndex(ctx: FrontRouteContext, input: FrontCommunicationIngestionInput): Promise<SubmitAndPollResult>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright 2026 Connecting Solution & Applications Ltd under the Apache License, Version 2.0.
|
|
2
|
+
import { FrontClinicalRuntimeClient } from 'gdc-sdk-front-ts';
|
|
3
|
+
import { UhcCommunicationClinicalFormatRenderers } from 'uhc-sdk-core-ts';
|
|
4
|
+
/** Browser/mobile clinical runtime with UHC-owned formats such as FHIR R5. */
|
|
5
|
+
export class UhcFrontClinicalRuntimeClient extends FrontClinicalRuntimeClient {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super({
|
|
8
|
+
...options,
|
|
9
|
+
communicationFormatRenderers: {
|
|
10
|
+
...UhcCommunicationClinicalFormatRenderers,
|
|
11
|
+
...(options.communicationFormatRenderers || {}),
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
ingestCommunicationAndUpdateIndex(ctx, input) {
|
|
16
|
+
return super.ingestCommunicationAndUpdateIndex(ctx, {
|
|
17
|
+
...input,
|
|
18
|
+
clinicalFormat: normalizeUhcClinicalFormat(input.clinicalFormat),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function normalizeUhcClinicalFormat(format) {
|
|
23
|
+
return format === 'r5' || format === 'fhir.r5' ? 'org.hl7.fhir.r5' : format;
|
|
24
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "uhc-sdk-front-ts",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "UHC/UNID frontend SDK extension built on top of gdc-sdk-front-ts and uhc-sdk-core-ts",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "Connecting Solution & Applications Ltd",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc -p tsconfig.json",
|
|
15
|
+
"type-check": "tsc -p tsconfig.json --noEmit",
|
|
16
|
+
"test": "npm run build && node --test tests/*.test.mjs"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"gdc-sdk-front-ts": "^2.3.0",
|
|
20
|
+
"uhc-sdk-core-ts": "^0.3.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "^20.14.10",
|
|
24
|
+
"typescript": "^5.5.4"
|
|
25
|
+
}
|
|
26
|
+
}
|