invoice-system/src/config/qbo.js

27 lines
652 B
JavaScript

// src/config/qbo.js
const OAuthClient = require('intuit-oauth');
const {
getOAuthClient: getClient,
saveTokens,
resetOAuthClient,
makeQboApiCall // <-- NEU: Direkt hier mit importieren
} = require('../../qbo_helper');
function getOAuthClient() {
return getClient();
}
function getQboBaseUrl() {
return process.env.QBO_ENVIRONMENT === 'production'
? 'https://quickbooks.api.intuit.com'
: 'https://sandbox-quickbooks.api.intuit.com';
}
module.exports = {
OAuthClient,
getOAuthClient,
getQboBaseUrl,
saveTokens,
resetOAuthClient,
makeQboApiCall // <-- NEU: Und sauber weiterreichen
};