@codat/lending 7.0.0 → 7.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/FUNCTIONS.md +110 -0
- package/README.md +57 -38
- package/RUNTIMES.md +48 -0
- package/docs/sdks/companies/README.md +112 -7
- package/docs/sdks/sourceaccounts/README.md +92 -36
- package/funcs/accountingBankDataAccountsGet.d.ts.map +1 -1
- package/funcs/accountingBankDataAccountsGet.js +4 -3
- package/funcs/accountingBankDataAccountsGet.js.map +1 -1
- package/funcs/accountingBankDataAccountsList.d.ts.map +1 -1
- package/funcs/accountingBankDataAccountsList.js +4 -3
- package/funcs/accountingBankDataAccountsList.js.map +1 -1
- package/funcs/accountingBankDataListTransactions.d.ts.map +1 -1
- package/funcs/accountingBankDataListTransactions.js +4 -3
- package/funcs/accountingBankDataListTransactions.js.map +1 -1
- package/funcs/accountsPayableBillCreditNotesGet.d.ts.map +1 -1
- package/funcs/accountsPayableBillCreditNotesGet.js +4 -3
- package/funcs/accountsPayableBillCreditNotesGet.js.map +1 -1
- package/funcs/accountsPayableBillCreditNotesList.d.ts.map +1 -1
- package/funcs/accountsPayableBillCreditNotesList.js +4 -3
- package/funcs/accountsPayableBillCreditNotesList.js.map +1 -1
- package/funcs/accountsPayableBillPaymentsGet.d.ts.map +1 -1
- package/funcs/accountsPayableBillPaymentsGet.js +4 -3
- package/funcs/accountsPayableBillPaymentsGet.js.map +1 -1
- package/funcs/accountsPayableBillPaymentsList.d.ts.map +1 -1
- package/funcs/accountsPayableBillPaymentsList.js +4 -3
- package/funcs/accountsPayableBillPaymentsList.js.map +1 -1
- package/funcs/accountsPayableBillsDownloadAttachment.d.ts.map +1 -1
- package/funcs/accountsPayableBillsDownloadAttachment.js +4 -3
- package/funcs/accountsPayableBillsDownloadAttachment.js.map +1 -1
- package/funcs/accountsPayableBillsGet.d.ts.map +1 -1
- package/funcs/accountsPayableBillsGet.js +4 -3
- package/funcs/accountsPayableBillsGet.js.map +1 -1
- package/funcs/accountsPayableBillsGetAttachment.d.ts.map +1 -1
- package/funcs/accountsPayableBillsGetAttachment.js +4 -3
- package/funcs/accountsPayableBillsGetAttachment.js.map +1 -1
- package/funcs/accountsPayableBillsList.d.ts.map +1 -1
- package/funcs/accountsPayableBillsList.js +4 -3
- package/funcs/accountsPayableBillsList.js.map +1 -1
- package/funcs/accountsPayableBillsListAttachments.d.ts.map +1 -1
- package/funcs/accountsPayableBillsListAttachments.js +4 -3
- package/funcs/accountsPayableBillsListAttachments.js.map +1 -1
- package/funcs/accountsPayableSuppliersDownloadAttachment.d.ts.map +1 -1
- package/funcs/accountsPayableSuppliersDownloadAttachment.js +4 -3
- package/funcs/accountsPayableSuppliersDownloadAttachment.js.map +1 -1
- package/funcs/accountsPayableSuppliersGet.d.ts.map +1 -1
- package/funcs/accountsPayableSuppliersGet.js +4 -3
- package/funcs/accountsPayableSuppliersGet.js.map +1 -1
- package/funcs/accountsPayableSuppliersGetAttachment.d.ts.map +1 -1
- package/funcs/accountsPayableSuppliersGetAttachment.js +4 -3
- package/funcs/accountsPayableSuppliersGetAttachment.js.map +1 -1
- package/funcs/accountsPayableSuppliersList.d.ts.map +1 -1
- package/funcs/accountsPayableSuppliersList.js +4 -3
- package/funcs/accountsPayableSuppliersList.js.map +1 -1
- package/funcs/accountsPayableSuppliersListAttachments.d.ts.map +1 -1
- package/funcs/accountsPayableSuppliersListAttachments.js +4 -3
- package/funcs/accountsPayableSuppliersListAttachments.js.map +1 -1
- package/funcs/accountsReceivableCreditNotesGet.d.ts.map +1 -1
- package/funcs/accountsReceivableCreditNotesGet.js +4 -3
- package/funcs/accountsReceivableCreditNotesGet.js.map +1 -1
- package/funcs/accountsReceivableCreditNotesList.d.ts.map +1 -1
- package/funcs/accountsReceivableCreditNotesList.js +4 -3
- package/funcs/accountsReceivableCreditNotesList.js.map +1 -1
- package/funcs/accountsReceivableCustomersDownloadAttachment.d.ts.map +1 -1
- package/funcs/accountsReceivableCustomersDownloadAttachment.js +4 -3
- package/funcs/accountsReceivableCustomersDownloadAttachment.js.map +1 -1
- package/funcs/accountsReceivableCustomersGet.d.ts.map +1 -1
- package/funcs/accountsReceivableCustomersGet.js +4 -3
- package/funcs/accountsReceivableCustomersGet.js.map +1 -1
- package/funcs/accountsReceivableCustomersGetAttachment.d.ts.map +1 -1
- package/funcs/accountsReceivableCustomersGetAttachment.js +4 -3
- package/funcs/accountsReceivableCustomersGetAttachment.js.map +1 -1
- package/funcs/accountsReceivableCustomersList.d.ts.map +1 -1
- package/funcs/accountsReceivableCustomersList.js +4 -3
- package/funcs/accountsReceivableCustomersList.js.map +1 -1
- package/funcs/accountsReceivableCustomersListAttachments.d.ts.map +1 -1
- package/funcs/accountsReceivableCustomersListAttachments.js +4 -3
- package/funcs/accountsReceivableCustomersListAttachments.js.map +1 -1
- package/funcs/accountsReceivableDirectIncomesDownloadAttachment.d.ts.map +1 -1
- package/funcs/accountsReceivableDirectIncomesDownloadAttachment.js +4 -3
- package/funcs/accountsReceivableDirectIncomesDownloadAttachment.js.map +1 -1
- package/funcs/accountsReceivableDirectIncomesGet.d.ts.map +1 -1
- package/funcs/accountsReceivableDirectIncomesGet.js +4 -3
- package/funcs/accountsReceivableDirectIncomesGet.js.map +1 -1
- package/funcs/accountsReceivableDirectIncomesGetAttachment.d.ts.map +1 -1
- package/funcs/accountsReceivableDirectIncomesGetAttachment.js +4 -3
- package/funcs/accountsReceivableDirectIncomesGetAttachment.js.map +1 -1
- package/funcs/accountsReceivableDirectIncomesList.d.ts.map +1 -1
- package/funcs/accountsReceivableDirectIncomesList.js +4 -3
- package/funcs/accountsReceivableDirectIncomesList.js.map +1 -1
- package/funcs/accountsReceivableDirectIncomesListAttachments.d.ts.map +1 -1
- package/funcs/accountsReceivableDirectIncomesListAttachments.js +4 -3
- package/funcs/accountsReceivableDirectIncomesListAttachments.js.map +1 -1
- package/funcs/accountsReceivableInvoicesDownloadAttachment.d.ts.map +1 -1
- package/funcs/accountsReceivableInvoicesDownloadAttachment.js +4 -3
- package/funcs/accountsReceivableInvoicesDownloadAttachment.js.map +1 -1
- package/funcs/accountsReceivableInvoicesDownloadPdf.d.ts.map +1 -1
- package/funcs/accountsReceivableInvoicesDownloadPdf.js +4 -3
- package/funcs/accountsReceivableInvoicesDownloadPdf.js.map +1 -1
- package/funcs/accountsReceivableInvoicesGet.d.ts.map +1 -1
- package/funcs/accountsReceivableInvoicesGet.js +4 -3
- package/funcs/accountsReceivableInvoicesGet.js.map +1 -1
- package/funcs/accountsReceivableInvoicesGetAttachment.d.ts.map +1 -1
- package/funcs/accountsReceivableInvoicesGetAttachment.js +4 -3
- package/funcs/accountsReceivableInvoicesGetAttachment.js.map +1 -1
- package/funcs/accountsReceivableInvoicesList.d.ts.map +1 -1
- package/funcs/accountsReceivableInvoicesList.js +4 -3
- package/funcs/accountsReceivableInvoicesList.js.map +1 -1
- package/funcs/accountsReceivableInvoicesListAttachments.d.ts.map +1 -1
- package/funcs/accountsReceivableInvoicesListAttachments.js +4 -3
- package/funcs/accountsReceivableInvoicesListAttachments.js.map +1 -1
- package/funcs/accountsReceivableInvoicesListReconciled.d.ts.map +1 -1
- package/funcs/accountsReceivableInvoicesListReconciled.js +4 -3
- package/funcs/accountsReceivableInvoicesListReconciled.js.map +1 -1
- package/funcs/accountsReceivablePaymentsGet.d.ts.map +1 -1
- package/funcs/accountsReceivablePaymentsGet.js +4 -3
- package/funcs/accountsReceivablePaymentsGet.js.map +1 -1
- package/funcs/accountsReceivablePaymentsList.d.ts.map +1 -1
- package/funcs/accountsReceivablePaymentsList.js +4 -3
- package/funcs/accountsReceivablePaymentsList.js.map +1 -1
- package/funcs/accountsReceivableReportsGetAgedCreditors.d.ts.map +1 -1
- package/funcs/accountsReceivableReportsGetAgedCreditors.js +4 -3
- package/funcs/accountsReceivableReportsGetAgedCreditors.js.map +1 -1
- package/funcs/accountsReceivableReportsGetAgedDebtors.d.ts.map +1 -1
- package/funcs/accountsReceivableReportsGetAgedDebtors.js +4 -3
- package/funcs/accountsReceivableReportsGetAgedDebtors.js.map +1 -1
- package/funcs/accountsReceivableReportsIsAgedCreditorsAvailable.d.ts.map +1 -1
- package/funcs/accountsReceivableReportsIsAgedCreditorsAvailable.js +4 -3
- package/funcs/accountsReceivableReportsIsAgedCreditorsAvailable.js.map +1 -1
- package/funcs/accountsReceivableReportsIsAgedDebtorsAvailable.d.ts.map +1 -1
- package/funcs/accountsReceivableReportsIsAgedDebtorsAvailable.js +4 -3
- package/funcs/accountsReceivableReportsIsAgedDebtorsAvailable.js.map +1 -1
- package/funcs/bankStatementsEndUploadSession.d.ts.map +1 -1
- package/funcs/bankStatementsEndUploadSession.js +4 -3
- package/funcs/bankStatementsEndUploadSession.js.map +1 -1
- package/funcs/bankStatementsGetUploadConfiguration.d.ts.map +1 -1
- package/funcs/bankStatementsGetUploadConfiguration.js +4 -3
- package/funcs/bankStatementsGetUploadConfiguration.js.map +1 -1
- package/funcs/bankStatementsSetUploadConfiguration.d.ts.map +1 -1
- package/funcs/bankStatementsSetUploadConfiguration.js +4 -3
- package/funcs/bankStatementsSetUploadConfiguration.js.map +1 -1
- package/funcs/bankStatementsStartUploadSession.d.ts.map +1 -1
- package/funcs/bankStatementsStartUploadSession.js +4 -3
- package/funcs/bankStatementsStartUploadSession.js.map +1 -1
- package/funcs/bankStatementsUploadBankStatementData.d.ts.map +1 -1
- package/funcs/bankStatementsUploadBankStatementData.js +4 -3
- package/funcs/bankStatementsUploadBankStatementData.js.map +1 -1
- package/funcs/bankingAccountBalancesList.d.ts.map +1 -1
- package/funcs/bankingAccountBalancesList.js +4 -3
- package/funcs/bankingAccountBalancesList.js.map +1 -1
- package/funcs/bankingAccountsGet.d.ts.map +1 -1
- package/funcs/bankingAccountsGet.js +4 -3
- package/funcs/bankingAccountsGet.js.map +1 -1
- package/funcs/bankingAccountsList.d.ts.map +1 -1
- package/funcs/bankingAccountsList.js +4 -3
- package/funcs/bankingAccountsList.js.map +1 -1
- package/funcs/bankingCategorizedStatementGet.d.ts.map +1 -1
- package/funcs/bankingCategorizedStatementGet.js +4 -3
- package/funcs/bankingCategorizedStatementGet.js.map +1 -1
- package/funcs/bankingTransactionCategoriesGet.d.ts.map +1 -1
- package/funcs/bankingTransactionCategoriesGet.js +4 -3
- package/funcs/bankingTransactionCategoriesGet.js.map +1 -1
- package/funcs/bankingTransactionCategoriesList.d.ts.map +1 -1
- package/funcs/bankingTransactionCategoriesList.js +4 -3
- package/funcs/bankingTransactionCategoriesList.js.map +1 -1
- package/funcs/bankingTransactionsGet.d.ts.map +1 -1
- package/funcs/bankingTransactionsGet.js +4 -3
- package/funcs/bankingTransactionsGet.js.map +1 -1
- package/funcs/bankingTransactionsList.d.ts.map +1 -1
- package/funcs/bankingTransactionsList.js +4 -3
- package/funcs/bankingTransactionsList.js.map +1 -1
- package/funcs/companiesCreate.d.ts.map +1 -1
- package/funcs/companiesCreate.js +4 -3
- package/funcs/companiesCreate.js.map +1 -1
- package/funcs/companiesDelete.d.ts.map +1 -1
- package/funcs/companiesDelete.js +4 -3
- package/funcs/companiesDelete.js.map +1 -1
- package/funcs/companiesGet.d.ts.map +1 -1
- package/funcs/companiesGet.js +4 -3
- package/funcs/companiesGet.js.map +1 -1
- package/funcs/companiesList.d.ts +13 -0
- package/funcs/companiesList.d.ts.map +1 -1
- package/funcs/companiesList.js +22 -7
- package/funcs/companiesList.js.map +1 -1
- package/funcs/companiesReplace.d.ts +20 -0
- package/funcs/companiesReplace.d.ts.map +1 -0
- package/funcs/companiesReplace.js +122 -0
- package/funcs/companiesReplace.js.map +1 -0
- package/funcs/companiesUpdate.d.ts +3 -2
- package/funcs/companiesUpdate.d.ts.map +1 -1
- package/funcs/companiesUpdate.js +9 -7
- package/funcs/companiesUpdate.js.map +1 -1
- package/funcs/companyInfoGetAccountingProfile.d.ts.map +1 -1
- package/funcs/companyInfoGetAccountingProfile.js +4 -3
- package/funcs/companyInfoGetAccountingProfile.js.map +1 -1
- package/funcs/companyInfoGetCommerceProfile.d.ts.map +1 -1
- package/funcs/companyInfoGetCommerceProfile.js +4 -3
- package/funcs/companyInfoGetCommerceProfile.js.map +1 -1
- package/funcs/connectionsCreate.d.ts.map +1 -1
- package/funcs/connectionsCreate.js +4 -3
- package/funcs/connectionsCreate.js.map +1 -1
- package/funcs/connectionsDelete.d.ts.map +1 -1
- package/funcs/connectionsDelete.js +4 -3
- package/funcs/connectionsDelete.js.map +1 -1
- package/funcs/connectionsGet.d.ts.map +1 -1
- package/funcs/connectionsGet.js +4 -3
- package/funcs/connectionsGet.js.map +1 -1
- package/funcs/connectionsList.d.ts.map +1 -1
- package/funcs/connectionsList.js +4 -3
- package/funcs/connectionsList.js.map +1 -1
- package/funcs/connectionsUnlink.d.ts.map +1 -1
- package/funcs/connectionsUnlink.js +4 -3
- package/funcs/connectionsUnlink.js.map +1 -1
- package/funcs/dataIntegrityDetails.d.ts.map +1 -1
- package/funcs/dataIntegrityDetails.js +4 -3
- package/funcs/dataIntegrityDetails.js.map +1 -1
- package/funcs/dataIntegrityStatus.d.ts.map +1 -1
- package/funcs/dataIntegrityStatus.js +4 -3
- package/funcs/dataIntegrityStatus.js.map +1 -1
- package/funcs/dataIntegritySummaries.d.ts.map +1 -1
- package/funcs/dataIntegritySummaries.js +4 -3
- package/funcs/dataIntegritySummaries.js.map +1 -1
- package/funcs/excelReportsDownload.d.ts.map +1 -1
- package/funcs/excelReportsDownload.js +4 -3
- package/funcs/excelReportsDownload.js.map +1 -1
- package/funcs/excelReportsGenerate.d.ts.map +1 -1
- package/funcs/excelReportsGenerate.js +4 -3
- package/funcs/excelReportsGenerate.js.map +1 -1
- package/funcs/excelReportsGetStatus.d.ts.map +1 -1
- package/funcs/excelReportsGetStatus.js +4 -3
- package/funcs/excelReportsGetStatus.js.map +1 -1
- package/funcs/fileUploadDownload.d.ts.map +1 -1
- package/funcs/fileUploadDownload.js +4 -3
- package/funcs/fileUploadDownload.js.map +1 -1
- package/funcs/fileUploadListUploaded.d.ts.map +1 -1
- package/funcs/fileUploadListUploaded.js +4 -3
- package/funcs/fileUploadListUploaded.js.map +1 -1
- package/funcs/fileUploadUpload.d.ts.map +1 -1
- package/funcs/fileUploadUpload.js +4 -3
- package/funcs/fileUploadUpload.js.map +1 -1
- package/funcs/financialStatementsAccountsGet.d.ts.map +1 -1
- package/funcs/financialStatementsAccountsGet.js +4 -3
- package/funcs/financialStatementsAccountsGet.js.map +1 -1
- package/funcs/financialStatementsAccountsList.d.ts.map +1 -1
- package/funcs/financialStatementsAccountsList.js +4 -3
- package/funcs/financialStatementsAccountsList.js.map +1 -1
- package/funcs/financialStatementsBalanceSheetGet.d.ts.map +1 -1
- package/funcs/financialStatementsBalanceSheetGet.js +4 -3
- package/funcs/financialStatementsBalanceSheetGet.js.map +1 -1
- package/funcs/financialStatementsBalanceSheetGetCategorizedAccounts.d.ts.map +1 -1
- package/funcs/financialStatementsBalanceSheetGetCategorizedAccounts.js +4 -3
- package/funcs/financialStatementsBalanceSheetGetCategorizedAccounts.js.map +1 -1
- package/funcs/financialStatementsCashFlowGet.d.ts.map +1 -1
- package/funcs/financialStatementsCashFlowGet.js +4 -3
- package/funcs/financialStatementsCashFlowGet.js.map +1 -1
- package/funcs/financialStatementsProfitAndLossGet.d.ts.map +1 -1
- package/funcs/financialStatementsProfitAndLossGet.js +4 -3
- package/funcs/financialStatementsProfitAndLossGet.js.map +1 -1
- package/funcs/financialStatementsProfitAndLossGetCategorizedAccounts.d.ts.map +1 -1
- package/funcs/financialStatementsProfitAndLossGetCategorizedAccounts.js +4 -3
- package/funcs/financialStatementsProfitAndLossGetCategorizedAccounts.js.map +1 -1
- package/funcs/liabilitiesGenerateLoanSummary.d.ts.map +1 -1
- package/funcs/liabilitiesGenerateLoanSummary.js +4 -3
- package/funcs/liabilitiesGenerateLoanSummary.js.map +1 -1
- package/funcs/liabilitiesGenerateLoanTransactions.d.ts.map +1 -1
- package/funcs/liabilitiesGenerateLoanTransactions.js +4 -3
- package/funcs/liabilitiesGenerateLoanTransactions.js.map +1 -1
- package/funcs/liabilitiesGetLoanSummary.d.ts.map +1 -1
- package/funcs/liabilitiesGetLoanSummary.js +4 -3
- package/funcs/liabilitiesGetLoanSummary.js.map +1 -1
- package/funcs/liabilitiesListLoanTransactions.d.ts.map +1 -1
- package/funcs/liabilitiesListLoanTransactions.js +4 -3
- package/funcs/liabilitiesListLoanTransactions.js.map +1 -1
- package/funcs/loanWritebackAccountsCreate.d.ts.map +1 -1
- package/funcs/loanWritebackAccountsCreate.js +4 -3
- package/funcs/loanWritebackAccountsCreate.js.map +1 -1
- package/funcs/loanWritebackAccountsGetCreateModel.d.ts.map +1 -1
- package/funcs/loanWritebackAccountsGetCreateModel.js +4 -3
- package/funcs/loanWritebackAccountsGetCreateModel.js.map +1 -1
- package/funcs/loanWritebackBankAccountsCreate.d.ts.map +1 -1
- package/funcs/loanWritebackBankAccountsCreate.js +4 -3
- package/funcs/loanWritebackBankAccountsCreate.js.map +1 -1
- package/funcs/loanWritebackBankAccountsGetCreateUpdateModel.d.ts.map +1 -1
- package/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js +4 -3
- package/funcs/loanWritebackBankAccountsGetCreateUpdateModel.js.map +1 -1
- package/funcs/loanWritebackBankTransactionsCreate.d.ts.map +1 -1
- package/funcs/loanWritebackBankTransactionsCreate.js +4 -3
- package/funcs/loanWritebackBankTransactionsCreate.js.map +1 -1
- package/funcs/loanWritebackBankTransactionsGetCreateModel.d.ts.map +1 -1
- package/funcs/loanWritebackBankTransactionsGetCreateModel.js +4 -3
- package/funcs/loanWritebackBankTransactionsGetCreateModel.js.map +1 -1
- package/funcs/loanWritebackCreateOperationsGet.d.ts.map +1 -1
- package/funcs/loanWritebackCreateOperationsGet.js +4 -3
- package/funcs/loanWritebackCreateOperationsGet.js.map +1 -1
- package/funcs/loanWritebackCreateOperationsList.d.ts.map +1 -1
- package/funcs/loanWritebackCreateOperationsList.js +4 -3
- package/funcs/loanWritebackCreateOperationsList.js.map +1 -1
- package/funcs/loanWritebackDirectCostsCreate.d.ts.map +1 -1
- package/funcs/loanWritebackDirectCostsCreate.js +4 -3
- package/funcs/loanWritebackDirectCostsCreate.js.map +1 -1
- package/funcs/loanWritebackDirectCostsGetCreateModel.d.ts.map +1 -1
- package/funcs/loanWritebackDirectCostsGetCreateModel.js +4 -3
- package/funcs/loanWritebackDirectCostsGetCreateModel.js.map +1 -1
- package/funcs/loanWritebackPaymentsCreate.d.ts.map +1 -1
- package/funcs/loanWritebackPaymentsCreate.js +4 -3
- package/funcs/loanWritebackPaymentsCreate.js.map +1 -1
- package/funcs/loanWritebackPaymentsGetCreateModel.d.ts.map +1 -1
- package/funcs/loanWritebackPaymentsGetCreateModel.js +4 -3
- package/funcs/loanWritebackPaymentsGetCreateModel.js.map +1 -1
- package/funcs/loanWritebackSourceAccountsCreate.d.ts.map +1 -1
- package/funcs/loanWritebackSourceAccountsCreate.js +4 -3
- package/funcs/loanWritebackSourceAccountsCreate.js.map +1 -1
- package/funcs/loanWritebackSourceAccountsCreateMapping.d.ts.map +1 -1
- package/funcs/loanWritebackSourceAccountsCreateMapping.js +4 -3
- package/funcs/loanWritebackSourceAccountsCreateMapping.js.map +1 -1
- package/funcs/loanWritebackSourceAccountsListMappings.d.ts +23 -0
- package/funcs/loanWritebackSourceAccountsListMappings.d.ts.map +1 -0
- package/funcs/loanWritebackSourceAccountsListMappings.js +127 -0
- package/funcs/loanWritebackSourceAccountsListMappings.js.map +1 -0
- package/funcs/loanWritebackSuppliersCreate.d.ts.map +1 -1
- package/funcs/loanWritebackSuppliersCreate.js +4 -3
- package/funcs/loanWritebackSuppliersCreate.js.map +1 -1
- package/funcs/loanWritebackSuppliersGetCreateUpdateModel.d.ts.map +1 -1
- package/funcs/loanWritebackSuppliersGetCreateUpdateModel.js +4 -3
- package/funcs/loanWritebackSuppliersGetCreateUpdateModel.js.map +1 -1
- package/funcs/loanWritebackTransfersCreate.d.ts.map +1 -1
- package/funcs/loanWritebackTransfersCreate.js +4 -3
- package/funcs/loanWritebackTransfersCreate.js.map +1 -1
- package/funcs/loanWritebackTransfersGetCreateModel.d.ts.map +1 -1
- package/funcs/loanWritebackTransfersGetCreateModel.js +4 -3
- package/funcs/loanWritebackTransfersGetCreateModel.js.map +1 -1
- package/funcs/manageDataGetStatus.d.ts.map +1 -1
- package/funcs/manageDataGetStatus.js +4 -3
- package/funcs/manageDataGetStatus.js.map +1 -1
- package/funcs/manageDataPullOperationsGet.d.ts.map +1 -1
- package/funcs/manageDataPullOperationsGet.js +4 -3
- package/funcs/manageDataPullOperationsGet.js.map +1 -1
- package/funcs/manageDataPullOperationsList.d.ts.map +1 -1
- package/funcs/manageDataPullOperationsList.js +4 -3
- package/funcs/manageDataPullOperationsList.js.map +1 -1
- package/funcs/manageDataRefreshAllDataTypes.d.ts.map +1 -1
- package/funcs/manageDataRefreshAllDataTypes.js +4 -3
- package/funcs/manageDataRefreshAllDataTypes.js.map +1 -1
- package/funcs/manageDataRefreshDataType.d.ts.map +1 -1
- package/funcs/manageDataRefreshDataType.js +4 -3
- package/funcs/manageDataRefreshDataType.js.map +1 -1
- package/funcs/manageReportsGenerateReport.d.ts.map +1 -1
- package/funcs/manageReportsGenerateReport.js +5 -4
- package/funcs/manageReportsGenerateReport.js.map +1 -1
- package/funcs/manageReportsListReports.d.ts.map +1 -1
- package/funcs/manageReportsListReports.js +4 -3
- package/funcs/manageReportsListReports.js.map +1 -1
- package/funcs/salesCustomersGet.d.ts.map +1 -1
- package/funcs/salesCustomersGet.js +4 -3
- package/funcs/salesCustomersGet.js.map +1 -1
- package/funcs/salesCustomersList.d.ts.map +1 -1
- package/funcs/salesCustomersList.js +4 -3
- package/funcs/salesCustomersList.js.map +1 -1
- package/funcs/salesDisputesGet.d.ts.map +1 -1
- package/funcs/salesDisputesGet.js +4 -3
- package/funcs/salesDisputesGet.js.map +1 -1
- package/funcs/salesDisputesList.d.ts.map +1 -1
- package/funcs/salesDisputesList.js +4 -3
- package/funcs/salesDisputesList.js.map +1 -1
- package/funcs/salesLocationsGet.d.ts.map +1 -1
- package/funcs/salesLocationsGet.js +4 -3
- package/funcs/salesLocationsGet.js.map +1 -1
- package/funcs/salesLocationsList.d.ts.map +1 -1
- package/funcs/salesLocationsList.js +4 -3
- package/funcs/salesLocationsList.js.map +1 -1
- package/funcs/salesMetricsGetCustomerRetention.d.ts.map +1 -1
- package/funcs/salesMetricsGetCustomerRetention.js +4 -3
- package/funcs/salesMetricsGetCustomerRetention.js.map +1 -1
- package/funcs/salesMetricsGetLifetimeValue.d.ts.map +1 -1
- package/funcs/salesMetricsGetLifetimeValue.js +4 -3
- package/funcs/salesMetricsGetLifetimeValue.js.map +1 -1
- package/funcs/salesMetricsGetRevenue.d.ts.map +1 -1
- package/funcs/salesMetricsGetRevenue.js +4 -3
- package/funcs/salesMetricsGetRevenue.js.map +1 -1
- package/funcs/salesOrdersGet.d.ts.map +1 -1
- package/funcs/salesOrdersGet.js +4 -3
- package/funcs/salesOrdersGet.js.map +1 -1
- package/funcs/salesOrdersList.d.ts.map +1 -1
- package/funcs/salesOrdersList.js +4 -3
- package/funcs/salesOrdersList.js.map +1 -1
- package/funcs/salesPaymentMethodsGet.d.ts.map +1 -1
- package/funcs/salesPaymentMethodsGet.js +4 -3
- package/funcs/salesPaymentMethodsGet.js.map +1 -1
- package/funcs/salesPaymentMethodsList.d.ts.map +1 -1
- package/funcs/salesPaymentMethodsList.js +4 -3
- package/funcs/salesPaymentMethodsList.js.map +1 -1
- package/funcs/salesPaymentsGet.d.ts.map +1 -1
- package/funcs/salesPaymentsGet.js +4 -3
- package/funcs/salesPaymentsGet.js.map +1 -1
- package/funcs/salesPaymentsList.d.ts.map +1 -1
- package/funcs/salesPaymentsList.js +4 -3
- package/funcs/salesPaymentsList.js.map +1 -1
- package/funcs/salesProductCategoriesGet.d.ts.map +1 -1
- package/funcs/salesProductCategoriesGet.js +4 -3
- package/funcs/salesProductCategoriesGet.js.map +1 -1
- package/funcs/salesProductCategoriesList.d.ts.map +1 -1
- package/funcs/salesProductCategoriesList.js +4 -3
- package/funcs/salesProductCategoriesList.js.map +1 -1
- package/funcs/salesProductsGet.d.ts.map +1 -1
- package/funcs/salesProductsGet.js +4 -3
- package/funcs/salesProductsGet.js.map +1 -1
- package/funcs/salesProductsList.d.ts.map +1 -1
- package/funcs/salesProductsList.js +4 -3
- package/funcs/salesProductsList.js.map +1 -1
- package/funcs/salesReportsGetOrders.d.ts.map +1 -1
- package/funcs/salesReportsGetOrders.js +4 -3
- package/funcs/salesReportsGetOrders.js.map +1 -1
- package/funcs/salesReportsGetRefunds.d.ts.map +1 -1
- package/funcs/salesReportsGetRefunds.js +4 -3
- package/funcs/salesReportsGetRefunds.js.map +1 -1
- package/funcs/salesTransactionsGet.d.ts.map +1 -1
- package/funcs/salesTransactionsGet.js +4 -3
- package/funcs/salesTransactionsGet.js.map +1 -1
- package/funcs/salesTransactionsList.d.ts.map +1 -1
- package/funcs/salesTransactionsList.js +4 -3
- package/funcs/salesTransactionsList.js.map +1 -1
- package/funcs/transactionsAccountTransactionsGet.d.ts.map +1 -1
- package/funcs/transactionsAccountTransactionsGet.js +4 -3
- package/funcs/transactionsAccountTransactionsGet.js.map +1 -1
- package/funcs/transactionsAccountTransactionsList.d.ts.map +1 -1
- package/funcs/transactionsAccountTransactionsList.js +4 -3
- package/funcs/transactionsAccountTransactionsList.js.map +1 -1
- package/funcs/transactionsDirectCostsDownloadAttachment.d.ts.map +1 -1
- package/funcs/transactionsDirectCostsDownloadAttachment.js +4 -3
- package/funcs/transactionsDirectCostsDownloadAttachment.js.map +1 -1
- package/funcs/transactionsDirectCostsGet.d.ts.map +1 -1
- package/funcs/transactionsDirectCostsGet.js +4 -3
- package/funcs/transactionsDirectCostsGet.js.map +1 -1
- package/funcs/transactionsDirectCostsGetAttachment.d.ts.map +1 -1
- package/funcs/transactionsDirectCostsGetAttachment.js +4 -3
- package/funcs/transactionsDirectCostsGetAttachment.js.map +1 -1
- package/funcs/transactionsDirectCostsList.d.ts.map +1 -1
- package/funcs/transactionsDirectCostsList.js +4 -3
- package/funcs/transactionsDirectCostsList.js.map +1 -1
- package/funcs/transactionsDirectCostsListAttachments.d.ts.map +1 -1
- package/funcs/transactionsDirectCostsListAttachments.js +4 -3
- package/funcs/transactionsDirectCostsListAttachments.js.map +1 -1
- package/funcs/transactionsJournalEntriesGet.d.ts.map +1 -1
- package/funcs/transactionsJournalEntriesGet.js +4 -3
- package/funcs/transactionsJournalEntriesGet.js.map +1 -1
- package/funcs/transactionsJournalEntriesList.d.ts.map +1 -1
- package/funcs/transactionsJournalEntriesList.js +4 -3
- package/funcs/transactionsJournalEntriesList.js.map +1 -1
- package/funcs/transactionsJournalsGet.d.ts.map +1 -1
- package/funcs/transactionsJournalsGet.js +4 -3
- package/funcs/transactionsJournalsGet.js.map +1 -1
- package/funcs/transactionsJournalsList.d.ts.map +1 -1
- package/funcs/transactionsJournalsList.js +4 -3
- package/funcs/transactionsJournalsList.js.map +1 -1
- package/funcs/transactionsTransfersGet.d.ts.map +1 -1
- package/funcs/transactionsTransfersGet.js +4 -3
- package/funcs/transactionsTransfersGet.js.map +1 -1
- package/funcs/transactionsTransfersList.d.ts.map +1 -1
- package/funcs/transactionsTransfersList.js +4 -3
- package/funcs/transactionsTransfersList.js.map +1 -1
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js +18 -0
- package/hooks/hooks.js.map +1 -1
- package/hooks/types.d.ts +3 -0
- package/hooks/types.d.ts.map +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +4 -5
- package/lib/config.js.map +1 -1
- package/lib/encodings.js +18 -19
- package/lib/encodings.js.map +1 -1
- package/lib/http.js +1 -2
- package/lib/http.js.map +1 -1
- package/lib/matchers.js +5 -6
- package/lib/matchers.js.map +1 -1
- package/lib/primitives.js +1 -1
- package/lib/primitives.js.map +1 -1
- package/lib/retries.js +3 -4
- package/lib/retries.js.map +1 -1
- package/lib/sdks.d.ts +5 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +16 -16
- package/lib/sdks.js.map +1 -1
- package/lib/security.js +2 -2
- package/lib/security.js.map +1 -1
- package/lib/url.js +1 -1
- package/lib/url.js.map +1 -1
- package/package.json +1 -3
- package/sdk/accountingbankdata.js +1 -2
- package/sdk/accountingbankdata.js.map +1 -1
- package/sdk/accountspayable.js +4 -8
- package/sdk/accountspayable.js.map +1 -1
- package/sdk/accountsreceivable.js +6 -12
- package/sdk/accountsreceivable.js.map +1 -1
- package/sdk/banking.js +5 -10
- package/sdk/banking.js.map +1 -1
- package/sdk/companies.d.ts +26 -2
- package/sdk/companies.d.ts.map +1 -1
- package/sdk/companies.js +29 -2
- package/sdk/companies.js.map +1 -1
- package/sdk/financialstatements.js +4 -8
- package/sdk/financialstatements.js.map +1 -1
- package/sdk/loanwriteback.js +9 -18
- package/sdk/loanwriteback.js.map +1 -1
- package/sdk/managedata.js +2 -4
- package/sdk/managedata.js.map +1 -1
- package/sdk/models/errors/httpclienterrors.js +2 -2
- package/sdk/models/errors/httpclienterrors.js.map +1 -1
- package/sdk/models/operations/createsourceaccount.d.ts +4 -4
- package/sdk/models/operations/createsourceaccount.d.ts.map +1 -1
- package/sdk/models/operations/createsourceaccount.js +8 -8
- package/sdk/models/operations/createsourceaccount.js.map +1 -1
- package/sdk/models/operations/getbankaccountmapping.d.ts +37 -0
- package/sdk/models/operations/getbankaccountmapping.d.ts.map +1 -0
- package/sdk/models/operations/getbankaccountmapping.js +61 -0
- package/sdk/models/operations/getbankaccountmapping.js.map +1 -0
- package/sdk/models/operations/index.d.ts +2 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +2 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listcompanies.d.ts +5 -0
- package/sdk/models/operations/listcompanies.d.ts.map +1 -1
- package/sdk/models/operations/listcompanies.js +2 -0
- package/sdk/models/operations/listcompanies.js.map +1 -1
- package/sdk/models/operations/replacecompany.d.ts +35 -0
- package/sdk/models/operations/replacecompany.d.ts.map +1 -0
- package/sdk/models/operations/replacecompany.js +71 -0
- package/sdk/models/operations/replacecompany.js.map +1 -0
- package/sdk/models/operations/updatecompany.d.ts +2 -2
- package/sdk/models/operations/updatecompany.d.ts.map +1 -1
- package/sdk/models/operations/updatecompany.js +4 -4
- package/sdk/models/operations/updatecompany.js.map +1 -1
- package/sdk/models/shared/accountingbalancesheet.d.ts +2 -2
- package/sdk/models/shared/accountingbalancesheet.d.ts.map +1 -1
- package/sdk/models/shared/accountingbalancesheet.js +2 -2
- package/sdk/models/shared/accountingbalancesheet.js.map +1 -1
- package/sdk/models/shared/accountingcashflowstatement.d.ts +2 -2
- package/sdk/models/shared/accountingcashflowstatement.d.ts.map +1 -1
- package/sdk/models/shared/accountingcashflowstatement.js +2 -2
- package/sdk/models/shared/accountingcashflowstatement.js.map +1 -1
- package/sdk/models/shared/accountingprofitandlossreport.d.ts +2 -2
- package/sdk/models/shared/accountingprofitandlossreport.d.ts.map +1 -1
- package/sdk/models/shared/accountingprofitandlossreport.js +2 -2
- package/sdk/models/shared/accountingprofitandlossreport.js.map +1 -1
- package/sdk/models/shared/bankfeedmapping.d.ts +108 -0
- package/sdk/models/shared/bankfeedmapping.d.ts.map +1 -0
- package/sdk/models/shared/bankfeedmapping.js +81 -0
- package/sdk/models/shared/bankfeedmapping.js.map +1 -0
- package/sdk/models/shared/companyupdaterequest.d.ts +46 -0
- package/sdk/models/shared/companyupdaterequest.d.ts.map +1 -0
- package/sdk/models/shared/companyupdaterequest.js +63 -0
- package/sdk/models/shared/companyupdaterequest.js.map +1 -0
- package/sdk/models/shared/file.d.ts +2 -2
- package/sdk/models/shared/file.d.ts.map +1 -1
- package/sdk/models/shared/file.js +4 -4
- package/sdk/models/shared/file.js.map +1 -1
- package/sdk/models/shared/index.d.ts +7 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +7 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/propertieaccounttype.d.ts +43 -0
- package/sdk/models/shared/propertieaccounttype.d.ts.map +1 -0
- package/sdk/models/shared/propertieaccounttype.js +56 -0
- package/sdk/models/shared/propertieaccounttype.js.map +1 -0
- package/sdk/models/shared/reportoperation.d.ts +3 -0
- package/sdk/models/shared/reportoperation.d.ts.map +1 -1
- package/sdk/models/shared/reportoperation.js +1 -0
- package/sdk/models/shared/reportoperation.js.map +1 -1
- package/sdk/models/shared/reporttype.d.ts +3 -0
- package/sdk/models/shared/reporttype.d.ts.map +1 -1
- package/sdk/models/shared/reporttype.js +1 -0
- package/sdk/models/shared/reporttype.js.map +1 -1
- package/sdk/models/shared/schema.d.ts +63 -0
- package/sdk/models/shared/schema.d.ts.map +1 -0
- package/sdk/models/shared/schema.js +67 -0
- package/sdk/models/shared/schema.js.map +1 -0
- package/sdk/models/shared/sourceaccountprototype.d.ts +94 -0
- package/sdk/models/shared/sourceaccountprototype.d.ts.map +1 -0
- package/sdk/models/shared/sourceaccountprototype.js +74 -0
- package/sdk/models/shared/sourceaccountprototype.js.map +1 -0
- package/sdk/models/shared/sourceaccountv2.d.ts +5 -0
- package/sdk/models/shared/sourceaccountv2.d.ts.map +1 -1
- package/sdk/models/shared/sourceaccountv2.js +2 -0
- package/sdk/models/shared/sourceaccountv2.js.map +1 -1
- package/sdk/models/shared/sourceaccountv2prototype.d.ts +104 -0
- package/sdk/models/shared/sourceaccountv2prototype.d.ts.map +1 -0
- package/sdk/models/shared/sourceaccountv2prototype.js +81 -0
- package/sdk/models/shared/sourceaccountv2prototype.js.map +1 -0
- package/sdk/models/shared/targetaccountoption.d.ts +53 -0
- package/sdk/models/shared/targetaccountoption.d.ts.map +1 -0
- package/sdk/models/shared/targetaccountoption.js +68 -0
- package/sdk/models/shared/targetaccountoption.js.map +1 -0
- package/sdk/models/webhooks/index.d.ts +1 -1
- package/sdk/models/webhooks/index.d.ts.map +1 -1
- package/sdk/models/webhooks/index.js +1 -1
- package/sdk/models/webhooks/index.js.map +1 -1
- package/sdk/models/webhooks/reportscreditmodelgeneratesuccessful.d.ts +63 -0
- package/sdk/models/webhooks/reportscreditmodelgeneratesuccessful.d.ts.map +1 -0
- package/sdk/models/webhooks/reportscreditmodelgeneratesuccessful.js +68 -0
- package/sdk/models/webhooks/reportscreditmodelgeneratesuccessful.js.map +1 -0
- package/sdk/sales.js +11 -22
- package/sdk/sales.js.map +1 -1
- package/sdk/sdk.js +18 -36
- package/sdk/sdk.js.map +1 -1
- package/sdk/sourceaccounts.d.ts +13 -0
- package/sdk/sourceaccounts.d.ts.map +1 -1
- package/sdk/sourceaccounts.js +16 -0
- package/sdk/sourceaccounts.js.map +1 -1
- package/sdk/transactions.js +5 -10
- package/sdk/transactions.js.map +1 -1
- package/sdk/types/index.d.ts +1 -0
- package/sdk/types/index.d.ts.map +1 -1
- package/sdk/types/webhooks.d.ts +4 -0
- package/sdk/types/webhooks.d.ts.map +1 -0
- package/sdk/types/webhooks.js +6 -0
- package/sdk/types/webhooks.js.map +1 -0
- package/src/funcs/accountingBankDataAccountsGet.ts +1 -0
- package/src/funcs/accountingBankDataAccountsList.ts +1 -0
- package/src/funcs/accountingBankDataListTransactions.ts +1 -0
- package/src/funcs/accountsPayableBillCreditNotesGet.ts +1 -0
- package/src/funcs/accountsPayableBillCreditNotesList.ts +1 -0
- package/src/funcs/accountsPayableBillPaymentsGet.ts +1 -0
- package/src/funcs/accountsPayableBillPaymentsList.ts +1 -0
- package/src/funcs/accountsPayableBillsDownloadAttachment.ts +1 -0
- package/src/funcs/accountsPayableBillsGet.ts +1 -0
- package/src/funcs/accountsPayableBillsGetAttachment.ts +1 -0
- package/src/funcs/accountsPayableBillsList.ts +1 -0
- package/src/funcs/accountsPayableBillsListAttachments.ts +1 -0
- package/src/funcs/accountsPayableSuppliersDownloadAttachment.ts +1 -0
- package/src/funcs/accountsPayableSuppliersGet.ts +1 -0
- package/src/funcs/accountsPayableSuppliersGetAttachment.ts +1 -0
- package/src/funcs/accountsPayableSuppliersList.ts +1 -0
- package/src/funcs/accountsPayableSuppliersListAttachments.ts +1 -0
- package/src/funcs/accountsReceivableCreditNotesGet.ts +1 -0
- package/src/funcs/accountsReceivableCreditNotesList.ts +1 -0
- package/src/funcs/accountsReceivableCustomersDownloadAttachment.ts +1 -0
- package/src/funcs/accountsReceivableCustomersGet.ts +1 -0
- package/src/funcs/accountsReceivableCustomersGetAttachment.ts +1 -0
- package/src/funcs/accountsReceivableCustomersList.ts +1 -0
- package/src/funcs/accountsReceivableCustomersListAttachments.ts +1 -0
- package/src/funcs/accountsReceivableDirectIncomesDownloadAttachment.ts +1 -0
- package/src/funcs/accountsReceivableDirectIncomesGet.ts +1 -0
- package/src/funcs/accountsReceivableDirectIncomesGetAttachment.ts +1 -0
- package/src/funcs/accountsReceivableDirectIncomesList.ts +1 -0
- package/src/funcs/accountsReceivableDirectIncomesListAttachments.ts +1 -0
- package/src/funcs/accountsReceivableInvoicesDownloadAttachment.ts +1 -0
- package/src/funcs/accountsReceivableInvoicesDownloadPdf.ts +1 -0
- package/src/funcs/accountsReceivableInvoicesGet.ts +1 -0
- package/src/funcs/accountsReceivableInvoicesGetAttachment.ts +1 -0
- package/src/funcs/accountsReceivableInvoicesList.ts +1 -0
- package/src/funcs/accountsReceivableInvoicesListAttachments.ts +1 -0
- package/src/funcs/accountsReceivableInvoicesListReconciled.ts +1 -0
- package/src/funcs/accountsReceivablePaymentsGet.ts +1 -0
- package/src/funcs/accountsReceivablePaymentsList.ts +1 -0
- package/src/funcs/accountsReceivableReportsGetAgedCreditors.ts +1 -0
- package/src/funcs/accountsReceivableReportsGetAgedDebtors.ts +1 -0
- package/src/funcs/accountsReceivableReportsIsAgedCreditorsAvailable.ts +1 -0
- package/src/funcs/accountsReceivableReportsIsAgedDebtorsAvailable.ts +1 -0
- package/src/funcs/bankStatementsEndUploadSession.ts +1 -0
- package/src/funcs/bankStatementsGetUploadConfiguration.ts +1 -0
- package/src/funcs/bankStatementsSetUploadConfiguration.ts +1 -0
- package/src/funcs/bankStatementsStartUploadSession.ts +1 -0
- package/src/funcs/bankStatementsUploadBankStatementData.ts +1 -0
- package/src/funcs/bankingAccountBalancesList.ts +1 -0
- package/src/funcs/bankingAccountsGet.ts +1 -0
- package/src/funcs/bankingAccountsList.ts +1 -0
- package/src/funcs/bankingCategorizedStatementGet.ts +1 -0
- package/src/funcs/bankingTransactionCategoriesGet.ts +1 -0
- package/src/funcs/bankingTransactionCategoriesList.ts +1 -0
- package/src/funcs/bankingTransactionsGet.ts +1 -0
- package/src/funcs/bankingTransactionsList.ts +1 -0
- package/src/funcs/companiesCreate.ts +1 -0
- package/src/funcs/companiesDelete.ts +1 -0
- package/src/funcs/companiesGet.ts +1 -0
- package/src/funcs/companiesList.ts +15 -0
- package/src/funcs/companiesReplace.ts +158 -0
- package/src/funcs/companiesUpdate.ts +6 -4
- package/src/funcs/companyInfoGetAccountingProfile.ts +1 -0
- package/src/funcs/companyInfoGetCommerceProfile.ts +1 -0
- package/src/funcs/connectionsCreate.ts +1 -0
- package/src/funcs/connectionsDelete.ts +1 -0
- package/src/funcs/connectionsGet.ts +1 -0
- package/src/funcs/connectionsList.ts +1 -0
- package/src/funcs/connectionsUnlink.ts +1 -0
- package/src/funcs/dataIntegrityDetails.ts +1 -0
- package/src/funcs/dataIntegrityStatus.ts +1 -0
- package/src/funcs/dataIntegritySummaries.ts +1 -0
- package/src/funcs/excelReportsDownload.ts +1 -0
- package/src/funcs/excelReportsGenerate.ts +1 -0
- package/src/funcs/excelReportsGetStatus.ts +1 -0
- package/src/funcs/fileUploadDownload.ts +1 -0
- package/src/funcs/fileUploadListUploaded.ts +1 -0
- package/src/funcs/fileUploadUpload.ts +1 -0
- package/src/funcs/financialStatementsAccountsGet.ts +1 -0
- package/src/funcs/financialStatementsAccountsList.ts +1 -0
- package/src/funcs/financialStatementsBalanceSheetGet.ts +1 -0
- package/src/funcs/financialStatementsBalanceSheetGetCategorizedAccounts.ts +1 -0
- package/src/funcs/financialStatementsCashFlowGet.ts +1 -0
- package/src/funcs/financialStatementsProfitAndLossGet.ts +1 -0
- package/src/funcs/financialStatementsProfitAndLossGetCategorizedAccounts.ts +1 -0
- package/src/funcs/liabilitiesGenerateLoanSummary.ts +1 -0
- package/src/funcs/liabilitiesGenerateLoanTransactions.ts +1 -0
- package/src/funcs/liabilitiesGetLoanSummary.ts +1 -0
- package/src/funcs/liabilitiesListLoanTransactions.ts +1 -0
- package/src/funcs/loanWritebackAccountsCreate.ts +1 -0
- package/src/funcs/loanWritebackAccountsGetCreateModel.ts +1 -0
- package/src/funcs/loanWritebackBankAccountsCreate.ts +1 -0
- package/src/funcs/loanWritebackBankAccountsGetCreateUpdateModel.ts +1 -0
- package/src/funcs/loanWritebackBankTransactionsCreate.ts +1 -0
- package/src/funcs/loanWritebackBankTransactionsGetCreateModel.ts +1 -0
- package/src/funcs/loanWritebackCreateOperationsGet.ts +1 -0
- package/src/funcs/loanWritebackCreateOperationsList.ts +1 -0
- package/src/funcs/loanWritebackDirectCostsCreate.ts +1 -0
- package/src/funcs/loanWritebackDirectCostsGetCreateModel.ts +1 -0
- package/src/funcs/loanWritebackPaymentsCreate.ts +1 -0
- package/src/funcs/loanWritebackPaymentsGetCreateModel.ts +1 -0
- package/src/funcs/loanWritebackSourceAccountsCreate.ts +1 -0
- package/src/funcs/loanWritebackSourceAccountsCreateMapping.ts +1 -0
- package/src/funcs/loanWritebackSourceAccountsListMappings.ts +166 -0
- package/src/funcs/loanWritebackSuppliersCreate.ts +1 -0
- package/src/funcs/loanWritebackSuppliersGetCreateUpdateModel.ts +1 -0
- package/src/funcs/loanWritebackTransfersCreate.ts +1 -0
- package/src/funcs/loanWritebackTransfersGetCreateModel.ts +1 -0
- package/src/funcs/manageDataGetStatus.ts +1 -0
- package/src/funcs/manageDataPullOperationsGet.ts +1 -0
- package/src/funcs/manageDataPullOperationsList.ts +1 -0
- package/src/funcs/manageDataRefreshAllDataTypes.ts +1 -0
- package/src/funcs/manageDataRefreshDataType.ts +1 -0
- package/src/funcs/manageReportsGenerateReport.ts +2 -1
- package/src/funcs/manageReportsListReports.ts +1 -0
- package/src/funcs/salesCustomersGet.ts +1 -0
- package/src/funcs/salesCustomersList.ts +1 -0
- package/src/funcs/salesDisputesGet.ts +1 -0
- package/src/funcs/salesDisputesList.ts +1 -0
- package/src/funcs/salesLocationsGet.ts +1 -0
- package/src/funcs/salesLocationsList.ts +1 -0
- package/src/funcs/salesMetricsGetCustomerRetention.ts +1 -0
- package/src/funcs/salesMetricsGetLifetimeValue.ts +1 -0
- package/src/funcs/salesMetricsGetRevenue.ts +1 -0
- package/src/funcs/salesOrdersGet.ts +1 -0
- package/src/funcs/salesOrdersList.ts +1 -0
- package/src/funcs/salesPaymentMethodsGet.ts +1 -0
- package/src/funcs/salesPaymentMethodsList.ts +1 -0
- package/src/funcs/salesPaymentsGet.ts +1 -0
- package/src/funcs/salesPaymentsList.ts +1 -0
- package/src/funcs/salesProductCategoriesGet.ts +1 -0
- package/src/funcs/salesProductCategoriesList.ts +1 -0
- package/src/funcs/salesProductsGet.ts +1 -0
- package/src/funcs/salesProductsList.ts +1 -0
- package/src/funcs/salesReportsGetOrders.ts +1 -0
- package/src/funcs/salesReportsGetRefunds.ts +1 -0
- package/src/funcs/salesTransactionsGet.ts +1 -0
- package/src/funcs/salesTransactionsList.ts +1 -0
- package/src/funcs/transactionsAccountTransactionsGet.ts +1 -0
- package/src/funcs/transactionsAccountTransactionsList.ts +1 -0
- package/src/funcs/transactionsDirectCostsDownloadAttachment.ts +1 -0
- package/src/funcs/transactionsDirectCostsGet.ts +1 -0
- package/src/funcs/transactionsDirectCostsGetAttachment.ts +1 -0
- package/src/funcs/transactionsDirectCostsList.ts +1 -0
- package/src/funcs/transactionsDirectCostsListAttachments.ts +1 -0
- package/src/funcs/transactionsJournalEntriesGet.ts +1 -0
- package/src/funcs/transactionsJournalEntriesList.ts +1 -0
- package/src/funcs/transactionsJournalsGet.ts +1 -0
- package/src/funcs/transactionsJournalsList.ts +1 -0
- package/src/funcs/transactionsTransfersGet.ts +1 -0
- package/src/funcs/transactionsTransfersList.ts +1 -0
- package/src/hooks/hooks.ts +20 -0
- package/src/hooks/types.ts +9 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +6 -1
- package/src/lib/security.ts +1 -1
- package/src/sdk/companies.ts +37 -2
- package/src/sdk/models/operations/createsourceaccount.ts +18 -15
- package/src/sdk/models/operations/getbankaccountmapping.ts +78 -0
- package/src/sdk/models/operations/index.ts +2 -0
- package/src/sdk/models/operations/listcompanies.ts +7 -0
- package/src/sdk/models/operations/replacecompany.ts +83 -0
- package/src/sdk/models/operations/updatecompany.ts +6 -6
- package/src/sdk/models/shared/accountingbalancesheet.ts +4 -4
- package/src/sdk/models/shared/accountingcashflowstatement.ts +4 -4
- package/src/sdk/models/shared/accountingprofitandlossreport.ts +4 -4
- package/src/sdk/models/shared/bankfeedmapping.ts +170 -0
- package/src/sdk/models/shared/companyupdaterequest.ts +83 -0
- package/src/sdk/models/shared/file.ts +2 -2
- package/src/sdk/models/shared/index.ts +7 -0
- package/src/sdk/models/shared/propertieaccounttype.ts +42 -0
- package/src/sdk/models/shared/reportoperation.ts +1 -0
- package/src/sdk/models/shared/reporttype.ts +1 -0
- package/src/sdk/models/shared/schema.ts +104 -0
- package/src/sdk/models/shared/sourceaccountprototype.ts +149 -0
- package/src/sdk/models/shared/sourceaccountv2.ts +7 -0
- package/src/sdk/models/shared/sourceaccountv2prototype.ts +175 -0
- package/src/sdk/models/shared/targetaccountoption.ts +102 -0
- package/src/sdk/models/webhooks/index.ts +1 -1
- package/src/sdk/models/webhooks/reportscreditmodelgeneratesuccessful.ts +119 -0
- package/src/sdk/sourceaccounts.ts +24 -0
- package/src/sdk/types/index.ts +1 -0
- package/src/sdk/types/webhooks.ts +7 -0
- package/sdk/models/webhooks/reportcategorizedbankstatementgeneratesuccessful.d.ts +0 -63
- package/sdk/models/webhooks/reportcategorizedbankstatementgeneratesuccessful.d.ts.map +0 -1
- package/sdk/models/webhooks/reportcategorizedbankstatementgeneratesuccessful.js +0 -68
- package/sdk/models/webhooks/reportcategorizedbankstatementgeneratesuccessful.js.map +0 -1
- package/src/sdk/models/webhooks/reportcategorizedbankstatementgeneratesuccessful.ts +0 -122
package/FUNCTIONS.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Standalone Functions
|
|
2
|
+
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> This section is useful if you are using a bundler and targetting browsers and
|
|
5
|
+
> runtimes where the size of an application affects performance and load times.
|
|
6
|
+
|
|
7
|
+
Every method in this SDK is also available as a standalone function. This
|
|
8
|
+
alternative API is suitable when targetting the browser or serverless runtimes
|
|
9
|
+
and using a bundler to build your application since all unused functionality
|
|
10
|
+
will be tree-shaken away. This includes code for unused methods, Zod schemas,
|
|
11
|
+
encoding helpers and response handlers. The result is dramatically smaller
|
|
12
|
+
impact on the application's final bundle size which grows very slowly as you use
|
|
13
|
+
more and more functionality from this SDK.
|
|
14
|
+
|
|
15
|
+
Calling methods through the main SDK class remains a valid and generally more
|
|
16
|
+
more ergonomic option. Standalone functions represent an optimisation for a
|
|
17
|
+
specific category of applications.
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { CodatLendingCore } from "@codat/lending/core.js";
|
|
23
|
+
import { companiesList } from "@codat/lending/funcs/companiesList.js";
|
|
24
|
+
import { SDKValidationError } from "@codat/lending/sdk/models/errors/sdkvalidationerror.js";
|
|
25
|
+
|
|
26
|
+
// Use `CodatLendingCore` for best tree-shaking performance.
|
|
27
|
+
// You can create one instance of it to use across an application.
|
|
28
|
+
const codatLending = new CodatLendingCore({
|
|
29
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
async function run() {
|
|
33
|
+
const res = await companiesList(codatLending, {
|
|
34
|
+
page: 1,
|
|
35
|
+
pageSize: 100,
|
|
36
|
+
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
|
|
37
|
+
orderBy: "-modifiedDate",
|
|
38
|
+
tags: "region=uk && team=invoice-finance",
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
switch (true) {
|
|
42
|
+
case res.ok:
|
|
43
|
+
// The success case will be handled outside of the switch block
|
|
44
|
+
break;
|
|
45
|
+
case res.error instanceof SDKValidationError:
|
|
46
|
+
// Pretty-print validation errors.
|
|
47
|
+
return console.log(res.error.pretty());
|
|
48
|
+
case res.error instanceof Error:
|
|
49
|
+
return console.log(res.error);
|
|
50
|
+
default:
|
|
51
|
+
// TypeScript's type checking will fail on the following line if the above
|
|
52
|
+
// cases were not exhaustive.
|
|
53
|
+
res.error satisfies never;
|
|
54
|
+
throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
const { value: result } = res;
|
|
59
|
+
|
|
60
|
+
// Handle the result
|
|
61
|
+
console.log(result);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
run();
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Result types
|
|
68
|
+
|
|
69
|
+
Standalone functions differ from SDK methods in that they return a
|
|
70
|
+
`Result<Value, Error>` type to capture _known errors_ and document them using
|
|
71
|
+
the type system. By avoiding throwing errors, application code maintains clear
|
|
72
|
+
control flow and error-handling become part of the regular flow of application
|
|
73
|
+
code.
|
|
74
|
+
|
|
75
|
+
> We use the term "known errors" because standalone functions, and JavaScript
|
|
76
|
+
> code in general, can still throw unexpected errors such as `TypeError`s,
|
|
77
|
+
> `RangeError`s and `DOMException`s. Exhaustively catching all errors may be
|
|
78
|
+
> something this SDK addresses in the future. Nevertheless, there is still a lot
|
|
79
|
+
> of benefit from capturing most errors and turning them into values.
|
|
80
|
+
|
|
81
|
+
The second reason for this style of programming is because these functions will
|
|
82
|
+
typically be used in front-end applications where exception throwing is
|
|
83
|
+
sometimes discouraged or considered unidiomatic. React and similar ecosystems
|
|
84
|
+
and libraries tend to promote this style of programming so that components
|
|
85
|
+
render useful content under all states (loading, success, error and so on).
|
|
86
|
+
|
|
87
|
+
The general pattern when calling standalone functions looks like this:
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
import { Core } from "<sdk-package-name>";
|
|
91
|
+
import { fetchSomething } from "<sdk-package-name>/funcs/fetchSomething.js";
|
|
92
|
+
|
|
93
|
+
const client = new Core();
|
|
94
|
+
|
|
95
|
+
async function run() {
|
|
96
|
+
const result = await fetchSomething(client, { id: "123" });
|
|
97
|
+
if (!result.ok) {
|
|
98
|
+
// You can throw the error or handle it. It's your choice now.
|
|
99
|
+
throw result.error;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
console.log(result.value);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
run();
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Notably, `result.error` above will have an explicit type compared to a try-catch
|
|
109
|
+
variation where the error in the catch block can only be of type `unknown` (or
|
|
110
|
+
`any` depending on your TypeScript settings).
|
package/README.md
CHANGED
|
@@ -38,19 +38,24 @@ The Lending API is built on top of the latest accounting, commerce, and banking
|
|
|
38
38
|
|
|
39
39
|
<!-- Start Table of Contents [toc] -->
|
|
40
40
|
## Table of Contents
|
|
41
|
+
<!-- $toc-max-depth=2 -->
|
|
42
|
+
* [Lending](#lending)
|
|
43
|
+
* [Endpoints](#endpoints)
|
|
44
|
+
* [SDK Installation](#sdk-installation)
|
|
45
|
+
* [Example Usage](#example-usage)
|
|
46
|
+
* [Requirements](#requirements)
|
|
47
|
+
* [SDK Example Usage](#sdk-example-usage)
|
|
48
|
+
* [Available Resources and Operations](#available-resources-and-operations)
|
|
49
|
+
* [Standalone functions](#standalone-functions)
|
|
50
|
+
* [File uploads](#file-uploads)
|
|
51
|
+
* [Retries](#retries)
|
|
52
|
+
* [Error Handling](#error-handling)
|
|
53
|
+
* [Server Selection](#server-selection)
|
|
54
|
+
* [Custom HTTP Client](#custom-http-client)
|
|
55
|
+
* [Authentication](#authentication)
|
|
56
|
+
* [Debugging](#debugging)
|
|
57
|
+
* [Support](#support)
|
|
41
58
|
|
|
42
|
-
* [SDK Installation](#sdk-installation)
|
|
43
|
-
* [Requirements](#requirements)
|
|
44
|
-
* [SDK Example Usage](#sdk-example-usage)
|
|
45
|
-
* [Available Resources and Operations](#available-resources-and-operations)
|
|
46
|
-
* [Standalone functions](#standalone-functions)
|
|
47
|
-
* [File uploads](#file-uploads)
|
|
48
|
-
* [Retries](#retries)
|
|
49
|
-
* [Error Handling](#error-handling)
|
|
50
|
-
* [Server Selection](#server-selection)
|
|
51
|
-
* [Custom HTTP Client](#custom-http-client)
|
|
52
|
-
* [Authentication](#authentication)
|
|
53
|
-
* [Debugging](#debugging)
|
|
54
59
|
<!-- End Table of Contents [toc] -->
|
|
55
60
|
|
|
56
61
|
<!-- Start SDK Installation [installation] -->
|
|
@@ -101,20 +106,23 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
|
|
|
101
106
|
```typescript
|
|
102
107
|
import { CodatLending } from "@codat/lending";
|
|
103
108
|
|
|
104
|
-
const codatLending = new CodatLending(
|
|
105
|
-
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
106
|
-
});
|
|
109
|
+
const codatLending = new CodatLending();
|
|
107
110
|
|
|
108
111
|
async function run() {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
await codatLending.accountCategoriesUpdated({
|
|
113
|
+
clientId: "bae71d36-ff47-420a-b4a6-f8c9ddf41140",
|
|
114
|
+
clientName: "Bank of Dave",
|
|
115
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
116
|
+
dataConnectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
117
|
+
ruleId: "70af3071-65d9-4ec3-b3cb-5283e8d55dac",
|
|
118
|
+
ruleType: "Account Categories Updated",
|
|
119
|
+
alertId: "a9367074-b5c3-42c4-9be4-be129f43577e",
|
|
120
|
+
message:
|
|
121
|
+
"Account categories updated for company f1c35bdc-1546-41b9-baf4-3f31135af968.",
|
|
122
|
+
data: {
|
|
123
|
+
modifiedDate: "2022-10-23",
|
|
124
|
+
},
|
|
114
125
|
});
|
|
115
|
-
|
|
116
|
-
// Handle the result
|
|
117
|
-
console.log(result);
|
|
118
126
|
}
|
|
119
127
|
|
|
120
128
|
run();
|
|
@@ -251,6 +259,7 @@ run();
|
|
|
251
259
|
|
|
252
260
|
* [list](docs/sdks/companies/README.md#list) - List companies
|
|
253
261
|
* [create](docs/sdks/companies/README.md#create) - Create company
|
|
262
|
+
* [replace](docs/sdks/companies/README.md#replace) - Replace company
|
|
254
263
|
* [update](docs/sdks/companies/README.md#update) - Update company
|
|
255
264
|
* [delete](docs/sdks/companies/README.md#delete) - Delete a company
|
|
256
265
|
* [get](docs/sdks/companies/README.md#get) - Get company
|
|
@@ -351,6 +360,7 @@ run();
|
|
|
351
360
|
#### [loanWriteback.sourceAccounts](docs/sdks/sourceaccounts/README.md)
|
|
352
361
|
|
|
353
362
|
* [create](docs/sdks/sourceaccounts/README.md#create) - Create source account
|
|
363
|
+
* [listMappings](docs/sdks/sourceaccounts/README.md#listmappings) - List bank feed account mappings
|
|
354
364
|
* [createMapping](docs/sdks/sourceaccounts/README.md#createmapping) - Create bank feed account mapping
|
|
355
365
|
|
|
356
366
|
#### [loanWriteback.suppliers](docs/sdks/codatlendingsuppliers/README.md)
|
|
@@ -551,6 +561,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
551
561
|
- [`companiesDelete`](docs/sdks/companies/README.md#delete) - Delete a company
|
|
552
562
|
- [`companiesGet`](docs/sdks/companies/README.md#get) - Get company
|
|
553
563
|
- [`companiesList`](docs/sdks/companies/README.md#list) - List companies
|
|
564
|
+
- [`companiesReplace`](docs/sdks/companies/README.md#replace) - Replace company
|
|
554
565
|
- [`companiesUpdate`](docs/sdks/companies/README.md#update) - Update company
|
|
555
566
|
- [`companyInfoGetAccountingProfile`](docs/sdks/companyinfo/README.md#getaccountingprofile) - Get company accounting profile
|
|
556
567
|
- [`companyInfoGetCommerceProfile`](docs/sdks/companyinfo/README.md#getcommerceprofile) - Get company commerce profile
|
|
@@ -593,6 +604,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
593
604
|
- [`loanWritebackPaymentsGetCreateModel`](docs/sdks/codatlendingloanwritebackpayments/README.md#getcreatemodel) - Get create payment model
|
|
594
605
|
- [`loanWritebackSourceAccountsCreate`](docs/sdks/sourceaccounts/README.md#create) - Create source account
|
|
595
606
|
- [`loanWritebackSourceAccountsCreateMapping`](docs/sdks/sourceaccounts/README.md#createmapping) - Create bank feed account mapping
|
|
607
|
+
- [`loanWritebackSourceAccountsListMappings`](docs/sdks/sourceaccounts/README.md#listmappings) - List bank feed account mappings
|
|
596
608
|
- [`loanWritebackSuppliersCreate`](docs/sdks/codatlendingsuppliers/README.md#create) - Create supplier
|
|
597
609
|
- [`loanWritebackSuppliersGetCreateUpdateModel`](docs/sdks/codatlendingsuppliers/README.md#getcreateupdatemodel) - Get create/update supplier model
|
|
598
610
|
- [`loanWritebackTransfersCreate`](docs/sdks/codatlendingtransfers/README.md#create) - Create transfer
|
|
@@ -696,6 +708,7 @@ async function run() {
|
|
|
696
708
|
pageSize: 100,
|
|
697
709
|
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
|
|
698
710
|
orderBy: "-modifiedDate",
|
|
711
|
+
tags: "region=uk && team=invoice-finance",
|
|
699
712
|
}, {
|
|
700
713
|
retries: {
|
|
701
714
|
strategy: "backoff",
|
|
@@ -741,6 +754,7 @@ async function run() {
|
|
|
741
754
|
pageSize: 100,
|
|
742
755
|
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
|
|
743
756
|
orderBy: "-modifiedDate",
|
|
757
|
+
tags: "region=uk && team=invoice-finance",
|
|
744
758
|
});
|
|
745
759
|
|
|
746
760
|
// Handle the result
|
|
@@ -755,25 +769,15 @@ run();
|
|
|
755
769
|
<!-- Start Error Handling [errors] -->
|
|
756
770
|
## Error Handling
|
|
757
771
|
|
|
758
|
-
All
|
|
759
|
-
|
|
760
|
-
If a HTTP request fails, an operation my also throw an error from the `sdk/models/errors/httpclienterrors.ts` module:
|
|
761
|
-
|
|
762
|
-
| HTTP Client Error | Description |
|
|
763
|
-
| ---------------------------------------------------- | ---------------------------------------------------- |
|
|
764
|
-
| RequestAbortedError | HTTP request was aborted by the client |
|
|
765
|
-
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
|
|
766
|
-
| ConnectionError | HTTP client was unable to make a request to a server |
|
|
767
|
-
| InvalidRequestError | Any input used to create a request is invalid |
|
|
768
|
-
| UnexpectedClientError | Unrecognised or unexpected error |
|
|
769
|
-
|
|
770
|
-
In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `list` method may throw the following errors:
|
|
772
|
+
Some methods specify known errors which can be thrown. All the known errors are enumerated in the `sdk/models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `list` method may throw the following errors:
|
|
771
773
|
|
|
772
774
|
| Error Type | Status Code | Content Type |
|
|
773
775
|
| ------------------- | -------------------------------------- | ---------------- |
|
|
774
776
|
| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json |
|
|
775
777
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
776
778
|
|
|
779
|
+
If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`.
|
|
780
|
+
|
|
777
781
|
```typescript
|
|
778
782
|
import { CodatLending } from "@codat/lending";
|
|
779
783
|
import {
|
|
@@ -793,14 +797,16 @@ async function run() {
|
|
|
793
797
|
pageSize: 100,
|
|
794
798
|
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
|
|
795
799
|
orderBy: "-modifiedDate",
|
|
800
|
+
tags: "region=uk && team=invoice-finance",
|
|
796
801
|
});
|
|
797
802
|
|
|
798
803
|
// Handle the result
|
|
799
804
|
console.log(result);
|
|
800
805
|
} catch (err) {
|
|
801
806
|
switch (true) {
|
|
807
|
+
// The server response does not match the expected SDK schema
|
|
802
808
|
case (err instanceof SDKValidationError): {
|
|
803
|
-
//
|
|
809
|
+
// Pretty-print will provide a human-readable multi-line error message
|
|
804
810
|
console.error(err.pretty());
|
|
805
811
|
// Raw value may also be inspected
|
|
806
812
|
console.error(err.rawValue);
|
|
@@ -812,6 +818,7 @@ async function run() {
|
|
|
812
818
|
return;
|
|
813
819
|
}
|
|
814
820
|
default: {
|
|
821
|
+
// Other errors such as network errors, see HTTPClientErrors for more details
|
|
815
822
|
throw err;
|
|
816
823
|
}
|
|
817
824
|
}
|
|
@@ -822,7 +829,17 @@ run();
|
|
|
822
829
|
|
|
823
830
|
```
|
|
824
831
|
|
|
825
|
-
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging.
|
|
832
|
+
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.
|
|
833
|
+
|
|
834
|
+
In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `sdk/models/errors/httpclienterrors.ts` module:
|
|
835
|
+
|
|
836
|
+
| HTTP Client Error | Description |
|
|
837
|
+
| ---------------------------------------------------- | ---------------------------------------------------- |
|
|
838
|
+
| RequestAbortedError | HTTP request was aborted by the client |
|
|
839
|
+
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
|
|
840
|
+
| ConnectionError | HTTP client was unable to make a request to a server |
|
|
841
|
+
| InvalidRequestError | Any input used to create a request is invalid |
|
|
842
|
+
| UnexpectedClientError | Unrecognised or unexpected error |
|
|
826
843
|
<!-- End Error Handling [errors] -->
|
|
827
844
|
|
|
828
845
|
<!-- Start Server Selection [server] -->
|
|
@@ -845,6 +862,7 @@ async function run() {
|
|
|
845
862
|
pageSize: 100,
|
|
846
863
|
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
|
|
847
864
|
orderBy: "-modifiedDate",
|
|
865
|
+
tags: "region=uk && team=invoice-finance",
|
|
848
866
|
});
|
|
849
867
|
|
|
850
868
|
// Handle the result
|
|
@@ -930,6 +948,7 @@ async function run() {
|
|
|
930
948
|
pageSize: 100,
|
|
931
949
|
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
|
|
932
950
|
orderBy: "-modifiedDate",
|
|
951
|
+
tags: "region=uk && team=invoice-finance",
|
|
933
952
|
});
|
|
934
953
|
|
|
935
954
|
// Handle the result
|
package/RUNTIMES.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Supported JavaScript runtimes
|
|
2
|
+
|
|
3
|
+
This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:
|
|
4
|
+
|
|
5
|
+
* [Web Fetch API][web-fetch]
|
|
6
|
+
* [Web Streams API][web-streams] and in particular `ReadableStream`
|
|
7
|
+
* [Async iterables][async-iter] using `Symbol.asyncIterator`
|
|
8
|
+
|
|
9
|
+
[web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
|
|
10
|
+
[web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
|
|
11
|
+
[async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
|
|
12
|
+
|
|
13
|
+
Runtime environments that are explicitly supported are:
|
|
14
|
+
|
|
15
|
+
- Evergreen browsers which include: Chrome, Safari, Edge, Firefox
|
|
16
|
+
- Node.js active and maintenance LTS releases
|
|
17
|
+
- Currently, this is v18 and v20
|
|
18
|
+
- Bun v1 and above
|
|
19
|
+
- Deno v1.39
|
|
20
|
+
- Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
|
|
21
|
+
|
|
22
|
+
[deno-file-streaming]: https://github.com/denoland/deno/issues/11018
|
|
23
|
+
|
|
24
|
+
## Recommended TypeScript compiler options
|
|
25
|
+
|
|
26
|
+
The following `tsconfig.json` options are recommended for projects using this
|
|
27
|
+
SDK in order to get static type support for features like async iterables,
|
|
28
|
+
streams and `fetch`-related APIs ([`for await...of`][for-await-of],
|
|
29
|
+
[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
|
|
30
|
+
so on):
|
|
31
|
+
|
|
32
|
+
[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
|
|
33
|
+
[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
|
34
|
+
[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
|
|
35
|
+
[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response
|
|
36
|
+
|
|
37
|
+
```jsonc
|
|
38
|
+
{
|
|
39
|
+
"compilerOptions": {
|
|
40
|
+
"target": "es2020", // or higher
|
|
41
|
+
"lib": ["es2020", "dom", "dom.iterable"],
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
While `target` can be set to older ECMAScript versions, it may result in extra,
|
|
47
|
+
unnecessary compatibility code being generated if you are not targeting old
|
|
48
|
+
runtimes.
|
|
@@ -9,6 +9,7 @@ Create and manage your SMB users' companies.
|
|
|
9
9
|
|
|
10
10
|
* [list](#list) - List companies
|
|
11
11
|
* [create](#create) - Create company
|
|
12
|
+
* [replace](#replace) - Replace company
|
|
12
13
|
* [update](#update) - Update company
|
|
13
14
|
* [delete](#delete) - Delete a company
|
|
14
15
|
* [get](#get) - Get company
|
|
@@ -20,6 +21,19 @@ Create and manage your SMB users' companies.
|
|
|
20
21
|
A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
21
22
|
Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
|
|
22
23
|
|
|
24
|
+
## Filter by tags
|
|
25
|
+
|
|
26
|
+
The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying):
|
|
27
|
+
|
|
28
|
+
- equals (`=`)
|
|
29
|
+
- not equals (`!=`)
|
|
30
|
+
- contains (`~`)
|
|
31
|
+
|
|
32
|
+
For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team:
|
|
33
|
+
- Foreign key: `uid = {yourCustomerId}`
|
|
34
|
+
- Region: `region != uk`
|
|
35
|
+
- Owning team and region: `region = uk && owningTeam = invoice-finance`
|
|
36
|
+
|
|
23
37
|
### Example Usage
|
|
24
38
|
|
|
25
39
|
```typescript
|
|
@@ -35,6 +49,7 @@ async function run() {
|
|
|
35
49
|
pageSize: 100,
|
|
36
50
|
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
|
|
37
51
|
orderBy: "-modifiedDate",
|
|
52
|
+
tags: "region=uk && team=invoice-finance",
|
|
38
53
|
});
|
|
39
54
|
|
|
40
55
|
// Handle the result
|
|
@@ -64,6 +79,7 @@ async function run() {
|
|
|
64
79
|
pageSize: 100,
|
|
65
80
|
query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
|
|
66
81
|
orderBy: "-modifiedDate",
|
|
82
|
+
tags: "region=uk && team=invoice-finance",
|
|
67
83
|
});
|
|
68
84
|
|
|
69
85
|
if (!res.ok) {
|
|
@@ -183,9 +199,9 @@ run();
|
|
|
183
199
|
| errors.ErrorMessage | 400, 401, 402, 403, 429, 500, 503 | application/json |
|
|
184
200
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
185
201
|
|
|
186
|
-
##
|
|
202
|
+
## replace
|
|
187
203
|
|
|
188
|
-
Use the *
|
|
204
|
+
Use the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload.
|
|
189
205
|
|
|
190
206
|
A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
191
207
|
Each company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
|
|
@@ -200,11 +216,10 @@ const codatLending = new CodatLending({
|
|
|
200
216
|
});
|
|
201
217
|
|
|
202
218
|
async function run() {
|
|
203
|
-
const result = await codatLending.companies.
|
|
219
|
+
const result = await codatLending.companies.replace({
|
|
204
220
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
205
221
|
companyRequestBody: {
|
|
206
222
|
name: "New Name",
|
|
207
|
-
description: "Requested early access to the new financing scheme.",
|
|
208
223
|
},
|
|
209
224
|
});
|
|
210
225
|
|
|
@@ -221,7 +236,7 @@ The standalone function version of this method:
|
|
|
221
236
|
|
|
222
237
|
```typescript
|
|
223
238
|
import { CodatLendingCore } from "@codat/lending/core.js";
|
|
224
|
-
import {
|
|
239
|
+
import { companiesReplace } from "@codat/lending/funcs/companiesReplace.js";
|
|
225
240
|
|
|
226
241
|
// Use `CodatLendingCore` for best tree-shaking performance.
|
|
227
242
|
// You can create one instance of it to use across an application.
|
|
@@ -230,11 +245,101 @@ const codatLending = new CodatLendingCore({
|
|
|
230
245
|
});
|
|
231
246
|
|
|
232
247
|
async function run() {
|
|
233
|
-
const res = await
|
|
248
|
+
const res = await companiesReplace(codatLending, {
|
|
234
249
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
235
250
|
companyRequestBody: {
|
|
236
251
|
name: "New Name",
|
|
237
|
-
|
|
252
|
+
},
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
if (!res.ok) {
|
|
256
|
+
throw res.error;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
const { value: result } = res;
|
|
260
|
+
|
|
261
|
+
// Handle the result
|
|
262
|
+
console.log(result);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
run();
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Parameters
|
|
269
|
+
|
|
270
|
+
| Parameter | Type | Required | Description |
|
|
271
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
272
|
+
| `request` | [operations.ReplaceCompanyRequest](../../sdk/models/operations/replacecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
273
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
274
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
275
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
276
|
+
|
|
277
|
+
### Response
|
|
278
|
+
|
|
279
|
+
**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>**
|
|
280
|
+
|
|
281
|
+
### Errors
|
|
282
|
+
|
|
283
|
+
| Error Type | Status Code | Content Type |
|
|
284
|
+
| --------------------------------- | --------------------------------- | --------------------------------- |
|
|
285
|
+
| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json |
|
|
286
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
287
|
+
|
|
288
|
+
## update
|
|
289
|
+
|
|
290
|
+
Use the *Update company* endpoint to update the name, description, or tags of the company.
|
|
291
|
+
|
|
292
|
+
The *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update.
|
|
293
|
+
|
|
294
|
+
A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
295
|
+
|
|
296
|
+
### Example Usage
|
|
297
|
+
|
|
298
|
+
```typescript
|
|
299
|
+
import { CodatLending } from "@codat/lending";
|
|
300
|
+
|
|
301
|
+
const codatLending = new CodatLending({
|
|
302
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
async function run() {
|
|
306
|
+
const result = await codatLending.companies.update({
|
|
307
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
308
|
+
companyUpdateRequest: {
|
|
309
|
+
tags: {
|
|
310
|
+
"refrence": "new reference",
|
|
311
|
+
},
|
|
312
|
+
},
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
// Handle the result
|
|
316
|
+
console.log(result);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
run();
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Standalone function
|
|
323
|
+
|
|
324
|
+
The standalone function version of this method:
|
|
325
|
+
|
|
326
|
+
```typescript
|
|
327
|
+
import { CodatLendingCore } from "@codat/lending/core.js";
|
|
328
|
+
import { companiesUpdate } from "@codat/lending/funcs/companiesUpdate.js";
|
|
329
|
+
|
|
330
|
+
// Use `CodatLendingCore` for best tree-shaking performance.
|
|
331
|
+
// You can create one instance of it to use across an application.
|
|
332
|
+
const codatLending = new CodatLendingCore({
|
|
333
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
async function run() {
|
|
337
|
+
const res = await companiesUpdate(codatLending, {
|
|
338
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
339
|
+
companyUpdateRequest: {
|
|
340
|
+
tags: {
|
|
341
|
+
"refrence": "new reference",
|
|
342
|
+
},
|
|
238
343
|
},
|
|
239
344
|
});
|
|
240
345
|
|