Logo Lanfrica

akira-io/node-efatura

Domaine:

digital infrastructure

Type de record:

software
Créateur:
aki
Hôte:
Cabo Verde e-Fatura fiscal document validation engine for Node.js > [!WARNING] > Beta software. The API may change before `1.0.0`. Install with the `beta` tag: `npm install @akira-io/efatura@beta`. Pin an exact version in production and review the changelog before upgrading. Cabo Verde e-Fatura fiscal document validation engine for Node.js. It provides a framework-agnostic core for validating fiscal documents, generating DFE XML, packaging ZIP payloads, signing with XAdES-BES, and integrating through Express, Fastify, and Nest adapters. ## Install ```sh # npm npm install @akira-io/efatura # pnpm pnpm add @akira-io/efatura # yarn yarn add @akira-io/efatura # bun bun add @akira-io/efatura ``` ```json { "dependencies": { "@akira-io/efatura": "latest" } } ``` Review CHANGELOG.md before upgrading production systems. ## Prisma schema Copy the sequence model into a Prisma multi-file schema: ```sh npx @akira-io/efatura prisma ``` The command writes to `prisma/schema/efatura-sequence.prisma` by default. Use `--out` for a custom path, `--print` to inspect or append the model, and `--force` to replace an existing file. ## Quick start ```ts import { DocumentType, TaxTypeCode, createEfatura } from '@akira-io/efatura'; const efatura = createEfatura({ transmitterNif: '123456789', transmitterLed: '001', transmitterKey: process.env.EFATURA_TRANSMITTER_KEY, defaultSerie: 'SER-F', emitter: { name: 'Demo Emitter', address: { countryCode: 'CV', addressDetail: 'Praia', }, contacts: { email: 'billing@example.com', telephone: '2600000', }, }, softwareCode: 'EFATURA-DEMO', softwareName: 'Demo Billing', softwareVersion: '1.0.0', middlewareBaseUrl: 'middleware.example.test', dfaBaseUrl: 'dfa.example.test', environment: 'TEST', }); const invoice = efatura .invoice() .type(DocumentType.ElectronicInvoice) .issueDate('2026-02-08') .receiver({ taxId: { countryCode: 'CV', value: '900800700' }, name: 'Receiver' }) .line({ quantity: { value: 1, unitCode: 'UN' }, price: 1000, priceExtension: 1000, netTotal: 1000, taxes: [{ taxTypeCode …

Licenses