@accounty/jortt
v1.1.3
Published
<img src="https://cdn.jsdelivr.net/npm/@accounty/jortt/banner.png" alt="Accounty — Many providers. One interface." />
Readme
@accounty/jortt
Customers and invoices from Jortt.
Installation
yarn add @accounty/jorttUsage
Authentication: OAuth 2.0.
import Jortt from '@accounty/jortt'
const provider = new Jortt({})
await provider.setCredentials({ accessToken: '<access-token>' })
const { data: invoices } = await provider.fetchInvoices()For OAuth authorization and token refresh, pass clientId, clientSecret, and redirectUri
to the constructor. Persist credentials returned by getOauthToken() or
setCredentials(). See the OAuth guide.
Supported behavior
fetchCompanies(),fetchInvoices(), andfetchInvoicesWithCompany()return normalized records.downloadInvoice(remoteId)resolves the download location and returns the file as aBuffer.- Authorization requests the
customers:readandinvoices:readscopes.
Fetch methods return { data, version? }. Amounts are integer cents, dates are
Date objects, and remoteData preserves provider records. Filter support varies
by provider.
