Arbeidstilsynet.Common.Altinn
2.5.0
See the version list below for details.
dotnet add package Arbeidstilsynet.Common.Altinn --version 2.5.0
NuGet\Install-Package Arbeidstilsynet.Common.Altinn -Version 2.5.0
<PackageReference Include="Arbeidstilsynet.Common.Altinn" Version="2.5.0" />
<PackageVersion Include="Arbeidstilsynet.Common.Altinn" Version="2.5.0" />
<PackageReference Include="Arbeidstilsynet.Common.Altinn" />
paket add Arbeidstilsynet.Common.Altinn --version 2.5.0
#r "nuget: Arbeidstilsynet.Common.Altinn, 2.5.0"
#:package Arbeidstilsynet.Common.Altinn@2.5.0
#addin nuget:?package=Arbeidstilsynet.Common.Altinn&version=2.5.0
#tool nuget:?package=Arbeidstilsynet.Common.Altinn&version=2.5.0
Arbeidstilsynet.Common.Altinn
A collection of common patterns and extensions for cross-cutting concerns for applications which need to interact with Altinns APIs.
📖 Installation
To install the package, use the following command in your terminal:
dotnet add package Arbeidstilsynet.Common.Altinn
🚀 Features
- Extension Methods for common Altinn operations
- Altinn Adapter Provides a high-level abstraction for Arbeidstilsynet’s integration needs, streamlining communication with Altinn instances.
- Altinn API Clients Robust REST API clients for direct and flexible interaction with Altinn’s services, supporting both general and advanced use cases.
🧑💻 Usage
Dependency Injection Setup
Consuming Altinn Instances
var builder = WebApplication.CreateBuilder(args);
var services = builder.Services;
var appSettings = builder.Configuration.GetRequired<MyAppSettings>();
// Adds IAltinnAdapter, which abstracts communication with Altinn instances.
services.AddAltinnAdapter(builder.Environment, appSettings.MaskinportenConfiguration);
// Adds Altinn API clients for consuming Altinn services, at a lower level of abstraction than IAltinnAdapter
services.AddAltinnApiClients(builder.Environment, appSettings.MaskinportenConfiguration);
🤝 Contributing
This library follows standard .NET conventions and includes comprehensive unit tests. When contributing:
- Add unit tests for new functionality
- Follow existing code patterns
- Update documentation for new features
- Ensure all tests pass
📄 License
This project is licensed under the terms specified by Arbeidstilsynet.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Arbeidstilsynet.Common.AspNetCore.Extensions (>= 2.2.1)
- Microsoft.Extensions.Http.Resilience (>= 10.3.0)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.16.0)
- Microsoft.IdentityModel.Tokens (>= 8.16.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.6.0-alpha4 | 0 | 3/13/2026 |
| 2.6.0-alpha3 | 0 | 3/13/2026 |
| 2.6.0-alpha2 | 0 | 3/13/2026 |
| 2.6.0-alpha | 30 | 3/12/2026 |
| 2.5.0 | 106 | 3/6/2026 |
| 2.4.2 | 95 | 2/25/2026 |
| 2.4.1 | 163 | 2/18/2026 |
| 2.4.1-beta1 | 87 | 2/18/2026 |
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added <!-- for new features. -->
### Changed <!-- for changes in existing functionality. -->
### Deprecated <!-- for soon-to-be removed features. -->
### Removed <!-- for now removed features. -->
### Fixed <!-- for any bug fixes. -->
### Security <!-- in case of vulnerabilities. -->
## 2.5.0
### Changed
- changed(deps): Applied minor and patch updates to dependencies
## 2.4.2
### Fixed
- Fixed a bug where a partial altinn configuration would overwrite defaults.
## 2.4.1
### Changed
- chore: moved package to nuget.org
## 2.4.0
### Added
- feat(altinn): Differentiate between structured data and the main content of the instance.
- Implements the StructuredData configuration from AltinnApp 2.4.0.
- Adds DataType and Id from the Altinn DataElement to the FileMetadata of the AltinnDocument.
## 2.3.0
### Added
- feat(altinn): Enhanced ``AltinnEventsClient`` to support retrieving details for a subscriptions. Also updated ``IAltinnAdapter`` to implement a convenience method for getting these details.
## 2.2.0
### Changed
- changed(deps): Applied minor and patch updates to dependencies
## 2.1.0
### Added
- feat(altinn): Enhanced ``AltinnEventsClient`` to support Unsubscribing. Also updated ``IAltinnAdapter`` to implement a convenience method for unsubscribing.
## 2.0.2
### Added
- feat(altinn): Added function to return only metadata for non completed instances (in order to not download attachments)
## 2.0.1
### Changed
- changed(deps): Updated internal package referances (remove prerelease version)
## 2.0.0
### Changed
- changed(deps): Major dotnet updated (v10)
## 1.4.0
### Changed
- changed: using "structured-data" as default dataType for MainDocument.
## 1.3.2
### Added
- chore: added extension methods to create a Dictionary based on `AltinnMetadata`.
## 1.3.1
### Fixed
- fix: add nullable declarations to `AltinnCloudEvent` dto to enable usage in a dotnet Controller.
## 1.3.0
### Changed
- changed: split up package to only contain logic to communicate with Altinns API. All logic with is only relevant for altinn apps was moved to the new AltinnApp package.
## 1.2.0
### Changed
- fix(deps): use correct version range to only support Microsoft version 8.* packages
## 1.1.0
### Fixed
- fix: move complete action to new "Apps Client" since all mutable instance actions must go through Apps Api instead of Storage Api
## 1.0.0
### Added
- feat: add altinn token provider and clients to handle token exchange
## 0.0.4
### Changed
- chore: enhance altinn metadata with process started / ended
## 0.0.3
### Changed
- chore(renovate): all non major update
## 0.0.2
### Changed
- chore(altinn-adapter): update FileMetadata model to return an enum of FileScanResults instead of a string
## 0.0.1
### Added
- **API Clients** to be used to consume public Altinn APIs
- `Storage Api Client` for the storage API (Instance Data)
- `Event Api Client` for the event API (Subscriptions)
- **Extension Methods** for common Altinn operations
- `InstanceExtensions` - Extract GUID, app name, and party ID from instances
- `DataClientExtensions` - Simplified form data retrieval and element deletion
- `AssemblyExtensions` - Load and deserialize embedded JSON resources
- **Abstract Data Processors** for handling form data changes
- `BaseDataProcessor<T>` - Base class for type-specific data processing
- `MemberProcessor<T, TMember>` - Process changes to specific object members
- `ListProcessor<T, TItem>` - Handle list/collection changes with item-level processing
- **Country Code Lookup Service** (`ILandskodeLookup`)
- Country anmes and dial codes for 238 countries
- **Altinn Options Provider** for country dropdowns
- `LandOptions` for Altinn dropdowns etc.