npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@financica/edavki

v0.1.0

Published

TypeScript toolkit for Slovenian eDavki (FURS) tax documents: build and serialize the DDV-O VAT return as schema-faithful EDP XML.

Readme

@financica/edavki

TypeScript toolkit for Slovenian eDavki (FURS) tax documents.

v0 covers the DDV-O VAT return: build a return from plain numbers and serialize it as schema-faithful EDP XML, either standalone or wrapped in a full submission envelope, for manual import into the eDavki portal.

It is the Slovenian counterpart to @financica/myminfin (Belgian SPF Finances / Intervat) and follows the same shape as the other @financica/* format libraries (ubl, coda, camt053).

Install

bun add @financica/edavki

Usage

import { buildDdvOEnvelope, serializeDdvO } from "@financica/edavki";

const ret = {
	taxPeriodStart: "2026-01-01",
	taxPeriodEnd: "2026-01-31",
	rates: { higher: 22, lower: 9.5, reduced: 5 },
	appliesDeductibleProportion: false,
	claimsRefund: false,
	fields: {
		f11: 10000, // taxable supplies (base)
		f21: 2200, // output VAT @ 22 %
		f31: 4000, // purchases (base)
		f41: 880, // input VAT @ 22 %
		f51: 1320, // VAT liability
	},
};

// Just the <DDV-O> document:
const doc = serializeDdvO(ret);

// A full <Envelope> ready for manual eDavki import:
const xml = buildDdvOEnvelope({
	return: ret,
	taxpayer: { vatNumber: "SI12345678", name: "Test d.o.o.", taxpayerType: "PO" },
});

The field registry

DDV_O_FIELDS is the ordered list of every monetary box on the return, with its section, whether it is a tax base or a VAT amount, and its rate. It is exported so a consuming app (e.g. Financica's statutory VAT-return engine) can drive box mapping, labels, and UI from one source of truth.

import { DDV_O_FIELDS, DDV_O_FIELD_BY_ID } from "@financica/edavki";

DDV_O_FIELD_BY_ID.f21; // { id: "f21", section: "vatCharged", kind: "vat", rate: 22, labelEn: "VAT charged at 22 %", ... }

Sections mirror the form: supplies (I), vatCharged (II), purchases (III), vatDeducted (IV), settlement (V).

Scope & non-goals (v0)

  • In scope: building / serializing DDV-O (DDV_O_11) as standalone or enveloped XML; the field registry; the EDP taxpayer header.
  • Out of scope (for now): authenticated submission transport (the eDavki web service needs a qualified digital certificate and XML-DSig signatures — the envelope emits an empty <edp:Signatures/> placeholder); the July-2025 VAT ledgers (KIR/KPR, DDV_KIR_KPR_1.xsd); and XSD-level runtime validation. These are tracked for later versions.

Schemas

Vendored under schemas/ for reference and deterministic builds:

  • DDV_O_11.xsd — the VAT return (current version; v12 not yet published)
  • EDP-Common-1.xsd — the shared envelope/header/signatures

Source of truth: https://edavki.durs.si/Documents/Schemas/. FURS bumps the DDV-O version periodically (the namespace on the root element encodes it); when a new version ships, vendor the new XSD, add the new fields, and bump NS_DDV_O.

Development

bun install
bun run ci   # type-check + lint + test + build