@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
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
19
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
20
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
21
|
+
}
|
|
22
|
+
Object.defineProperty(o, k2, desc);
|
|
23
|
+
}) : (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
o[k2] = m[k];
|
|
26
|
+
}));
|
|
27
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
28
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
29
|
+
}) : function(o, v) {
|
|
30
|
+
o["default"] = v;
|
|
31
|
+
});
|
|
32
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
40
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
41
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
42
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
43
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
44
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
45
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
49
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
50
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
51
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
52
|
+
function step(op) {
|
|
53
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
54
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
55
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
56
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
57
|
+
switch (op[0]) {
|
|
58
|
+
case 0: case 1: t = op; break;
|
|
59
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
60
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
61
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
62
|
+
default:
|
|
63
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
64
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
65
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
66
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
67
|
+
if (t[2]) _.ops.pop();
|
|
68
|
+
_.trys.pop(); continue;
|
|
69
|
+
}
|
|
70
|
+
op = body.call(thisArg, _);
|
|
71
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
72
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
|
+
exports.SalesProducts = void 0;
|
|
77
|
+
var utils = __importStar(require("../internal/utils"));
|
|
78
|
+
var errors = __importStar(require("./models/errors"));
|
|
79
|
+
var operations = __importStar(require("./models/operations"));
|
|
80
|
+
var shared = __importStar(require("./models/shared"));
|
|
81
|
+
var SalesProducts = /** @class */ (function () {
|
|
82
|
+
function SalesProducts(sdkConfig) {
|
|
83
|
+
this.sdkConfiguration = sdkConfig;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get product
|
|
87
|
+
*
|
|
88
|
+
* @remarks
|
|
89
|
+
* The *Get product* endpoint returns a single product for a given productId.
|
|
90
|
+
*
|
|
91
|
+
* [Products](https://docs.codat.io/commerce-api#/schemas/Product) are items in the company's inventory that are available for sale.
|
|
92
|
+
*
|
|
93
|
+
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-products) for integrations that support getting a specific product.
|
|
94
|
+
*
|
|
95
|
+
* Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
|
|
96
|
+
*
|
|
97
|
+
*/
|
|
98
|
+
SalesProducts.prototype.get = function (req, retries, config) {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
101
|
+
var baseURL, url, client, globalSecurity, properties, headers, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
102
|
+
return __generator(this, function (_c) {
|
|
103
|
+
switch (_c.label) {
|
|
104
|
+
case 0:
|
|
105
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
106
|
+
req = new operations.GetCommerceProductRequest(req);
|
|
107
|
+
}
|
|
108
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
109
|
+
url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-products/{productId}", req);
|
|
110
|
+
client = this.sdkConfiguration.defaultClient;
|
|
111
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
112
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
113
|
+
return [4 /*yield*/, globalSecurity()];
|
|
114
|
+
case 1:
|
|
115
|
+
globalSecurity = _c.sent();
|
|
116
|
+
_c.label = 2;
|
|
117
|
+
case 2:
|
|
118
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
119
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
120
|
+
}
|
|
121
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
122
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
123
|
+
headers["Accept"] = "application/json";
|
|
124
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
125
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
126
|
+
retryConfig = retries;
|
|
127
|
+
if (!retryConfig) {
|
|
128
|
+
if (globalRetryConfig) {
|
|
129
|
+
retryConfig = globalRetryConfig;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return [4 /*yield*/, utils.Retry(function () {
|
|
136
|
+
return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
137
|
+
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
138
|
+
case 3:
|
|
139
|
+
httpRes = _c.sent();
|
|
140
|
+
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 : "";
|
|
141
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
142
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
143
|
+
}
|
|
144
|
+
res = new operations.GetCommerceProductResponse({
|
|
145
|
+
statusCode: httpRes.status,
|
|
146
|
+
contentType: contentType,
|
|
147
|
+
rawResponse: httpRes,
|
|
148
|
+
});
|
|
149
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
150
|
+
switch (true) {
|
|
151
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
152
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
153
|
+
res.commerceProduct = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceProduct);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
157
|
+
}
|
|
158
|
+
break;
|
|
159
|
+
case [401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
160
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
161
|
+
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
165
|
+
}
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
return [2 /*return*/, res];
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* List products
|
|
175
|
+
*
|
|
176
|
+
* @remarks
|
|
177
|
+
* The *List products* endpoint returns a list of [products](https://docs.codat.io/commerce-api#/schemas/Product) for a given company's connection.
|
|
178
|
+
*
|
|
179
|
+
* [Products](https://docs.codat.io/commerce-api#/schemas/Product) are items in the company's inventory that are available for sale.
|
|
180
|
+
*
|
|
181
|
+
* Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
|
|
182
|
+
*
|
|
183
|
+
*/
|
|
184
|
+
SalesProducts.prototype.list = function (req, retries, config) {
|
|
185
|
+
var _a, _b;
|
|
186
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
187
|
+
var baseURL, url, client, globalSecurity, properties, headers, queryParams, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
188
|
+
return __generator(this, function (_c) {
|
|
189
|
+
switch (_c.label) {
|
|
190
|
+
case 0:
|
|
191
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
192
|
+
req = new operations.ListCommerceProductsRequest(req);
|
|
193
|
+
}
|
|
194
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
195
|
+
url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-products", req);
|
|
196
|
+
client = this.sdkConfiguration.defaultClient;
|
|
197
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
198
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
199
|
+
return [4 /*yield*/, globalSecurity()];
|
|
200
|
+
case 1:
|
|
201
|
+
globalSecurity = _c.sent();
|
|
202
|
+
_c.label = 2;
|
|
203
|
+
case 2:
|
|
204
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
205
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
206
|
+
}
|
|
207
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
208
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
209
|
+
queryParams = utils.serializeQueryParams(req);
|
|
210
|
+
headers["Accept"] = "application/json";
|
|
211
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
212
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
213
|
+
retryConfig = retries;
|
|
214
|
+
if (!retryConfig) {
|
|
215
|
+
if (globalRetryConfig) {
|
|
216
|
+
retryConfig = globalRetryConfig;
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return [4 /*yield*/, utils.Retry(function () {
|
|
223
|
+
return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
224
|
+
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
225
|
+
case 3:
|
|
226
|
+
httpRes = _c.sent();
|
|
227
|
+
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 : "";
|
|
228
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
229
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
230
|
+
}
|
|
231
|
+
res = new operations.ListCommerceProductsResponse({
|
|
232
|
+
statusCode: httpRes.status,
|
|
233
|
+
contentType: contentType,
|
|
234
|
+
rawResponse: httpRes,
|
|
235
|
+
});
|
|
236
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
237
|
+
switch (true) {
|
|
238
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
239
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
240
|
+
res.commerceProducts = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceProducts);
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
244
|
+
}
|
|
245
|
+
break;
|
|
246
|
+
case [400, 401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
247
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
248
|
+
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
252
|
+
}
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
return [2 /*return*/, res];
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
return SalesProducts;
|
|
261
|
+
}());
|
|
262
|
+
exports.SalesProducts = SalesProducts;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as utils from "../internal/utils";
|
|
2
|
+
import * as operations from "./models/operations";
|
|
3
|
+
import { SDKConfiguration } from "./sdk";
|
|
4
|
+
import { AxiosRequestConfig } from "axios";
|
|
5
|
+
export declare class SalesReports {
|
|
6
|
+
private sdkConfiguration;
|
|
7
|
+
constructor(sdkConfig: SDKConfiguration);
|
|
8
|
+
/**
|
|
9
|
+
* Get orders report
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* The *Get orders report* endpoint returns the number of orders, total value, and average order value for a specific company's commerce connection over one or more periods of time.
|
|
13
|
+
*
|
|
14
|
+
* This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company.
|
|
15
|
+
*
|
|
16
|
+
* Learn more about the formulas used to calculate the order metrics [here](https://docs.codat.io/lending/commerce-metrics/overview#what-metrics-are-available).
|
|
17
|
+
*
|
|
18
|
+
* Refer to the [commerce reporting structure](https://docs.codat.io/lending/commerce-metrics/reporting-structure) page for more details on commerce reports in Lending.
|
|
19
|
+
*
|
|
20
|
+
* #### Response structure
|
|
21
|
+
*
|
|
22
|
+
* The Orders report's dimensions and measures are:
|
|
23
|
+
*
|
|
24
|
+
* | Index | Dimensions |
|
|
25
|
+
* |---------------|----------------|
|
|
26
|
+
* | `index` = 0 | Period |
|
|
27
|
+
* | `index` = 1 | Order metrics |
|
|
28
|
+
*
|
|
29
|
+
* | Index | Measures |
|
|
30
|
+
* |---------------|------------|
|
|
31
|
+
* | `index` = 0 | Count |
|
|
32
|
+
* | `index` = 1 | Value |
|
|
33
|
+
*
|
|
34
|
+
* The report data then combines multiple reporting dimensions and measures and outputs the value of each combination.
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
getOrders(req: operations.GetCommerceOrdersReportRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.GetCommerceOrdersReportResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Get refunds report
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* The *Get refunds report* endpoint returns the number and total value of refunds and the refund rate for a specific company's commerce connection over one or more periods of time.
|
|
43
|
+
*
|
|
44
|
+
* This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company.
|
|
45
|
+
*
|
|
46
|
+
* Learn more about the formulas used to calculate the refunds metrics [here](https://docs.codat.io/lending/commerce-metrics/overview#what-metrics-are-available).
|
|
47
|
+
*
|
|
48
|
+
* Refer to the [commerce reporting structure](https://docs.codat.io/lending/commerce-metrics/reporting-structure) page for more details on commerce reports in Lending.
|
|
49
|
+
*
|
|
50
|
+
* #### Response structure
|
|
51
|
+
*
|
|
52
|
+
* The Refunds report's dimensions and measures are:
|
|
53
|
+
*
|
|
54
|
+
* | Index | Dimensions |
|
|
55
|
+
* |----------------|----------------|
|
|
56
|
+
* | `index` = 0 | Period |
|
|
57
|
+
* | `index` = 1 | Refund metrics |
|
|
58
|
+
*
|
|
59
|
+
* | Index | Measures |
|
|
60
|
+
* |----------------|------------|
|
|
61
|
+
* | `index` = 0 | Count |
|
|
62
|
+
* | `index` = 1 | Value |
|
|
63
|
+
* | `index` = 2 | Percentage |
|
|
64
|
+
*
|
|
65
|
+
* The report data then combines multiple reporting dimensions and measures and outputs the value of each combination.
|
|
66
|
+
*
|
|
67
|
+
*/
|
|
68
|
+
getRefunds(req: operations.GetCommerceRefundsReportRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.GetCommerceRefundsReportResponse>;
|
|
69
|
+
}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
19
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
20
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
21
|
+
}
|
|
22
|
+
Object.defineProperty(o, k2, desc);
|
|
23
|
+
}) : (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
o[k2] = m[k];
|
|
26
|
+
}));
|
|
27
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
28
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
29
|
+
}) : function(o, v) {
|
|
30
|
+
o["default"] = v;
|
|
31
|
+
});
|
|
32
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
40
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
41
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
42
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
43
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
44
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
45
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
49
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
50
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
51
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
52
|
+
function step(op) {
|
|
53
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
54
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
55
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
56
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
57
|
+
switch (op[0]) {
|
|
58
|
+
case 0: case 1: t = op; break;
|
|
59
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
60
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
61
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
62
|
+
default:
|
|
63
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
64
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
65
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
66
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
67
|
+
if (t[2]) _.ops.pop();
|
|
68
|
+
_.trys.pop(); continue;
|
|
69
|
+
}
|
|
70
|
+
op = body.call(thisArg, _);
|
|
71
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
72
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
|
+
exports.SalesReports = void 0;
|
|
77
|
+
var utils = __importStar(require("../internal/utils"));
|
|
78
|
+
var errors = __importStar(require("./models/errors"));
|
|
79
|
+
var operations = __importStar(require("./models/operations"));
|
|
80
|
+
var shared = __importStar(require("./models/shared"));
|
|
81
|
+
var SalesReports = /** @class */ (function () {
|
|
82
|
+
function SalesReports(sdkConfig) {
|
|
83
|
+
this.sdkConfiguration = sdkConfig;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get orders report
|
|
87
|
+
*
|
|
88
|
+
* @remarks
|
|
89
|
+
* The *Get orders report* endpoint returns the number of orders, total value, and average order value for a specific company's commerce connection over one or more periods of time.
|
|
90
|
+
*
|
|
91
|
+
* This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company.
|
|
92
|
+
*
|
|
93
|
+
* Learn more about the formulas used to calculate the order metrics [here](https://docs.codat.io/lending/commerce-metrics/overview#what-metrics-are-available).
|
|
94
|
+
*
|
|
95
|
+
* Refer to the [commerce reporting structure](https://docs.codat.io/lending/commerce-metrics/reporting-structure) page for more details on commerce reports in Lending.
|
|
96
|
+
*
|
|
97
|
+
* #### Response structure
|
|
98
|
+
*
|
|
99
|
+
* The Orders report's dimensions and measures are:
|
|
100
|
+
*
|
|
101
|
+
* | Index | Dimensions |
|
|
102
|
+
* |---------------|----------------|
|
|
103
|
+
* | `index` = 0 | Period |
|
|
104
|
+
* | `index` = 1 | Order metrics |
|
|
105
|
+
*
|
|
106
|
+
* | Index | Measures |
|
|
107
|
+
* |---------------|------------|
|
|
108
|
+
* | `index` = 0 | Count |
|
|
109
|
+
* | `index` = 1 | Value |
|
|
110
|
+
*
|
|
111
|
+
* The report data then combines multiple reporting dimensions and measures and outputs the value of each combination.
|
|
112
|
+
*
|
|
113
|
+
*/
|
|
114
|
+
SalesReports.prototype.getOrders = function (req, retries, config) {
|
|
115
|
+
var _a, _b;
|
|
116
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
117
|
+
var baseURL, url, client, globalSecurity, properties, headers, queryParams, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
118
|
+
return __generator(this, function (_c) {
|
|
119
|
+
switch (_c.label) {
|
|
120
|
+
case 0:
|
|
121
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
122
|
+
req = new operations.GetCommerceOrdersReportRequest(req);
|
|
123
|
+
}
|
|
124
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
125
|
+
url = utils.generateURL(baseURL, "/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/orders", req);
|
|
126
|
+
client = this.sdkConfiguration.defaultClient;
|
|
127
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
128
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
129
|
+
return [4 /*yield*/, globalSecurity()];
|
|
130
|
+
case 1:
|
|
131
|
+
globalSecurity = _c.sent();
|
|
132
|
+
_c.label = 2;
|
|
133
|
+
case 2:
|
|
134
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
135
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
136
|
+
}
|
|
137
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
138
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
139
|
+
queryParams = utils.serializeQueryParams(req);
|
|
140
|
+
headers["Accept"] = "application/json";
|
|
141
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
142
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
143
|
+
retryConfig = retries;
|
|
144
|
+
if (!retryConfig) {
|
|
145
|
+
if (globalRetryConfig) {
|
|
146
|
+
retryConfig = globalRetryConfig;
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return [4 /*yield*/, utils.Retry(function () {
|
|
153
|
+
return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
154
|
+
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
155
|
+
case 3:
|
|
156
|
+
httpRes = _c.sent();
|
|
157
|
+
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 : "";
|
|
158
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
159
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
160
|
+
}
|
|
161
|
+
res = new operations.GetCommerceOrdersReportResponse({
|
|
162
|
+
statusCode: httpRes.status,
|
|
163
|
+
contentType: contentType,
|
|
164
|
+
rawResponse: httpRes,
|
|
165
|
+
});
|
|
166
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
167
|
+
switch (true) {
|
|
168
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
169
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
170
|
+
res.commerceReport = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceReport);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
case [401, 404].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
177
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
178
|
+
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
182
|
+
}
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
return [2 /*return*/, res];
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Get refunds report
|
|
192
|
+
*
|
|
193
|
+
* @remarks
|
|
194
|
+
* The *Get refunds report* endpoint returns the number and total value of refunds and the refund rate for a specific company's commerce connection over one or more periods of time.
|
|
195
|
+
*
|
|
196
|
+
* This detail helps you assess a merchant's health and advise them on performance improvement strategies. It also provides you with key insights you need to assess the credit risk of a company.
|
|
197
|
+
*
|
|
198
|
+
* Learn more about the formulas used to calculate the refunds metrics [here](https://docs.codat.io/lending/commerce-metrics/overview#what-metrics-are-available).
|
|
199
|
+
*
|
|
200
|
+
* Refer to the [commerce reporting structure](https://docs.codat.io/lending/commerce-metrics/reporting-structure) page for more details on commerce reports in Lending.
|
|
201
|
+
*
|
|
202
|
+
* #### Response structure
|
|
203
|
+
*
|
|
204
|
+
* The Refunds report's dimensions and measures are:
|
|
205
|
+
*
|
|
206
|
+
* | Index | Dimensions |
|
|
207
|
+
* |----------------|----------------|
|
|
208
|
+
* | `index` = 0 | Period |
|
|
209
|
+
* | `index` = 1 | Refund metrics |
|
|
210
|
+
*
|
|
211
|
+
* | Index | Measures |
|
|
212
|
+
* |----------------|------------|
|
|
213
|
+
* | `index` = 0 | Count |
|
|
214
|
+
* | `index` = 1 | Value |
|
|
215
|
+
* | `index` = 2 | Percentage |
|
|
216
|
+
*
|
|
217
|
+
* The report data then combines multiple reporting dimensions and measures and outputs the value of each combination.
|
|
218
|
+
*
|
|
219
|
+
*/
|
|
220
|
+
SalesReports.prototype.getRefunds = function (req, retries, config) {
|
|
221
|
+
var _a, _b;
|
|
222
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
223
|
+
var baseURL, url, client, globalSecurity, properties, headers, queryParams, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
224
|
+
return __generator(this, function (_c) {
|
|
225
|
+
switch (_c.label) {
|
|
226
|
+
case 0:
|
|
227
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
228
|
+
req = new operations.GetCommerceRefundsReportRequest(req);
|
|
229
|
+
}
|
|
230
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
231
|
+
url = utils.generateURL(baseURL, "/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/refunds", req);
|
|
232
|
+
client = this.sdkConfiguration.defaultClient;
|
|
233
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
234
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
235
|
+
return [4 /*yield*/, globalSecurity()];
|
|
236
|
+
case 1:
|
|
237
|
+
globalSecurity = _c.sent();
|
|
238
|
+
_c.label = 2;
|
|
239
|
+
case 2:
|
|
240
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
241
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
242
|
+
}
|
|
243
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
244
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
245
|
+
queryParams = utils.serializeQueryParams(req);
|
|
246
|
+
headers["Accept"] = "application/json";
|
|
247
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
248
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
249
|
+
retryConfig = retries;
|
|
250
|
+
if (!retryConfig) {
|
|
251
|
+
if (globalRetryConfig) {
|
|
252
|
+
retryConfig = globalRetryConfig;
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return [4 /*yield*/, utils.Retry(function () {
|
|
259
|
+
return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
260
|
+
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
261
|
+
case 3:
|
|
262
|
+
httpRes = _c.sent();
|
|
263
|
+
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 : "";
|
|
264
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
265
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
266
|
+
}
|
|
267
|
+
res = new operations.GetCommerceRefundsReportResponse({
|
|
268
|
+
statusCode: httpRes.status,
|
|
269
|
+
contentType: contentType,
|
|
270
|
+
rawResponse: httpRes,
|
|
271
|
+
});
|
|
272
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
273
|
+
switch (true) {
|
|
274
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
275
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
276
|
+
res.commerceReport = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceReport);
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
280
|
+
}
|
|
281
|
+
break;
|
|
282
|
+
case [401, 404].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
283
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
284
|
+
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
288
|
+
}
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
return [2 /*return*/, res];
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
};
|
|
296
|
+
return SalesReports;
|
|
297
|
+
}());
|
|
298
|
+
exports.SalesReports = SalesReports;
|