https://github.com/hochfrequenz/bo4e-dotnet-ts-models
TypeScript models auto generated from BO4E-dotnet classes
https://github.com/hochfrequenz/bo4e-dotnet-ts-models
bo4e
Last synced: 5 months ago
JSON representation
TypeScript models auto generated from BO4E-dotnet classes
- Host: GitHub
- URL: https://github.com/hochfrequenz/bo4e-dotnet-ts-models
- Owner: Hochfrequenz
- License: mit
- Created: 2023-01-20T09:16:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-06T14:08:20.000Z (almost 2 years ago)
- Last Synced: 2025-03-19T02:34:19.098Z (about 1 year ago)
- Topics: bo4e
- Homepage: https://github.com/Hochfrequenz/BO4E-dotnet/
- Size: 174 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bo4e-dotnet-ts-models
This repository contains the NPM package [`bo4e-dotnet-ts-models`](https://www.npmjs.com/package/bo4e-dotnet-ts-models).
The package contains typescript interfaces that are inherently consistent with the [BO4E-dotnet](https://github.com/Hochfrequenz/bo4E-dotnet/) data model which is used by many Hochfrequenz services (namely transformer.bee/edifact-bo4e-converter).
This repository contains no logic, just types for ease of use in any frontend project.
The files in [src](src/) are **completly autogenerated** from [JSON Schemas](https://github.com/Hochfrequenz/BO4E-dotnet/tree/main/json-schema-files), so they're inherently consistent with the BO4E.NET data model. Any push to the C# repos `json-schema-files` directory [creates](https://github.com/Hochfrequenz/BO4E-dotnet/blob/main/.github/workflows/generate_ts_models.yml) a commit in this repository.
### Installation
```bash
npm install bo4e-dotnet-ts-models
```
## Release Workflow (CI/CD)
- Update the source code (happens automatically via the .NET repo for [`/src`](/src))
- iff there are any new BO classes, re-export the autogenerated models in [index.d.ts](https://github.com/Hochfrequenz/bo4e-dotnet-ts-models/blob/main/index.d.ts)
- manually bump the the version in [`package.json`](package.json); It's best to choose the same version as the respective BO4E.net version that was used to generate the .ts models unless there's good reason to not do so.
- click on "[Draft a new Release](https://github.com/Hochfrequenz/bo4e-dotnet-ts-models/releases/new)" in the right sidebar on Github
- Choose a tag that has the form `v1.2.3` an the main branch where `v1.2.3` is the same version as the one you manually set in `index.d.ts`
- Autogenerate Release Notes