
Company News
Socket Has Acquired Secure Annex
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.
e-Arşiv üzerinden fatura oluşturur, faturaları listeler, faturaları imzalar ve daha fazlasını yapar.
Bu paket, Node.js aracılığıyla e-Arşiv üzerinden fatura oluşturma, düzenleme, imzalama gibi işlemleri yapabilmenize olanak sağlar.
🚨 Bu paket vergiye tabî olan belge oluşturur. Hiç bir sorumluluk kabul edilmez ve ne yaptığınızdan emin olana kadar EInvoice.setTestMode(true) kullanarak test modu açık şekilde test verileriyle işlem yapmanız önerilir.
yarn add e-fatura
veya
npm i e-fatura
import EInvoice, {
getDateFormat, // Tarih formatını alır (Gün/Ay/Yıl veya Saat:Dakika:Saniye)
paymentPriceToText, // Ödenecek tutarı metine dönüştürür
isEInvoiceApiResponseError, // e-Arşiv HTTP yanıtının hata içerip içermediğini kontrol eder
XsltRenderer, // Faturayı XSLT şablonu ile işler
EInvoiceApi, // Soyut hata sınıfı
EInvoiceError, // Tür hata sınıfı
EInvoiceTypeError, // Tür hata sınıfı
EInvoiceApiError, // API hata sınıfı
EInvoiceMissingTokenError, // Eksik veya hatalı erişim jetonu hata sınıfı
EInvoiceMissingCredentialsError, // Eksik veya hatalı giriş bilgileri hata sınıfı
InvoiceType, // Fatura türü
EInvoiceCountry, // Ülkeler
EInvoiceApiErrorCode, // API hata kodları
InvoiceApprovalStatus, // Fatura onay durumu
EInvoiceCurrencyType, // Param birimi
EInvoiceUnitType // Birim türü
// ... Typescript türleri
} from 'e-fatura'
Kendi verileriniz ile test etmek için:
https://earsivportal.efatura.gov.tr/intragiris.html
Test hesaplarıyla test etmek için:
https://earsivportaltest.efatura.gov.tr/login.jsp
import EInvoice from 'e-fatura'
await EInvoice.connect({
anonymous: true
})
// ... Diğer işlemler. Fatura oluşturma, listeleme, düzenleme vb.
// e-Arşiv oturumunu sonlandırır.
await EInvoice.logout()
import EInvoice from 'e-fatura'
// Muhasebecinizden aldığınız giriş bilgileri.
await EInvoice.connect({
username: 'kullanıcı kodu|adı',
password: 'şifre'
})
// ... Diğer işlemler. Fatura oluşturma, listeleme, düzenleme vb.
// e-Arşiv oturumunu sonlandırır.
await EInvoice.logout()
API ve tür hatalarının ayıklanması.
import axios from 'axios'
import EInvoice, {
EInvoiceApiError,
EInvoiceTypeError,
EInvoiceApiErrorCode,
EInvoiceMissingTokenError,
EInvoiceMissingCredentialsError
} from 'e-fatura'
try {
// EInvoice.*()
} catch (e) {
if (e instanceof EInvoiceTypeError) {
console.error('Tür hatası meydana geldi:', e)
} else if (e instanceof EInvoiceMissingTokenError) {
console.error('Erişim jetonu sağlanmadı.')
} else if (e instanceof EInvoiceMissingCredentialsError) {
console.error('Giriş bilgileri sağlanmadı veya eksik sağlandı:', e.credentials)
} else if (e instanceof EInvoiceApiError) {
switch (e.errorCode) {
case EInvoiceApiErrorCode.UNKNOWN_ERROR:
console.error('Bilinmeyen bir hata oluştu:', e.response)
break
case EInvoiceApiErrorCode.INVALID_RESPONSE:
console.error('Geçersiz API cevabı:', e.response)
break
case EInvoiceApiErrorCode.INVALID_ACCESS_TOKEN:
console.error('Geçersiz erişim jetonu:', e.response)
break
case EInvoiceApiErrorCode.BASIC_INVOICE_NOT_CREATED:
console.error('Basit fatura oluşturulamadı:', e.response)
// ...
}
} else if (axios.isAxiosError(e)) {
console.error('Axios hatası meydana geldi:', e)
} else {
console.error('Bilinmeyen bir hata meydana geldi:', e)
}
}
Diğer API hata kodları için EInvoiceApiErrorCode.ts dosyasına bakabilirsiniz.
Bu proje Furkan Kadıoğlu'nun efatura projesinden yola çıkılarak Node.js'e uyarlanmıştır.
FAQs
e-Arşiv üzerinden fatura oluşturur, faturaları listeler, faturaları imzalar ve daha fazlasını yapar.
The npm package e-fatura receives a total of 50 weekly downloads. As such, e-fatura popularity was classified as not popular.
We found that e-fatura demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.

Product
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.