@codat/lending 0.1.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.
Files changed (1299) hide show
  1. package/README.md +14 -0
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +20 -0
  4. package/dist/internal/utils/contenttype.d.ts +1 -0
  5. package/dist/internal/utils/contenttype.js +33 -0
  6. package/dist/internal/utils/headers.d.ts +4 -0
  7. package/dist/internal/utils/headers.js +92 -0
  8. package/dist/internal/utils/index.d.ts +8 -0
  9. package/dist/internal/utils/index.js +27 -0
  10. package/dist/internal/utils/pathparams.d.ts +2 -0
  11. package/dist/internal/utils/pathparams.js +53 -0
  12. package/dist/internal/utils/queryparams.d.ts +2 -0
  13. package/dist/internal/utils/queryparams.js +178 -0
  14. package/dist/internal/utils/requestbody.d.ts +2 -0
  15. package/dist/internal/utils/requestbody.js +318 -0
  16. package/dist/internal/utils/retries.d.ts +20 -0
  17. package/dist/internal/utils/retries.js +250 -0
  18. package/dist/internal/utils/security.d.ts +2 -0
  19. package/dist/internal/utils/security.js +188 -0
  20. package/dist/internal/utils/utils.d.ts +37 -0
  21. package/dist/internal/utils/utils.js +370 -0
  22. package/dist/sdk/accountingbankdata.d.ts +51 -0
  23. package/dist/sdk/accountingbankdata.js +303 -0
  24. package/dist/sdk/accountspayable.d.ts +209 -0
  25. package/dist/sdk/accountspayable.js +1210 -0
  26. package/dist/sdk/accountsreceivable.d.ts +289 -0
  27. package/dist/sdk/accountsreceivable.js +1689 -0
  28. package/dist/sdk/cashflow.d.ts +112 -0
  29. package/dist/sdk/cashflow.js +628 -0
  30. package/dist/sdk/companies.d.ts +52 -0
  31. package/dist/sdk/companies.js +446 -0
  32. package/dist/sdk/companyinfo.d.ts +27 -0
  33. package/dist/sdk/companyinfo.js +220 -0
  34. package/dist/sdk/connections.d.ts +49 -0
  35. package/dist/sdk/connections.js +444 -0
  36. package/dist/sdk/dataintegrity.d.ts +45 -0
  37. package/dist/sdk/dataintegrity.js +297 -0
  38. package/dist/sdk/excelreports.d.ts +52 -0
  39. package/dist/sdk/excelreports.js +311 -0
  40. package/dist/sdk/fileupload.d.ts +42 -0
  41. package/dist/sdk/fileupload.js +321 -0
  42. package/dist/sdk/financials.d.ts +75 -0
  43. package/dist/sdk/financials.js +559 -0
  44. package/dist/sdk/index.d.ts +1 -0
  45. package/dist/sdk/index.js +20 -0
  46. package/dist/sdk/liabilities.d.ts +35 -0
  47. package/dist/sdk/liabilities.js +229 -0
  48. package/dist/sdk/managedata.d.ts +52 -0
  49. package/dist/sdk/managedata.js +414 -0
  50. package/dist/sdk/models/errors/index.d.ts +1 -0
  51. package/dist/sdk/models/errors/index.js +20 -0
  52. package/dist/sdk/models/errors/sdkerror.d.ts +7 -0
  53. package/dist/sdk/models/errors/sdkerror.js +40 -0
  54. package/dist/sdk/models/operations/createcompany.d.ts +16 -0
  55. package/dist/sdk/models/operations/createcompany.js +83 -0
  56. package/dist/sdk/models/operations/createconnection.d.ts +23 -0
  57. package/dist/sdk/models/operations/createconnection.js +113 -0
  58. package/dist/sdk/models/operations/deletecompany.d.ts +15 -0
  59. package/dist/sdk/models/operations/deletecompany.js +91 -0
  60. package/dist/sdk/models/operations/deleteconnection.d.ts +16 -0
  61. package/dist/sdk/models/operations/deleteconnection.js +95 -0
  62. package/dist/sdk/models/operations/downloadaccountingbillattachment.d.ts +28 -0
  63. package/dist/sdk/models/operations/downloadaccountingbillattachment.js +107 -0
  64. package/dist/sdk/models/operations/downloadaccountingcustomerattachment.d.ts +25 -0
  65. package/dist/sdk/models/operations/downloadaccountingcustomerattachment.js +107 -0
  66. package/dist/sdk/models/operations/downloadaccountingdirectcostattachment.d.ts +28 -0
  67. package/dist/sdk/models/operations/downloadaccountingdirectcostattachment.js +107 -0
  68. package/dist/sdk/models/operations/downloadaccountingdirectincomeattachment.d.ts +28 -0
  69. package/dist/sdk/models/operations/downloadaccountingdirectincomeattachment.js +107 -0
  70. package/dist/sdk/models/operations/downloadaccountinginvoiceattachment.d.ts +28 -0
  71. package/dist/sdk/models/operations/downloadaccountinginvoiceattachment.js +107 -0
  72. package/dist/sdk/models/operations/downloadaccountinginvoicepdf.d.ts +18 -0
  73. package/dist/sdk/models/operations/downloadaccountinginvoicepdf.js +71 -0
  74. package/dist/sdk/models/operations/downloadaccountingsupplierattachment.d.ts +28 -0
  75. package/dist/sdk/models/operations/downloadaccountingsupplierattachment.js +107 -0
  76. package/dist/sdk/models/operations/downloadexcelreport.d.ts +20 -0
  77. package/dist/sdk/models/operations/downloadexcelreport.js +99 -0
  78. package/dist/sdk/models/operations/downloadfiles.d.ts +23 -0
  79. package/dist/sdk/models/operations/downloadfiles.js +99 -0
  80. package/dist/sdk/models/operations/generateexcelreport.d.ts +23 -0
  81. package/dist/sdk/models/operations/generateexcelreport.js +99 -0
  82. package/dist/sdk/models/operations/getaccountingaccount.d.ts +23 -0
  83. package/dist/sdk/models/operations/getaccountingaccount.js +99 -0
  84. package/dist/sdk/models/operations/getaccountingaccounttransaction.d.ts +21 -0
  85. package/dist/sdk/models/operations/getaccountingaccounttransaction.js +103 -0
  86. package/dist/sdk/models/operations/getaccountingagedcreditorsreport.d.ts +32 -0
  87. package/dist/sdk/models/operations/getaccountingagedcreditorsreport.js +108 -0
  88. package/dist/sdk/models/operations/getaccountingageddebtorsreport.d.ts +32 -0
  89. package/dist/sdk/models/operations/getaccountingageddebtorsreport.js +108 -0
  90. package/dist/sdk/models/operations/getaccountingbalancesheet.d.ts +28 -0
  91. package/dist/sdk/models/operations/getaccountingbalancesheet.js +107 -0
  92. package/dist/sdk/models/operations/getaccountingbankaccount.d.ts +24 -0
  93. package/dist/sdk/models/operations/getaccountingbankaccount.js +103 -0
  94. package/dist/sdk/models/operations/getaccountingbill.d.ts +23 -0
  95. package/dist/sdk/models/operations/getaccountingbill.js +99 -0
  96. package/dist/sdk/models/operations/getaccountingbillattachment.d.ts +28 -0
  97. package/dist/sdk/models/operations/getaccountingbillattachment.js +107 -0
  98. package/dist/sdk/models/operations/getaccountingbillcreditnote.d.ts +20 -0
  99. package/dist/sdk/models/operations/getaccountingbillcreditnote.js +99 -0
  100. package/dist/sdk/models/operations/getaccountingbillpayment.d.ts +20 -0
  101. package/dist/sdk/models/operations/getaccountingbillpayment.js +99 -0
  102. package/dist/sdk/models/operations/getaccountingcashflowstatement.d.ts +28 -0
  103. package/dist/sdk/models/operations/getaccountingcashflowstatement.js +107 -0
  104. package/dist/sdk/models/operations/getaccountingcompanyinfo.d.ts +19 -0
  105. package/dist/sdk/models/operations/getaccountingcompanyinfo.js +95 -0
  106. package/dist/sdk/models/operations/getaccountingcreditnote.d.ts +20 -0
  107. package/dist/sdk/models/operations/getaccountingcreditnote.js +99 -0
  108. package/dist/sdk/models/operations/getaccountingcustomer.d.ts +20 -0
  109. package/dist/sdk/models/operations/getaccountingcustomer.js +99 -0
  110. package/dist/sdk/models/operations/getaccountingcustomerattachment.d.ts +25 -0
  111. package/dist/sdk/models/operations/getaccountingcustomerattachment.js +107 -0
  112. package/dist/sdk/models/operations/getaccountingdirectcost.d.ts +24 -0
  113. package/dist/sdk/models/operations/getaccountingdirectcost.js +103 -0
  114. package/dist/sdk/models/operations/getaccountingdirectcostattachment.d.ts +28 -0
  115. package/dist/sdk/models/operations/getaccountingdirectcostattachment.js +107 -0
  116. package/dist/sdk/models/operations/getaccountingdirectincome.d.ts +21 -0
  117. package/dist/sdk/models/operations/getaccountingdirectincome.js +103 -0
  118. package/dist/sdk/models/operations/getaccountingdirectincomeattachment.d.ts +29 -0
  119. package/dist/sdk/models/operations/getaccountingdirectincomeattachment.js +111 -0
  120. package/dist/sdk/models/operations/getaccountinginvoice.d.ts +23 -0
  121. package/dist/sdk/models/operations/getaccountinginvoice.js +99 -0
  122. package/dist/sdk/models/operations/getaccountinginvoiceattachment.d.ts +28 -0
  123. package/dist/sdk/models/operations/getaccountinginvoiceattachment.js +107 -0
  124. package/dist/sdk/models/operations/getaccountingjournal.d.ts +20 -0
  125. package/dist/sdk/models/operations/getaccountingjournal.js +99 -0
  126. package/dist/sdk/models/operations/getaccountingjournalentry.d.ts +20 -0
  127. package/dist/sdk/models/operations/getaccountingjournalentry.js +99 -0
  128. package/dist/sdk/models/operations/getaccountingpayment.d.ts +20 -0
  129. package/dist/sdk/models/operations/getaccountingpayment.js +99 -0
  130. package/dist/sdk/models/operations/getaccountingprofitandloss.d.ts +28 -0
  131. package/dist/sdk/models/operations/getaccountingprofitandloss.js +107 -0
  132. package/dist/sdk/models/operations/getaccountingsupplier.d.ts +23 -0
  133. package/dist/sdk/models/operations/getaccountingsupplier.js +99 -0
  134. package/dist/sdk/models/operations/getaccountingsupplierattachment.d.ts +28 -0
  135. package/dist/sdk/models/operations/getaccountingsupplierattachment.js +107 -0
  136. package/dist/sdk/models/operations/getaccountingtransfer.d.ts +21 -0
  137. package/dist/sdk/models/operations/getaccountingtransfer.js +103 -0
  138. package/dist/sdk/models/operations/getbankingaccount.d.ts +20 -0
  139. package/dist/sdk/models/operations/getbankingaccount.js +99 -0
  140. package/dist/sdk/models/operations/getbankingtransaction.d.ts +20 -0
  141. package/dist/sdk/models/operations/getbankingtransaction.js +99 -0
  142. package/dist/sdk/models/operations/getbankingtransactioncategory.d.ts +20 -0
  143. package/dist/sdk/models/operations/getbankingtransactioncategory.js +99 -0
  144. package/dist/sdk/models/operations/getcommercecompanyinfo.d.ts +20 -0
  145. package/dist/sdk/models/operations/getcommercecompanyinfo.js +99 -0
  146. package/dist/sdk/models/operations/getcommercecustomer.d.ts +24 -0
  147. package/dist/sdk/models/operations/getcommercecustomer.js +103 -0
  148. package/dist/sdk/models/operations/getcommercecustomerretentionmetrics.d.ts +40 -0
  149. package/dist/sdk/models/operations/getcommercecustomerretentionmetrics.js +119 -0
  150. package/dist/sdk/models/operations/getcommercedispute.d.ts +24 -0
  151. package/dist/sdk/models/operations/getcommercedispute.js +103 -0
  152. package/dist/sdk/models/operations/getcommercelifetimevaluemetrics.d.ts +40 -0
  153. package/dist/sdk/models/operations/getcommercelifetimevaluemetrics.js +119 -0
  154. package/dist/sdk/models/operations/getcommercelocation.d.ts +24 -0
  155. package/dist/sdk/models/operations/getcommercelocation.js +103 -0
  156. package/dist/sdk/models/operations/getcommerceorder.d.ts +24 -0
  157. package/dist/sdk/models/operations/getcommerceorder.js +103 -0
  158. package/dist/sdk/models/operations/getcommerceordersreport.d.ts +40 -0
  159. package/dist/sdk/models/operations/getcommerceordersreport.js +119 -0
  160. package/dist/sdk/models/operations/getcommercepayment.d.ts +24 -0
  161. package/dist/sdk/models/operations/getcommercepayment.js +103 -0
  162. package/dist/sdk/models/operations/getcommercepaymentmethod.d.ts +24 -0
  163. package/dist/sdk/models/operations/getcommercepaymentmethod.js +103 -0
  164. package/dist/sdk/models/operations/getcommerceproduct.d.ts +24 -0
  165. package/dist/sdk/models/operations/getcommerceproduct.js +103 -0
  166. package/dist/sdk/models/operations/getcommerceproductcategory.d.ts +24 -0
  167. package/dist/sdk/models/operations/getcommerceproductcategory.js +103 -0
  168. package/dist/sdk/models/operations/getcommercerefundsmetrics.d.ts +40 -0
  169. package/dist/sdk/models/operations/getcommercerefundsmetrics.js +119 -0
  170. package/dist/sdk/models/operations/getcommercerevenuemetrics.d.ts +40 -0
  171. package/dist/sdk/models/operations/getcommercerevenuemetrics.js +119 -0
  172. package/dist/sdk/models/operations/getcommercetransaction.d.ts +24 -0
  173. package/dist/sdk/models/operations/getcommercetransaction.js +103 -0
  174. package/dist/sdk/models/operations/getcompany.d.ts +19 -0
  175. package/dist/sdk/models/operations/getcompany.js +95 -0
  176. package/dist/sdk/models/operations/getconnection.d.ts +20 -0
  177. package/dist/sdk/models/operations/getconnection.js +99 -0
  178. package/dist/sdk/models/operations/getdataintegritystatus.d.ts +23 -0
  179. package/dist/sdk/models/operations/getdataintegritystatus.js +99 -0
  180. package/dist/sdk/models/operations/getdataintegritysummaries.d.ts +27 -0
  181. package/dist/sdk/models/operations/getdataintegritysummaries.js +103 -0
  182. package/dist/sdk/models/operations/getdatastatus.d.ts +19 -0
  183. package/dist/sdk/models/operations/getdatastatus.js +95 -0
  184. package/dist/sdk/models/operations/getenhancedbalancesheetaccounts.d.ts +27 -0
  185. package/dist/sdk/models/operations/getenhancedbalancesheetaccounts.js +103 -0
  186. package/dist/sdk/models/operations/getenhancedcashflowtransactions.d.ts +31 -0
  187. package/dist/sdk/models/operations/getenhancedcashflowtransactions.js +107 -0
  188. package/dist/sdk/models/operations/getenhancedinvoicesreport.d.ts +31 -0
  189. package/dist/sdk/models/operations/getenhancedinvoicesreport.js +107 -0
  190. package/dist/sdk/models/operations/getenhancedprofitandlossaccounts.d.ts +27 -0
  191. package/dist/sdk/models/operations/getenhancedprofitandlossaccounts.js +103 -0
  192. package/dist/sdk/models/operations/getexcelreportgenerationstatus.d.ts +23 -0
  193. package/dist/sdk/models/operations/getexcelreportgenerationstatus.js +99 -0
  194. package/dist/sdk/models/operations/getloansummary.d.ts +19 -0
  195. package/dist/sdk/models/operations/getloansummary.js +95 -0
  196. package/dist/sdk/models/operations/getpulloperation.d.ts +23 -0
  197. package/dist/sdk/models/operations/getpulloperation.js +99 -0
  198. package/dist/sdk/models/operations/index.d.ts +121 -0
  199. package/dist/sdk/models/operations/index.js +140 -0
  200. package/dist/sdk/models/operations/isagedcreditorsreportavailable.d.ts +14 -0
  201. package/dist/sdk/models/operations/isagedcreditorsreportavailable.js +67 -0
  202. package/dist/sdk/models/operations/isageddebtorreportavailable.d.ts +14 -0
  203. package/dist/sdk/models/operations/isageddebtorreportavailable.js +67 -0
  204. package/dist/sdk/models/operations/listaccountingaccounts.d.ts +35 -0
  205. package/dist/sdk/models/operations/listaccountingaccounts.js +111 -0
  206. package/dist/sdk/models/operations/listaccountingaccounttransactions.d.ts +36 -0
  207. package/dist/sdk/models/operations/listaccountingaccounttransactions.js +115 -0
  208. package/dist/sdk/models/operations/listaccountingbankaccounts.d.ts +36 -0
  209. package/dist/sdk/models/operations/listaccountingbankaccounts.js +115 -0
  210. package/dist/sdk/models/operations/listaccountingbankaccounttransactions.d.ts +40 -0
  211. package/dist/sdk/models/operations/listaccountingbankaccounttransactions.js +119 -0
  212. package/dist/sdk/models/operations/listaccountingbillattachments.d.ts +24 -0
  213. package/dist/sdk/models/operations/listaccountingbillattachments.js +103 -0
  214. package/dist/sdk/models/operations/listaccountingbillcreditnotes.d.ts +35 -0
  215. package/dist/sdk/models/operations/listaccountingbillcreditnotes.js +111 -0
  216. package/dist/sdk/models/operations/listaccountingbillpayments.d.ts +35 -0
  217. package/dist/sdk/models/operations/listaccountingbillpayments.js +111 -0
  218. package/dist/sdk/models/operations/listaccountingbills.d.ts +35 -0
  219. package/dist/sdk/models/operations/listaccountingbills.js +111 -0
  220. package/dist/sdk/models/operations/listaccountingcreditnotes.d.ts +35 -0
  221. package/dist/sdk/models/operations/listaccountingcreditnotes.js +111 -0
  222. package/dist/sdk/models/operations/listaccountingcustomerattachments.d.ts +21 -0
  223. package/dist/sdk/models/operations/listaccountingcustomerattachments.js +103 -0
  224. package/dist/sdk/models/operations/listaccountingcustomers.d.ts +35 -0
  225. package/dist/sdk/models/operations/listaccountingcustomers.js +111 -0
  226. package/dist/sdk/models/operations/listaccountingdirectcostattachments.d.ts +24 -0
  227. package/dist/sdk/models/operations/listaccountingdirectcostattachments.js +103 -0
  228. package/dist/sdk/models/operations/listaccountingdirectcosts.d.ts +36 -0
  229. package/dist/sdk/models/operations/listaccountingdirectcosts.js +115 -0
  230. package/dist/sdk/models/operations/listaccountingdirectincomeattachments.d.ts +24 -0
  231. package/dist/sdk/models/operations/listaccountingdirectincomeattachments.js +103 -0
  232. package/dist/sdk/models/operations/listaccountingdirectincomes.d.ts +36 -0
  233. package/dist/sdk/models/operations/listaccountingdirectincomes.js +115 -0
  234. package/dist/sdk/models/operations/listaccountinginvoiceattachments.d.ts +24 -0
  235. package/dist/sdk/models/operations/listaccountinginvoiceattachments.js +103 -0
  236. package/dist/sdk/models/operations/listaccountinginvoices.d.ts +35 -0
  237. package/dist/sdk/models/operations/listaccountinginvoices.js +111 -0
  238. package/dist/sdk/models/operations/listaccountingjournalentries.d.ts +35 -0
  239. package/dist/sdk/models/operations/listaccountingjournalentries.js +111 -0
  240. package/dist/sdk/models/operations/listaccountingjournals.d.ts +35 -0
  241. package/dist/sdk/models/operations/listaccountingjournals.js +111 -0
  242. package/dist/sdk/models/operations/listaccountingpayments.d.ts +35 -0
  243. package/dist/sdk/models/operations/listaccountingpayments.js +111 -0
  244. package/dist/sdk/models/operations/listaccountingsupplierattachments.d.ts +24 -0
  245. package/dist/sdk/models/operations/listaccountingsupplierattachments.js +103 -0
  246. package/dist/sdk/models/operations/listaccountingsuppliers.d.ts +35 -0
  247. package/dist/sdk/models/operations/listaccountingsuppliers.js +111 -0
  248. package/dist/sdk/models/operations/listaccountingtransfers.d.ts +36 -0
  249. package/dist/sdk/models/operations/listaccountingtransfers.js +115 -0
  250. package/dist/sdk/models/operations/listbankingaccountbalances.d.ts +36 -0
  251. package/dist/sdk/models/operations/listbankingaccountbalances.js +115 -0
  252. package/dist/sdk/models/operations/listbankingaccounts.d.ts +36 -0
  253. package/dist/sdk/models/operations/listbankingaccounts.js +115 -0
  254. package/dist/sdk/models/operations/listbankingtransactioncategories.d.ts +36 -0
  255. package/dist/sdk/models/operations/listbankingtransactioncategories.js +115 -0
  256. package/dist/sdk/models/operations/listbankingtransactions.d.ts +36 -0
  257. package/dist/sdk/models/operations/listbankingtransactions.js +115 -0
  258. package/dist/sdk/models/operations/listcommercecustomers.d.ts +36 -0
  259. package/dist/sdk/models/operations/listcommercecustomers.js +115 -0
  260. package/dist/sdk/models/operations/listcommercedisputes.d.ts +36 -0
  261. package/dist/sdk/models/operations/listcommercedisputes.js +115 -0
  262. package/dist/sdk/models/operations/listcommercelocations.d.ts +20 -0
  263. package/dist/sdk/models/operations/listcommercelocations.js +99 -0
  264. package/dist/sdk/models/operations/listcommerceorders.d.ts +36 -0
  265. package/dist/sdk/models/operations/listcommerceorders.js +115 -0
  266. package/dist/sdk/models/operations/listcommercepaymentmethods.d.ts +36 -0
  267. package/dist/sdk/models/operations/listcommercepaymentmethods.js +115 -0
  268. package/dist/sdk/models/operations/listcommercepayments.d.ts +36 -0
  269. package/dist/sdk/models/operations/listcommercepayments.js +115 -0
  270. package/dist/sdk/models/operations/listcommerceproductcategories.d.ts +36 -0
  271. package/dist/sdk/models/operations/listcommerceproductcategories.js +115 -0
  272. package/dist/sdk/models/operations/listcommerceproducts.d.ts +36 -0
  273. package/dist/sdk/models/operations/listcommerceproducts.js +115 -0
  274. package/dist/sdk/models/operations/listcommercetransactions.d.ts +36 -0
  275. package/dist/sdk/models/operations/listcommercetransactions.js +115 -0
  276. package/dist/sdk/models/operations/listcompanies.d.ts +34 -0
  277. package/dist/sdk/models/operations/listcompanies.js +107 -0
  278. package/dist/sdk/models/operations/listconnections.d.ts +35 -0
  279. package/dist/sdk/models/operations/listconnections.js +111 -0
  280. package/dist/sdk/models/operations/listdataintegritydetails.d.ts +39 -0
  281. package/dist/sdk/models/operations/listdataintegritydetails.js +115 -0
  282. package/dist/sdk/models/operations/listfiles.d.ts +19 -0
  283. package/dist/sdk/models/operations/listfiles.js +95 -0
  284. package/dist/sdk/models/operations/listloantransactions.d.ts +31 -0
  285. package/dist/sdk/models/operations/listloantransactions.js +108 -0
  286. package/dist/sdk/models/operations/listpulloperations.d.ts +35 -0
  287. package/dist/sdk/models/operations/listpulloperations.js +111 -0
  288. package/dist/sdk/models/operations/refreshalldatatypes.d.ts +15 -0
  289. package/dist/sdk/models/operations/refreshalldatatypes.js +91 -0
  290. package/dist/sdk/models/operations/refreshdatatype.d.ts +27 -0
  291. package/dist/sdk/models/operations/refreshdatatype.js +103 -0
  292. package/dist/sdk/models/operations/unlinkconnection.d.ts +24 -0
  293. package/dist/sdk/models/operations/unlinkconnection.js +117 -0
  294. package/dist/sdk/models/operations/updatecompany.d.ts +20 -0
  295. package/dist/sdk/models/operations/updatecompany.js +99 -0
  296. package/dist/sdk/models/operations/uploadfiles.d.ts +21 -0
  297. package/dist/sdk/models/operations/uploadfiles.js +117 -0
  298. package/dist/sdk/models/shared/accountbalance.d.ts +19 -0
  299. package/dist/sdk/models/shared/accountbalance.js +60 -0
  300. package/dist/sdk/models/shared/accountbalanceamounts.d.ts +18 -0
  301. package/dist/sdk/models/shared/accountbalanceamounts.js +58 -0
  302. package/dist/sdk/models/shared/accountcategorylevel.d.ts +14 -0
  303. package/dist/sdk/models/shared/accountcategorylevel.js +53 -0
  304. package/dist/sdk/models/shared/accountidentifiers.d.ts +42 -0
  305. package/dist/sdk/models/shared/accountidentifiers.js +79 -0
  306. package/dist/sdk/models/shared/accountidentifiertype.d.ts +12 -0
  307. package/dist/sdk/models/shared/accountidentifiertype.js +19 -0
  308. package/dist/sdk/models/shared/accountingaccount.d.ts +160 -0
  309. package/dist/sdk/models/shared/accountingaccount.js +214 -0
  310. package/dist/sdk/models/shared/accountingaccounts.d.ts +13 -0
  311. package/dist/sdk/models/shared/accountingaccounts.js +72 -0
  312. package/dist/sdk/models/shared/accountingaccounttransaction.d.ts +133 -0
  313. package/dist/sdk/models/shared/accountingaccounttransaction.js +142 -0
  314. package/dist/sdk/models/shared/accountingaccounttransactions.d.ts +13 -0
  315. package/dist/sdk/models/shared/accountingaccounttransactions.js +72 -0
  316. package/dist/sdk/models/shared/accountingaddress.d.ts +32 -0
  317. package/dist/sdk/models/shared/accountingaddress.js +76 -0
  318. package/dist/sdk/models/shared/accountingaddresstype.d.ts +8 -0
  319. package/dist/sdk/models/shared/accountingaddresstype.js +15 -0
  320. package/dist/sdk/models/shared/accountingagedcreditorreport.d.ts +92 -0
  321. package/dist/sdk/models/shared/accountingagedcreditorreport.js +93 -0
  322. package/dist/sdk/models/shared/accountingageddebtorreport.d.ts +92 -0
  323. package/dist/sdk/models/shared/accountingageddebtorreport.js +93 -0
  324. package/dist/sdk/models/shared/accountingattachment.d.ts +75 -0
  325. package/dist/sdk/models/shared/accountingattachment.js +102 -0
  326. package/dist/sdk/models/shared/accountingbalancesheet.d.ts +90 -0
  327. package/dist/sdk/models/shared/accountingbalancesheet.js +84 -0
  328. package/dist/sdk/models/shared/accountingbankaccount.d.ts +105 -0
  329. package/dist/sdk/models/shared/accountingbankaccount.js +138 -0
  330. package/dist/sdk/models/shared/accountingbankaccounts.d.ts +13 -0
  331. package/dist/sdk/models/shared/accountingbankaccounts.js +72 -0
  332. package/dist/sdk/models/shared/accountingbankaccounttype.d.ts +12 -0
  333. package/dist/sdk/models/shared/accountingbankaccounttype.js +19 -0
  334. package/dist/sdk/models/shared/accountingbanktransaction.d.ts +60 -0
  335. package/dist/sdk/models/shared/accountingbanktransaction.js +111 -0
  336. package/dist/sdk/models/shared/accountingbanktransactions.d.ts +13 -0
  337. package/dist/sdk/models/shared/accountingbanktransactions.js +72 -0
  338. package/dist/sdk/models/shared/accountingbill.d.ts +147 -0
  339. package/dist/sdk/models/shared/accountingbill.js +217 -0
  340. package/dist/sdk/models/shared/accountingbillcreditnote.d.ts +184 -0
  341. package/dist/sdk/models/shared/accountingbillcreditnote.js +183 -0
  342. package/dist/sdk/models/shared/accountingbillcreditnotes.d.ts +13 -0
  343. package/dist/sdk/models/shared/accountingbillcreditnotes.js +72 -0
  344. package/dist/sdk/models/shared/accountingbillpayment.d.ts +232 -0
  345. package/dist/sdk/models/shared/accountingbillpayment.js +280 -0
  346. package/dist/sdk/models/shared/accountingbillpayments.d.ts +13 -0
  347. package/dist/sdk/models/shared/accountingbillpayments.js +72 -0
  348. package/dist/sdk/models/shared/accountingbills.d.ts +13 -0
  349. package/dist/sdk/models/shared/accountingbills.js +72 -0
  350. package/dist/sdk/models/shared/accountingcashflowstatement.d.ts +95 -0
  351. package/dist/sdk/models/shared/accountingcashflowstatement.js +91 -0
  352. package/dist/sdk/models/shared/accountingcompanyinfo.d.ts +163 -0
  353. package/dist/sdk/models/shared/accountingcompanyinfo.js +169 -0
  354. package/dist/sdk/models/shared/accountingcreditnote.d.ts +173 -0
  355. package/dist/sdk/models/shared/accountingcreditnote.js +189 -0
  356. package/dist/sdk/models/shared/accountingcreditnotes.d.ts +13 -0
  357. package/dist/sdk/models/shared/accountingcreditnotes.js +72 -0
  358. package/dist/sdk/models/shared/accountingcustomer.d.ts +83 -0
  359. package/dist/sdk/models/shared/accountingcustomer.js +136 -0
  360. package/dist/sdk/models/shared/accountingcustomerref.d.ts +11 -0
  361. package/dist/sdk/models/shared/accountingcustomerref.js +50 -0
  362. package/dist/sdk/models/shared/accountingcustomers.d.ts +13 -0
  363. package/dist/sdk/models/shared/accountingcustomers.js +72 -0
  364. package/dist/sdk/models/shared/accountingdirectcost.d.ts +140 -0
  365. package/dist/sdk/models/shared/accountingdirectcost.js +149 -0
  366. package/dist/sdk/models/shared/accountingdirectcosts.d.ts +13 -0
  367. package/dist/sdk/models/shared/accountingdirectcosts.js +72 -0
  368. package/dist/sdk/models/shared/accountingdirectincome.d.ts +135 -0
  369. package/dist/sdk/models/shared/accountingdirectincome.js +150 -0
  370. package/dist/sdk/models/shared/accountingdirectincomes.d.ts +13 -0
  371. package/dist/sdk/models/shared/accountingdirectincomes.js +72 -0
  372. package/dist/sdk/models/shared/accountinginvoice.d.ts +236 -0
  373. package/dist/sdk/models/shared/accountinginvoice.js +235 -0
  374. package/dist/sdk/models/shared/accountinginvoices.d.ts +13 -0
  375. package/dist/sdk/models/shared/accountinginvoices.js +72 -0
  376. package/dist/sdk/models/shared/accountingjournal.d.ts +93 -0
  377. package/dist/sdk/models/shared/accountingjournal.js +125 -0
  378. package/dist/sdk/models/shared/accountingjournalentries.d.ts +13 -0
  379. package/dist/sdk/models/shared/accountingjournalentries.js +72 -0
  380. package/dist/sdk/models/shared/accountingjournalentry.d.ts +141 -0
  381. package/dist/sdk/models/shared/accountingjournalentry.js +136 -0
  382. package/dist/sdk/models/shared/accountingjournals.d.ts +13 -0
  383. package/dist/sdk/models/shared/accountingjournals.js +72 -0
  384. package/dist/sdk/models/shared/accountingpayment.d.ts +793 -0
  385. package/dist/sdk/models/shared/accountingpayment.js +807 -0
  386. package/dist/sdk/models/shared/accountingpaymentallocation.d.ts +78 -0
  387. package/dist/sdk/models/shared/accountingpaymentallocation.js +81 -0
  388. package/dist/sdk/models/shared/accountingpayments.d.ts +13 -0
  389. package/dist/sdk/models/shared/accountingpayments.js +72 -0
  390. package/dist/sdk/models/shared/accountingprofitandlossreport.d.ts +91 -0
  391. package/dist/sdk/models/shared/accountingprofitandlossreport.js +94 -0
  392. package/dist/sdk/models/shared/accountingsupplier.d.ts +67 -0
  393. package/dist/sdk/models/shared/accountingsupplier.js +126 -0
  394. package/dist/sdk/models/shared/accountingsuppliers.d.ts +13 -0
  395. package/dist/sdk/models/shared/accountingsuppliers.js +72 -0
  396. package/dist/sdk/models/shared/accountingtransfer.d.ts +79 -0
  397. package/dist/sdk/models/shared/accountingtransfer.js +140 -0
  398. package/dist/sdk/models/shared/accountingtransfers.d.ts +13 -0
  399. package/dist/sdk/models/shared/accountingtransfers.js +72 -0
  400. package/dist/sdk/models/shared/accountinstitution.d.ts +14 -0
  401. package/dist/sdk/models/shared/accountinstitution.js +53 -0
  402. package/dist/sdk/models/shared/accountref.d.ts +14 -0
  403. package/dist/sdk/models/shared/accountref.js +53 -0
  404. package/dist/sdk/models/shared/accounts.d.ts +40 -0
  405. package/dist/sdk/models/shared/accounts.js +77 -0
  406. package/dist/sdk/models/shared/accountspayabletracking.d.ts +15 -0
  407. package/dist/sdk/models/shared/accountspayabletracking.js +75 -0
  408. package/dist/sdk/models/shared/accountsreceivabletracking.d.ts +40 -0
  409. package/dist/sdk/models/shared/accountsreceivabletracking.js +106 -0
  410. package/dist/sdk/models/shared/accountstatus.d.ts +9 -0
  411. package/dist/sdk/models/shared/accountstatus.js +16 -0
  412. package/dist/sdk/models/shared/accounttransactionline.d.ts +20 -0
  413. package/dist/sdk/models/shared/accounttransactionline.js +57 -0
  414. package/dist/sdk/models/shared/accounttype.d.ts +11 -0
  415. package/dist/sdk/models/shared/accounttype.js +18 -0
  416. package/dist/sdk/models/shared/agedcreditor.d.ts +16 -0
  417. package/dist/sdk/models/shared/agedcreditor.js +57 -0
  418. package/dist/sdk/models/shared/agedcurrencyoutstanding.d.ts +20 -0
  419. package/dist/sdk/models/shared/agedcurrencyoutstanding.js +52 -0
  420. package/dist/sdk/models/shared/ageddebtor.d.ts +16 -0
  421. package/dist/sdk/models/shared/ageddebtor.js +57 -0
  422. package/dist/sdk/models/shared/agedoutstandingamount.d.ts +60 -0
  423. package/dist/sdk/models/shared/agedoutstandingamount.js +62 -0
  424. package/dist/sdk/models/shared/agedoutstandingamountdetail.d.ts +11 -0
  425. package/dist/sdk/models/shared/agedoutstandingamountdetail.js +50 -0
  426. package/dist/sdk/models/shared/attachments.d.ts +8 -0
  427. package/dist/sdk/models/shared/attachments.js +50 -0
  428. package/dist/sdk/models/shared/balancesheet.d.ts +35 -0
  429. package/dist/sdk/models/shared/balancesheet.js +69 -0
  430. package/dist/sdk/models/shared/bankaccountref.d.ts +14 -0
  431. package/dist/sdk/models/shared/bankaccountref.js +53 -0
  432. package/dist/sdk/models/shared/bankingaccount.d.ts +58 -0
  433. package/dist/sdk/models/shared/bankingaccount.js +111 -0
  434. package/dist/sdk/models/shared/bankingaccountbalance.d.ts +51 -0
  435. package/dist/sdk/models/shared/bankingaccountbalance.js +80 -0
  436. package/dist/sdk/models/shared/bankingaccountbalances.d.ts +13 -0
  437. package/dist/sdk/models/shared/bankingaccountbalances.js +72 -0
  438. package/dist/sdk/models/shared/bankingaccounts.d.ts +13 -0
  439. package/dist/sdk/models/shared/bankingaccounts.js +72 -0
  440. package/dist/sdk/models/shared/bankingtransaction.d.ts +96 -0
  441. package/dist/sdk/models/shared/bankingtransaction.js +112 -0
  442. package/dist/sdk/models/shared/bankingtransactioncategories.d.ts +13 -0
  443. package/dist/sdk/models/shared/bankingtransactioncategories.js +72 -0
  444. package/dist/sdk/models/shared/bankingtransactioncategory.d.ts +26 -0
  445. package/dist/sdk/models/shared/bankingtransactioncategory.js +79 -0
  446. package/dist/sdk/models/shared/bankingtransactionref.d.ts +33 -0
  447. package/dist/sdk/models/shared/bankingtransactionref.js +75 -0
  448. package/dist/sdk/models/shared/bankingtransactions.d.ts +13 -0
  449. package/dist/sdk/models/shared/bankingtransactions.js +72 -0
  450. package/dist/sdk/models/shared/banktransactiontype.d.ts +23 -0
  451. package/dist/sdk/models/shared/banktransactiontype.js +30 -0
  452. package/dist/sdk/models/shared/billcreditnotelineitem.d.ts +112 -0
  453. package/dist/sdk/models/shared/billcreditnotelineitem.js +171 -0
  454. package/dist/sdk/models/shared/billcreditnotestatus.d.ts +11 -0
  455. package/dist/sdk/models/shared/billcreditnotestatus.js +18 -0
  456. package/dist/sdk/models/shared/billedtotype.d.ts +6 -0
  457. package/dist/sdk/models/shared/billedtotype.js +13 -0
  458. package/dist/sdk/models/shared/billedtotype1.d.ts +5 -0
  459. package/dist/sdk/models/shared/billedtotype1.js +12 -0
  460. package/dist/sdk/models/shared/billlineitem.d.ts +73 -0
  461. package/dist/sdk/models/shared/billlineitem.js +120 -0
  462. package/dist/sdk/models/shared/billpaymentline.d.ts +33 -0
  463. package/dist/sdk/models/shared/billpaymentline.js +57 -0
  464. package/dist/sdk/models/shared/billpaymentlinelink.d.ts +51 -0
  465. package/dist/sdk/models/shared/billpaymentlinelink.js +61 -0
  466. package/dist/sdk/models/shared/billpaymentlinelinktype.d.ts +15 -0
  467. package/dist/sdk/models/shared/billpaymentlinelinktype.js +22 -0
  468. package/dist/sdk/models/shared/billstatus.d.ts +11 -0
  469. package/dist/sdk/models/shared/billstatus.js +18 -0
  470. package/dist/sdk/models/shared/cashflowstatement.d.ts +54 -0
  471. package/dist/sdk/models/shared/cashflowstatement.js +63 -0
  472. package/dist/sdk/models/shared/commerceaddress.d.ts +32 -0
  473. package/dist/sdk/models/shared/commerceaddress.js +76 -0
  474. package/dist/sdk/models/shared/commerceaddresstype.d.ts +10 -0
  475. package/dist/sdk/models/shared/commerceaddresstype.js +17 -0
  476. package/dist/sdk/models/shared/commercecompanyinfo.d.ts +90 -0
  477. package/dist/sdk/models/shared/commercecompanyinfo.js +122 -0
  478. package/dist/sdk/models/shared/commercecustomer.d.ts +62 -0
  479. package/dist/sdk/models/shared/commercecustomer.js +99 -0
  480. package/dist/sdk/models/shared/commercecustomerref.d.ts +14 -0
  481. package/dist/sdk/models/shared/commercecustomerref.js +53 -0
  482. package/dist/sdk/models/shared/commercecustomers.d.ts +13 -0
  483. package/dist/sdk/models/shared/commercecustomers.js +72 -0
  484. package/dist/sdk/models/shared/commercedispute.d.ts +99 -0
  485. package/dist/sdk/models/shared/commercedispute.js +105 -0
  486. package/dist/sdk/models/shared/commercedisputes.d.ts +13 -0
  487. package/dist/sdk/models/shared/commercedisputes.js +72 -0
  488. package/dist/sdk/models/shared/commercelocation.d.ts +24 -0
  489. package/dist/sdk/models/shared/commercelocation.js +76 -0
  490. package/dist/sdk/models/shared/commercelocations.d.ts +13 -0
  491. package/dist/sdk/models/shared/commercelocations.js +72 -0
  492. package/dist/sdk/models/shared/commerceorder.d.ts +134 -0
  493. package/dist/sdk/models/shared/commerceorder.js +174 -0
  494. package/dist/sdk/models/shared/commerceorders.d.ts +13 -0
  495. package/dist/sdk/models/shared/commerceorders.js +72 -0
  496. package/dist/sdk/models/shared/commercepayment.d.ts +94 -0
  497. package/dist/sdk/models/shared/commercepayment.js +102 -0
  498. package/dist/sdk/models/shared/commercepaymentmethod.d.ts +25 -0
  499. package/dist/sdk/models/shared/commercepaymentmethod.js +73 -0
  500. package/dist/sdk/models/shared/commercepaymentmethods.d.ts +13 -0
  501. package/dist/sdk/models/shared/commercepaymentmethods.js +72 -0
  502. package/dist/sdk/models/shared/commercepayments.d.ts +13 -0
  503. package/dist/sdk/models/shared/commercepayments.js +72 -0
  504. package/dist/sdk/models/shared/commerceproduct.d.ts +37 -0
  505. package/dist/sdk/models/shared/commerceproduct.js +80 -0
  506. package/dist/sdk/models/shared/commerceproductcategories.d.ts +13 -0
  507. package/dist/sdk/models/shared/commerceproductcategories.js +72 -0
  508. package/dist/sdk/models/shared/commerceproductcategory.d.ts +29 -0
  509. package/dist/sdk/models/shared/commerceproductcategory.js +79 -0
  510. package/dist/sdk/models/shared/commerceproducts.d.ts +13 -0
  511. package/dist/sdk/models/shared/commerceproducts.js +72 -0
  512. package/dist/sdk/models/shared/commercerecordref.d.ts +11 -0
  513. package/dist/sdk/models/shared/commercerecordref.js +50 -0
  514. package/dist/sdk/models/shared/commercereport.d.ts +57 -0
  515. package/dist/sdk/models/shared/commercereport.js +118 -0
  516. package/dist/sdk/models/shared/commercereportcomponent.d.ts +10 -0
  517. package/dist/sdk/models/shared/commercereportcomponent.js +73 -0
  518. package/dist/sdk/models/shared/commercereportdimension.d.ts +10 -0
  519. package/dist/sdk/models/shared/commercereportdimension.js +74 -0
  520. package/dist/sdk/models/shared/commercereporterror.d.ts +6 -0
  521. package/dist/sdk/models/shared/commercereporterror.js +55 -0
  522. package/dist/sdk/models/shared/commercereportmeasure.d.ts +7 -0
  523. package/dist/sdk/models/shared/commercereportmeasure.js +60 -0
  524. package/dist/sdk/models/shared/commercetransaction.d.ts +111 -0
  525. package/dist/sdk/models/shared/commercetransaction.js +107 -0
  526. package/dist/sdk/models/shared/commercetransactions.d.ts +13 -0
  527. package/dist/sdk/models/shared/commercetransactions.js +72 -0
  528. package/dist/sdk/models/shared/companies.d.ts +13 -0
  529. package/dist/sdk/models/shared/companies.js +72 -0
  530. package/dist/sdk/models/shared/company.d.ts +83 -0
  531. package/dist/sdk/models/shared/company.js +96 -0
  532. package/dist/sdk/models/shared/companyrequestbody.d.ts +11 -0
  533. package/dist/sdk/models/shared/companyrequestbody.js +50 -0
  534. package/dist/sdk/models/shared/connection.d.ts +106 -0
  535. package/dist/sdk/models/shared/connection.js +133 -0
  536. package/dist/sdk/models/shared/connections.d.ts +13 -0
  537. package/dist/sdk/models/shared/connections.js +72 -0
  538. package/dist/sdk/models/shared/contact.d.ts +47 -0
  539. package/dist/sdk/models/shared/contact.js +75 -0
  540. package/dist/sdk/models/shared/contactref.d.ts +8 -0
  541. package/dist/sdk/models/shared/contactref.js +53 -0
  542. package/dist/sdk/models/shared/creditnotelineitem.d.ts +74 -0
  543. package/dist/sdk/models/shared/creditnotelineitem.js +120 -0
  544. package/dist/sdk/models/shared/creditnotestatus.d.ts +8 -0
  545. package/dist/sdk/models/shared/creditnotestatus.js +15 -0
  546. package/dist/sdk/models/shared/customerstatus.d.ts +8 -0
  547. package/dist/sdk/models/shared/customerstatus.js +15 -0
  548. package/dist/sdk/models/shared/dataconnectionerror.d.ts +30 -0
  549. package/dist/sdk/models/shared/dataconnectionerror.js +60 -0
  550. package/dist/sdk/models/shared/dataconnectionstatus.d.ts +9 -0
  551. package/dist/sdk/models/shared/dataconnectionstatus.js +16 -0
  552. package/dist/sdk/models/shared/dataintegrityamounts.d.ts +26 -0
  553. package/dist/sdk/models/shared/dataintegrityamounts.js +58 -0
  554. package/dist/sdk/models/shared/dataintegritybyamount.d.ts +31 -0
  555. package/dist/sdk/models/shared/dataintegritybyamount.js +65 -0
  556. package/dist/sdk/models/shared/dataintegritybycount.d.ts +19 -0
  557. package/dist/sdk/models/shared/dataintegritybycount.js +60 -0
  558. package/dist/sdk/models/shared/dataintegrityconnectionid.d.ts +11 -0
  559. package/dist/sdk/models/shared/dataintegrityconnectionid.js +50 -0
  560. package/dist/sdk/models/shared/dataintegritydatatype.d.ts +9 -0
  561. package/dist/sdk/models/shared/dataintegritydatatype.js +16 -0
  562. package/dist/sdk/models/shared/dataintegritydates.d.ts +102 -0
  563. package/dist/sdk/models/shared/dataintegritydates.js +63 -0
  564. package/dist/sdk/models/shared/dataintegritydetail.d.ts +61 -0
  565. package/dist/sdk/models/shared/dataintegritydetail.js +82 -0
  566. package/dist/sdk/models/shared/dataintegritydetails.d.ts +13 -0
  567. package/dist/sdk/models/shared/dataintegritydetails.js +72 -0
  568. package/dist/sdk/models/shared/dataintegritymatch.d.ts +39 -0
  569. package/dist/sdk/models/shared/dataintegritymatch.js +75 -0
  570. package/dist/sdk/models/shared/dataintegritystatus.d.ts +21 -0
  571. package/dist/sdk/models/shared/dataintegritystatus.js +73 -0
  572. package/dist/sdk/models/shared/dataintegritystatuses.d.ts +8 -0
  573. package/dist/sdk/models/shared/dataintegritystatuses.js +50 -0
  574. package/dist/sdk/models/shared/dataintegritystatusinfo.d.ts +36 -0
  575. package/dist/sdk/models/shared/dataintegritystatusinfo.js +56 -0
  576. package/dist/sdk/models/shared/dataintegritysummaries.d.ts +8 -0
  577. package/dist/sdk/models/shared/dataintegritysummaries.js +50 -0
  578. package/dist/sdk/models/shared/dataintegritysummary.d.ts +11 -0
  579. package/dist/sdk/models/shared/dataintegritysummary.js +59 -0
  580. package/dist/sdk/models/shared/datasource.d.ts +8 -0
  581. package/dist/sdk/models/shared/datasource.js +47 -0
  582. package/dist/sdk/models/shared/datastatus.d.ts +34 -0
  583. package/dist/sdk/models/shared/datastatus.js +68 -0
  584. package/dist/sdk/models/shared/datatype.d.ts +47 -0
  585. package/dist/sdk/models/shared/datatype.js +54 -0
  586. package/dist/sdk/models/shared/definitionsitemref.d.ts +15 -0
  587. package/dist/sdk/models/shared/definitionsitemref.js +55 -0
  588. package/dist/sdk/models/shared/directcostlineitem.d.ts +77 -0
  589. package/dist/sdk/models/shared/directcostlineitem.js +115 -0
  590. package/dist/sdk/models/shared/directincomelineitem.d.ts +76 -0
  591. package/dist/sdk/models/shared/directincomelineitem.js +108 -0
  592. package/dist/sdk/models/shared/disputestatus.d.ts +16 -0
  593. package/dist/sdk/models/shared/disputestatus.js +23 -0
  594. package/dist/sdk/models/shared/enhancedcashflowitem.d.ts +8 -0
  595. package/dist/sdk/models/shared/enhancedcashflowitem.js +47 -0
  596. package/dist/sdk/models/shared/enhancedcashflowtransaction.d.ts +56 -0
  597. package/dist/sdk/models/shared/enhancedcashflowtransaction.js +91 -0
  598. package/dist/sdk/models/shared/enhancedcashflowtransactions.d.ts +21 -0
  599. package/dist/sdk/models/shared/enhancedcashflowtransactions.js +70 -0
  600. package/dist/sdk/models/shared/enhancedfinancialreport.d.ts +52 -0
  601. package/dist/sdk/models/shared/enhancedfinancialreport.js +91 -0
  602. package/dist/sdk/models/shared/enhancedinvoicereportitem.d.ts +113 -0
  603. package/dist/sdk/models/shared/enhancedinvoicereportitem.js +110 -0
  604. package/dist/sdk/models/shared/enhancedinvoicesreport.d.ts +13 -0
  605. package/dist/sdk/models/shared/enhancedinvoicesreport.js +57 -0
  606. package/dist/sdk/models/shared/enhancedreportaccountcategory.d.ts +9 -0
  607. package/dist/sdk/models/shared/enhancedreportaccountcategory.js +52 -0
  608. package/dist/sdk/models/shared/enhancedreportinfo.d.ts +47 -0
  609. package/dist/sdk/models/shared/enhancedreportinfo.js +60 -0
  610. package/dist/sdk/models/shared/errormessage.d.ts +12 -0
  611. package/dist/sdk/models/shared/errormessage.js +73 -0
  612. package/dist/sdk/models/shared/excelreporttypes.d.ts +9 -0
  613. package/dist/sdk/models/shared/excelreporttypes.js +16 -0
  614. package/dist/sdk/models/shared/excelstatus.d.ts +59 -0
  615. package/dist/sdk/models/shared/excelstatus.js +84 -0
  616. package/dist/sdk/models/shared/file.d.ts +30 -0
  617. package/dist/sdk/models/shared/file.js +60 -0
  618. package/dist/sdk/models/shared/halref.d.ts +4 -0
  619. package/dist/sdk/models/shared/halref.js +45 -0
  620. package/dist/sdk/models/shared/index.d.ts +235 -0
  621. package/dist/sdk/models/shared/index.js +254 -0
  622. package/dist/sdk/models/shared/integritystatus.d.ts +9 -0
  623. package/dist/sdk/models/shared/integritystatus.js +16 -0
  624. package/dist/sdk/models/shared/invoicelineitem.d.ts +74 -0
  625. package/dist/sdk/models/shared/invoicelineitem.js +120 -0
  626. package/dist/sdk/models/shared/invoicestatus.d.ts +19 -0
  627. package/dist/sdk/models/shared/invoicestatus.js +26 -0
  628. package/dist/sdk/models/shared/itemref.d.ts +14 -0
  629. package/dist/sdk/models/shared/itemref.js +53 -0
  630. package/dist/sdk/models/shared/items.d.ts +12 -0
  631. package/dist/sdk/models/shared/items.js +51 -0
  632. package/dist/sdk/models/shared/journalline.d.ts +31 -0
  633. package/dist/sdk/models/shared/journalline.js +86 -0
  634. package/dist/sdk/models/shared/journalref.d.ts +14 -0
  635. package/dist/sdk/models/shared/journalref.js +53 -0
  636. package/dist/sdk/models/shared/journalstatus.d.ts +8 -0
  637. package/dist/sdk/models/shared/journalstatus.js +15 -0
  638. package/dist/sdk/models/shared/lendingcustomerref.d.ts +11 -0
  639. package/dist/sdk/models/shared/lendingcustomerref.js +50 -0
  640. package/dist/sdk/models/shared/links.d.ts +8 -0
  641. package/dist/sdk/models/shared/links.js +65 -0
  642. package/dist/sdk/models/shared/loanref.d.ts +15 -0
  643. package/dist/sdk/models/shared/loanref.js +55 -0
  644. package/dist/sdk/models/shared/loansummary.d.ts +13 -0
  645. package/dist/sdk/models/shared/loansummary.js +57 -0
  646. package/dist/sdk/models/shared/loansummaryintegrationtype.d.ts +8 -0
  647. package/dist/sdk/models/shared/loansummaryintegrationtype.js +15 -0
  648. package/dist/sdk/models/shared/loansummaryrecordref.d.ts +21 -0
  649. package/dist/sdk/models/shared/loansummaryrecordref.js +62 -0
  650. package/dist/sdk/models/shared/loansummaryrecordreftype.d.ts +8 -0
  651. package/dist/sdk/models/shared/loansummaryrecordreftype.js +15 -0
  652. package/dist/sdk/models/shared/loansummaryreportinfo.d.ts +35 -0
  653. package/dist/sdk/models/shared/loansummaryreportinfo.js +55 -0
  654. package/dist/sdk/models/shared/loansummaryreportitem.d.ts +45 -0
  655. package/dist/sdk/models/shared/loansummaryreportitem.js +72 -0
  656. package/dist/sdk/models/shared/loantransactions.d.ts +17 -0
  657. package/dist/sdk/models/shared/loantransactions.js +62 -0
  658. package/dist/sdk/models/shared/loantransactionsreportinfo.d.ts +47 -0
  659. package/dist/sdk/models/shared/loantransactionsreportinfo.js +70 -0
  660. package/dist/sdk/models/shared/locationref.d.ts +14 -0
  661. package/dist/sdk/models/shared/locationref.js +53 -0
  662. package/dist/sdk/models/shared/metadata.d.ts +7 -0
  663. package/dist/sdk/models/shared/metadata.js +45 -0
  664. package/dist/sdk/models/shared/orderdiscountallocation.d.ts +11 -0
  665. package/dist/sdk/models/shared/orderdiscountallocation.js +50 -0
  666. package/dist/sdk/models/shared/orderlineitem.d.ts +48 -0
  667. package/dist/sdk/models/shared/orderlineitem.js +98 -0
  668. package/dist/sdk/models/shared/payment.d.ts +77 -0
  669. package/dist/sdk/models/shared/payment.js +77 -0
  670. package/dist/sdk/models/shared/paymentallocationpayment.d.ts +90 -0
  671. package/dist/sdk/models/shared/paymentallocationpayment.js +82 -0
  672. package/dist/sdk/models/shared/paymentline.d.ts +33 -0
  673. package/dist/sdk/models/shared/paymentline.js +57 -0
  674. package/dist/sdk/models/shared/paymentlinelink.d.ts +62 -0
  675. package/dist/sdk/models/shared/paymentlinelink.js +61 -0
  676. package/dist/sdk/models/shared/paymentlinktype.d.ts +27 -0
  677. package/dist/sdk/models/shared/paymentlinktype.js +34 -0
  678. package/dist/sdk/models/shared/paymentmethodstatus.d.ts +8 -0
  679. package/dist/sdk/models/shared/paymentmethodstatus.js +15 -0
  680. package/dist/sdk/models/shared/paymentref.d.ts +87 -0
  681. package/dist/sdk/models/shared/paymentref.js +92 -0
  682. package/dist/sdk/models/shared/paymentstatus.d.ts +11 -0
  683. package/dist/sdk/models/shared/paymentstatus.js +18 -0
  684. package/dist/sdk/models/shared/paymenttype.d.ts +17 -0
  685. package/dist/sdk/models/shared/paymenttype.js +24 -0
  686. package/dist/sdk/models/shared/periodunit.d.ts +9 -0
  687. package/dist/sdk/models/shared/periodunit.js +16 -0
  688. package/dist/sdk/models/shared/phonenumbertype.d.ts +10 -0
  689. package/dist/sdk/models/shared/phonenumbertype.js +17 -0
  690. package/dist/sdk/models/shared/productinventory.d.ts +9 -0
  691. package/dist/sdk/models/shared/productinventory.js +55 -0
  692. package/dist/sdk/models/shared/productinventorylocation.d.ts +9 -0
  693. package/dist/sdk/models/shared/productinventorylocation.js +52 -0
  694. package/dist/sdk/models/shared/productprice.d.ts +16 -0
  695. package/dist/sdk/models/shared/productprice.js +50 -0
  696. package/dist/sdk/models/shared/productref.d.ts +14 -0
  697. package/dist/sdk/models/shared/productref.js +53 -0
  698. package/dist/sdk/models/shared/productvariant.d.ts +79 -0
  699. package/dist/sdk/models/shared/productvariant.js +121 -0
  700. package/dist/sdk/models/shared/productvariantref.d.ts +14 -0
  701. package/dist/sdk/models/shared/productvariantref.js +53 -0
  702. package/dist/sdk/models/shared/productvariantstatus.d.ts +5 -0
  703. package/dist/sdk/models/shared/productvariantstatus.js +12 -0
  704. package/dist/sdk/models/shared/profitandlossreport.d.ts +73 -0
  705. package/dist/sdk/models/shared/profitandlossreport.js +101 -0
  706. package/dist/sdk/models/shared/projectref.d.ts +5 -0
  707. package/dist/sdk/models/shared/projectref.js +50 -0
  708. package/dist/sdk/models/shared/pulloperation.d.ts +66 -0
  709. package/dist/sdk/models/shared/pulloperation.js +117 -0
  710. package/dist/sdk/models/shared/pulloperations.d.ts +13 -0
  711. package/dist/sdk/models/shared/pulloperations.js +72 -0
  712. package/dist/sdk/models/shared/recordref.d.ts +18 -0
  713. package/dist/sdk/models/shared/recordref.js +57 -0
  714. package/dist/sdk/models/shared/reportbasis.d.ts +8 -0
  715. package/dist/sdk/models/shared/reportbasis.js +15 -0
  716. package/dist/sdk/models/shared/reportcomponentmeasure.d.ts +6 -0
  717. package/dist/sdk/models/shared/reportcomponentmeasure.js +55 -0
  718. package/dist/sdk/models/shared/reportinfo.d.ts +30 -0
  719. package/dist/sdk/models/shared/reportinfo.js +73 -0
  720. package/dist/sdk/models/shared/reportinput.d.ts +8 -0
  721. package/dist/sdk/models/shared/reportinput.js +15 -0
  722. package/dist/sdk/models/shared/reportitems.d.ts +42 -0
  723. package/dist/sdk/models/shared/reportitems.js +76 -0
  724. package/dist/sdk/models/shared/reportline.d.ts +19 -0
  725. package/dist/sdk/models/shared/reportline.js +61 -0
  726. package/dist/sdk/models/shared/security.d.ts +4 -0
  727. package/dist/sdk/models/shared/security.js +45 -0
  728. package/dist/sdk/models/shared/servicecharge.d.ts +33 -0
  729. package/dist/sdk/models/shared/servicecharge.js +78 -0
  730. package/dist/sdk/models/shared/servicechargetype.d.ts +9 -0
  731. package/dist/sdk/models/shared/servicechargetype.js +16 -0
  732. package/dist/sdk/models/shared/sourceref.d.ts +10 -0
  733. package/dist/sdk/models/shared/sourceref.js +48 -0
  734. package/dist/sdk/models/shared/supplementaldata.d.ts +11 -0
  735. package/dist/sdk/models/shared/supplementaldata.js +52 -0
  736. package/dist/sdk/models/shared/supplierref.d.ts +14 -0
  737. package/dist/sdk/models/shared/supplierref.js +53 -0
  738. package/dist/sdk/models/shared/supplierstatus.d.ts +8 -0
  739. package/dist/sdk/models/shared/supplierstatus.js +15 -0
  740. package/dist/sdk/models/shared/taxcomponentallocation.d.ts +12 -0
  741. package/dist/sdk/models/shared/taxcomponentallocation.js +52 -0
  742. package/dist/sdk/models/shared/taxcomponentref.d.ts +14 -0
  743. package/dist/sdk/models/shared/taxcomponentref.js +53 -0
  744. package/dist/sdk/models/shared/taxrateref.d.ts +29 -0
  745. package/dist/sdk/models/shared/taxrateref.js +69 -0
  746. package/dist/sdk/models/shared/tracking.d.ts +13 -0
  747. package/dist/sdk/models/shared/tracking.js +53 -0
  748. package/dist/sdk/models/shared/trackingcategoryref.d.ts +10 -0
  749. package/dist/sdk/models/shared/trackingcategoryref.js +55 -0
  750. package/dist/sdk/models/shared/transactioncategory.d.ts +11 -0
  751. package/dist/sdk/models/shared/transactioncategory.js +50 -0
  752. package/dist/sdk/models/shared/transactioncategoryref.d.ts +14 -0
  753. package/dist/sdk/models/shared/transactioncategoryref.js +53 -0
  754. package/dist/sdk/models/shared/transactioncategorystatus.d.ts +5 -0
  755. package/dist/sdk/models/shared/transactioncategorystatus.js +12 -0
  756. package/dist/sdk/models/shared/transactioncode.d.ts +20 -0
  757. package/dist/sdk/models/shared/transactioncode.js +27 -0
  758. package/dist/sdk/models/shared/transactionsourceref.d.ts +9 -0
  759. package/dist/sdk/models/shared/transactionsourceref.js +51 -0
  760. package/dist/sdk/models/shared/transactionsourcetype.d.ts +7 -0
  761. package/dist/sdk/models/shared/transactionsourcetype.js +14 -0
  762. package/dist/sdk/models/shared/transactiontype.d.ts +23 -0
  763. package/dist/sdk/models/shared/transactiontype.js +30 -0
  764. package/dist/sdk/models/shared/transferaccount.d.ts +24 -0
  765. package/dist/sdk/models/shared/transferaccount.js +57 -0
  766. package/dist/sdk/models/shared/weblinksitems.d.ts +22 -0
  767. package/dist/sdk/models/shared/weblinksitems.js +62 -0
  768. package/dist/sdk/models/shared/withholdingtaxitems.d.ts +5 -0
  769. package/dist/sdk/models/shared/withholdingtaxitems.js +50 -0
  770. package/dist/sdk/sales.d.ts +377 -0
  771. package/dist/sdk/sales.js +1780 -0
  772. package/dist/sdk/sdk.d.ts +128 -0
  773. package/dist/sdk/sdk.js +122 -0
  774. package/dist/sdk/transactions.d.ts +181 -0
  775. package/dist/sdk/transactions.js +1012 -0
  776. package/dist/sdk/types/index.d.ts +1 -0
  777. package/dist/sdk/types/index.js +20 -0
  778. package/dist/sdk/types/rfcdate.d.ts +9 -0
  779. package/dist/sdk/types/rfcdate.js +59 -0
  780. package/docs/models/operations/createcompanyresponse.md +12 -0
  781. package/docs/models/operations/createconnectionrequest.md +9 -0
  782. package/docs/models/operations/createconnectionrequestbody.md +8 -0
  783. package/docs/models/operations/createconnectionresponse.md +12 -0
  784. package/docs/models/operations/deletecompanyrequest.md +8 -0
  785. package/docs/models/operations/deletecompanyresponse.md +11 -0
  786. package/docs/models/operations/deleteconnectionrequest.md +9 -0
  787. package/docs/models/operations/deleteconnectionresponse.md +11 -0
  788. package/docs/models/operations/downloadaccountingbillattachmentrequest.md +11 -0
  789. package/docs/models/operations/downloadaccountingbillattachmentresponse.md +12 -0
  790. package/docs/models/operations/downloadaccountingcustomerattachmentrequest.md +11 -0
  791. package/docs/models/operations/downloadaccountingcustomerattachmentresponse.md +12 -0
  792. package/docs/models/operations/downloadaccountingdirectcostattachmentrequest.md +11 -0
  793. package/docs/models/operations/downloadaccountingdirectcostattachmentresponse.md +12 -0
  794. package/docs/models/operations/downloadaccountingdirectincomeattachmentrequest.md +11 -0
  795. package/docs/models/operations/downloadaccountingdirectincomeattachmentresponse.md +12 -0
  796. package/docs/models/operations/downloadaccountinginvoiceattachmentrequest.md +11 -0
  797. package/docs/models/operations/downloadaccountinginvoiceattachmentresponse.md +12 -0
  798. package/docs/models/operations/downloadaccountinginvoicepdfrequest.md +9 -0
  799. package/docs/models/operations/downloadaccountinginvoicepdfresponse.md +11 -0
  800. package/docs/models/operations/downloadaccountingsupplierattachmentrequest.md +11 -0
  801. package/docs/models/operations/downloadaccountingsupplierattachmentresponse.md +12 -0
  802. package/docs/models/operations/downloadexcelreportrequest.md +9 -0
  803. package/docs/models/operations/downloadexcelreportresponse.md +12 -0
  804. package/docs/models/operations/downloadfilesrequest.md +9 -0
  805. package/docs/models/operations/downloadfilesresponse.md +12 -0
  806. package/docs/models/operations/generateexcelreportrequest.md +9 -0
  807. package/docs/models/operations/generateexcelreportresponse.md +12 -0
  808. package/docs/models/operations/getaccountingaccountrequest.md +9 -0
  809. package/docs/models/operations/getaccountingaccountresponse.md +12 -0
  810. package/docs/models/operations/getaccountingaccounttransactionrequest.md +10 -0
  811. package/docs/models/operations/getaccountingaccounttransactionresponse.md +12 -0
  812. package/docs/models/operations/getaccountingagedcreditorsreportrequest.md +11 -0
  813. package/docs/models/operations/getaccountingagedcreditorsreportresponse.md +12 -0
  814. package/docs/models/operations/getaccountingageddebtorsreportrequest.md +11 -0
  815. package/docs/models/operations/getaccountingageddebtorsreportresponse.md +12 -0
  816. package/docs/models/operations/getaccountingbalancesheetrequest.md +11 -0
  817. package/docs/models/operations/getaccountingbalancesheetresponse.md +12 -0
  818. package/docs/models/operations/getaccountingbankaccountrequest.md +10 -0
  819. package/docs/models/operations/getaccountingbankaccountresponse.md +12 -0
  820. package/docs/models/operations/getaccountingbillattachmentrequest.md +11 -0
  821. package/docs/models/operations/getaccountingbillattachmentresponse.md +12 -0
  822. package/docs/models/operations/getaccountingbillcreditnoterequest.md +9 -0
  823. package/docs/models/operations/getaccountingbillcreditnoteresponse.md +12 -0
  824. package/docs/models/operations/getaccountingbillpaymentrequest.md +9 -0
  825. package/docs/models/operations/getaccountingbillpaymentresponse.md +12 -0
  826. package/docs/models/operations/getaccountingbillrequest.md +9 -0
  827. package/docs/models/operations/getaccountingbillresponse.md +12 -0
  828. package/docs/models/operations/getaccountingcashflowstatementrequest.md +11 -0
  829. package/docs/models/operations/getaccountingcashflowstatementresponse.md +12 -0
  830. package/docs/models/operations/getaccountingcompanyinforequest.md +8 -0
  831. package/docs/models/operations/getaccountingcompanyinforesponse.md +12 -0
  832. package/docs/models/operations/getaccountingcreditnoterequest.md +9 -0
  833. package/docs/models/operations/getaccountingcreditnoteresponse.md +12 -0
  834. package/docs/models/operations/getaccountingcustomerattachmentrequest.md +11 -0
  835. package/docs/models/operations/getaccountingcustomerattachmentresponse.md +12 -0
  836. package/docs/models/operations/getaccountingcustomerrequest.md +9 -0
  837. package/docs/models/operations/getaccountingcustomerresponse.md +12 -0
  838. package/docs/models/operations/getaccountingdirectcostattachmentrequest.md +11 -0
  839. package/docs/models/operations/getaccountingdirectcostattachmentresponse.md +12 -0
  840. package/docs/models/operations/getaccountingdirectcostrequest.md +10 -0
  841. package/docs/models/operations/getaccountingdirectcostresponse.md +12 -0
  842. package/docs/models/operations/getaccountingdirectincomeattachmentrequest.md +12 -0
  843. package/docs/models/operations/getaccountingdirectincomeattachmentresponse.md +12 -0
  844. package/docs/models/operations/getaccountingdirectincomerequest.md +10 -0
  845. package/docs/models/operations/getaccountingdirectincomeresponse.md +12 -0
  846. package/docs/models/operations/getaccountinginvoiceattachmentrequest.md +11 -0
  847. package/docs/models/operations/getaccountinginvoiceattachmentresponse.md +12 -0
  848. package/docs/models/operations/getaccountinginvoicerequest.md +9 -0
  849. package/docs/models/operations/getaccountinginvoiceresponse.md +12 -0
  850. package/docs/models/operations/getaccountingjournalentryrequest.md +9 -0
  851. package/docs/models/operations/getaccountingjournalentryresponse.md +12 -0
  852. package/docs/models/operations/getaccountingjournalrequest.md +9 -0
  853. package/docs/models/operations/getaccountingjournalresponse.md +12 -0
  854. package/docs/models/operations/getaccountingpaymentrequest.md +9 -0
  855. package/docs/models/operations/getaccountingpaymentresponse.md +12 -0
  856. package/docs/models/operations/getaccountingprofitandlossrequest.md +11 -0
  857. package/docs/models/operations/getaccountingprofitandlossresponse.md +12 -0
  858. package/docs/models/operations/getaccountingsupplierattachmentrequest.md +11 -0
  859. package/docs/models/operations/getaccountingsupplierattachmentresponse.md +12 -0
  860. package/docs/models/operations/getaccountingsupplierrequest.md +9 -0
  861. package/docs/models/operations/getaccountingsupplierresponse.md +12 -0
  862. package/docs/models/operations/getaccountingtransferrequest.md +10 -0
  863. package/docs/models/operations/getaccountingtransferresponse.md +12 -0
  864. package/docs/models/operations/getbankingaccountrequest.md +10 -0
  865. package/docs/models/operations/getbankingaccountresponse.md +11 -0
  866. package/docs/models/operations/getbankingtransactioncategoryrequest.md +10 -0
  867. package/docs/models/operations/getbankingtransactioncategoryresponse.md +11 -0
  868. package/docs/models/operations/getbankingtransactionrequest.md +10 -0
  869. package/docs/models/operations/getbankingtransactionresponse.md +11 -0
  870. package/docs/models/operations/getcommercecompanyinforequest.md +9 -0
  871. package/docs/models/operations/getcommercecompanyinforesponse.md +12 -0
  872. package/docs/models/operations/getcommercecustomerrequest.md +10 -0
  873. package/docs/models/operations/getcommercecustomerresponse.md +12 -0
  874. package/docs/models/operations/getcommercecustomerretentionmetricsrequest.md +14 -0
  875. package/docs/models/operations/getcommercecustomerretentionmetricsresponse.md +12 -0
  876. package/docs/models/operations/getcommercedisputerequest.md +10 -0
  877. package/docs/models/operations/getcommercedisputeresponse.md +12 -0
  878. package/docs/models/operations/getcommercelifetimevaluemetricsrequest.md +14 -0
  879. package/docs/models/operations/getcommercelifetimevaluemetricsresponse.md +12 -0
  880. package/docs/models/operations/getcommercelocationrequest.md +10 -0
  881. package/docs/models/operations/getcommercelocationresponse.md +12 -0
  882. package/docs/models/operations/getcommerceorderrequest.md +10 -0
  883. package/docs/models/operations/getcommerceorderresponse.md +12 -0
  884. package/docs/models/operations/getcommerceordersreportrequest.md +14 -0
  885. package/docs/models/operations/getcommerceordersreportresponse.md +12 -0
  886. package/docs/models/operations/getcommercepaymentmethodrequest.md +10 -0
  887. package/docs/models/operations/getcommercepaymentmethodresponse.md +12 -0
  888. package/docs/models/operations/getcommercepaymentrequest.md +10 -0
  889. package/docs/models/operations/getcommercepaymentresponse.md +12 -0
  890. package/docs/models/operations/getcommerceproductcategoryrequest.md +10 -0
  891. package/docs/models/operations/getcommerceproductcategoryresponse.md +12 -0
  892. package/docs/models/operations/getcommerceproductrequest.md +10 -0
  893. package/docs/models/operations/getcommerceproductresponse.md +12 -0
  894. package/docs/models/operations/getcommercerefundsmetricsrequest.md +14 -0
  895. package/docs/models/operations/getcommercerefundsmetricsresponse.md +12 -0
  896. package/docs/models/operations/getcommercerevenuemetricsrequest.md +14 -0
  897. package/docs/models/operations/getcommercerevenuemetricsresponse.md +12 -0
  898. package/docs/models/operations/getcommercetransactionrequest.md +10 -0
  899. package/docs/models/operations/getcommercetransactionresponse.md +12 -0
  900. package/docs/models/operations/getcompanyrequest.md +8 -0
  901. package/docs/models/operations/getcompanyresponse.md +12 -0
  902. package/docs/models/operations/getconnectionrequest.md +9 -0
  903. package/docs/models/operations/getconnectionresponse.md +12 -0
  904. package/docs/models/operations/getdataintegritystatusrequest.md +9 -0
  905. package/docs/models/operations/getdataintegritystatusresponse.md +12 -0
  906. package/docs/models/operations/getdataintegritysummariesrequest.md +10 -0
  907. package/docs/models/operations/getdataintegritysummariesresponse.md +12 -0
  908. package/docs/models/operations/getdatastatusrequest.md +8 -0
  909. package/docs/models/operations/getdatastatusresponse.md +12 -0
  910. package/docs/models/operations/getenhancedbalancesheetaccountsrequest.md +10 -0
  911. package/docs/models/operations/getenhancedbalancesheetaccountsresponse.md +12 -0
  912. package/docs/models/operations/getenhancedcashflowtransactionsrequest.md +11 -0
  913. package/docs/models/operations/getenhancedcashflowtransactionsresponse.md +12 -0
  914. package/docs/models/operations/getenhancedinvoicesreportrequest.md +11 -0
  915. package/docs/models/operations/getenhancedinvoicesreportresponse.md +12 -0
  916. package/docs/models/operations/getenhancedprofitandlossaccountsrequest.md +10 -0
  917. package/docs/models/operations/getenhancedprofitandlossaccountsresponse.md +12 -0
  918. package/docs/models/operations/getexcelreportgenerationstatusrequest.md +9 -0
  919. package/docs/models/operations/getexcelreportgenerationstatusresponse.md +12 -0
  920. package/docs/models/operations/getloansummaryrequest.md +8 -0
  921. package/docs/models/operations/getloansummaryresponse.md +12 -0
  922. package/docs/models/operations/getpulloperationrequest.md +9 -0
  923. package/docs/models/operations/getpulloperationresponse.md +12 -0
  924. package/docs/models/operations/isagedcreditorsreportavailablerequest.md +8 -0
  925. package/docs/models/operations/isagedcreditorsreportavailableresponse.md +11 -0
  926. package/docs/models/operations/isageddebtorreportavailablerequest.md +8 -0
  927. package/docs/models/operations/isageddebtorreportavailableresponse.md +11 -0
  928. package/docs/models/operations/listaccountingaccountsrequest.md +12 -0
  929. package/docs/models/operations/listaccountingaccountsresponse.md +12 -0
  930. package/docs/models/operations/listaccountingaccounttransactionsrequest.md +13 -0
  931. package/docs/models/operations/listaccountingaccounttransactionsresponse.md +12 -0
  932. package/docs/models/operations/listaccountingbankaccountsrequest.md +13 -0
  933. package/docs/models/operations/listaccountingbankaccountsresponse.md +12 -0
  934. package/docs/models/operations/listaccountingbankaccounttransactionsrequest.md +14 -0
  935. package/docs/models/operations/listaccountingbankaccounttransactionsresponse.md +12 -0
  936. package/docs/models/operations/listaccountingbillattachmentsrequest.md +10 -0
  937. package/docs/models/operations/listaccountingbillattachmentsresponse.md +12 -0
  938. package/docs/models/operations/listaccountingbillcreditnotesrequest.md +12 -0
  939. package/docs/models/operations/listaccountingbillcreditnotesresponse.md +12 -0
  940. package/docs/models/operations/listaccountingbillpaymentsrequest.md +12 -0
  941. package/docs/models/operations/listaccountingbillpaymentsresponse.md +12 -0
  942. package/docs/models/operations/listaccountingbillsrequest.md +12 -0
  943. package/docs/models/operations/listaccountingbillsresponse.md +12 -0
  944. package/docs/models/operations/listaccountingcreditnotesrequest.md +12 -0
  945. package/docs/models/operations/listaccountingcreditnotesresponse.md +12 -0
  946. package/docs/models/operations/listaccountingcustomerattachmentsrequest.md +10 -0
  947. package/docs/models/operations/listaccountingcustomerattachmentsresponse.md +12 -0
  948. package/docs/models/operations/listaccountingcustomersrequest.md +12 -0
  949. package/docs/models/operations/listaccountingcustomersresponse.md +12 -0
  950. package/docs/models/operations/listaccountingdirectcostattachmentsrequest.md +10 -0
  951. package/docs/models/operations/listaccountingdirectcostattachmentsresponse.md +12 -0
  952. package/docs/models/operations/listaccountingdirectcostsrequest.md +13 -0
  953. package/docs/models/operations/listaccountingdirectcostsresponse.md +12 -0
  954. package/docs/models/operations/listaccountingdirectincomeattachmentsrequest.md +10 -0
  955. package/docs/models/operations/listaccountingdirectincomeattachmentsresponse.md +12 -0
  956. package/docs/models/operations/listaccountingdirectincomesrequest.md +13 -0
  957. package/docs/models/operations/listaccountingdirectincomesresponse.md +12 -0
  958. package/docs/models/operations/listaccountinginvoiceattachmentsrequest.md +10 -0
  959. package/docs/models/operations/listaccountinginvoiceattachmentsresponse.md +12 -0
  960. package/docs/models/operations/listaccountinginvoicesrequest.md +12 -0
  961. package/docs/models/operations/listaccountinginvoicesresponse.md +12 -0
  962. package/docs/models/operations/listaccountingjournalentriesrequest.md +12 -0
  963. package/docs/models/operations/listaccountingjournalentriesresponse.md +12 -0
  964. package/docs/models/operations/listaccountingjournalsrequest.md +12 -0
  965. package/docs/models/operations/listaccountingjournalsresponse.md +12 -0
  966. package/docs/models/operations/listaccountingpaymentsrequest.md +12 -0
  967. package/docs/models/operations/listaccountingpaymentsresponse.md +12 -0
  968. package/docs/models/operations/listaccountingsupplierattachmentsrequest.md +10 -0
  969. package/docs/models/operations/listaccountingsupplierattachmentsresponse.md +12 -0
  970. package/docs/models/operations/listaccountingsuppliersrequest.md +12 -0
  971. package/docs/models/operations/listaccountingsuppliersresponse.md +12 -0
  972. package/docs/models/operations/listaccountingtransfersrequest.md +13 -0
  973. package/docs/models/operations/listaccountingtransfersresponse.md +12 -0
  974. package/docs/models/operations/listbankingaccountbalancesrequest.md +13 -0
  975. package/docs/models/operations/listbankingaccountbalancesresponse.md +12 -0
  976. package/docs/models/operations/listbankingaccountsrequest.md +13 -0
  977. package/docs/models/operations/listbankingaccountsresponse.md +12 -0
  978. package/docs/models/operations/listbankingtransactioncategoriesrequest.md +13 -0
  979. package/docs/models/operations/listbankingtransactioncategoriesresponse.md +12 -0
  980. package/docs/models/operations/listbankingtransactionsrequest.md +13 -0
  981. package/docs/models/operations/listbankingtransactionsresponse.md +12 -0
  982. package/docs/models/operations/listcommercecustomersrequest.md +13 -0
  983. package/docs/models/operations/listcommercecustomersresponse.md +12 -0
  984. package/docs/models/operations/listcommercedisputesrequest.md +13 -0
  985. package/docs/models/operations/listcommercedisputesresponse.md +12 -0
  986. package/docs/models/operations/listcommercelocationsrequest.md +9 -0
  987. package/docs/models/operations/listcommercelocationsresponse.md +12 -0
  988. package/docs/models/operations/listcommerceordersrequest.md +13 -0
  989. package/docs/models/operations/listcommerceordersresponse.md +12 -0
  990. package/docs/models/operations/listcommercepaymentmethodsrequest.md +13 -0
  991. package/docs/models/operations/listcommercepaymentmethodsresponse.md +12 -0
  992. package/docs/models/operations/listcommercepaymentsrequest.md +13 -0
  993. package/docs/models/operations/listcommercepaymentsresponse.md +12 -0
  994. package/docs/models/operations/listcommerceproductcategoriesrequest.md +13 -0
  995. package/docs/models/operations/listcommerceproductcategoriesresponse.md +12 -0
  996. package/docs/models/operations/listcommerceproductsrequest.md +13 -0
  997. package/docs/models/operations/listcommerceproductsresponse.md +12 -0
  998. package/docs/models/operations/listcommercetransactionsrequest.md +13 -0
  999. package/docs/models/operations/listcommercetransactionsresponse.md +12 -0
  1000. package/docs/models/operations/listcompaniesrequest.md +11 -0
  1001. package/docs/models/operations/listcompaniesresponse.md +12 -0
  1002. package/docs/models/operations/listconnectionsrequest.md +12 -0
  1003. package/docs/models/operations/listconnectionsresponse.md +12 -0
  1004. package/docs/models/operations/listdataintegritydetailsrequest.md +13 -0
  1005. package/docs/models/operations/listdataintegritydetailsresponse.md +12 -0
  1006. package/docs/models/operations/listfilesrequest.md +8 -0
  1007. package/docs/models/operations/listfilesresponse.md +12 -0
  1008. package/docs/models/operations/listloantransactionsrequest.md +9 -0
  1009. package/docs/models/operations/listloantransactionsresponse.md +12 -0
  1010. package/docs/models/operations/listloantransactionssourcetype.md +12 -0
  1011. package/docs/models/operations/listpulloperationsrequest.md +12 -0
  1012. package/docs/models/operations/listpulloperationsresponse.md +12 -0
  1013. package/docs/models/operations/refreshalldatatypesrequest.md +8 -0
  1014. package/docs/models/operations/refreshalldatatypesresponse.md +11 -0
  1015. package/docs/models/operations/refreshdatatyperequest.md +10 -0
  1016. package/docs/models/operations/refreshdatatyperesponse.md +12 -0
  1017. package/docs/models/operations/unlinkconnectionrequest.md +10 -0
  1018. package/docs/models/operations/unlinkconnectionrequestbody.md +8 -0
  1019. package/docs/models/operations/unlinkconnectionresponse.md +12 -0
  1020. package/docs/models/operations/updatecompanyrequest.md +9 -0
  1021. package/docs/models/operations/updatecompanyresponse.md +12 -0
  1022. package/docs/models/operations/uploadfilesrequest.md +10 -0
  1023. package/docs/models/operations/uploadfilesrequestbody.md +9 -0
  1024. package/docs/models/operations/uploadfilesresponse.md +11 -0
  1025. package/docs/models/shared/accountbalance.md +11 -0
  1026. package/docs/models/shared/accountbalanceamounts.md +12 -0
  1027. package/docs/models/shared/accountcategorylevel.md +11 -0
  1028. package/docs/models/shared/accountidentifiers.md +16 -0
  1029. package/docs/models/shared/accountidentifiertype.md +16 -0
  1030. package/docs/models/shared/accountingaccount.md +51 -0
  1031. package/docs/models/shared/accountingaccounts.md +14 -0
  1032. package/docs/models/shared/accountingaccounttransaction.md +38 -0
  1033. package/docs/models/shared/accountingaccounttransactions.md +14 -0
  1034. package/docs/models/shared/accountingaccounttransactionstatus.md +13 -0
  1035. package/docs/models/shared/accountingaccountvaliddatatypelinks.md +50 -0
  1036. package/docs/models/shared/accountingaddress.md +14 -0
  1037. package/docs/models/shared/accountingaddresstype.md +12 -0
  1038. package/docs/models/shared/accountingagedcreditorreport.md +43 -0
  1039. package/docs/models/shared/accountingageddebtorreport.md +43 -0
  1040. package/docs/models/shared/accountingattachment.md +34 -0
  1041. package/docs/models/shared/accountingbalancesheet.md +30 -0
  1042. package/docs/models/shared/accountingbankaccount.md +39 -0
  1043. package/docs/models/shared/accountingbankaccounts.md +14 -0
  1044. package/docs/models/shared/accountingbankaccounttype.md +14 -0
  1045. package/docs/models/shared/accountingbanktransaction.md +34 -0
  1046. package/docs/models/shared/accountingbanktransactions.md +14 -0
  1047. package/docs/models/shared/accountingbill.md +48 -0
  1048. package/docs/models/shared/accountingbillcreditnote.md +46 -0
  1049. package/docs/models/shared/accountingbillcreditnotes.md +14 -0
  1050. package/docs/models/shared/accountingbillpayment.md +174 -0
  1051. package/docs/models/shared/accountingbillpayments.md +14 -0
  1052. package/docs/models/shared/accountingbillpurchaseorderreference.md +9 -0
  1053. package/docs/models/shared/accountingbills.md +14 -0
  1054. package/docs/models/shared/accountingbillwithholdingtax.md +9 -0
  1055. package/docs/models/shared/accountingcashflowstatement.md +27 -0
  1056. package/docs/models/shared/accountingcompanyinfo.md +28 -0
  1057. package/docs/models/shared/accountingcompanyinfophone.md +9 -0
  1058. package/docs/models/shared/accountingcompanyinfoweblink.md +11 -0
  1059. package/docs/models/shared/accountingcompanyinfoweblinktype.md +12 -0
  1060. package/docs/models/shared/accountingcreditnote.md +44 -0
  1061. package/docs/models/shared/accountingcreditnotes.md +14 -0
  1062. package/docs/models/shared/accountingcustomer.md +31 -0
  1063. package/docs/models/shared/accountingcustomerref.md +9 -0
  1064. package/docs/models/shared/accountingcustomers.md +14 -0
  1065. package/docs/models/shared/accountingdirectcost.md +39 -0
  1066. package/docs/models/shared/accountingdirectcosts.md +14 -0
  1067. package/docs/models/shared/accountingdirectincome.md +40 -0
  1068. package/docs/models/shared/accountingdirectincomes.md +14 -0
  1069. package/docs/models/shared/accountinginvoice.md +63 -0
  1070. package/docs/models/shared/accountinginvoices.md +14 -0
  1071. package/docs/models/shared/accountinginvoicesalesorderreference.md +9 -0
  1072. package/docs/models/shared/accountingjournal.md +42 -0
  1073. package/docs/models/shared/accountingjournalentries.md +14 -0
  1074. package/docs/models/shared/accountingjournalentry.md +42 -0
  1075. package/docs/models/shared/accountingjournals.md +14 -0
  1076. package/docs/models/shared/accountingpayment.md +701 -0
  1077. package/docs/models/shared/accountingpaymentallocation.md +9 -0
  1078. package/docs/models/shared/accountingpaymentallocationallocation.md +11 -0
  1079. package/docs/models/shared/accountingpayments.md +14 -0
  1080. package/docs/models/shared/accountingprofitandlossreport.md +35 -0
  1081. package/docs/models/shared/accountingsupplier.md +27 -0
  1082. package/docs/models/shared/accountingsuppliers.md +14 -0
  1083. package/docs/models/shared/accountingtransfer.md +23 -0
  1084. package/docs/models/shared/accountingtransfercontactref.md +11 -0
  1085. package/docs/models/shared/accountingtransfers.md +14 -0
  1086. package/docs/models/shared/accountinstitution.md +11 -0
  1087. package/docs/models/shared/accountref.md +11 -0
  1088. package/docs/models/shared/accounts.md +14 -0
  1089. package/docs/models/shared/accountspayabletracking.md +14 -0
  1090. package/docs/models/shared/accountsreceivabletracking.md +15 -0
  1091. package/docs/models/shared/accountsreceivabletrackingrecordreference.md +13 -0
  1092. package/docs/models/shared/accountstatus.md +13 -0
  1093. package/docs/models/shared/accounttransactionline.md +10 -0
  1094. package/docs/models/shared/accounttype.md +15 -0
  1095. package/docs/models/shared/agedcreditor.md +10 -0
  1096. package/docs/models/shared/agedcurrencyoutstanding.md +9 -0
  1097. package/docs/models/shared/ageddebtor.md +10 -0
  1098. package/docs/models/shared/agedoutstandingamount.md +11 -0
  1099. package/docs/models/shared/agedoutstandingamountdetail.md +9 -0
  1100. package/docs/models/shared/attachments.md +10 -0
  1101. package/docs/models/shared/balancesheet.md +12 -0
  1102. package/docs/models/shared/bankaccountref.md +11 -0
  1103. package/docs/models/shared/bankingaccount.md +24 -0
  1104. package/docs/models/shared/bankingaccountbalance.md +22 -0
  1105. package/docs/models/shared/bankingaccountbalances.md +14 -0
  1106. package/docs/models/shared/bankingaccounts.md +14 -0
  1107. package/docs/models/shared/bankingtransaction.md +25 -0
  1108. package/docs/models/shared/bankingtransactioncategories.md +14 -0
  1109. package/docs/models/shared/bankingtransactioncategory.md +16 -0
  1110. package/docs/models/shared/bankingtransactionref.md +14 -0
  1111. package/docs/models/shared/bankingtransactions.md +14 -0
  1112. package/docs/models/shared/banktransactiontype.md +27 -0
  1113. package/docs/models/shared/billcreditnotelineitem.md +20 -0
  1114. package/docs/models/shared/billcreditnotelineitemitemreference.md +11 -0
  1115. package/docs/models/shared/billcreditnotelineitemtaxratereference.md +21 -0
  1116. package/docs/models/shared/billcreditnotestatus.md +15 -0
  1117. package/docs/models/shared/billedtotype.md +11 -0
  1118. package/docs/models/shared/billedtotype1.md +10 -0
  1119. package/docs/models/shared/billlineitem.md +21 -0
  1120. package/docs/models/shared/billpaymentline.md +10 -0
  1121. package/docs/models/shared/billpaymentlinelink.md +11 -0
  1122. package/docs/models/shared/billpaymentlinelinktype.md +19 -0
  1123. package/docs/models/shared/billstatus.md +15 -0
  1124. package/docs/models/shared/cashflowstatement.md +11 -0
  1125. package/docs/models/shared/commerceaddress.md +14 -0
  1126. package/docs/models/shared/commerceaddresstype.md +14 -0
  1127. package/docs/models/shared/commercecompanyinfo.md +26 -0
  1128. package/docs/models/shared/commercecustomer.md +21 -0
  1129. package/docs/models/shared/commercecustomerref.md +11 -0
  1130. package/docs/models/shared/commercecustomers.md +14 -0
  1131. package/docs/models/shared/commercedispute.md +26 -0
  1132. package/docs/models/shared/commercedisputes.md +14 -0
  1133. package/docs/models/shared/commercelocation.md +18 -0
  1134. package/docs/models/shared/commercelocations.md +14 -0
  1135. package/docs/models/shared/commerceorder.md +31 -0
  1136. package/docs/models/shared/commerceorders.md +14 -0
  1137. package/docs/models/shared/commerceordersupplementaldata.md +12 -0
  1138. package/docs/models/shared/commercepayment.md +25 -0
  1139. package/docs/models/shared/commercepaymentmethod.md +16 -0
  1140. package/docs/models/shared/commercepaymentmethods.md +14 -0
  1141. package/docs/models/shared/commercepayments.md +14 -0
  1142. package/docs/models/shared/commerceproduct.md +18 -0
  1143. package/docs/models/shared/commerceproductcategories.md +14 -0
  1144. package/docs/models/shared/commerceproductcategory.md +17 -0
  1145. package/docs/models/shared/commerceproducts.md +14 -0
  1146. package/docs/models/shared/commercerecordref.md +9 -0
  1147. package/docs/models/shared/commercereport.md +54 -0
  1148. package/docs/models/shared/commercereportcomponent.md +13 -0
  1149. package/docs/models/shared/commercereportdimension.md +11 -0
  1150. package/docs/models/shared/commercereportdimensionitems.md +8 -0
  1151. package/docs/models/shared/commercereporterror.md +10 -0
  1152. package/docs/models/shared/commercereportmeasure.md +11 -0
  1153. package/docs/models/shared/commercetransaction.md +28 -0
  1154. package/docs/models/shared/commercetransactions.md +14 -0
  1155. package/docs/models/shared/companies.md +14 -0
  1156. package/docs/models/shared/company.md +22 -0
  1157. package/docs/models/shared/companyrequestbody.md +9 -0
  1158. package/docs/models/shared/connection.md +31 -0
  1159. package/docs/models/shared/connections.md +14 -0
  1160. package/docs/models/shared/connectionsourcetype.md +14 -0
  1161. package/docs/models/shared/contact.md +13 -0
  1162. package/docs/models/shared/contactref.md +11 -0
  1163. package/docs/models/shared/creditnotelineitem.md +21 -0
  1164. package/docs/models/shared/creditnotestatus.md +13 -0
  1165. package/docs/models/shared/customerstatus.md +12 -0
  1166. package/docs/models/shared/dataconnectionerror.md +11 -0
  1167. package/docs/models/shared/dataconnectionstatus.md +13 -0
  1168. package/docs/models/shared/dataintegrityamounts.md +12 -0
  1169. package/docs/models/shared/dataintegritybyamount.md +12 -0
  1170. package/docs/models/shared/dataintegritybycount.md +11 -0
  1171. package/docs/models/shared/dataintegrityconnectionid.md +9 -0
  1172. package/docs/models/shared/dataintegritydatatype.md +13 -0
  1173. package/docs/models/shared/dataintegritydates.md +13 -0
  1174. package/docs/models/shared/dataintegritydetail.md +15 -0
  1175. package/docs/models/shared/dataintegritydetails.md +14 -0
  1176. package/docs/models/shared/dataintegritymatch.md +14 -0
  1177. package/docs/models/shared/dataintegritystatus.md +12 -0
  1178. package/docs/models/shared/dataintegritystatuses.md +10 -0
  1179. package/docs/models/shared/dataintegritystatusinfo.md +10 -0
  1180. package/docs/models/shared/dataintegritysummaries.md +10 -0
  1181. package/docs/models/shared/dataintegritysummary.md +10 -0
  1182. package/docs/models/shared/datasource.md +8 -0
  1183. package/docs/models/shared/datastatus.md +14 -0
  1184. package/docs/models/shared/datatype.md +51 -0
  1185. package/docs/models/shared/definitionsitemref.md +10 -0
  1186. package/docs/models/shared/directcostlineitem.md +20 -0
  1187. package/docs/models/shared/directincomelineitem.md +19 -0
  1188. package/docs/models/shared/disputestatus.md +20 -0
  1189. package/docs/models/shared/enhancedcashflowitem.md +8 -0
  1190. package/docs/models/shared/enhancedcashflowtransaction.md +16 -0
  1191. package/docs/models/shared/enhancedcashflowtransactions.md +16 -0
  1192. package/docs/models/shared/enhancedfinancialreport.md +11 -0
  1193. package/docs/models/shared/enhancedfinancialreportreportitem.md +12 -0
  1194. package/docs/models/shared/enhancedinvoicereportitem.md +20 -0
  1195. package/docs/models/shared/enhancedinvoicesreport.md +11 -0
  1196. package/docs/models/shared/enhancedreportaccountcategory.md +9 -0
  1197. package/docs/models/shared/enhancedreportinfo.md +11 -0
  1198. package/docs/models/shared/errormessage.md +15 -0
  1199. package/docs/models/shared/excelreporttypes.md +13 -0
  1200. package/docs/models/shared/excelstatus.md +17 -0
  1201. package/docs/models/shared/file.md +11 -0
  1202. package/docs/models/shared/halref.md +8 -0
  1203. package/docs/models/shared/integritystatus.md +13 -0
  1204. package/docs/models/shared/invoicelineitem.md +21 -0
  1205. package/docs/models/shared/invoicestatus.md +21 -0
  1206. package/docs/models/shared/itemref.md +11 -0
  1207. package/docs/models/shared/items.md +9 -0
  1208. package/docs/models/shared/itemstype.md +12 -0
  1209. package/docs/models/shared/journalline.md +12 -0
  1210. package/docs/models/shared/journallinetracking.md +10 -0
  1211. package/docs/models/shared/journalref.md +11 -0
  1212. package/docs/models/shared/journalstatus.md +12 -0
  1213. package/docs/models/shared/lendingcustomerref.md +9 -0
  1214. package/docs/models/shared/links.md +11 -0
  1215. package/docs/models/shared/loanref.md +10 -0
  1216. package/docs/models/shared/loansummary.md +11 -0
  1217. package/docs/models/shared/loansummaryintegrationtype.md +12 -0
  1218. package/docs/models/shared/loansummaryrecordref.md +11 -0
  1219. package/docs/models/shared/loansummaryrecordreftype.md +12 -0
  1220. package/docs/models/shared/loansummaryreportinfo.md +10 -0
  1221. package/docs/models/shared/loansummaryreportitem.md +13 -0
  1222. package/docs/models/shared/loantransactions.md +12 -0
  1223. package/docs/models/shared/loantransactionsreportinfo.md +13 -0
  1224. package/docs/models/shared/locationref.md +11 -0
  1225. package/docs/models/shared/metadata.md +8 -0
  1226. package/docs/models/shared/orderdiscountallocation.md +9 -0
  1227. package/docs/models/shared/orderlineitem.md +17 -0
  1228. package/docs/models/shared/payment.md +14 -0
  1229. package/docs/models/shared/paymentallocationpayment.md +15 -0
  1230. package/docs/models/shared/paymentline.md +10 -0
  1231. package/docs/models/shared/paymentlinelink.md +11 -0
  1232. package/docs/models/shared/paymentlinktype.md +29 -0
  1233. package/docs/models/shared/paymentmethodstatus.md +12 -0
  1234. package/docs/models/shared/paymentref.md +17 -0
  1235. package/docs/models/shared/paymentstatus.md +15 -0
  1236. package/docs/models/shared/paymenttype.md +21 -0
  1237. package/docs/models/shared/periodunit.md +13 -0
  1238. package/docs/models/shared/phonenumbertype.md +14 -0
  1239. package/docs/models/shared/productinventory.md +11 -0
  1240. package/docs/models/shared/productinventorylocation.md +9 -0
  1241. package/docs/models/shared/productprice.md +9 -0
  1242. package/docs/models/shared/productref.md +11 -0
  1243. package/docs/models/shared/productvariant.md +24 -0
  1244. package/docs/models/shared/productvariantref.md +11 -0
  1245. package/docs/models/shared/productvariantstatus.md +10 -0
  1246. package/docs/models/shared/profitandlossreport.md +18 -0
  1247. package/docs/models/shared/projectref.md +9 -0
  1248. package/docs/models/shared/pulloperation.md +19 -0
  1249. package/docs/models/shared/pulloperations.md +14 -0
  1250. package/docs/models/shared/pulloperationstatus.md +30 -0
  1251. package/docs/models/shared/recordref.md +13 -0
  1252. package/docs/models/shared/reportbasis.md +12 -0
  1253. package/docs/models/shared/reportcomponentmeasure.md +10 -0
  1254. package/docs/models/shared/reportinfo.md +15 -0
  1255. package/docs/models/shared/reportinput.md +12 -0
  1256. package/docs/models/shared/reportitems.md +12 -0
  1257. package/docs/models/shared/reportitemsloantransactiontype.md +11 -0
  1258. package/docs/models/shared/reportline.md +11 -0
  1259. package/docs/models/shared/security.md +8 -0
  1260. package/docs/models/shared/servicecharge.md +14 -0
  1261. package/docs/models/shared/servicechargetype.md +13 -0
  1262. package/docs/models/shared/sourceref.md +10 -0
  1263. package/docs/models/shared/supplementaldata.md +12 -0
  1264. package/docs/models/shared/supplierref.md +11 -0
  1265. package/docs/models/shared/supplierstatus.md +12 -0
  1266. package/docs/models/shared/taxcomponentallocation.md +9 -0
  1267. package/docs/models/shared/taxcomponentref.md +11 -0
  1268. package/docs/models/shared/taxrateref.md +21 -0
  1269. package/docs/models/shared/tracking.md +9 -0
  1270. package/docs/models/shared/trackingcategoryref.md +13 -0
  1271. package/docs/models/shared/transactioncategory.md +9 -0
  1272. package/docs/models/shared/transactioncategoryref.md +11 -0
  1273. package/docs/models/shared/transactioncategorystatus.md +10 -0
  1274. package/docs/models/shared/transactioncode.md +24 -0
  1275. package/docs/models/shared/transactionsourceref.md +9 -0
  1276. package/docs/models/shared/transactionsourcetype.md +12 -0
  1277. package/docs/models/shared/transactiontype.md +25 -0
  1278. package/docs/models/shared/transferaccount.md +10 -0
  1279. package/docs/models/shared/weblinksitems.md +11 -0
  1280. package/docs/models/shared/withholdingtaxitems.md +9 -0
  1281. package/docs/models/utils/retryconfig.md +24 -0
  1282. package/docs/sdks/accountingbankdata/README.md +160 -0
  1283. package/docs/sdks/accountspayable/README.md +766 -0
  1284. package/docs/sdks/accountsreceivable/README.md +1093 -0
  1285. package/docs/sdks/cashflow/README.md +402 -0
  1286. package/docs/sdks/codatlending/README.md +14 -0
  1287. package/docs/sdks/companies/README.md +221 -0
  1288. package/docs/sdks/companyinfo/README.md +91 -0
  1289. package/docs/sdks/connections/README.md +224 -0
  1290. package/docs/sdks/dataintegrity/README.md +152 -0
  1291. package/docs/sdks/excelreports/README.md +150 -0
  1292. package/docs/sdks/fileupload/README.md +140 -0
  1293. package/docs/sdks/financials/README.md +321 -0
  1294. package/docs/sdks/liabilities/README.md +99 -0
  1295. package/docs/sdks/managedata/README.md +222 -0
  1296. package/docs/sdks/sales/README.md +1227 -0
  1297. package/docs/sdks/transactions/README.md +642 -0
  1298. package/docs/types/rfcdate.md +11 -0
  1299. package/package.json +34 -0
