@fatturazione-elettronica-aruba/nuxt
Nuxt module for Aruba Electronic Invoicing SDK
1,083
| Install | |
|---|---|
npm install @fatturazione-elettronica-aruba/nuxt |
|
| Latest Version: | 0.3.0 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Jun 22, 2026 |
| Links: | npm |
Maintainer: zangetsu02
@fatturazione-elettronica-aruba/nuxt
Nuxt module for Aruba Electronic Invoicing SDK.
Features
- Server-side only composables for security
- Auto-imported utilities in Nitro server routes
- TypeScript support out of the box
- Automatic OAuth2 authentication
Installation
pnpm add @fatturazione-elettronica-aruba/nuxt
Configuration
Add the module to your nuxt.config.ts:
export default defineNuxtConfig({
modules: ['@fatturazione-elettronica-aruba/nuxt'],
fatturazioneAruba: {
environment: 'demo', // or 'production'
},
runtimeConfig: {
fatturazioneAruba: {
username: '', // Set via NUXT_FATTURAZIONE_ARUBA_USERNAME
password: '', // Set via NUXT_FATTURAZIONE_ARUBA_PASSWORD
},
},
});
Environment Variables
For security, credentials should be set via environment variables:
NUXT_FATTURAZIONE_ARUBA_USERNAME=your_username
NUXT_FATTURAZIONE_ARUBA_PASSWORD=your_password
Usage
The module provides server-side composables that are auto-imported in your Nitro server routes:
useArubaClient()
Returns the main ArubaClient instance:
// server/api/user.get.ts
export default defineEventHandler(async () => {
const client = useArubaClient();
return await client.auth.getUserInfo();
});
useArubaInvoices()
Manage electronic invoices:
// server/api/invoices/sent.get.ts
export default defineEventHandler(async () => {
const invoices = useArubaInvoices();
return await invoices.findSent({
creationDateStart: '2024-01-01',
creationDateEnd: '2024-12-31',
});
});
useArubaNotifications()
Handle SDI notifications:
// server/api/notifications/receipts.get.ts
export default defineEventHandler(async () => {
const notifications = useArubaNotifications();
return await notifications.findDeliveryReceipts({
creationDateStart: '2024-01-01',
creationDateEnd: '2024-12-31',
});
});
useArubaCommunications()
Manage AdE communications (VAT liquidations, etc.):
// server/api/communications/liquidazioni.get.ts
export default defineEventHandler(async () => {
const communications = useArubaCommunications();
return await communications.findLiquidazioni({
creationDateStart: '2024-01-01',
creationDateEnd: '2024-12-31',
});
});
Security
All composables are server-side only and cannot be used in client-side code. This ensures your API credentials are never exposed to the browser.
License
MIT
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.3.0 | ^3.0 | MIT | |
| 0.2.1 | ^3.0 | MIT | |
| 0.2.0 | ^3.0 | MIT | |
| 0.1.1 | ^3.0 | MIT | |
| 0.1.0 | ^3.0 | MIT |