Elvia.Afiextensions.Schemas
6.2.1
dotnet add package Elvia.Afiextensions.Schemas --version 6.2.1
NuGet\Install-Package Elvia.Afiextensions.Schemas -Version 6.2.1
<PackageReference Include="Elvia.Afiextensions.Schemas" Version="6.2.1" />
<PackageVersion Include="Elvia.Afiextensions.Schemas" Version="6.2.1" />
<PackageReference Include="Elvia.Afiextensions.Schemas" />
paket add Elvia.Afiextensions.Schemas --version 6.2.1
#r "nuget: Elvia.Afiextensions.Schemas, 6.2.1"
#:package Elvia.Afiextensions.Schemas@6.2.1
#addin nuget:?package=Elvia.Afiextensions.Schemas&version=6.2.1
#tool nuget:?package=Elvia.Afiextensions.Schemas&version=6.2.1
Afiextensions Schemas
A .NET library containing contracts and schemas for publishing messages outside Afiextensions. This package provides strongly-typed event schemas for various business domains including invoices, contracts, tariffs, and more.
📦 Installation
Install the package via NuGet Package Manager:
dotnet add package Elvia.Afiextensions.Schemas
Or via Package Manager Console:
Install-Package Elvia.Afiextensions.Schemas
🏗️ Available Schemas
This library contains event schemas and API contracts organized by domain and version. Each schema includes comprehensive XML documentation for all properties and is accessible through IntelliSense in your IDE.
Invoice Events
Events related to invoice lifecycle and management:
- InvoiceCreatedEvents.V1 - Invoice creation events from CGI with invoice lines and header data
- InvoicePostedEvents.V1 - Invoice posting and accounting events
- InvoiceBalanceEvents.V1 - Invoice balance changes and payment tracking
- InvoiceDebtCollectionEvents.V1 - Debt collection process events
- InvoiceAgreementEvents.V1 - Invoice agreement lifecycle events
Contract Management
Contract operations and GDPR compliance:
- ContractsApi.V1 / V2 - API contracts for managing billing blocks, payment agreements, sundry expenses, and supplementary products. V2 includes additional operations like
UpdateBankAccountNumber,UpdateIndustryCode, andUpdateInvoiceDeliverySettings - ContractGdprDeletionCandidate.V1 - GDPR deletion candidates for contracts
Customer Data
Customer-related events and GDPR compliance:
- CustomerGdprDeletionCandidate.V1 - GDPR deletion candidates for customer data
Billing & Sales
Sales order and billing events:
- CompensationDemandEvents.V1 - Compensation demand creation and processing
- SundryExpenseEvents.V1 - Sundry expense sale events
- SupplementaryProductEvents.V1 - Supplementary product sale events
- SalesOrderEvents.V1 - Sales order lifecycle events
Tariff & Pricing
Tariff and grid pricing schemas:
- TariffEvents.V1 - Tariff change and update events
- GridTariffEvents.V1 - Grid tariff specific events
Data Products
Data product schemas and APIs:
- DataProduct.V1 - Core data product schemas (e.g., Invoice data products)
- DataProductApi.V1 - Data product API contracts
- EidsivaDataProductApi.V1 - Eidsiva-specific data product API
Power Management
Power consumption and rationing:
- PowerRationingEvent.V1 - Power rationing events including metering point info, baseline/quota volumes, consumption surcharges, and rationing levels
- AnnualConsumptionQuarantineEvents.V1 - Annual consumption quarantine processing
Time Series
Time series data requests:
- TimeSeriesRequestEvents.V1 - Time series data request and processing events
Versioning: All schemas follow semantic versioning with separate V1, V2, etc. namespaces for breaking changes. Import the specific version namespace you need, e.g., using Afiextensions.Schemas.InvoiceCreatedEvents.V1;
🚀 Usage
All schemas include comprehensive XML documentation that appears in IntelliSense, making it easy to discover available properties and their meanings.
using Afiextensions.Schemas.InvoiceCreatedEvents.V1;
// Example: Working with invoice created events
var invoiceEvent = new InvoiceCreatedEvent(
id: "event-123",
accountCode: "12345",
actorId: 87654321,
cid: "123456789",
createdTime: DateTime.UtcNow,
dueDate: DateTime.UtcNow.AddDays(30),
externalCustomerGuid: "guid-here",
externalCustomerReference: "ref-123",
invoice: myInvoice,
invoiceAgreementId: 98765,
invoiceBalance: 1500.50m,
invoiceNumber: 123456
);
using Afiextensions.Schemas.ContractsApi.V2;
// Example: Creating a payment agreement
var paymentAgreement = new CreatePaymentAgreement(
InvoiceNumber: 123456,
FirstDueDate: DateTimeOffset.UtcNow.AddDays(7),
IntervalDays: 30,
NumberOfPayments: 3,
CalculateInterestRate: true,
ImmediatePrint: false
);
using Afiextensions.Schemas.PowerRationingEvent.V1;
// Example: Working with power rationing events
var rationingEvent = new PowerRationingInfoEvent(
eventId: "event-456",
meteringPointId: "707057500000000001",
customerNumber: "12345678",
customerGuid: Guid.NewGuid(),
consumptionCode: "C01",
industryCode: "I01",
meteringPointAddress: address,
baselineVolume: 1000m,
quotaVolume: 900m,
overConsumptionSurcharge: 1.5m,
level: 2,
fromDate: DateTime.UtcNow,
toDate: DateTime.UtcNow.AddMonths(1)
);
💡 Tip: Hover over any type or property in your IDE to see detailed documentation including parameter descriptions, Norwegian translations, and field constraints.
🔄 Development & Release Process
Development Workflow
Every push to the trunk branch automatically creates a preview NuGet package with version format 1.2.3-preview.4
Release Process
To create a stable release:
- Navigate to Releases in the GitHub repository
- Click Draft release
- Create a new tag via Choose a tag (follow Semantic Versioning)
- Write a description of the changes
- Publish the release
This will trigger the creation of a stable release NuGet package (e.g., 1.2.3)
🛠️ Technical Details
- Target Framework: .NET 10.0
- Nullable Reference Types: Enabled
- Documentation: XML documentation generated for all public APIs
📋 Requirements
- .NET 10.0 or later
📄 License
This project is licensed under the MIT License.
🔗 Links
| 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
- Newtonsoft.Json (>= 13.0.4)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Elvia.Afiextensions.Schemas:
| Package | Downloads |
|---|---|
|
Elvia.Kunde.InvoiceFiltering
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.2.1 | 1,661 | 4/21/2026 |
| 6.2.1-preview.1-2 | 52 | 4/21/2026 |
| 6.2.0 | 421 | 4/17/2026 |
| 6.1.4-preview.1-2 | 63 | 4/16/2026 |
| 6.1.3 | 524 | 4/8/2026 |
| 6.1.3-preview.1-2 | 47 | 4/8/2026 |
| 6.1.2 | 120 | 4/8/2026 |
| 6.1.2-preview.1-2 | 51 | 4/8/2026 |
| 6.1.1 | 98 | 4/8/2026 |
| 6.1.1-preview.1-2 | 52 | 4/8/2026 |
| 6.1.0 | 289 | 4/7/2026 |
| 6.0.1-preview.1-3 | 52 | 4/7/2026 |
| 6.0.0 | 485 | 3/23/2026 |
| 5.6.3-preview.1-2 | 51 | 3/23/2026 |
| 5.6.2 | 596 | 3/16/2026 |
| 5.6.2-preview.1-2 | 61 | 3/16/2026 |
| 5.6.1 | 343 | 3/6/2026 |
| 5.6.0 | 293 | 3/2/2026 |
| 5.5.1-preview.1-9 | 60 | 3/2/2026 |
| 5.5.1-preview.1-6 | 58 | 2/17/2026 |