@smals-belgium/myhealth-wc-integration v2.0.0
MyHealth - Web Component Integration
This module defines the types used to describe the inputs and outputs exposed by the MyHealth Web Components.
It also provides a web component documentation template (markdown) at: README-component.template.md.
Please refer to the specification located at the root of this repository, under myhealth-webcomponent-specification-vX.Y.pdf
This library is published to the NPM registry at: https://www.npmjs.com/package/@smals-belgium/myhealth-wc-integration
Documentation
componentSpecVersion
This is a const string variable holding the version of the specification implemented by this module.
This variable can be used by integrators to populate the version input.
It can also be used by component developers to compare it with the version input value provided by integrators.
Language
Enum type used to describe the language a component should use to display information. Possible values: EN, FR, NL, DE
Used by the language input.
Configuration
Enum type used to describe the configuration where a component is being deployed. Possible values: DEV (development), INT (integration), ACC (acceptance), PROD (production), DEMO (demo),
Used by the configName input.
ComponentServices
Complex type composed of the following:
cache: ComponentCache,
offlineStore?: ComponentOfflineStore,
getAccessToken: GetAccessToken,
registerRefreshCallback: RegisterRefreshCallbackComponentCache
Provides methods to access the in-memory cache provided by integrators.
get: (key:string) => any
set: (key:string, value:any) => void
remove: (key:string) => voidComponentOfflineStore
Provides methods to access the optional offline store provided by integrators.
get: (key:string) => Promise<any>
set: (key:string, value:any, encryption:boolean) => Promise<void>
remove: (key:string) => Promise<void>getAccessToken
Function definition used by components to retrieve an access token (exchanged provided the audience)
type GetAccessToken = (audience:string) => Promise<string|null>RegisterRefreshCallback
Function definition used by components to register themselves to receive refresh events.
type RefreshCallback = (done:()=>void) => void
type RegisterRefreshCallback = (callback:RefreshCallback) => voidRelease Process
You can follow the steps below to perform a new release:
- Ensure
README.mdis up-to-date with whatever changes made to the specification or types - Ensure the
myhealth-webcomponent-specification-v*.pdffile has been updated with the corresponding specification version. - Ensure a new entry has been added to the
CHANGELOG.mdfile for the new version - Issue
npm version <major|minor|patch>in themainbranch to update the version info and generate a corresponding git tag git pushthe latest commits. Do not git push the tag just yet- Verify that the build pipeline completes successfully
git pushthe version tag and verify a new draft release gets created in the GitHub repository- Update the draft release content with something similar to the added content in the
CHANGELOG.mdand hit thePublish Releasebutton - This will kick off the publish pipeline, which will publish the new version of the library to the official NPM registry.