@codat/lending 0.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +312 -1
- package/dist/internal/utils/requestbody.d.ts +1 -1
- package/dist/internal/utils/retries.d.ts +2 -2
- package/dist/internal/utils/security.d.ts +5 -2
- package/dist/internal/utils/security.js +28 -28
- package/dist/sdk/accountingbankdata.d.ts +2 -26
- package/dist/sdk/accountingbankdata.js +24 -146
- package/dist/sdk/accountingbankdataaccounts.d.ts +34 -0
- package/dist/sdk/accountingbankdataaccounts.js +262 -0
- package/dist/sdk/accountspayable.d.ts +8 -170
- package/dist/sdk/accountspayable.js +53 -983
- package/dist/sdk/accountspayablebillcreditnotes.d.ts +34 -0
- package/dist/sdk/accountspayablebillcreditnotes.js +262 -0
- package/dist/sdk/accountspayablebillpayments.d.ts +34 -0
- package/dist/sdk/accountspayablebillpayments.js +262 -0
- package/dist/sdk/accountspayablebills.d.ts +46 -0
- package/dist/sdk/accountspayablebills.js +348 -0
- package/dist/sdk/accountspayablesuppliers.d.ts +74 -0
- package/dist/sdk/accountspayablesuppliers.js +530 -0
- package/dist/sdk/accountsreceivable.d.ts +12 -284
- package/dist/sdk/accountsreceivable.js +13 -1677
- package/dist/sdk/accountsreceivablecreditnotes.d.ts +34 -0
- package/dist/sdk/accountsreceivablecreditnotes.js +262 -0
- package/dist/sdk/accountsreceivablecustomers.d.ts +74 -0
- package/dist/sdk/accountsreceivablecustomers.js +530 -0
- package/dist/sdk/accountsreceivabledirectincomes.d.ts +74 -0
- package/dist/sdk/{financials.js → accountsreceivabledirectincomes.js} +183 -211
- package/dist/sdk/accountsreceivableinvoices.d.ts +93 -0
- package/dist/sdk/{cashflow.js → accountsreceivableinvoices.js} +250 -189
- package/dist/sdk/accountsreceivablepayments.d.ts +34 -0
- package/dist/sdk/accountsreceivablepayments.js +262 -0
- package/dist/sdk/accountsreceivablereports.d.ts +36 -0
- package/dist/sdk/accountsreceivablereports.js +399 -0
- package/dist/sdk/banking.d.ts +15 -0
- package/dist/sdk/banking.js +23 -0
- package/dist/sdk/bankingaccountbalances.d.ts +20 -0
- package/dist/sdk/bankingaccountbalances.js +174 -0
- package/dist/sdk/bankingaccounts.d.ts +34 -0
- package/dist/sdk/bankingaccounts.js +254 -0
- package/dist/sdk/bankingcategorizedstatement.d.ts +19 -0
- package/dist/sdk/bankingcategorizedstatement.js +173 -0
- package/dist/sdk/bankingtransactioncategories.d.ts +34 -0
- package/dist/sdk/bankingtransactioncategories.js +254 -0
- package/dist/sdk/bankingtransactions.d.ts +34 -0
- package/dist/sdk/bankingtransactions.js +254 -0
- package/dist/sdk/companies.js +110 -25
- package/dist/sdk/companyinfo.d.ts +4 -4
- package/dist/sdk/companyinfo.js +52 -18
- package/dist/sdk/connections.js +110 -25
- package/dist/sdk/dataintegrity.js +66 -15
- package/dist/sdk/excelreports.d.ts +10 -2
- package/dist/sdk/excelreports.js +76 -17
- package/dist/sdk/fileupload.js +66 -15
- package/dist/sdk/financialstatements.d.ts +13 -0
- package/dist/sdk/financialstatements.js +21 -0
- package/dist/sdk/financialstatementsaccounts.d.ts +33 -0
- package/dist/sdk/financialstatementsaccounts.js +261 -0
- package/dist/sdk/financialstatementsbalancesheet.d.ts +24 -0
- package/dist/sdk/financialstatementsbalancesheet.js +253 -0
- package/dist/sdk/financialstatementscashflow.d.ts +15 -0
- package/dist/sdk/financialstatementscashflow.js +169 -0
- package/dist/sdk/financialstatementsprofitandloss.d.ts +24 -0
- package/dist/sdk/financialstatementsprofitandloss.js +253 -0
- package/dist/sdk/liabilities.d.ts +4 -4
- package/dist/sdk/liabilities.js +48 -14
- package/dist/sdk/managedata.d.ts +5 -38
- package/dist/sdk/managedata.js +27 -267
- package/dist/sdk/managedatapulloperations.d.ts +22 -0
- package/dist/sdk/managedatapulloperations.js +250 -0
- package/dist/sdk/managedatarefresh.d.ts +28 -0
- package/dist/sdk/managedatarefresh.js +250 -0
- package/dist/sdk/models/operations/{getaccountingcompanyinfo.d.ts → getaccountingprofile.d.ts} +2 -2
- package/dist/sdk/models/operations/{getaccountingcompanyinfo.js → getaccountingprofile.js} +17 -17
- package/dist/sdk/models/operations/{getenhancedprofitandlossaccounts.d.ts → getcategorizedbalancesheetstatement.d.ts} +2 -2
- package/dist/sdk/models/operations/{getenhancedbalancesheetaccounts.js → getcategorizedbalancesheetstatement.js} +19 -19
- package/dist/sdk/models/operations/{getenhancedcashflowtransactions.d.ts → getcategorizedbankstatement.d.ts} +2 -2
- package/dist/sdk/models/operations/{getenhancedcashflowtransactions.js → getcategorizedbankstatement.js} +20 -20
- package/dist/sdk/models/operations/{getenhancedbalancesheetaccounts.d.ts → getcategorizedprofitandlossstatement.d.ts} +2 -2
- package/dist/sdk/models/operations/{getenhancedprofitandlossaccounts.js → getcategorizedprofitandlossstatement.js} +19 -19
- package/dist/sdk/models/operations/{getcommercecompanyinfo.d.ts → getcommerceprofile.d.ts} +2 -2
- package/dist/sdk/models/operations/{getcommercecompanyinfo.js → getcommerceprofile.js} +18 -18
- package/dist/sdk/models/operations/{getcommercerefundsmetrics.d.ts → getcommercerefundsreport.d.ts} +2 -2
- package/dist/sdk/models/operations/{getcommercerefundsmetrics.js → getcommercerefundsreport.js} +23 -23
- package/dist/sdk/models/operations/index.d.ts +8 -8
- package/dist/sdk/models/operations/index.js +8 -8
- package/dist/sdk/models/operations/{isageddebtorreportavailable.d.ts → isageddebtorsreportavailable.d.ts} +3 -3
- package/dist/sdk/models/operations/{isageddebtorreportavailable.js → isageddebtorsreportavailable.js} +16 -16
- package/dist/sdk/models/operations/{getenhancedinvoicesreport.d.ts → listreconciledinvoices.d.ts} +2 -2
- package/dist/sdk/models/operations/{getenhancedinvoicesreport.js → listreconciledinvoices.js} +20 -20
- package/dist/sdk/models/operations/unlinkconnection.d.ts +6 -3
- package/dist/sdk/models/operations/unlinkconnection.js +8 -8
- package/dist/sdk/models/shared/accountbalance.d.ts +1 -1
- package/dist/sdk/models/shared/accountbalance.js +1 -1
- package/dist/sdk/models/shared/accountingaccounts.d.ts +0 -3
- package/dist/sdk/models/shared/accountingaccounts.js +0 -3
- package/dist/sdk/models/shared/accountingaccounttransactions.d.ts +0 -3
- package/dist/sdk/models/shared/accountingaccounttransactions.js +0 -3
- package/dist/sdk/models/shared/accountingbankaccounts.d.ts +0 -3
- package/dist/sdk/models/shared/accountingbankaccounts.js +0 -3
- package/dist/sdk/models/shared/accountingbanktransactions.d.ts +0 -3
- package/dist/sdk/models/shared/accountingbanktransactions.js +0 -3
- package/dist/sdk/models/shared/accountingbill.d.ts +1 -1
- package/dist/sdk/models/shared/accountingbillcreditnote.d.ts +1 -1
- package/dist/sdk/models/shared/accountingbillcreditnotes.d.ts +0 -3
- package/dist/sdk/models/shared/accountingbillcreditnotes.js +0 -3
- package/dist/sdk/models/shared/accountingbillpayment.d.ts +1 -1
- package/dist/sdk/models/shared/accountingbillpayments.d.ts +0 -3
- package/dist/sdk/models/shared/accountingbillpayments.js +0 -3
- package/dist/sdk/models/shared/accountingbills.d.ts +0 -3
- package/dist/sdk/models/shared/accountingbills.js +0 -3
- package/dist/sdk/models/shared/accountingcompanyinfo.d.ts +32 -2
- package/dist/sdk/models/shared/accountingcompanyinfo.js +47 -4
- package/dist/sdk/models/shared/accountingcreditnote.d.ts +1 -1
- package/dist/sdk/models/shared/accountingcreditnotes.d.ts +0 -3
- package/dist/sdk/models/shared/accountingcreditnotes.js +0 -3
- package/dist/sdk/models/shared/accountingcustomer.d.ts +3 -3
- package/dist/sdk/models/shared/accountingcustomer.js +3 -3
- package/dist/sdk/models/shared/accountingcustomers.d.ts +0 -3
- package/dist/sdk/models/shared/accountingcustomers.js +0 -3
- package/dist/sdk/models/shared/accountingdirectcost.d.ts +1 -1
- package/dist/sdk/models/shared/accountingdirectcosts.d.ts +0 -3
- package/dist/sdk/models/shared/accountingdirectcosts.js +0 -3
- package/dist/sdk/models/shared/accountingdirectincome.d.ts +1 -1
- package/dist/sdk/models/shared/accountingdirectincomes.d.ts +0 -3
- package/dist/sdk/models/shared/accountingdirectincomes.js +0 -3
- package/dist/sdk/models/shared/accountinginvoice.d.ts +1 -1
- package/dist/sdk/models/shared/accountinginvoices.d.ts +0 -3
- package/dist/sdk/models/shared/accountinginvoices.js +0 -3
- package/dist/sdk/models/shared/accountingjournalentries.d.ts +0 -3
- package/dist/sdk/models/shared/accountingjournalentries.js +0 -3
- package/dist/sdk/models/shared/accountingjournalentry.d.ts +1 -1
- package/dist/sdk/models/shared/accountingjournals.d.ts +0 -3
- package/dist/sdk/models/shared/accountingjournals.js +0 -3
- package/dist/sdk/models/shared/accountingpayment.d.ts +1 -1
- package/dist/sdk/models/shared/accountingpayments.d.ts +0 -3
- package/dist/sdk/models/shared/accountingpayments.js +0 -3
- package/dist/sdk/models/shared/accountingsupplier.d.ts +3 -3
- package/dist/sdk/models/shared/accountingsupplier.js +3 -3
- package/dist/sdk/models/shared/accountingsuppliers.d.ts +0 -3
- package/dist/sdk/models/shared/accountingsuppliers.js +0 -3
- package/dist/sdk/models/shared/accountingtransfer.d.ts +1 -1
- package/dist/sdk/models/shared/accountingtransfers.d.ts +0 -3
- package/dist/sdk/models/shared/accountingtransfers.js +0 -3
- package/dist/sdk/models/shared/{accountingaddress.d.ts → addressesitems.d.ts} +1 -1
- package/dist/sdk/models/shared/{accountingaddress.js → addressesitems.js} +13 -13
- package/dist/sdk/models/shared/attachments.d.ts +0 -3
- package/dist/sdk/models/shared/attachments.js +0 -3
- package/dist/sdk/models/shared/bankingaccountbalances.d.ts +0 -3
- package/dist/sdk/models/shared/bankingaccountbalances.js +0 -3
- package/dist/sdk/models/shared/bankingaccounts.d.ts +0 -3
- package/dist/sdk/models/shared/bankingaccounts.js +0 -3
- package/dist/sdk/models/shared/bankingtransactioncategories.d.ts +0 -3
- package/dist/sdk/models/shared/bankingtransactioncategories.js +0 -3
- package/dist/sdk/models/shared/bankingtransactions.d.ts +0 -3
- package/dist/sdk/models/shared/bankingtransactions.js +0 -3
- package/dist/sdk/models/shared/commercecustomers.d.ts +0 -3
- package/dist/sdk/models/shared/commercecustomers.js +0 -3
- package/dist/sdk/models/shared/commercedispute.d.ts +1 -1
- package/dist/sdk/models/shared/commercedispute.js +1 -1
- package/dist/sdk/models/shared/commercedisputes.d.ts +0 -3
- package/dist/sdk/models/shared/commercedisputes.js +0 -3
- package/dist/sdk/models/shared/commercelocations.d.ts +0 -3
- package/dist/sdk/models/shared/commercelocations.js +0 -3
- package/dist/sdk/models/shared/commerceorder.d.ts +2 -2
- package/dist/sdk/models/shared/commerceorder.js +1 -1
- package/dist/sdk/models/shared/commerceorders.d.ts +0 -3
- package/dist/sdk/models/shared/commerceorders.js +0 -3
- package/dist/sdk/models/shared/commercepaymentmethods.d.ts +0 -3
- package/dist/sdk/models/shared/commercepaymentmethods.js +0 -3
- package/dist/sdk/models/shared/commercepayments.d.ts +0 -3
- package/dist/sdk/models/shared/commercepayments.js +0 -3
- package/dist/sdk/models/shared/commerceproductcategories.d.ts +0 -3
- package/dist/sdk/models/shared/commerceproductcategories.js +0 -3
- package/dist/sdk/models/shared/commerceproducts.d.ts +0 -3
- package/dist/sdk/models/shared/commerceproducts.js +0 -3
- package/dist/sdk/models/shared/commercetransactions.d.ts +0 -3
- package/dist/sdk/models/shared/commercetransactions.js +0 -3
- package/dist/sdk/models/shared/companies.d.ts +0 -3
- package/dist/sdk/models/shared/companies.js +0 -3
- package/dist/sdk/models/shared/connections.d.ts +0 -3
- package/dist/sdk/models/shared/connections.js +0 -3
- package/dist/sdk/models/shared/contact.d.ts +2 -2
- package/dist/sdk/models/shared/contact.js +3 -3
- package/dist/sdk/models/shared/dataintegritydatatype.d.ts +0 -3
- package/dist/sdk/models/shared/dataintegritydatatype.js +0 -3
- package/dist/sdk/models/shared/dataintegritydetails.d.ts +0 -3
- package/dist/sdk/models/shared/dataintegritydetails.js +0 -3
- package/dist/sdk/models/shared/dataintegritystatuses.d.ts +0 -3
- package/dist/sdk/models/shared/dataintegritystatuses.js +0 -3
- package/dist/sdk/models/shared/dataintegritysummaries.d.ts +0 -3
- package/dist/sdk/models/shared/dataintegritysummaries.js +0 -3
- package/dist/sdk/models/shared/enhancedfinancialreport.d.ts +0 -3
- package/dist/sdk/models/shared/enhancedfinancialreport.js +0 -3
- package/dist/sdk/models/shared/errormessage.d.ts +0 -3
- package/dist/sdk/models/shared/errormessage.js +0 -3
- package/dist/sdk/models/shared/excelstatus.d.ts +0 -3
- package/dist/sdk/models/shared/excelstatus.js +0 -3
- package/dist/sdk/models/shared/index.d.ts +1 -1
- package/dist/sdk/models/shared/index.js +1 -1
- package/dist/sdk/models/shared/loansummary.d.ts +0 -3
- package/dist/sdk/models/shared/loansummary.js +0 -3
- package/dist/sdk/models/shared/loantransactions.d.ts +0 -3
- package/dist/sdk/models/shared/loantransactions.js +0 -3
- package/dist/sdk/models/shared/periodunit.d.ts +0 -3
- package/dist/sdk/models/shared/periodunit.js +0 -3
- package/dist/sdk/models/shared/pulloperations.d.ts +0 -3
- package/dist/sdk/models/shared/pulloperations.js +0 -3
- package/dist/sdk/models/shared/supplementaldata.d.ts +1 -1
- package/dist/sdk/models/shared/supplementaldata.js +1 -1
- package/dist/sdk/sales.d.ts +22 -372
- package/dist/sdk/sales.js +22 -1767
- package/dist/sdk/salescustomers.d.ts +34 -0
- package/dist/sdk/salescustomers.js +262 -0
- package/dist/sdk/salesdisputes.d.ts +34 -0
- package/dist/sdk/salesdisputes.js +262 -0
- package/dist/sdk/saleslocations.d.ts +34 -0
- package/dist/sdk/saleslocations.js +261 -0
- package/dist/sdk/salesmetrics.d.ts +102 -0
- package/dist/sdk/salesmetrics.js +406 -0
- package/dist/sdk/salesorders.d.ts +34 -0
- package/dist/sdk/salesorders.js +262 -0
- package/dist/sdk/salespaymentmethods.d.ts +34 -0
- package/dist/sdk/salespaymentmethods.js +262 -0
- package/dist/sdk/salespayments.d.ts +34 -0
- package/dist/sdk/salespayments.js +262 -0
- package/dist/sdk/salesproductcategories.d.ts +34 -0
- package/dist/sdk/salesproductcategories.js +262 -0
- package/dist/sdk/salesproducts.d.ts +34 -0
- package/dist/sdk/salesproducts.js +262 -0
- package/dist/sdk/salesreports.d.ts +69 -0
- package/dist/sdk/salesreports.js +298 -0
- package/dist/sdk/salestransactions.d.ts +34 -0
- package/dist/sdk/salestransactions.js +262 -0
- package/dist/sdk/sdk.d.ts +38 -30
- package/dist/sdk/sdk.js +33 -45
- package/dist/sdk/transactions.d.ts +10 -176
- package/dist/sdk/transactions.js +11 -1000
- package/dist/sdk/transactionsaccounttransactions.d.ts +34 -0
- package/dist/sdk/transactionsaccounttransactions.js +262 -0
- package/dist/sdk/transactionsdirectcosts.d.ts +74 -0
- package/dist/sdk/transactionsdirectcosts.js +530 -0
- package/dist/sdk/transactionsjournalentries.d.ts +34 -0
- package/dist/sdk/transactionsjournalentries.js +262 -0
- package/dist/sdk/transactionsjournals.d.ts +34 -0
- package/dist/sdk/transactionsjournals.js +262 -0
- package/dist/sdk/transactionstransfers.d.ts +34 -0
- package/dist/sdk/transactionstransfers.js +262 -0
- package/docs/models/operations/{getaccountingcompanyinforequest.md → getaccountingprofilerequest.md} +1 -1
- package/docs/models/operations/{getaccountingcompanyinforesponse.md → getaccountingprofileresponse.md} +1 -1
- package/docs/models/operations/{getenhancedbalancesheetaccountsrequest.md → getcategorizedbalancesheetstatementrequest.md} +1 -1
- package/docs/models/operations/{getenhancedprofitandlossaccountsresponse.md → getcategorizedbalancesheetstatementresponse.md} +1 -1
- package/docs/models/operations/{getenhancedcashflowtransactionsrequest.md → getcategorizedbankstatementrequest.md} +1 -1
- package/docs/models/operations/{getenhancedcashflowtransactionsresponse.md → getcategorizedbankstatementresponse.md} +1 -1
- package/docs/models/operations/{getenhancedprofitandlossaccountsrequest.md → getcategorizedprofitandlossstatementrequest.md} +1 -1
- package/docs/models/operations/{getenhancedbalancesheetaccountsresponse.md → getcategorizedprofitandlossstatementresponse.md} +1 -1
- package/docs/models/operations/{getcommercecompanyinforequest.md → getcommerceprofilerequest.md} +1 -1
- package/docs/models/operations/{getcommercecompanyinforesponse.md → getcommerceprofileresponse.md} +1 -1
- package/docs/models/operations/{getcommercerefundsmetricsrequest.md → getcommercerefundsreportrequest.md} +1 -1
- package/docs/models/operations/{getcommercerefundsmetricsresponse.md → getcommercerefundsreportresponse.md} +1 -1
- package/docs/models/operations/{isageddebtorreportavailablerequest.md → isageddebtorsreportavailablerequest.md} +1 -1
- package/docs/models/operations/{isageddebtorreportavailableresponse.md → isageddebtorsreportavailableresponse.md} +2 -2
- package/docs/models/operations/{getenhancedinvoicesreportrequest.md → listreconciledinvoicesrequest.md} +1 -1
- package/docs/models/operations/{getenhancedinvoicesreportresponse.md → listreconciledinvoicesresponse.md} +1 -1
- package/docs/models/operations/unlinkconnectionrequest.md +5 -5
- package/docs/models/operations/unlinkconnectionupdateconnection.md +8 -0
- package/docs/models/shared/accountbalance.md +1 -1
- package/docs/models/shared/accountingaccounts.md +0 -2
- package/docs/models/shared/accountingaccounttransactions.md +0 -2
- package/docs/models/shared/accountingbankaccounts.md +0 -2
- package/docs/models/shared/accountingbanktransactions.md +0 -2
- package/docs/models/shared/accountingbill.md +1 -1
- package/docs/models/shared/accountingbillcreditnote.md +1 -1
- package/docs/models/shared/accountingbillcreditnotes.md +0 -2
- package/docs/models/shared/accountingbillpayment.md +1 -1
- package/docs/models/shared/accountingbillpayments.md +0 -2
- package/docs/models/shared/accountingbills.md +0 -2
- package/docs/models/shared/accountingcompanyinfo.md +1 -1
- package/docs/models/shared/accountingcompanyinfoaccountingaddress.md +14 -0
- package/docs/models/shared/accountingcreditnote.md +1 -1
- package/docs/models/shared/accountingcreditnotes.md +0 -2
- package/docs/models/shared/accountingcustomer.md +2 -2
- package/docs/models/shared/accountingcustomers.md +0 -2
- package/docs/models/shared/accountingdirectcost.md +1 -1
- package/docs/models/shared/accountingdirectcosts.md +0 -2
- package/docs/models/shared/accountingdirectincome.md +1 -1
- package/docs/models/shared/accountingdirectincomes.md +0 -2
- package/docs/models/shared/accountinginvoice.md +1 -1
- package/docs/models/shared/accountinginvoices.md +0 -2
- package/docs/models/shared/accountingjournalentries.md +0 -2
- package/docs/models/shared/accountingjournalentry.md +1 -1
- package/docs/models/shared/accountingjournals.md +0 -2
- package/docs/models/shared/accountingpayment.md +1 -1
- package/docs/models/shared/accountingpayments.md +0 -2
- package/docs/models/shared/accountingsupplier.md +16 -16
- package/docs/models/shared/accountingsuppliers.md +0 -2
- package/docs/models/shared/accountingtransfer.md +1 -1
- package/docs/models/shared/accountingtransfers.md +0 -2
- package/docs/models/shared/{accountingaddress.md → addressesitems.md} +1 -1
- package/docs/models/shared/attachments.md +0 -2
- package/docs/models/shared/bankingaccountbalances.md +0 -2
- package/docs/models/shared/bankingaccounts.md +0 -2
- package/docs/models/shared/bankingtransactioncategories.md +0 -2
- package/docs/models/shared/bankingtransactions.md +0 -2
- package/docs/models/shared/commercecustomers.md +0 -2
- package/docs/models/shared/commercedispute.md +1 -1
- package/docs/models/shared/commercedisputes.md +0 -2
- package/docs/models/shared/commercelocations.md +0 -2
- package/docs/models/shared/commerceorder.md +1 -1
- package/docs/models/shared/commerceorders.md +0 -2
- package/docs/models/shared/commerceordersupplementaldata.md +1 -1
- package/docs/models/shared/commercepaymentmethods.md +0 -2
- package/docs/models/shared/commercepayments.md +0 -2
- package/docs/models/shared/commerceproductcategories.md +0 -2
- package/docs/models/shared/commerceproducts.md +0 -2
- package/docs/models/shared/commercetransactions.md +0 -2
- package/docs/models/shared/companies.md +0 -2
- package/docs/models/shared/connections.md +0 -2
- package/docs/models/shared/contact.md +1 -1
- package/docs/models/shared/dataintegritydatatype.md +0 -2
- package/docs/models/shared/dataintegritydetails.md +0 -2
- package/docs/models/shared/dataintegritystatuses.md +0 -2
- package/docs/models/shared/dataintegritysummaries.md +0 -2
- package/docs/models/shared/enhancedfinancialreport.md +0 -2
- package/docs/models/shared/errormessage.md +0 -2
- package/docs/models/shared/excelstatus.md +0 -2
- package/docs/models/shared/loansummary.md +0 -2
- package/docs/models/shared/loantransactions.md +0 -2
- package/docs/models/shared/periodunit.md +0 -2
- package/docs/models/shared/pulloperations.md +0 -2
- package/docs/models/shared/supplementaldata.md +1 -1
- package/docs/sdks/accountingbankdata/README.md +2 -101
- package/docs/sdks/accountingbankdataaccounts/README.md +103 -0
- package/docs/sdks/accountspayable/README.md +2 -664
- package/docs/sdks/accountspayablebillcreditnotes/README.md +101 -0
- package/docs/sdks/accountspayablebillpayments/README.md +101 -0
- package/docs/sdks/accountspayablebills/README.md +148 -0
- package/docs/sdks/accountspayablesuppliers/README.md +244 -0
- package/docs/sdks/accountsreceivable/README.md +0 -1089
- package/docs/sdks/accountsreceivablecreditnotes/README.md +101 -0
- package/docs/sdks/accountsreceivablecustomers/README.md +244 -0
- package/docs/sdks/accountsreceivabledirectincomes/README.md +247 -0
- package/docs/sdks/{financials → accountsreceivableinvoices}/README.md +123 -111
- package/docs/sdks/accountsreceivablepayments/README.md +101 -0
- package/docs/sdks/accountsreceivablereports/README.md +172 -0
- package/docs/sdks/banking/README.md +4 -0
- package/docs/sdks/bankingaccountbalances/README.md +54 -0
- package/docs/sdks/bankingaccounts/README.md +103 -0
- package/docs/sdks/bankingcategorizedstatement/README.md +51 -0
- package/docs/sdks/bankingtransactioncategories/README.md +103 -0
- package/docs/sdks/bankingtransactions/README.md +103 -0
- package/docs/sdks/codatlending/README.md +24 -4
- package/docs/sdks/companies/README.md +1 -1
- package/docs/sdks/companyinfo/README.md +22 -22
- package/docs/sdks/connections/README.md +4 -3
- package/docs/sdks/dataintegrity/README.md +5 -5
- package/docs/sdks/excelreports/README.md +12 -4
- package/docs/sdks/fileupload/README.md +2 -2
- package/docs/sdks/financialstatements/README.md +4 -0
- package/docs/sdks/financialstatementsaccounts/README.md +100 -0
- package/docs/sdks/financialstatementsbalancesheet/README.md +91 -0
- package/docs/sdks/financialstatementscashflow/README.md +47 -0
- package/docs/sdks/financialstatementsprofitandloss/README.md +91 -0
- package/docs/sdks/liabilities/README.md +4 -4
- package/docs/sdks/managedata/README.md +3 -181
- package/docs/sdks/managedatapulloperations/README.md +89 -0
- package/docs/sdks/managedatarefresh/README.md +93 -0
- package/docs/sdks/sales/README.md +0 -1223
- package/docs/sdks/salescustomers/README.md +103 -0
- package/docs/sdks/salesdisputes/README.md +103 -0
- package/docs/sdks/saleslocations/README.md +99 -0
- package/docs/sdks/salesmetrics/README.md +218 -0
- package/docs/sdks/salesorders/README.md +103 -0
- package/docs/sdks/salespaymentmethods/README.md +103 -0
- package/docs/sdks/salespayments/README.md +103 -0
- package/docs/sdks/salesproductcategories/README.md +103 -0
- package/docs/sdks/salesproducts/README.md +103 -0
- package/docs/sdks/salesreports/README.md +145 -0
- package/docs/sdks/salestransactions/README.md +103 -0
- package/docs/sdks/transactions/README.md +0 -638
- package/docs/sdks/transactionsaccounttransactions/README.md +103 -0
- package/docs/sdks/transactionsdirectcosts/README.md +246 -0
- package/docs/sdks/transactionsjournalentries/README.md +101 -0
- package/docs/sdks/transactionsjournals/README.md +101 -0
- package/docs/sdks/transactionstransfers/README.md +103 -0
- package/package.json +1 -1
- package/dist/sdk/cashflow.d.ts +0 -112
- package/dist/sdk/financials.d.ts +0 -75
- package/docs/models/operations/unlinkconnectionrequestbody.md +0 -8
- package/docs/sdks/cashflow/README.md +0 -402
|
@@ -73,126 +73,83 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
|
-
exports.
|
|
76
|
+
exports.AccountsReceivableDirectIncomes = exports.DownloadAttachmentAcceptEnum = void 0;
|
|
77
77
|
var utils = __importStar(require("../internal/utils"));
|
|
78
78
|
var errors = __importStar(require("./models/errors"));
|
|
79
79
|
var operations = __importStar(require("./models/operations"));
|
|
80
80
|
var shared = __importStar(require("./models/shared"));
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
var DownloadAttachmentAcceptEnum;
|
|
82
|
+
(function (DownloadAttachmentAcceptEnum) {
|
|
83
|
+
DownloadAttachmentAcceptEnum["applicationJson"] = "application/json";
|
|
84
|
+
DownloadAttachmentAcceptEnum["applicationOctetStream"] = "application/octet-stream";
|
|
85
|
+
})(DownloadAttachmentAcceptEnum = exports.DownloadAttachmentAcceptEnum || (exports.DownloadAttachmentAcceptEnum = {}));
|
|
86
|
+
var AccountsReceivableDirectIncomes = /** @class */ (function () {
|
|
87
|
+
function AccountsReceivableDirectIncomes(sdkConfig) {
|
|
86
88
|
this.sdkConfiguration = sdkConfig;
|
|
87
89
|
}
|
|
88
90
|
/**
|
|
89
|
-
*
|
|
91
|
+
* Download direct income attachment
|
|
90
92
|
*
|
|
91
93
|
* @remarks
|
|
92
|
-
* The *
|
|
93
|
-
*
|
|
94
|
-
* [Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions.
|
|
94
|
+
* The *Download direct income attachment* endpoint downloads a specific attachment for a given `directIncomeId` and `attachmentId`.
|
|
95
95
|
*
|
|
96
|
-
*
|
|
96
|
+
* [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale.
|
|
97
97
|
*
|
|
98
|
-
*
|
|
98
|
+
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support downloading a direct income attachment.
|
|
99
99
|
*
|
|
100
100
|
*/
|
|
101
|
-
|
|
101
|
+
AccountsReceivableDirectIncomes.prototype.downloadAttachment = function (req, retries, config, acceptHeaderOverride) {
|
|
102
102
|
var _a, _b;
|
|
103
103
|
return __awaiter(this, void 0, void 0, function () {
|
|
104
|
-
var baseURL, url, client, headers, retryConfig, httpRes, contentType, res, decodedRes;
|
|
104
|
+
var baseURL, url, client, globalSecurity, properties, headers, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
105
105
|
return __generator(this, function (_c) {
|
|
106
106
|
switch (_c.label) {
|
|
107
107
|
case 0:
|
|
108
108
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
109
|
-
req = new operations.
|
|
109
|
+
req = new operations.DownloadAccountingDirectIncomeAttachmentRequest(req);
|
|
110
110
|
}
|
|
111
111
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
112
|
-
url = utils.generateURL(baseURL, "/companies/{companyId}/data/
|
|
113
|
-
client = this.sdkConfiguration.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
retryConfig = retries;
|
|
118
|
-
if (!retryConfig) {
|
|
119
|
-
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
120
|
-
}
|
|
121
|
-
return [4 /*yield*/, utils.Retry(function () {
|
|
122
|
-
return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
123
|
-
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
112
|
+
url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments/{attachmentId}/download", req);
|
|
113
|
+
client = this.sdkConfiguration.defaultClient;
|
|
114
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
115
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
116
|
+
return [4 /*yield*/, globalSecurity()];
|
|
124
117
|
case 1:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
118
|
+
globalSecurity = _c.sent();
|
|
119
|
+
_c.label = 2;
|
|
120
|
+
case 2:
|
|
121
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
122
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
129
123
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
});
|
|
135
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
136
|
-
switch (true) {
|
|
137
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
138
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
139
|
-
res.accountingAccount = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingAccount);
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
143
|
-
}
|
|
144
|
-
break;
|
|
145
|
-
case [401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
146
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
147
|
-
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
151
|
-
}
|
|
152
|
-
break;
|
|
124
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
125
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
126
|
+
if (acceptHeaderOverride !== undefined) {
|
|
127
|
+
headers["Accept"] = acceptHeaderOverride.toString();
|
|
153
128
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
};
|
|
159
|
-
/**
|
|
160
|
-
* Get balance sheet
|
|
161
|
-
*
|
|
162
|
-
* @remarks
|
|
163
|
-
* Gets the latest balance sheet for a company.
|
|
164
|
-
*/
|
|
165
|
-
Financials.prototype.getBalanceSheet = function (req, retries, config) {
|
|
166
|
-
var _a, _b;
|
|
167
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
168
|
-
var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
|
|
169
|
-
return __generator(this, function (_c) {
|
|
170
|
-
switch (_c.label) {
|
|
171
|
-
case 0:
|
|
172
|
-
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
173
|
-
req = new operations.GetAccountingBalanceSheetRequest(req);
|
|
129
|
+
else {
|
|
130
|
+
headers["Accept"] = "application/json;q=1, application/octet-stream;q=0";
|
|
174
131
|
}
|
|
175
|
-
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
176
|
-
url = utils.generateURL(baseURL, "/companies/{companyId}/data/financials/balanceSheet", req);
|
|
177
|
-
client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
|
|
178
|
-
headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
|
|
179
|
-
queryParams = utils.serializeQueryParams(req);
|
|
180
|
-
headers["Accept"] = "application/json";
|
|
181
132
|
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
133
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
182
134
|
retryConfig = retries;
|
|
183
135
|
if (!retryConfig) {
|
|
184
|
-
|
|
136
|
+
if (globalRetryConfig) {
|
|
137
|
+
retryConfig = globalRetryConfig;
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
141
|
+
}
|
|
185
142
|
}
|
|
186
143
|
return [4 /*yield*/, utils.Retry(function () {
|
|
187
|
-
return client.request(__assign({ validateStatus: function () { return true; }, url: url
|
|
144
|
+
return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
188
145
|
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
189
|
-
case
|
|
146
|
+
case 3:
|
|
190
147
|
httpRes = _c.sent();
|
|
191
148
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
192
149
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
193
150
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
194
151
|
}
|
|
195
|
-
res = new operations.
|
|
152
|
+
res = new operations.DownloadAccountingDirectIncomeAttachmentResponse({
|
|
196
153
|
statusCode: httpRes.status,
|
|
197
154
|
contentType: contentType,
|
|
198
155
|
rawResponse: httpRes,
|
|
@@ -200,14 +157,14 @@ var Financials = /** @class */ (function () {
|
|
|
200
157
|
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
201
158
|
switch (true) {
|
|
202
159
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
203
|
-
if (utils.matchContentType(contentType, "application/
|
|
204
|
-
res.
|
|
160
|
+
if (utils.matchContentType(contentType, "application/octet-stream")) {
|
|
161
|
+
res.data = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
|
|
205
162
|
}
|
|
206
163
|
else {
|
|
207
164
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
208
165
|
}
|
|
209
166
|
break;
|
|
210
|
-
case [401, 404,
|
|
167
|
+
case [401, 404, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
211
168
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
212
169
|
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
213
170
|
}
|
|
@@ -222,42 +179,65 @@ var Financials = /** @class */ (function () {
|
|
|
222
179
|
});
|
|
223
180
|
};
|
|
224
181
|
/**
|
|
225
|
-
* Get
|
|
182
|
+
* Get direct income
|
|
226
183
|
*
|
|
227
184
|
* @remarks
|
|
228
|
-
*
|
|
185
|
+
* The *Get direct income* endpoint returns a single direct income for a given directIncomeId.
|
|
186
|
+
*
|
|
187
|
+
* [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale.
|
|
188
|
+
*
|
|
189
|
+
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support getting a specific direct income.
|
|
190
|
+
*
|
|
191
|
+
* Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
|
|
192
|
+
*
|
|
229
193
|
*/
|
|
230
|
-
|
|
194
|
+
AccountsReceivableDirectIncomes.prototype.get = function (req, retries, config) {
|
|
231
195
|
var _a, _b;
|
|
232
196
|
return __awaiter(this, void 0, void 0, function () {
|
|
233
|
-
var baseURL, url, client, headers,
|
|
197
|
+
var baseURL, url, client, globalSecurity, properties, headers, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
234
198
|
return __generator(this, function (_c) {
|
|
235
199
|
switch (_c.label) {
|
|
236
200
|
case 0:
|
|
237
201
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
238
|
-
req = new operations.
|
|
202
|
+
req = new operations.GetAccountingDirectIncomeRequest(req);
|
|
239
203
|
}
|
|
240
204
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
241
|
-
url = utils.generateURL(baseURL, "/companies/{companyId}/data/
|
|
242
|
-
client = this.sdkConfiguration.
|
|
243
|
-
|
|
244
|
-
|
|
205
|
+
url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}", req);
|
|
206
|
+
client = this.sdkConfiguration.defaultClient;
|
|
207
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
208
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
209
|
+
return [4 /*yield*/, globalSecurity()];
|
|
210
|
+
case 1:
|
|
211
|
+
globalSecurity = _c.sent();
|
|
212
|
+
_c.label = 2;
|
|
213
|
+
case 2:
|
|
214
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
215
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
216
|
+
}
|
|
217
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
218
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
245
219
|
headers["Accept"] = "application/json";
|
|
246
220
|
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
221
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
247
222
|
retryConfig = retries;
|
|
248
223
|
if (!retryConfig) {
|
|
249
|
-
|
|
224
|
+
if (globalRetryConfig) {
|
|
225
|
+
retryConfig = globalRetryConfig;
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
229
|
+
}
|
|
250
230
|
}
|
|
251
231
|
return [4 /*yield*/, utils.Retry(function () {
|
|
252
|
-
return client.request(__assign({ validateStatus: function () { return true; }, url: url
|
|
232
|
+
return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
253
233
|
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
254
|
-
case
|
|
234
|
+
case 3:
|
|
255
235
|
httpRes = _c.sent();
|
|
256
236
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
257
237
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
258
238
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
259
239
|
}
|
|
260
|
-
res = new operations.
|
|
240
|
+
res = new operations.GetAccountingDirectIncomeResponse({
|
|
261
241
|
statusCode: httpRes.status,
|
|
262
242
|
contentType: contentType,
|
|
263
243
|
rawResponse: httpRes,
|
|
@@ -266,7 +246,7 @@ var Financials = /** @class */ (function () {
|
|
|
266
246
|
switch (true) {
|
|
267
247
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
268
248
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
269
|
-
res.
|
|
249
|
+
res.accountingDirectIncome = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingDirectIncome);
|
|
270
250
|
}
|
|
271
251
|
else {
|
|
272
252
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -287,44 +267,64 @@ var Financials = /** @class */ (function () {
|
|
|
287
267
|
});
|
|
288
268
|
};
|
|
289
269
|
/**
|
|
290
|
-
* Get
|
|
270
|
+
* Get direct income attachment
|
|
291
271
|
*
|
|
292
272
|
* @remarks
|
|
293
|
-
* The *Get
|
|
273
|
+
* The *Get direct income attachment* endpoint returns a specific attachment for a given `directIncomeId` and `attachmentId`.
|
|
274
|
+
*
|
|
275
|
+
* [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale.
|
|
276
|
+
*
|
|
277
|
+
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support getting a direct income attachment.
|
|
294
278
|
*
|
|
295
|
-
* Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/enhanced-financials/overview#categorize-accounts) to a more suitable one.
|
|
296
279
|
*/
|
|
297
|
-
|
|
280
|
+
AccountsReceivableDirectIncomes.prototype.getAttachment = function (req, retries, config) {
|
|
298
281
|
var _a, _b;
|
|
299
282
|
return __awaiter(this, void 0, void 0, function () {
|
|
300
|
-
var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
|
|
283
|
+
var baseURL, url, client, globalSecurity, properties, headers, queryParams, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
301
284
|
return __generator(this, function (_c) {
|
|
302
285
|
switch (_c.label) {
|
|
303
286
|
case 0:
|
|
304
287
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
305
|
-
req = new operations.
|
|
288
|
+
req = new operations.GetAccountingDirectIncomeAttachmentRequest(req);
|
|
306
289
|
}
|
|
307
290
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
308
|
-
url = utils.generateURL(baseURL, "/companies/{companyId}/
|
|
309
|
-
client = this.sdkConfiguration.
|
|
310
|
-
|
|
291
|
+
url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments/{attachmentId}", req);
|
|
292
|
+
client = this.sdkConfiguration.defaultClient;
|
|
293
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
294
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
295
|
+
return [4 /*yield*/, globalSecurity()];
|
|
296
|
+
case 1:
|
|
297
|
+
globalSecurity = _c.sent();
|
|
298
|
+
_c.label = 2;
|
|
299
|
+
case 2:
|
|
300
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
301
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
302
|
+
}
|
|
303
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
304
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
311
305
|
queryParams = utils.serializeQueryParams(req);
|
|
312
306
|
headers["Accept"] = "application/json";
|
|
313
307
|
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
308
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
314
309
|
retryConfig = retries;
|
|
315
310
|
if (!retryConfig) {
|
|
316
|
-
|
|
311
|
+
if (globalRetryConfig) {
|
|
312
|
+
retryConfig = globalRetryConfig;
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
316
|
+
}
|
|
317
317
|
}
|
|
318
318
|
return [4 /*yield*/, utils.Retry(function () {
|
|
319
319
|
return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
320
320
|
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
321
|
-
case
|
|
321
|
+
case 3:
|
|
322
322
|
httpRes = _c.sent();
|
|
323
323
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
324
324
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
325
325
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
326
326
|
}
|
|
327
|
-
res = new operations.
|
|
327
|
+
res = new operations.GetAccountingDirectIncomeAttachmentResponse({
|
|
328
328
|
statusCode: httpRes.status,
|
|
329
329
|
contentType: contentType,
|
|
330
330
|
rawResponse: httpRes,
|
|
@@ -333,13 +333,13 @@ var Financials = /** @class */ (function () {
|
|
|
333
333
|
switch (true) {
|
|
334
334
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
335
335
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
336
|
-
res.
|
|
336
|
+
res.accountingAttachment = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingAttachment);
|
|
337
337
|
}
|
|
338
338
|
else {
|
|
339
339
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
340
340
|
}
|
|
341
341
|
break;
|
|
342
|
-
case [401, 404].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
342
|
+
case [401, 404, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
343
343
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
344
344
|
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
345
345
|
}
|
|
@@ -354,109 +354,64 @@ var Financials = /** @class */ (function () {
|
|
|
354
354
|
});
|
|
355
355
|
};
|
|
356
356
|
/**
|
|
357
|
-
*
|
|
357
|
+
* List direct incomes
|
|
358
358
|
*
|
|
359
359
|
* @remarks
|
|
360
|
-
* The *
|
|
360
|
+
* The *List direct incomes* endpoint returns a list of [direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) for a given company's connection.
|
|
361
|
+
*
|
|
362
|
+
* [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale.
|
|
363
|
+
*
|
|
364
|
+
* Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
|
|
361
365
|
*
|
|
362
|
-
* Codat suggests a category for each account automatically, but you can [change it](https://docs.codat.io/lending/enhanced-financials/overview#categorize-accounts) to a more suitable one.
|
|
363
366
|
*/
|
|
364
|
-
|
|
367
|
+
AccountsReceivableDirectIncomes.prototype.list = function (req, retries, config) {
|
|
365
368
|
var _a, _b;
|
|
366
369
|
return __awaiter(this, void 0, void 0, function () {
|
|
367
|
-
var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
|
|
370
|
+
var baseURL, url, client, globalSecurity, properties, headers, queryParams, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
368
371
|
return __generator(this, function (_c) {
|
|
369
372
|
switch (_c.label) {
|
|
370
373
|
case 0:
|
|
371
374
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
372
|
-
req = new operations.
|
|
375
|
+
req = new operations.ListAccountingDirectIncomesRequest(req);
|
|
373
376
|
}
|
|
374
377
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
375
|
-
url = utils.generateURL(baseURL, "/companies/{companyId}/
|
|
376
|
-
client = this.sdkConfiguration.
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
381
|
-
retryConfig = retries;
|
|
382
|
-
if (!retryConfig) {
|
|
383
|
-
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
384
|
-
}
|
|
385
|
-
return [4 /*yield*/, utils.Retry(function () {
|
|
386
|
-
return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
387
|
-
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
378
|
+
url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/directIncomes", req);
|
|
379
|
+
client = this.sdkConfiguration.defaultClient;
|
|
380
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
381
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
382
|
+
return [4 /*yield*/, globalSecurity()];
|
|
388
383
|
case 1:
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
res = new operations.GetEnhancedProfitAndLossAccountsResponse({
|
|
395
|
-
statusCode: httpRes.status,
|
|
396
|
-
contentType: contentType,
|
|
397
|
-
rawResponse: httpRes,
|
|
398
|
-
});
|
|
399
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
400
|
-
switch (true) {
|
|
401
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
402
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
403
|
-
res.enhancedFinancialReport = utils.objectToClass(JSON.parse(decodedRes), shared.EnhancedFinancialReport);
|
|
404
|
-
}
|
|
405
|
-
else {
|
|
406
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
407
|
-
}
|
|
408
|
-
break;
|
|
409
|
-
case [401, 404].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
410
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
411
|
-
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
412
|
-
}
|
|
413
|
-
else {
|
|
414
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
415
|
-
}
|
|
416
|
-
break;
|
|
384
|
+
globalSecurity = _c.sent();
|
|
385
|
+
_c.label = 2;
|
|
386
|
+
case 2:
|
|
387
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
388
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
417
389
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
});
|
|
421
|
-
});
|
|
422
|
-
};
|
|
423
|
-
/**
|
|
424
|
-
* Get profit and loss
|
|
425
|
-
*
|
|
426
|
-
* @remarks
|
|
427
|
-
* Gets the latest profit and loss for a company.
|
|
428
|
-
*/
|
|
429
|
-
Financials.prototype.getProfitAndLoss = function (req, retries, config) {
|
|
430
|
-
var _a, _b;
|
|
431
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
432
|
-
var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
|
|
433
|
-
return __generator(this, function (_c) {
|
|
434
|
-
switch (_c.label) {
|
|
435
|
-
case 0:
|
|
436
|
-
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
437
|
-
req = new operations.GetAccountingProfitAndLossRequest(req);
|
|
438
|
-
}
|
|
439
|
-
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
440
|
-
url = utils.generateURL(baseURL, "/companies/{companyId}/data/financials/profitAndLoss", req);
|
|
441
|
-
client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
|
|
442
|
-
headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
|
|
390
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
391
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
443
392
|
queryParams = utils.serializeQueryParams(req);
|
|
444
393
|
headers["Accept"] = "application/json";
|
|
445
394
|
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
395
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
446
396
|
retryConfig = retries;
|
|
447
397
|
if (!retryConfig) {
|
|
448
|
-
|
|
398
|
+
if (globalRetryConfig) {
|
|
399
|
+
retryConfig = globalRetryConfig;
|
|
400
|
+
}
|
|
401
|
+
else {
|
|
402
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
403
|
+
}
|
|
449
404
|
}
|
|
450
405
|
return [4 /*yield*/, utils.Retry(function () {
|
|
451
406
|
return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
452
407
|
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
453
|
-
case
|
|
408
|
+
case 3:
|
|
454
409
|
httpRes = _c.sent();
|
|
455
410
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
456
411
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
457
412
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
458
413
|
}
|
|
459
|
-
res = new operations.
|
|
414
|
+
res = new operations.ListAccountingDirectIncomesResponse({
|
|
460
415
|
statusCode: httpRes.status,
|
|
461
416
|
contentType: contentType,
|
|
462
417
|
rawResponse: httpRes,
|
|
@@ -465,13 +420,13 @@ var Financials = /** @class */ (function () {
|
|
|
465
420
|
switch (true) {
|
|
466
421
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
467
422
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
468
|
-
res.
|
|
423
|
+
res.accountingDirectIncomes = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingDirectIncomes);
|
|
469
424
|
}
|
|
470
425
|
else {
|
|
471
426
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
472
427
|
}
|
|
473
428
|
break;
|
|
474
|
-
case [401, 404, 409
|
|
429
|
+
case [400, 401, 404, 409].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
475
430
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
476
431
|
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
477
432
|
}
|
|
@@ -486,46 +441,63 @@ var Financials = /** @class */ (function () {
|
|
|
486
441
|
});
|
|
487
442
|
};
|
|
488
443
|
/**
|
|
489
|
-
* List
|
|
444
|
+
* List direct income attachments
|
|
490
445
|
*
|
|
491
446
|
* @remarks
|
|
492
|
-
* The *List
|
|
447
|
+
* The *List direct income attachments* endpoint returns a list of attachments available to download for given `directIncomeId`.
|
|
493
448
|
*
|
|
494
|
-
* [
|
|
449
|
+
* [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale.
|
|
450
|
+
*
|
|
451
|
+
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support listing direct income attachments.
|
|
495
452
|
*
|
|
496
|
-
* Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
|
|
497
453
|
*/
|
|
498
|
-
|
|
454
|
+
AccountsReceivableDirectIncomes.prototype.listAttachments = function (req, retries, config) {
|
|
499
455
|
var _a, _b;
|
|
500
456
|
return __awaiter(this, void 0, void 0, function () {
|
|
501
|
-
var baseURL, url, client, headers,
|
|
457
|
+
var baseURL, url, client, globalSecurity, properties, headers, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
502
458
|
return __generator(this, function (_c) {
|
|
503
459
|
switch (_c.label) {
|
|
504
460
|
case 0:
|
|
505
461
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
506
|
-
req = new operations.
|
|
462
|
+
req = new operations.ListAccountingDirectIncomeAttachmentsRequest(req);
|
|
507
463
|
}
|
|
508
464
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
509
|
-
url = utils.generateURL(baseURL, "/companies/{companyId}/data/
|
|
510
|
-
client = this.sdkConfiguration.
|
|
511
|
-
|
|
512
|
-
|
|
465
|
+
url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments", req);
|
|
466
|
+
client = this.sdkConfiguration.defaultClient;
|
|
467
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
468
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
469
|
+
return [4 /*yield*/, globalSecurity()];
|
|
470
|
+
case 1:
|
|
471
|
+
globalSecurity = _c.sent();
|
|
472
|
+
_c.label = 2;
|
|
473
|
+
case 2:
|
|
474
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
475
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
476
|
+
}
|
|
477
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
478
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
513
479
|
headers["Accept"] = "application/json";
|
|
514
480
|
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
481
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
515
482
|
retryConfig = retries;
|
|
516
483
|
if (!retryConfig) {
|
|
517
|
-
|
|
484
|
+
if (globalRetryConfig) {
|
|
485
|
+
retryConfig = globalRetryConfig;
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
489
|
+
}
|
|
518
490
|
}
|
|
519
491
|
return [4 /*yield*/, utils.Retry(function () {
|
|
520
|
-
return client.request(__assign({ validateStatus: function () { return true; }, url: url
|
|
492
|
+
return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
521
493
|
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
522
|
-
case
|
|
494
|
+
case 3:
|
|
523
495
|
httpRes = _c.sent();
|
|
524
496
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
525
497
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
526
498
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
527
499
|
}
|
|
528
|
-
res = new operations.
|
|
500
|
+
res = new operations.ListAccountingDirectIncomeAttachmentsResponse({
|
|
529
501
|
statusCode: httpRes.status,
|
|
530
502
|
contentType: contentType,
|
|
531
503
|
rawResponse: httpRes,
|
|
@@ -534,13 +506,13 @@ var Financials = /** @class */ (function () {
|
|
|
534
506
|
switch (true) {
|
|
535
507
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
536
508
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
537
|
-
res.
|
|
509
|
+
res.attachments = utils.objectToClass(JSON.parse(decodedRes), shared.Attachments);
|
|
538
510
|
}
|
|
539
511
|
else {
|
|
540
512
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
541
513
|
}
|
|
542
514
|
break;
|
|
543
|
-
case [
|
|
515
|
+
case [401, 404, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
544
516
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
545
517
|
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
546
518
|
}
|
|
@@ -554,6 +526,6 @@ var Financials = /** @class */ (function () {
|
|
|
554
526
|
});
|
|
555
527
|
});
|
|
556
528
|
};
|
|
557
|
-
return
|
|
529
|
+
return AccountsReceivableDirectIncomes;
|
|
558
530
|
}());
|
|
559
|
-
exports.
|
|
531
|
+
exports.AccountsReceivableDirectIncomes = AccountsReceivableDirectIncomes;
|