@@ -0,0 +1,1780 @@
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.Sales = 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
+ /**
82
+ * Retrieve standardized sales data from a linked commerce platform.
83
+ */
84
+ var Sales = /** @class */ (function () {
85
+ function Sales(sdkConfig) {
86
+ this.sdkConfiguration = sdkConfig;
87
+ }
88
+ /**
89
+ * Get customer
90
+ *
91
+ * @remarks
92
+ * The *Get customer* endpoint returns a single customer for a given customerId.
93
+ *
94
+ * [Customers](https://docs.codat.io/commerce-api#/schemas/Customer) are people or organizations that place orders, make payments and receive goods and/or services from the SMB.
95
+ *
96
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-customers) for integrations that support getting a specific customer.
97
+ *
98
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
99
+ *
100
+ */
101
+ Sales.prototype.getCustomer = function (req, retries, config) {
102
+ var _a, _b;
103
+ return __awaiter(this, void 0, void 0, function () {
104
+ var baseURL, url, client, headers, retryConfig, httpRes, contentType, res, decodedRes;
105
+ return __generator(this, function (_c) {
106
+ switch (_c.label) {
107
+ case 0:
108
+ if (!(req instanceof utils.SpeakeasyBase)) {
109
+ req = new operations.GetCommerceCustomerRequest(req);
110
+ }
111
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
112
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-customers/{customerId}", req);
113
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
114
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
115
+ headers["Accept"] = "application/json";
116
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
117
+ retryConfig = retries;
118
+ if (!retryConfig) {
119
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
120
+ }
121
+ return [4 /*yield*/, utils.Retry(function () {
122
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
123
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
124
+ case 1:
125
+ httpRes = _c.sent();
126
+ 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 : "";
127
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
128
+ throw new Error("status code not found in response: ".concat(httpRes));
129
+ }
130
+ res = new operations.GetCommerceCustomerResponse({
131
+ statusCode: httpRes.status,
132
+ contentType: contentType,
133
+ rawResponse: httpRes,
134
+ });
135
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
136
+ switch (true) {
137
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
138
+ if (utils.matchContentType(contentType, "application/json")) {
139
+ res.commerceCustomer = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceCustomer);
140
+ }
141
+ else {
142
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
143
+ }
144
+ break;
145
+ case [401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
146
+ if (utils.matchContentType(contentType, "application/json")) {
147
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
148
+ }
149
+ else {
150
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
151
+ }
152
+ break;
153
+ }
154
+ return [2 /*return*/, res];
155
+ }
156
+ });
157
+ });
158
+ };
159
+ /**
160
+ * Get customer retention metrics
161
+ *
162
+ * @remarks
163
+ * The *Get customer retention metrics* endpoint returns customer retention insights for a specific company's commerce connection over one or more periods of time.
164
+ *
165
+ * 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.
166
+ *
167
+ * #### Customer retention metrics
168
+ *
169
+ * - __Existing customers__: the number of unique customers that have placed an order(s) in the specified period and any previous period.
170
+ * - __New customers__: the number of unique customers that have placed an order(s) in the specified period and none in any previous period.
171
+ * - __Total customers__: the total number of existing and new customers within the specified period.
172
+ * - __Retention rate__: the ratio of existing customers within the specified period compared to the total customers at the end of the previous period represented as a percentage.
173
+ * - __Repeat rate__: the ratio of existing customers to total customers over the specified period represented as a percentage.
174
+ *
175
+ * Learn more about the formulas used to calculate customer retention metrics [here](/lending/commerce-metrics/overview#what-metrics-are-available).
176
+ *
177
+ * #### Response structure
178
+ *
179
+ * The Customer retention report's dimensions and measures are:
180
+ *
181
+ * | Index | Dimensions |
182
+ * |-----------------------------|----------------------------|
183
+ * | `index` = 0 | Period |
184
+ * | `index` = 1 | Customer retention metrics |
185
+ *
186
+ * | Index | Measures |
187
+ * |----------------------|------------|
188
+ * | `index` = 0 | Count |
189
+ * | `index` = 1 | Percentage |
190
+ *
191
+ * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination.
192
+ */
193
+ Sales.prototype.getCustomerRetentionMetrics = function (req, retries, config) {
194
+ var _a, _b;
195
+ return __awaiter(this, void 0, void 0, function () {
196
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
197
+ return __generator(this, function (_c) {
198
+ switch (_c.label) {
199
+ case 0:
200
+ if (!(req instanceof utils.SpeakeasyBase)) {
201
+ req = new operations.GetCommerceCustomerRetentionMetricsRequest(req);
202
+ }
203
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
204
+ url = utils.generateURL(baseURL, "/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/customerRetention", req);
205
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
206
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
207
+ queryParams = utils.serializeQueryParams(req);
208
+ headers["Accept"] = "application/json";
209
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
210
+ retryConfig = retries;
211
+ if (!retryConfig) {
212
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
213
+ }
214
+ return [4 /*yield*/, utils.Retry(function () {
215
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
216
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
217
+ case 1:
218
+ httpRes = _c.sent();
219
+ 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 : "";
220
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
221
+ throw new Error("status code not found in response: ".concat(httpRes));
222
+ }
223
+ res = new operations.GetCommerceCustomerRetentionMetricsResponse({
224
+ statusCode: httpRes.status,
225
+ contentType: contentType,
226
+ rawResponse: httpRes,
227
+ });
228
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
229
+ switch (true) {
230
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
231
+ if (utils.matchContentType(contentType, "application/json")) {
232
+ res.commerceReport = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceReport);
233
+ }
234
+ else {
235
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
236
+ }
237
+ break;
238
+ case [401, 404].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
239
+ if (utils.matchContentType(contentType, "application/json")) {
240
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
241
+ }
242
+ else {
243
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
244
+ }
245
+ break;
246
+ }
247
+ return [2 /*return*/, res];
248
+ }
249
+ });
250
+ });
251
+ };
252
+ /**
253
+ * Get dispute
254
+ *
255
+ * @remarks
256
+ * The *Get dispute* endpoint returns a single dispute for a given disputeId.
257
+ *
258
+ * [Disputes](https://docs.codat.io/commerce-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly.
259
+ *
260
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-disputes) for integrations that support getting a specific dispute.
261
+ *
262
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
263
+ *
264
+ */
265
+ Sales.prototype.getDispute = function (req, retries, config) {
266
+ var _a, _b;
267
+ return __awaiter(this, void 0, void 0, function () {
268
+ var baseURL, url, client, headers, retryConfig, httpRes, contentType, res, decodedRes;
269
+ return __generator(this, function (_c) {
270
+ switch (_c.label) {
271
+ case 0:
272
+ if (!(req instanceof utils.SpeakeasyBase)) {
273
+ req = new operations.GetCommerceDisputeRequest(req);
274
+ }
275
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
276
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-disputes/{disputeId}", req);
277
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
278
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
279
+ headers["Accept"] = "application/json";
280
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
281
+ retryConfig = retries;
282
+ if (!retryConfig) {
283
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
284
+ }
285
+ return [4 /*yield*/, utils.Retry(function () {
286
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
287
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
288
+ case 1:
289
+ httpRes = _c.sent();
290
+ 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 : "";
291
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
292
+ throw new Error("status code not found in response: ".concat(httpRes));
293
+ }
294
+ res = new operations.GetCommerceDisputeResponse({
295
+ statusCode: httpRes.status,
296
+ contentType: contentType,
297
+ rawResponse: httpRes,
298
+ });
299
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
300
+ switch (true) {
301
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
302
+ if (utils.matchContentType(contentType, "application/json")) {
303
+ res.commerceDispute = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceDispute);
304
+ }
305
+ else {
306
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
307
+ }
308
+ break;
309
+ case [401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
310
+ if (utils.matchContentType(contentType, "application/json")) {
311
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
312
+ }
313
+ else {
314
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
315
+ }
316
+ break;
317
+ }
318
+ return [2 /*return*/, res];
319
+ }
320
+ });
321
+ });
322
+ };
323
+ /**
324
+ * Get lifetime value metrics
325
+ *
326
+ * @remarks
327
+ * The *Get lifetime value metrics* endpoint returns the average revenue that a specific company will generate throughout its lifespan over one or more periods of time.
328
+ *
329
+ * 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.
330
+ *
331
+ * Learn more about the formulas used to calculate the lifetime value metrics [here](/lending/commerce-metrics/overview#what-metrics-are-available).
332
+ *
333
+ * Refer to the [commerce reporting structure](/lending/commerce-metrics/reporting-structure) page for more detail on commerce reports in Lending.
334
+ *
335
+ * #### Response structure
336
+ *
337
+ * The Lifetime value report's dimensions and measures are:
338
+ *
339
+ * | Index | Dimensions |
340
+ * |---------------|------------------------|
341
+ * | `index` = 0 | Period |
342
+ * | `index` = 1 | Lifetime value metrics |
343
+ *
344
+ * | Index | Measures |
345
+ * |-------------------|---------|
346
+ * | `index` = 1 | Value |
347
+ *
348
+ * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination.
349
+ *
350
+ */
351
+ Sales.prototype.getLifetimeValueMetrics = function (req, retries, config) {
352
+ var _a, _b;
353
+ return __awaiter(this, void 0, void 0, function () {
354
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
355
+ return __generator(this, function (_c) {
356
+ switch (_c.label) {
357
+ case 0:
358
+ if (!(req instanceof utils.SpeakeasyBase)) {
359
+ req = new operations.GetCommerceLifetimeValueMetricsRequest(req);
360
+ }
361
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
362
+ url = utils.generateURL(baseURL, "/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/lifetimeValue", req);
363
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
364
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
365
+ queryParams = utils.serializeQueryParams(req);
366
+ headers["Accept"] = "application/json";
367
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
368
+ retryConfig = retries;
369
+ if (!retryConfig) {
370
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
371
+ }
372
+ return [4 /*yield*/, utils.Retry(function () {
373
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
374
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
375
+ case 1:
376
+ httpRes = _c.sent();
377
+ 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 : "";
378
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
379
+ throw new Error("status code not found in response: ".concat(httpRes));
380
+ }
381
+ res = new operations.GetCommerceLifetimeValueMetricsResponse({
382
+ statusCode: httpRes.status,
383
+ contentType: contentType,
384
+ rawResponse: httpRes,
385
+ });
386
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
387
+ switch (true) {
388
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
389
+ if (utils.matchContentType(contentType, "application/json")) {
390
+ res.commerceReport = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceReport);
391
+ }
392
+ else {
393
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
394
+ }
395
+ break;
396
+ case [401, 404].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
397
+ if (utils.matchContentType(contentType, "application/json")) {
398
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
399
+ }
400
+ else {
401
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
402
+ }
403
+ break;
404
+ }
405
+ return [2 /*return*/, res];
406
+ }
407
+ });
408
+ });
409
+ };
410
+ /**
411
+ * Get location
412
+ *
413
+ * @remarks
414
+ * The *Get location* endpoint returns a single location for a given locationId.
415
+ *
416
+ * [Locations](https://docs.codat.io/commerce-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/commerce-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/commerce-api#/schemas/Order) were placed.
417
+ *
418
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-locations) for integrations that support getting a specific location.
419
+ *
420
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
421
+ *
422
+ */
423
+ Sales.prototype.getLocation = function (req, retries, config) {
424
+ var _a, _b;
425
+ return __awaiter(this, void 0, void 0, function () {
426
+ var baseURL, url, client, headers, retryConfig, httpRes, contentType, res, decodedRes;
427
+ return __generator(this, function (_c) {
428
+ switch (_c.label) {
429
+ case 0:
430
+ if (!(req instanceof utils.SpeakeasyBase)) {
431
+ req = new operations.GetCommerceLocationRequest(req);
432
+ }
433
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
434
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-locations/{locationId}", req);
435
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
436
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
437
+ headers["Accept"] = "application/json";
438
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
439
+ retryConfig = retries;
440
+ if (!retryConfig) {
441
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
442
+ }
443
+ return [4 /*yield*/, utils.Retry(function () {
444
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
445
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
446
+ case 1:
447
+ httpRes = _c.sent();
448
+ 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 : "";
449
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
450
+ throw new Error("status code not found in response: ".concat(httpRes));
451
+ }
452
+ res = new operations.GetCommerceLocationResponse({
453
+ statusCode: httpRes.status,
454
+ contentType: contentType,
455
+ rawResponse: httpRes,
456
+ });
457
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
458
+ switch (true) {
459
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
460
+ if (utils.matchContentType(contentType, "application/json")) {
461
+ res.commerceLocation = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceLocation);
462
+ }
463
+ else {
464
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
465
+ }
466
+ break;
467
+ case [401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
468
+ if (utils.matchContentType(contentType, "application/json")) {
469
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
470
+ }
471
+ else {
472
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
473
+ }
474
+ break;
475
+ }
476
+ return [2 /*return*/, res];
477
+ }
478
+ });
479
+ });
480
+ };
481
+ /**
482
+ * Get order
483
+ *
484
+ * @remarks
485
+ * The *Get order* endpoint returns a single order for a given orderId.
486
+ *
487
+ * [Orders](https://docs.codat.io/commerce-api#/schemas/Order) contain the transaction details for all products sold by the company.
488
+ *
489
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-orders) for integrations that support getting a specific order.
490
+ *
491
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
492
+ *
493
+ */
494
+ Sales.prototype.getOrder = function (req, retries, config) {
495
+ var _a, _b;
496
+ return __awaiter(this, void 0, void 0, function () {
497
+ var baseURL, url, client, headers, retryConfig, httpRes, contentType, res, decodedRes;
498
+ return __generator(this, function (_c) {
499
+ switch (_c.label) {
500
+ case 0:
501
+ if (!(req instanceof utils.SpeakeasyBase)) {
502
+ req = new operations.GetCommerceOrderRequest(req);
503
+ }
504
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
505
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-orders/{orderId}", req);
506
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
507
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
508
+ headers["Accept"] = "application/json";
509
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
510
+ retryConfig = retries;
511
+ if (!retryConfig) {
512
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
513
+ }
514
+ return [4 /*yield*/, utils.Retry(function () {
515
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
516
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
517
+ case 1:
518
+ httpRes = _c.sent();
519
+ 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 : "";
520
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
521
+ throw new Error("status code not found in response: ".concat(httpRes));
522
+ }
523
+ res = new operations.GetCommerceOrderResponse({
524
+ statusCode: httpRes.status,
525
+ contentType: contentType,
526
+ rawResponse: httpRes,
527
+ });
528
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
529
+ switch (true) {
530
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
531
+ if (utils.matchContentType(contentType, "application/json")) {
532
+ res.commerceOrder = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceOrder);
533
+ }
534
+ else {
535
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
536
+ }
537
+ break;
538
+ case [401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
539
+ if (utils.matchContentType(contentType, "application/json")) {
540
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
541
+ }
542
+ else {
543
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
544
+ }
545
+ break;
546
+ }
547
+ return [2 /*return*/, res];
548
+ }
549
+ });
550
+ });
551
+ };
552
+ /**
553
+ * Get orders report
554
+ *
555
+ * @remarks
556
+ * 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.
557
+ *
558
+ * 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.
559
+ *
560
+ * Learn more about the formulas used to calculate the order metrics [here](/lending/commerce-metrics/overview#what-metrics-are-available).
561
+ *
562
+ * Refer to the [commerce reporting structure](/lending/commerce-metrics/reporting-structure) page for more details on commerce reports in Lending.
563
+ *
564
+ * #### Response structure
565
+ *
566
+ * The Orders report's dimensions and measures are:
567
+ *
568
+ * | Index | Dimensions |
569
+ * |---------------|----------------|
570
+ * | `index` = 0 | Period |
571
+ * | `index` = 1 | Order metrics |
572
+ *
573
+ * | Index | Measures |
574
+ * |---------------|------------|
575
+ * | `index` = 0 | Count |
576
+ * | `index` = 1 | Value |
577
+ *
578
+ * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination.
579
+ *
580
+ */
581
+ Sales.prototype.getOrdersReport = function (req, retries, config) {
582
+ var _a, _b;
583
+ return __awaiter(this, void 0, void 0, function () {
584
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
585
+ return __generator(this, function (_c) {
586
+ switch (_c.label) {
587
+ case 0:
588
+ if (!(req instanceof utils.SpeakeasyBase)) {
589
+ req = new operations.GetCommerceOrdersReportRequest(req);
590
+ }
591
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
592
+ url = utils.generateURL(baseURL, "/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/orders", req);
593
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
594
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
595
+ queryParams = utils.serializeQueryParams(req);
596
+ headers["Accept"] = "application/json";
597
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
598
+ retryConfig = retries;
599
+ if (!retryConfig) {
600
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
601
+ }
602
+ return [4 /*yield*/, utils.Retry(function () {
603
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
604
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
605
+ case 1:
606
+ httpRes = _c.sent();
607
+ 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 : "";
608
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
609
+ throw new Error("status code not found in response: ".concat(httpRes));
610
+ }
611
+ res = new operations.GetCommerceOrdersReportResponse({
612
+ statusCode: httpRes.status,
613
+ contentType: contentType,
614
+ rawResponse: httpRes,
615
+ });
616
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
617
+ switch (true) {
618
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
619
+ if (utils.matchContentType(contentType, "application/json")) {
620
+ res.commerceReport = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceReport);
621
+ }
622
+ else {
623
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
624
+ }
625
+ break;
626
+ case [401, 404].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
627
+ if (utils.matchContentType(contentType, "application/json")) {
628
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
629
+ }
630
+ else {
631
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
632
+ }
633
+ break;
634
+ }
635
+ return [2 /*return*/, res];
636
+ }
637
+ });
638
+ });
639
+ };
640
+ /**
641
+ * Get payment
642
+ *
643
+ * @remarks
644
+ * The *Get payment* endpoint returns a single payment for a given paymentId.
645
+ *
646
+ * [Payments](https://docs.codat.io/commerce-api#/schemas/Payment) contain details of all payments made by customers to the company.
647
+ *
648
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-payments) for integrations that support getting a specific payment.
649
+ *
650
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
651
+ *
652
+ */
653
+ Sales.prototype.getPayment = function (req, retries, config) {
654
+ var _a, _b;
655
+ return __awaiter(this, void 0, void 0, function () {
656
+ var baseURL, url, client, headers, retryConfig, httpRes, contentType, res, decodedRes;
657
+ return __generator(this, function (_c) {
658
+ switch (_c.label) {
659
+ case 0:
660
+ if (!(req instanceof utils.SpeakeasyBase)) {
661
+ req = new operations.GetCommercePaymentRequest(req);
662
+ }
663
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
664
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-payments/{paymentId}", req);
665
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
666
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
667
+ headers["Accept"] = "application/json";
668
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
669
+ retryConfig = retries;
670
+ if (!retryConfig) {
671
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
672
+ }
673
+ return [4 /*yield*/, utils.Retry(function () {
674
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
675
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
676
+ case 1:
677
+ httpRes = _c.sent();
678
+ 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 : "";
679
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
680
+ throw new Error("status code not found in response: ".concat(httpRes));
681
+ }
682
+ res = new operations.GetCommercePaymentResponse({
683
+ statusCode: httpRes.status,
684
+ contentType: contentType,
685
+ rawResponse: httpRes,
686
+ });
687
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
688
+ switch (true) {
689
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
690
+ if (utils.matchContentType(contentType, "application/json")) {
691
+ res.commercePayment = utils.objectToClass(JSON.parse(decodedRes), shared.CommercePayment);
692
+ }
693
+ else {
694
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
695
+ }
696
+ break;
697
+ case [401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
698
+ if (utils.matchContentType(contentType, "application/json")) {
699
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
700
+ }
701
+ else {
702
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
703
+ }
704
+ break;
705
+ }
706
+ return [2 /*return*/, res];
707
+ }
708
+ });
709
+ });
710
+ };
711
+ /**
712
+ * Get payment method
713
+ *
714
+ * @remarks
715
+ * The *Get payment method* endpoint returns a single payment method for a given paymentMethodId.
716
+ *
717
+ * [Payment methods](https://docs.codat.io/commerce-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments.
718
+ *
719
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-paymentMethods) for integrations that support getting a specific payment method.
720
+ *
721
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
722
+ *
723
+ */
724
+ Sales.prototype.getPaymentMethod = function (req, retries, config) {
725
+ var _a, _b;
726
+ return __awaiter(this, void 0, void 0, function () {
727
+ var baseURL, url, client, headers, retryConfig, httpRes, contentType, res, decodedRes;
728
+ return __generator(this, function (_c) {
729
+ switch (_c.label) {
730
+ case 0:
731
+ if (!(req instanceof utils.SpeakeasyBase)) {
732
+ req = new operations.GetCommercePaymentMethodRequest(req);
733
+ }
734
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
735
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-paymentMethods/{paymentMethodId}", req);
736
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
737
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
738
+ headers["Accept"] = "application/json";
739
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
740
+ retryConfig = retries;
741
+ if (!retryConfig) {
742
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
743
+ }
744
+ return [4 /*yield*/, utils.Retry(function () {
745
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
746
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
747
+ case 1:
748
+ httpRes = _c.sent();
749
+ 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 : "";
750
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
751
+ throw new Error("status code not found in response: ".concat(httpRes));
752
+ }
753
+ res = new operations.GetCommercePaymentMethodResponse({
754
+ statusCode: httpRes.status,
755
+ contentType: contentType,
756
+ rawResponse: httpRes,
757
+ });
758
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
759
+ switch (true) {
760
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
761
+ if (utils.matchContentType(contentType, "application/json")) {
762
+ res.commercePaymentMethod = utils.objectToClass(JSON.parse(decodedRes), shared.CommercePaymentMethod);
763
+ }
764
+ else {
765
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
766
+ }
767
+ break;
768
+ case [401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
769
+ if (utils.matchContentType(contentType, "application/json")) {
770
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
771
+ }
772
+ else {
773
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
774
+ }
775
+ break;
776
+ }
777
+ return [2 /*return*/, res];
778
+ }
779
+ });
780
+ });
781
+ };
782
+ /**
783
+ * Get product
784
+ *
785
+ * @remarks
786
+ * The *Get product* endpoint returns a single product for a given productId.
787
+ *
788
+ * [Products](https://docs.codat.io/commerce-api#/schemas/Product) are items in the company's inventory that are available for sale.
789
+ *
790
+ * 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.
791
+ *
792
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
793
+ *
794
+ */
795
+ Sales.prototype.getProduct = function (req, retries, config) {
796
+ var _a, _b;
797
+ return __awaiter(this, void 0, void 0, function () {
798
+ var baseURL, url, client, headers, retryConfig, httpRes, contentType, res, decodedRes;
799
+ return __generator(this, function (_c) {
800
+ switch (_c.label) {
801
+ case 0:
802
+ if (!(req instanceof utils.SpeakeasyBase)) {
803
+ req = new operations.GetCommerceProductRequest(req);
804
+ }
805
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
806
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-products/{productId}", req);
807
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
808
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
809
+ headers["Accept"] = "application/json";
810
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
811
+ retryConfig = retries;
812
+ if (!retryConfig) {
813
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
814
+ }
815
+ return [4 /*yield*/, utils.Retry(function () {
816
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
817
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
818
+ case 1:
819
+ httpRes = _c.sent();
820
+ 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 : "";
821
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
822
+ throw new Error("status code not found in response: ".concat(httpRes));
823
+ }
824
+ res = new operations.GetCommerceProductResponse({
825
+ statusCode: httpRes.status,
826
+ contentType: contentType,
827
+ rawResponse: httpRes,
828
+ });
829
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
830
+ switch (true) {
831
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
832
+ if (utils.matchContentType(contentType, "application/json")) {
833
+ res.commerceProduct = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceProduct);
834
+ }
835
+ else {
836
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
837
+ }
838
+ break;
839
+ case [401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
840
+ if (utils.matchContentType(contentType, "application/json")) {
841
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
842
+ }
843
+ else {
844
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
845
+ }
846
+ break;
847
+ }
848
+ return [2 /*return*/, res];
849
+ }
850
+ });
851
+ });
852
+ };
853
+ /**
854
+ * Get product category
855
+ *
856
+ * @remarks
857
+ * The *Get product* endpoint returns a single product for a given productId.
858
+ *
859
+ * [Product categories](https://docs.codat.io/commerce-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile.
860
+ *
861
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-productCategories) for integrations that support getting a specific product.
862
+ *
863
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
864
+ *
865
+ */
866
+ Sales.prototype.getProductCategory = function (req, retries, config) {
867
+ var _a, _b;
868
+ return __awaiter(this, void 0, void 0, function () {
869
+ var baseURL, url, client, headers, retryConfig, httpRes, contentType, res, decodedRes;
870
+ return __generator(this, function (_c) {
871
+ switch (_c.label) {
872
+ case 0:
873
+ if (!(req instanceof utils.SpeakeasyBase)) {
874
+ req = new operations.GetCommerceProductCategoryRequest(req);
875
+ }
876
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
877
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-productCategories/{productId}", req);
878
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
879
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
880
+ headers["Accept"] = "application/json";
881
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
882
+ retryConfig = retries;
883
+ if (!retryConfig) {
884
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
885
+ }
886
+ return [4 /*yield*/, utils.Retry(function () {
887
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
888
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
889
+ case 1:
890
+ httpRes = _c.sent();
891
+ 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 : "";
892
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
893
+ throw new Error("status code not found in response: ".concat(httpRes));
894
+ }
895
+ res = new operations.GetCommerceProductCategoryResponse({
896
+ statusCode: httpRes.status,
897
+ contentType: contentType,
898
+ rawResponse: httpRes,
899
+ });
900
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
901
+ switch (true) {
902
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
903
+ if (utils.matchContentType(contentType, "application/json")) {
904
+ res.commerceProductCategory = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceProductCategory);
905
+ }
906
+ else {
907
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
908
+ }
909
+ break;
910
+ case [401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
911
+ if (utils.matchContentType(contentType, "application/json")) {
912
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
913
+ }
914
+ else {
915
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
916
+ }
917
+ break;
918
+ }
919
+ return [2 /*return*/, res];
920
+ }
921
+ });
922
+ });
923
+ };
924
+ /**
925
+ * Get refunds report
926
+ *
927
+ * @remarks
928
+ * 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.
929
+ *
930
+ * 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.
931
+ *
932
+ * Learn more about the formulas used to calculate the refunds metrics [here](/lending/commerce-metrics/overview#what-metrics-are-available).
933
+ *
934
+ * Refer to the [commerce reporting structure](/lending/commerce-metrics/reporting-structure) page for more details on commerce reports in Lending.
935
+ *
936
+ * #### Response structure
937
+ *
938
+ * The Refunds report's dimensions and measures are:
939
+ *
940
+ * | Index | Dimensions |
941
+ * |----------------|----------------|
942
+ * | `index` = 0 | Period |
943
+ * | `index` = 1 | Refund metrics |
944
+ *
945
+ * | Index | Measures |
946
+ * |----------------|------------|
947
+ * | `index` = 0 | Count |
948
+ * | `index` = 1 | Value |
949
+ * | `index` = 2 | Percentage |
950
+ *
951
+ * The report data then combines multiple reporting dimensions and measures and outputs the value of each combination.
952
+ *
953
+ */
954
+ Sales.prototype.getRefundsReport = function (req, retries, config) {
955
+ var _a, _b;
956
+ return __awaiter(this, void 0, void 0, function () {
957
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
958
+ return __generator(this, function (_c) {
959
+ switch (_c.label) {
960
+ case 0:
961
+ if (!(req instanceof utils.SpeakeasyBase)) {
962
+ req = new operations.GetCommerceRefundsMetricsRequest(req);
963
+ }
964
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
965
+ url = utils.generateURL(baseURL, "/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/refunds", req);
966
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
967
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
968
+ queryParams = utils.serializeQueryParams(req);
969
+ headers["Accept"] = "application/json";
970
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
971
+ retryConfig = retries;
972
+ if (!retryConfig) {
973
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
974
+ }
975
+ return [4 /*yield*/, utils.Retry(function () {
976
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
977
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
978
+ case 1:
979
+ httpRes = _c.sent();
980
+ 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 : "";
981
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
982
+ throw new Error("status code not found in response: ".concat(httpRes));
983
+ }
984
+ res = new operations.GetCommerceRefundsMetricsResponse({
985
+ statusCode: httpRes.status,
986
+ contentType: contentType,
987
+ rawResponse: httpRes,
988
+ });
989
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
990
+ switch (true) {
991
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
992
+ if (utils.matchContentType(contentType, "application/json")) {
993
+ res.commerceReport = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceReport);
994
+ }
995
+ else {
996
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
997
+ }
998
+ break;
999
+ case [401, 404].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
1000
+ if (utils.matchContentType(contentType, "application/json")) {
1001
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
1002
+ }
1003
+ else {
1004
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1005
+ }
1006
+ break;
1007
+ }
1008
+ return [2 /*return*/, res];
1009
+ }
1010
+ });
1011
+ });
1012
+ };
1013
+ /**
1014
+ * Get commerce revenue metrics
1015
+ *
1016
+ * @remarks
1017
+ * Get the revenue and revenue growth for a specific company connection, over one or more periods of time.
1018
+ */
1019
+ Sales.prototype.getRevenueMetrics = function (req, retries, config) {
1020
+ var _a, _b;
1021
+ return __awaiter(this, void 0, void 0, function () {
1022
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
1023
+ return __generator(this, function (_c) {
1024
+ switch (_c.label) {
1025
+ case 0:
1026
+ if (!(req instanceof utils.SpeakeasyBase)) {
1027
+ req = new operations.GetCommerceRevenueMetricsRequest(req);
1028
+ }
1029
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1030
+ url = utils.generateURL(baseURL, "/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/revenue", req);
1031
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
1032
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
1033
+ queryParams = utils.serializeQueryParams(req);
1034
+ headers["Accept"] = "application/json";
1035
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
1036
+ retryConfig = retries;
1037
+ if (!retryConfig) {
1038
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
1039
+ }
1040
+ return [4 /*yield*/, utils.Retry(function () {
1041
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
1042
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
1043
+ case 1:
1044
+ httpRes = _c.sent();
1045
+ 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 : "";
1046
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1047
+ throw new Error("status code not found in response: ".concat(httpRes));
1048
+ }
1049
+ res = new operations.GetCommerceRevenueMetricsResponse({
1050
+ statusCode: httpRes.status,
1051
+ contentType: contentType,
1052
+ rawResponse: httpRes,
1053
+ });
1054
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1055
+ switch (true) {
1056
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1057
+ if (utils.matchContentType(contentType, "application/json")) {
1058
+ res.commerceReport = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceReport);
1059
+ }
1060
+ else {
1061
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1062
+ }
1063
+ break;
1064
+ case [401, 404].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
1065
+ if (utils.matchContentType(contentType, "application/json")) {
1066
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
1067
+ }
1068
+ else {
1069
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1070
+ }
1071
+ break;
1072
+ }
1073
+ return [2 /*return*/, res];
1074
+ }
1075
+ });
1076
+ });
1077
+ };
1078
+ /**
1079
+ * Get transaction
1080
+ *
1081
+ * @remarks
1082
+ * The *Get transaction* endpoint returns a single transaction for a given transactionId.
1083
+ *
1084
+ * [Transactions](https://docs.codat.io/commerce-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system.
1085
+ *
1086
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-transactions) for integrations that support getting a specific transaction.
1087
+ *
1088
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
1089
+ *
1090
+ */
1091
+ Sales.prototype.getTransaction = function (req, retries, config) {
1092
+ var _a, _b;
1093
+ return __awaiter(this, void 0, void 0, function () {
1094
+ var baseURL, url, client, headers, retryConfig, httpRes, contentType, res, decodedRes;
1095
+ return __generator(this, function (_c) {
1096
+ switch (_c.label) {
1097
+ case 0:
1098
+ if (!(req instanceof utils.SpeakeasyBase)) {
1099
+ req = new operations.GetCommerceTransactionRequest(req);
1100
+ }
1101
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1102
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-transactions/{transactionId}", req);
1103
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
1104
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
1105
+ headers["Accept"] = "application/json";
1106
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
1107
+ retryConfig = retries;
1108
+ if (!retryConfig) {
1109
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
1110
+ }
1111
+ return [4 /*yield*/, utils.Retry(function () {
1112
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
1113
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
1114
+ case 1:
1115
+ httpRes = _c.sent();
1116
+ 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 : "";
1117
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1118
+ throw new Error("status code not found in response: ".concat(httpRes));
1119
+ }
1120
+ res = new operations.GetCommerceTransactionResponse({
1121
+ statusCode: httpRes.status,
1122
+ contentType: contentType,
1123
+ rawResponse: httpRes,
1124
+ });
1125
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1126
+ switch (true) {
1127
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1128
+ if (utils.matchContentType(contentType, "application/json")) {
1129
+ res.commerceTransaction = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceTransaction);
1130
+ }
1131
+ else {
1132
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1133
+ }
1134
+ break;
1135
+ case [401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
1136
+ if (utils.matchContentType(contentType, "application/json")) {
1137
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
1138
+ }
1139
+ else {
1140
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1141
+ }
1142
+ break;
1143
+ }
1144
+ return [2 /*return*/, res];
1145
+ }
1146
+ });
1147
+ });
1148
+ };
1149
+ /**
1150
+ * List customers
1151
+ *
1152
+ * @remarks
1153
+ * The *List customers* endpoint returns a list of [customers](https://docs.codat.io/commerce-api#/schemas/Customer) for a given company's connection.
1154
+ *
1155
+ * [Customers](https://docs.codat.io/commerce-api#/schemas/Customer) are people or organizations that place orders, make payments and recieve goods and/or services from the SMB.
1156
+ *
1157
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
1158
+ *
1159
+ */
1160
+ Sales.prototype.listCustomers = function (req, retries, config) {
1161
+ var _a, _b;
1162
+ return __awaiter(this, void 0, void 0, function () {
1163
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
1164
+ return __generator(this, function (_c) {
1165
+ switch (_c.label) {
1166
+ case 0:
1167
+ if (!(req instanceof utils.SpeakeasyBase)) {
1168
+ req = new operations.ListCommerceCustomersRequest(req);
1169
+ }
1170
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1171
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-customers", req);
1172
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
1173
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
1174
+ queryParams = utils.serializeQueryParams(req);
1175
+ headers["Accept"] = "application/json";
1176
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
1177
+ retryConfig = retries;
1178
+ if (!retryConfig) {
1179
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
1180
+ }
1181
+ return [4 /*yield*/, utils.Retry(function () {
1182
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
1183
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
1184
+ case 1:
1185
+ httpRes = _c.sent();
1186
+ 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 : "";
1187
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1188
+ throw new Error("status code not found in response: ".concat(httpRes));
1189
+ }
1190
+ res = new operations.ListCommerceCustomersResponse({
1191
+ statusCode: httpRes.status,
1192
+ contentType: contentType,
1193
+ rawResponse: httpRes,
1194
+ });
1195
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1196
+ switch (true) {
1197
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1198
+ if (utils.matchContentType(contentType, "application/json")) {
1199
+ res.commerceCustomers = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceCustomers);
1200
+ }
1201
+ else {
1202
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1203
+ }
1204
+ break;
1205
+ case [400, 401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
1206
+ if (utils.matchContentType(contentType, "application/json")) {
1207
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
1208
+ }
1209
+ else {
1210
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1211
+ }
1212
+ break;
1213
+ }
1214
+ return [2 /*return*/, res];
1215
+ }
1216
+ });
1217
+ });
1218
+ };
1219
+ /**
1220
+ * List disputes
1221
+ *
1222
+ * @remarks
1223
+ * The *List disputes* endpoint returns a list of [disputes](https://docs.codat.io/commerce-api#/schemas/Dispute) for a given company's connection.
1224
+ *
1225
+ * [Disputes](https://docs.codat.io/commerce-api#/schemas/Dispute) are created when a customer is unsatisfied with their purchase or believe they have been charged incorrectly.
1226
+ *
1227
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
1228
+ *
1229
+ */
1230
+ Sales.prototype.listDisputes = function (req, retries, config) {
1231
+ var _a, _b;
1232
+ return __awaiter(this, void 0, void 0, function () {
1233
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
1234
+ return __generator(this, function (_c) {
1235
+ switch (_c.label) {
1236
+ case 0:
1237
+ if (!(req instanceof utils.SpeakeasyBase)) {
1238
+ req = new operations.ListCommerceDisputesRequest(req);
1239
+ }
1240
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1241
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-disputes", req);
1242
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
1243
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
1244
+ queryParams = utils.serializeQueryParams(req);
1245
+ headers["Accept"] = "application/json";
1246
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
1247
+ retryConfig = retries;
1248
+ if (!retryConfig) {
1249
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
1250
+ }
1251
+ return [4 /*yield*/, utils.Retry(function () {
1252
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
1253
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
1254
+ case 1:
1255
+ httpRes = _c.sent();
1256
+ 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 : "";
1257
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1258
+ throw new Error("status code not found in response: ".concat(httpRes));
1259
+ }
1260
+ res = new operations.ListCommerceDisputesResponse({
1261
+ statusCode: httpRes.status,
1262
+ contentType: contentType,
1263
+ rawResponse: httpRes,
1264
+ });
1265
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1266
+ switch (true) {
1267
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1268
+ if (utils.matchContentType(contentType, "application/json")) {
1269
+ res.commerceDisputes = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceDisputes);
1270
+ }
1271
+ else {
1272
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1273
+ }
1274
+ break;
1275
+ case [400, 401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
1276
+ if (utils.matchContentType(contentType, "application/json")) {
1277
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
1278
+ }
1279
+ else {
1280
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1281
+ }
1282
+ break;
1283
+ }
1284
+ return [2 /*return*/, res];
1285
+ }
1286
+ });
1287
+ });
1288
+ };
1289
+ /**
1290
+ * List locations
1291
+ *
1292
+ * @remarks
1293
+ * The *List locations* endpoint returns a list of [locations](https://docs.codat.io/commerce-api#/schemas/Location) for a given company's connection.
1294
+ *
1295
+ * [Locations](https://docs.codat.io/commerce-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/commerce-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/commerce-api#/schemas/Order) were placed.
1296
+ *
1297
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
1298
+ *
1299
+ */
1300
+ Sales.prototype.listLocations = function (req, retries, config) {
1301
+ var _a, _b;
1302
+ return __awaiter(this, void 0, void 0, function () {
1303
+ var baseURL, url, client, headers, retryConfig, httpRes, contentType, res, decodedRes;
1304
+ return __generator(this, function (_c) {
1305
+ switch (_c.label) {
1306
+ case 0:
1307
+ if (!(req instanceof utils.SpeakeasyBase)) {
1308
+ req = new operations.ListCommerceLocationsRequest(req);
1309
+ }
1310
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1311
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-locations", req);
1312
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
1313
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
1314
+ headers["Accept"] = "application/json";
1315
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
1316
+ retryConfig = retries;
1317
+ if (!retryConfig) {
1318
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
1319
+ }
1320
+ return [4 /*yield*/, utils.Retry(function () {
1321
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
1322
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
1323
+ case 1:
1324
+ httpRes = _c.sent();
1325
+ 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 : "";
1326
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1327
+ throw new Error("status code not found in response: ".concat(httpRes));
1328
+ }
1329
+ res = new operations.ListCommerceLocationsResponse({
1330
+ statusCode: httpRes.status,
1331
+ contentType: contentType,
1332
+ rawResponse: httpRes,
1333
+ });
1334
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1335
+ switch (true) {
1336
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1337
+ if (utils.matchContentType(contentType, "application/json")) {
1338
+ res.commerceLocations = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceLocations);
1339
+ }
1340
+ else {
1341
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1342
+ }
1343
+ break;
1344
+ case [400, 401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
1345
+ if (utils.matchContentType(contentType, "application/json")) {
1346
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
1347
+ }
1348
+ else {
1349
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1350
+ }
1351
+ break;
1352
+ }
1353
+ return [2 /*return*/, res];
1354
+ }
1355
+ });
1356
+ });
1357
+ };
1358
+ /**
1359
+ * List orders
1360
+ *
1361
+ * @remarks
1362
+ * The *List orders* endpoint returns a list of [orders](https://docs.codat.io/commerce-api#/schemas/Order) for a given company's connection.
1363
+ *
1364
+ * [Orders](https://docs.codat.io/commerce-api#/schemas/Order) contain the transaction details for all products sold by the company.
1365
+ *
1366
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
1367
+ *
1368
+ */
1369
+ Sales.prototype.listOrders = function (req, retries, config) {
1370
+ var _a, _b;
1371
+ return __awaiter(this, void 0, void 0, function () {
1372
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
1373
+ return __generator(this, function (_c) {
1374
+ switch (_c.label) {
1375
+ case 0:
1376
+ if (!(req instanceof utils.SpeakeasyBase)) {
1377
+ req = new operations.ListCommerceOrdersRequest(req);
1378
+ }
1379
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1380
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-orders", req);
1381
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
1382
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
1383
+ queryParams = utils.serializeQueryParams(req);
1384
+ headers["Accept"] = "application/json";
1385
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
1386
+ retryConfig = retries;
1387
+ if (!retryConfig) {
1388
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
1389
+ }
1390
+ return [4 /*yield*/, utils.Retry(function () {
1391
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
1392
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
1393
+ case 1:
1394
+ httpRes = _c.sent();
1395
+ 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 : "";
1396
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1397
+ throw new Error("status code not found in response: ".concat(httpRes));
1398
+ }
1399
+ res = new operations.ListCommerceOrdersResponse({
1400
+ statusCode: httpRes.status,
1401
+ contentType: contentType,
1402
+ rawResponse: httpRes,
1403
+ });
1404
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1405
+ switch (true) {
1406
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1407
+ if (utils.matchContentType(contentType, "application/json")) {
1408
+ res.commerceOrders = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceOrders);
1409
+ }
1410
+ else {
1411
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1412
+ }
1413
+ break;
1414
+ case [400, 401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
1415
+ if (utils.matchContentType(contentType, "application/json")) {
1416
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
1417
+ }
1418
+ else {
1419
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1420
+ }
1421
+ break;
1422
+ }
1423
+ return [2 /*return*/, res];
1424
+ }
1425
+ });
1426
+ });
1427
+ };
1428
+ /**
1429
+ * List payment methods
1430
+ *
1431
+ * @remarks
1432
+ * The *List payment methods* endpoint returns a list of [payment methods](https://docs.codat.io/commerce-api#/schemas/PaymentMethod) for a given company's connection.
1433
+ *
1434
+ * [Payment methods](https://docs.codat.io/commerce-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments.
1435
+ *
1436
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
1437
+ *
1438
+ */
1439
+ Sales.prototype.listPaymentMethods = function (req, retries, config) {
1440
+ var _a, _b;
1441
+ return __awaiter(this, void 0, void 0, function () {
1442
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
1443
+ return __generator(this, function (_c) {
1444
+ switch (_c.label) {
1445
+ case 0:
1446
+ if (!(req instanceof utils.SpeakeasyBase)) {
1447
+ req = new operations.ListCommercePaymentMethodsRequest(req);
1448
+ }
1449
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1450
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-paymentMethods", req);
1451
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
1452
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
1453
+ queryParams = utils.serializeQueryParams(req);
1454
+ headers["Accept"] = "application/json";
1455
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
1456
+ retryConfig = retries;
1457
+ if (!retryConfig) {
1458
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
1459
+ }
1460
+ return [4 /*yield*/, utils.Retry(function () {
1461
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
1462
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
1463
+ case 1:
1464
+ httpRes = _c.sent();
1465
+ 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 : "";
1466
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1467
+ throw new Error("status code not found in response: ".concat(httpRes));
1468
+ }
1469
+ res = new operations.ListCommercePaymentMethodsResponse({
1470
+ statusCode: httpRes.status,
1471
+ contentType: contentType,
1472
+ rawResponse: httpRes,
1473
+ });
1474
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1475
+ switch (true) {
1476
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1477
+ if (utils.matchContentType(contentType, "application/json")) {
1478
+ res.commercePaymentMethods = utils.objectToClass(JSON.parse(decodedRes), shared.CommercePaymentMethods);
1479
+ }
1480
+ else {
1481
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1482
+ }
1483
+ break;
1484
+ case [400, 401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
1485
+ if (utils.matchContentType(contentType, "application/json")) {
1486
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
1487
+ }
1488
+ else {
1489
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1490
+ }
1491
+ break;
1492
+ }
1493
+ return [2 /*return*/, res];
1494
+ }
1495
+ });
1496
+ });
1497
+ };
1498
+ /**
1499
+ * List payments
1500
+ *
1501
+ * @remarks
1502
+ * The *List payments* endpoint returns a list of [payments](https://docs.codat.io/commerce-api#/schemas/Payment) for a given company's connection.
1503
+ *
1504
+ * [Payments](https://docs.codat.io/commerce-api#/schemas/Payment) contain details of all payments made by customers to the company.
1505
+ *
1506
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
1507
+ *
1508
+ */
1509
+ Sales.prototype.listPayments = function (req, retries, config) {
1510
+ var _a, _b;
1511
+ return __awaiter(this, void 0, void 0, function () {
1512
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
1513
+ return __generator(this, function (_c) {
1514
+ switch (_c.label) {
1515
+ case 0:
1516
+ if (!(req instanceof utils.SpeakeasyBase)) {
1517
+ req = new operations.ListCommercePaymentsRequest(req);
1518
+ }
1519
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1520
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-payments", req);
1521
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
1522
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
1523
+ queryParams = utils.serializeQueryParams(req);
1524
+ headers["Accept"] = "application/json";
1525
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
1526
+ retryConfig = retries;
1527
+ if (!retryConfig) {
1528
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
1529
+ }
1530
+ return [4 /*yield*/, utils.Retry(function () {
1531
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
1532
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
1533
+ case 1:
1534
+ httpRes = _c.sent();
1535
+ 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 : "";
1536
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1537
+ throw new Error("status code not found in response: ".concat(httpRes));
1538
+ }
1539
+ res = new operations.ListCommercePaymentsResponse({
1540
+ statusCode: httpRes.status,
1541
+ contentType: contentType,
1542
+ rawResponse: httpRes,
1543
+ });
1544
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1545
+ switch (true) {
1546
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1547
+ if (utils.matchContentType(contentType, "application/json")) {
1548
+ res.commercePayments = utils.objectToClass(JSON.parse(decodedRes), shared.CommercePayments);
1549
+ }
1550
+ else {
1551
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1552
+ }
1553
+ break;
1554
+ case [400, 401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
1555
+ if (utils.matchContentType(contentType, "application/json")) {
1556
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
1557
+ }
1558
+ else {
1559
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1560
+ }
1561
+ break;
1562
+ }
1563
+ return [2 /*return*/, res];
1564
+ }
1565
+ });
1566
+ });
1567
+ };
1568
+ /**
1569
+ * List product categories
1570
+ *
1571
+ * @remarks
1572
+ * The *List product categories* endpoint returns a list of [product categories](https://docs.codat.io/commerce-api#/schemas/ProductCategory) for a given company's connection.
1573
+ *
1574
+ * [Product categories](https://docs.codat.io/commerce-api#/schemas/ProductCategory) are used to classify a group of products together, either by type (e.g. "Furniture"), or sometimes by tax profile.
1575
+ *
1576
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
1577
+ *
1578
+ */
1579
+ Sales.prototype.listProductCategories = function (req, retries, config) {
1580
+ var _a, _b;
1581
+ return __awaiter(this, void 0, void 0, function () {
1582
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
1583
+ return __generator(this, function (_c) {
1584
+ switch (_c.label) {
1585
+ case 0:
1586
+ if (!(req instanceof utils.SpeakeasyBase)) {
1587
+ req = new operations.ListCommerceProductCategoriesRequest(req);
1588
+ }
1589
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1590
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-productCategories", req);
1591
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
1592
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
1593
+ queryParams = utils.serializeQueryParams(req);
1594
+ headers["Accept"] = "application/json";
1595
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
1596
+ retryConfig = retries;
1597
+ if (!retryConfig) {
1598
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
1599
+ }
1600
+ return [4 /*yield*/, utils.Retry(function () {
1601
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
1602
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
1603
+ case 1:
1604
+ httpRes = _c.sent();
1605
+ 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 : "";
1606
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1607
+ throw new Error("status code not found in response: ".concat(httpRes));
1608
+ }
1609
+ res = new operations.ListCommerceProductCategoriesResponse({
1610
+ statusCode: httpRes.status,
1611
+ contentType: contentType,
1612
+ rawResponse: httpRes,
1613
+ });
1614
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1615
+ switch (true) {
1616
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1617
+ if (utils.matchContentType(contentType, "application/json")) {
1618
+ res.commerceProductCategories = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceProductCategories);
1619
+ }
1620
+ else {
1621
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1622
+ }
1623
+ break;
1624
+ case [400, 401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
1625
+ if (utils.matchContentType(contentType, "application/json")) {
1626
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
1627
+ }
1628
+ else {
1629
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1630
+ }
1631
+ break;
1632
+ }
1633
+ return [2 /*return*/, res];
1634
+ }
1635
+ });
1636
+ });
1637
+ };
1638
+ /**
1639
+ * List products
1640
+ *
1641
+ * @remarks
1642
+ * The *List products* endpoint returns a list of [products](https://docs.codat.io/commerce-api#/schemas/Product) for a given company's connection.
1643
+ *
1644
+ * [Products](https://docs.codat.io/commerce-api#/schemas/Product) are items in the company's inventory that are available for sale.
1645
+ *
1646
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
1647
+ *
1648
+ */
1649
+ Sales.prototype.listProducts = function (req, retries, config) {
1650
+ var _a, _b;
1651
+ return __awaiter(this, void 0, void 0, function () {
1652
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
1653
+ return __generator(this, function (_c) {
1654
+ switch (_c.label) {
1655
+ case 0:
1656
+ if (!(req instanceof utils.SpeakeasyBase)) {
1657
+ req = new operations.ListCommerceProductsRequest(req);
1658
+ }
1659
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1660
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-products", req);
1661
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
1662
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
1663
+ queryParams = utils.serializeQueryParams(req);
1664
+ headers["Accept"] = "application/json";
1665
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
1666
+ retryConfig = retries;
1667
+ if (!retryConfig) {
1668
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
1669
+ }
1670
+ return [4 /*yield*/, utils.Retry(function () {
1671
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
1672
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
1673
+ case 1:
1674
+ httpRes = _c.sent();
1675
+ 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 : "";
1676
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1677
+ throw new Error("status code not found in response: ".concat(httpRes));
1678
+ }
1679
+ res = new operations.ListCommerceProductsResponse({
1680
+ statusCode: httpRes.status,
1681
+ contentType: contentType,
1682
+ rawResponse: httpRes,
1683
+ });
1684
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1685
+ switch (true) {
1686
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1687
+ if (utils.matchContentType(contentType, "application/json")) {
1688
+ res.commerceProducts = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceProducts);
1689
+ }
1690
+ else {
1691
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1692
+ }
1693
+ break;
1694
+ case [400, 401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
1695
+ if (utils.matchContentType(contentType, "application/json")) {
1696
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
1697
+ }
1698
+ else {
1699
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1700
+ }
1701
+ break;
1702
+ }
1703
+ return [2 /*return*/, res];
1704
+ }
1705
+ });
1706
+ });
1707
+ };
1708
+ /**
1709
+ * List transactions
1710
+ *
1711
+ * @remarks
1712
+ * The *List transactions* endpoint returns a list of [transactions](https://docs.codat.io/commerce-api#/schemas/Transaction) for a given company's connection.
1713
+ *
1714
+ * [Transactions](https://docs.codat.io/commerce-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system.
1715
+ *
1716
+ * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
1717
+ *
1718
+ */
1719
+ Sales.prototype.listTransactions = function (req, retries, config) {
1720
+ var _a, _b;
1721
+ return __awaiter(this, void 0, void 0, function () {
1722
+ var baseURL, url, client, headers, queryParams, retryConfig, httpRes, contentType, res, decodedRes;
1723
+ return __generator(this, function (_c) {
1724
+ switch (_c.label) {
1725
+ case 0:
1726
+ if (!(req instanceof utils.SpeakeasyBase)) {
1727
+ req = new operations.ListCommerceTransactionsRequest(req);
1728
+ }
1729
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1730
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/commerce-transactions", req);
1731
+ client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
1732
+ headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
1733
+ queryParams = utils.serializeQueryParams(req);
1734
+ headers["Accept"] = "application/json";
1735
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
1736
+ retryConfig = retries;
1737
+ if (!retryConfig) {
1738
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
1739
+ }
1740
+ return [4 /*yield*/, utils.Retry(function () {
1741
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
1742
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
1743
+ case 1:
1744
+ httpRes = _c.sent();
1745
+ 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 : "";
1746
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1747
+ throw new Error("status code not found in response: ".concat(httpRes));
1748
+ }
1749
+ res = new operations.ListCommerceTransactionsResponse({
1750
+ statusCode: httpRes.status,
1751
+ contentType: contentType,
1752
+ rawResponse: httpRes,
1753
+ });
1754
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1755
+ switch (true) {
1756
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1757
+ if (utils.matchContentType(contentType, "application/json")) {
1758
+ res.commerceTransactions = utils.objectToClass(JSON.parse(decodedRes), shared.CommerceTransactions);
1759
+ }
1760
+ else {
1761
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1762
+ }
1763
+ break;
1764
+ case [400, 401, 404, 409, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
1765
+ if (utils.matchContentType(contentType, "application/json")) {
1766
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
1767
+ }
1768
+ else {
1769
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1770
+ }
1771
+ break;
1772
+ }
1773
+ return [2 /*return*/, res];
1774
+ }
1775
+ });
1776
+ });
1777
+ };
1778
+ return Sales;
1779
+ }());
1780
+ exports.Sales = Sales;