Arbeidstilsynet.Common.Altinn 2.5.0

There is a newer prerelease version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Arbeidstilsynet.Common.Altinn" Version="2.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Arbeidstilsynet.Common.Altinn" Version="2.5.0" />
                    
Directory.Packages.props
<PackageReference Include="Arbeidstilsynet.Common.Altinn" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Arbeidstilsynet.Common.Altinn --version 2.5.0
                    
#r "nuget: Arbeidstilsynet.Common.Altinn, 2.5.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Arbeidstilsynet.Common.Altinn@2.5.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Arbeidstilsynet.Common.Altinn&version=2.5.0
                    
Install as a Cake Addin
#tool nuget:?package=Arbeidstilsynet.Common.Altinn&version=2.5.0
                    
Install as a Cake Tool

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:

  1. Add unit tests for new functionality
  2. Follow existing code patterns
  3. Update documentation for new features
  4. Ensure all tests pass

📄 License

This project is licensed under the terms specified by Arbeidstilsynet.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.