@codat/lending 4.2.0 → 4.3.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 (281) hide show
  1. package/README.md +36 -1
  2. package/dist/sdk/companies.d.ts +22 -7
  3. package/dist/sdk/companies.js +22 -7
  4. package/dist/sdk/models/operations/getcreateoperation.d.ts +1 -1
  5. package/dist/sdk/models/shared/accountingbillcreditnote.d.ts +2 -2
  6. package/dist/sdk/models/shared/accountingbillcreditnote.js +3 -3
  7. package/dist/sdk/models/shared/accountingcreateaccountresponse.d.ts +171 -34
  8. package/dist/sdk/models/shared/accountingcreateaccountresponse.js +194 -4
  9. package/dist/sdk/models/shared/accountingcreatebankaccountresponse.d.ts +116 -22
  10. package/dist/sdk/models/shared/accountingcreatebankaccountresponse.js +118 -4
  11. package/dist/sdk/models/shared/accountingcreatebanktransactionsresponse.d.ts +12 -2
  12. package/dist/sdk/models/shared/accountingcreatebanktransactionsresponse.js +26 -4
  13. package/dist/sdk/models/shared/accountingcreatedirectcostresponse.d.ts +165 -18
  14. package/dist/sdk/models/shared/accountingcreatedirectcostresponse.js +150 -4
  15. package/dist/sdk/models/shared/accountingcreatepaymentresponse.d.ts +797 -675
  16. package/dist/sdk/models/shared/accountingcreatepaymentresponse.js +782 -4
  17. package/dist/sdk/models/shared/accountingcreatesupplierresponse.d.ts +69 -11
  18. package/dist/sdk/models/shared/accountingcreatesupplierresponse.js +99 -4
  19. package/dist/sdk/models/shared/accountingcreatetransferresponse.d.ts +81 -9
  20. package/dist/sdk/models/shared/accountingcreatetransferresponse.js +93 -4
  21. package/dist/sdk/models/shared/accountingcreditnote.d.ts +2 -2
  22. package/dist/sdk/models/shared/accountingcreditnote.js +3 -3
  23. package/dist/sdk/models/shared/accountingdirectcost.d.ts +11 -5
  24. package/dist/sdk/models/shared/accountingdirectcost.js +18 -11
  25. package/dist/sdk/models/shared/accountinginvoice.d.ts +10 -5
  26. package/dist/sdk/models/shared/accountinginvoice.js +11 -5
  27. package/dist/sdk/models/shared/accountingjournalentry.d.ts +3 -7
  28. package/dist/sdk/models/shared/accountingjournalentry.js +3 -3
  29. package/dist/sdk/models/shared/accounttransactionline.d.ts +3 -7
  30. package/dist/sdk/models/shared/accounttransactionline.js +3 -3
  31. package/dist/sdk/models/shared/accounttransactionlinerecordref.d.ts +30 -0
  32. package/dist/sdk/models/shared/accounttransactionlinerecordref.js +70 -0
  33. package/dist/sdk/models/shared/bankingtransactioncategory.d.ts +5 -1
  34. package/dist/sdk/models/shared/bankingtransactioncategory.js +5 -1
  35. package/dist/sdk/models/shared/company.d.ts +10 -0
  36. package/dist/sdk/models/shared/company.js +20 -1
  37. package/dist/sdk/models/shared/companyrequestbody.d.ts +5 -0
  38. package/dist/sdk/models/shared/companyrequestbody.js +7 -0
  39. package/dist/sdk/models/shared/connection.d.ts +2 -0
  40. package/dist/sdk/models/shared/connection.js +2 -0
  41. package/dist/sdk/models/shared/contactref.d.ts +9 -3
  42. package/dist/sdk/models/shared/contactref.js +9 -2
  43. package/dist/sdk/models/shared/directcostprototype.d.ts +11 -5
  44. package/dist/sdk/models/shared/directcostprototype.js +18 -11
  45. package/dist/sdk/models/shared/errormessage.d.ts +5 -0
  46. package/dist/sdk/models/shared/errormessage.js +7 -0
  47. package/dist/sdk/models/shared/errorvalidation.d.ts +9 -0
  48. package/dist/sdk/models/shared/errorvalidation.js +56 -0
  49. package/dist/sdk/models/shared/errorvalidationitem.d.ts +15 -0
  50. package/dist/sdk/models/shared/errorvalidationitem.js +55 -0
  51. package/dist/sdk/models/shared/index.d.ts +6 -0
  52. package/dist/sdk/models/shared/index.js +6 -0
  53. package/dist/sdk/models/shared/invoicelineitem.d.ts +0 -2
  54. package/dist/sdk/models/shared/items.d.ts +2 -6
  55. package/dist/sdk/models/shared/items.js +2 -7
  56. package/dist/sdk/models/shared/journalentryrecordref.d.ts +30 -0
  57. package/dist/sdk/models/shared/journalentryrecordref.js +70 -0
  58. package/dist/sdk/models/shared/journalline.d.ts +2 -2
  59. package/dist/sdk/models/shared/journalline.js +3 -3
  60. package/dist/sdk/models/shared/tracking.d.ts +2 -1
  61. package/dist/sdk/models/shared/tracking.js +3 -2
  62. package/dist/sdk/models/shared/trackingrecordref.d.ts +22 -0
  63. package/dist/sdk/models/shared/trackingrecordref.js +62 -0
  64. package/dist/sdk/models/shared/withholdingtaxitems.d.ts +11 -0
  65. package/dist/sdk/models/shared/withholdingtaxitems.js +50 -0
  66. package/dist/sdk/sdk.js +3 -3
  67. package/docs/sdk/models/operations/createcompanyresponse.md +7 -7
  68. package/docs/sdk/models/operations/createconnectionresponse.md +7 -7
  69. package/docs/sdk/models/operations/createsupplierrequest.md +7 -7
  70. package/docs/sdk/models/operations/getaccountingagedcreditorsreportresponse.md +7 -7
  71. package/docs/sdk/models/operations/getaccountingageddebtorsreportresponse.md +7 -7
  72. package/docs/sdk/models/operations/getaccountingbillcreditnoteresponse.md +7 -7
  73. package/docs/sdk/models/operations/getaccountingbillpaymentresponse.md +7 -7
  74. package/docs/sdk/models/operations/getaccountingcreditnoteresponse.md +7 -7
  75. package/docs/sdk/models/operations/getaccountingprofileresponse.md +7 -7
  76. package/docs/sdk/models/operations/getaccountingsupplierresponse.md +7 -7
  77. package/docs/sdk/models/operations/getbankingaccountresponse.md +7 -7
  78. package/docs/sdk/models/operations/getbankingtransactioncategoryresponse.md +7 -7
  79. package/docs/sdk/models/operations/getbankingtransactionresponse.md +7 -7
  80. package/docs/sdk/models/operations/getcategorizedbalancesheetstatementresponse.md +7 -7
  81. package/docs/sdk/models/operations/getcategorizedprofitandlossstatementresponse.md +7 -7
  82. package/docs/sdk/models/operations/getcommercecustomerresponse.md +7 -7
  83. package/docs/sdk/models/operations/getcommercedisputeresponse.md +7 -7
  84. package/docs/sdk/models/operations/getcommercelocationresponse.md +7 -7
  85. package/docs/sdk/models/operations/getcommerceorderresponse.md +7 -7
  86. package/docs/sdk/models/operations/getcommerceproductcategoryresponse.md +7 -7
  87. package/docs/sdk/models/operations/getcompanyresponse.md +7 -7
  88. package/docs/sdk/models/operations/getconnectionresponse.md +7 -7
  89. package/docs/sdk/models/operations/getcreateoperationrequest.md +4 -4
  90. package/docs/sdk/models/operations/getloansummaryresponse.md +7 -7
  91. package/docs/sdk/models/operations/getpulloperationresponse.md +7 -7
  92. package/docs/sdk/models/operations/listaccountingaccountsresponse.md +7 -7
  93. package/docs/sdk/models/operations/listaccountingaccounttransactionsresponse.md +7 -7
  94. package/docs/sdk/models/operations/listaccountingbankaccountsresponse.md +7 -7
  95. package/docs/sdk/models/operations/listaccountingbankaccounttransactionsresponse.md +7 -7
  96. package/docs/sdk/models/operations/listaccountingbillcreditnotesresponse.md +7 -7
  97. package/docs/sdk/models/operations/listaccountingbillpaymentsresponse.md +7 -7
  98. package/docs/sdk/models/operations/listaccountingbillsresponse.md +7 -7
  99. package/docs/sdk/models/operations/listaccountingcreditnotesresponse.md +7 -7
  100. package/docs/sdk/models/operations/listaccountingcustomersresponse.md +7 -7
  101. package/docs/sdk/models/operations/listaccountingdirectcostsresponse.md +7 -7
  102. package/docs/sdk/models/operations/listaccountingdirectincomesresponse.md +7 -7
  103. package/docs/sdk/models/operations/listaccountinginvoicesresponse.md +7 -7
  104. package/docs/sdk/models/operations/listaccountingjournalentriesresponse.md +7 -7
  105. package/docs/sdk/models/operations/listaccountingjournalsresponse.md +7 -7
  106. package/docs/sdk/models/operations/listaccountingpaymentsresponse.md +7 -7
  107. package/docs/sdk/models/operations/listaccountingsuppliersresponse.md +7 -7
  108. package/docs/sdk/models/operations/listaccountingtransfersresponse.md +7 -7
  109. package/docs/sdk/models/operations/listbankingaccountbalancesresponse.md +7 -7
  110. package/docs/sdk/models/operations/listbankingaccountsresponse.md +7 -7
  111. package/docs/sdk/models/operations/listbankingtransactioncategoriesresponse.md +7 -7
  112. package/docs/sdk/models/operations/listbankingtransactionsresponse.md +7 -7
  113. package/docs/sdk/models/operations/listcommercecustomersresponse.md +7 -7
  114. package/docs/sdk/models/operations/listcommercedisputesresponse.md +7 -7
  115. package/docs/sdk/models/operations/listcommercelocationsresponse.md +7 -7
  116. package/docs/sdk/models/operations/listcommerceordersresponse.md +7 -7
  117. package/docs/sdk/models/operations/listcommercepaymentmethodsresponse.md +7 -7
  118. package/docs/sdk/models/operations/listcommercepaymentsresponse.md +7 -7
  119. package/docs/sdk/models/operations/listcommerceproductcategoriesresponse.md +7 -7
  120. package/docs/sdk/models/operations/listcommerceproductsresponse.md +7 -7
  121. package/docs/sdk/models/operations/listcommercetransactionsresponse.md +7 -7
  122. package/docs/sdk/models/operations/listcompaniesresponse.md +7 -7
  123. package/docs/sdk/models/operations/listconnectionsresponse.md +7 -7
  124. package/docs/sdk/models/operations/listcreateoperationsresponse.md +7 -7
  125. package/docs/sdk/models/operations/listdataintegritydetailsresponse.md +7 -7
  126. package/docs/sdk/models/operations/listloantransactionsresponse.md +7 -7
  127. package/docs/sdk/models/operations/listpulloperationsresponse.md +7 -7
  128. package/docs/sdk/models/operations/refreshdatatyperesponse.md +7 -7
  129. package/docs/sdk/models/operations/unlinkconnectionresponse.md +7 -7
  130. package/docs/sdk/models/operations/updatecompanyresponse.md +7 -7
  131. package/docs/sdk/models/shared/accountingaccounts.md +7 -7
  132. package/docs/sdk/models/shared/accountingaccounttransactions.md +7 -7
  133. package/docs/sdk/models/shared/accountingbankaccounts.md +7 -7
  134. package/docs/sdk/models/shared/accountingbanktransactions.md +7 -7
  135. package/docs/sdk/models/shared/accountingbillcreditnote.md +1 -1
  136. package/docs/sdk/models/shared/accountingbillcreditnotes.md +7 -7
  137. package/docs/sdk/models/shared/accountingbillpayment.md +1 -1
  138. package/docs/sdk/models/shared/accountingbillpayments.md +7 -7
  139. package/docs/sdk/models/shared/accountingbills.md +7 -7
  140. package/docs/sdk/models/shared/accountingcreateaccountresponse.md +16 -16
  141. package/docs/sdk/models/shared/accountingcreateaccountresponseaccountingaccount.md +54 -0
  142. package/docs/sdk/models/shared/accountingcreateaccountresponsevaliddatatypelinks.md +50 -0
  143. package/docs/sdk/models/shared/accountingcreatebankaccountresponse.md +16 -16
  144. package/docs/sdk/models/shared/accountingcreatebankaccountresponseaccountingbankaccount.md +42 -0
  145. package/docs/sdk/models/shared/accountingcreatebankaccounttransactions.md +11 -0
  146. package/docs/sdk/models/shared/accountingcreatebanktransactionsresponse.md +1 -1
  147. package/docs/sdk/models/shared/accountingcreatedirectcostresponse.md +16 -16
  148. package/docs/sdk/models/shared/accountingcreatedirectcostresponseaccountingdirectcost.md +41 -0
  149. package/docs/sdk/models/shared/accountingcreatedirectcostresponsecontactreference.md +11 -0
  150. package/docs/sdk/models/shared/accountingcreatedirectcostresponsedatatype.md +11 -0
  151. package/docs/sdk/models/shared/accountingcreatepaymentresponse.md +16 -16
  152. package/docs/sdk/models/shared/accountingcreatepaymentresponseaccountingpayment.md +703 -0
  153. package/docs/sdk/models/shared/accountingcreatesupplierresponse.md +1 -1
  154. package/docs/sdk/models/shared/accountingcreatesupplierresponseaccountingsupplier.md +29 -0
  155. package/docs/sdk/models/shared/accountingcreatetransferresponse.md +1 -1
  156. package/docs/sdk/models/shared/accountingcreatetransferresponseaccountingtransfer.md +25 -0
  157. package/docs/sdk/models/shared/accountingcreditnote.md +1 -1
  158. package/docs/sdk/models/shared/accountingcreditnotes.md +7 -7
  159. package/docs/sdk/models/shared/accountingcustomers.md +7 -7
  160. package/docs/sdk/models/shared/accountingdirectcost.md +1 -1
  161. package/docs/sdk/models/shared/accountingdirectcostcontactreference.md +11 -0
  162. package/docs/sdk/models/shared/accountingdirectcostdatatype.md +11 -0
  163. package/docs/sdk/models/shared/accountingdirectcosts.md +7 -7
  164. package/docs/sdk/models/shared/accountingdirectincomes.md +7 -7
  165. package/docs/sdk/models/shared/accountinginvoice.md +1 -1
  166. package/docs/sdk/models/shared/accountinginvoicedatatype.md +10 -0
  167. package/docs/sdk/models/shared/accountinginvoices.md +7 -7
  168. package/docs/sdk/models/shared/accountingjournalentries.md +7 -7
  169. package/docs/sdk/models/shared/accountingjournalentry.md +1 -1
  170. package/docs/sdk/models/shared/accountingjournals.md +7 -7
  171. package/docs/sdk/models/shared/accountingpayment.md +1 -1
  172. package/docs/sdk/models/shared/accountingpayments.md +7 -7
  173. package/docs/sdk/models/shared/accountingsuppliers.md +7 -7
  174. package/docs/sdk/models/shared/accountingtransfers.md +7 -7
  175. package/docs/sdk/models/shared/accounts.md +1 -1
  176. package/docs/sdk/models/shared/accounttransactionline.md +5 -5
  177. package/docs/sdk/models/shared/accounttransactionlinerecordref.md +11 -0
  178. package/docs/sdk/models/shared/accounttransactionlinerecordrefdatatype.md +20 -0
  179. package/docs/sdk/models/shared/bankingaccountbalances.md +7 -7
  180. package/docs/sdk/models/shared/bankingaccounts.md +7 -7
  181. package/docs/sdk/models/shared/bankingtransactioncategories.md +7 -7
  182. package/docs/sdk/models/shared/bankingtransactioncategory.md +3 -1
  183. package/docs/sdk/models/shared/bankingtransactions.md +7 -7
  184. package/docs/sdk/models/shared/commercecustomers.md +7 -7
  185. package/docs/sdk/models/shared/commercedisputes.md +7 -7
  186. package/docs/sdk/models/shared/commercelocations.md +7 -7
  187. package/docs/sdk/models/shared/commerceorders.md +7 -7
  188. package/docs/sdk/models/shared/commercepayment.md +1 -1
  189. package/docs/sdk/models/shared/commercepaymentmethods.md +7 -7
  190. package/docs/sdk/models/shared/commercepayments.md +7 -7
  191. package/docs/sdk/models/shared/commerceproductcategories.md +7 -7
  192. package/docs/sdk/models/shared/commerceproducts.md +7 -7
  193. package/docs/sdk/models/shared/commercetransactions.md +7 -7
  194. package/docs/sdk/models/shared/companies.md +7 -7
  195. package/docs/sdk/models/shared/company.md +1 -0
  196. package/docs/sdk/models/shared/companyrequestbody.md +1 -0
  197. package/docs/sdk/models/shared/connections.md +7 -7
  198. package/docs/sdk/models/shared/contactref.md +4 -4
  199. package/docs/sdk/models/shared/contactrefdatatype.md +11 -0
  200. package/docs/sdk/models/shared/contactreference.md +11 -0
  201. package/docs/sdk/models/shared/dataintegritydetails.md +7 -7
  202. package/docs/sdk/models/shared/directcostprototype.md +1 -1
  203. package/docs/sdk/models/shared/directcostprototypedatatype.md +11 -0
  204. package/docs/sdk/models/shared/enhancedcashflowtransaction.md +2 -2
  205. package/docs/sdk/models/shared/enhancedcashflowtransactions.md +5 -5
  206. package/docs/sdk/models/shared/enhancedinvoicesreport.md +4 -4
  207. package/docs/sdk/models/shared/errormessage.md +9 -8
  208. package/docs/sdk/models/shared/errorvalidation.md +11 -0
  209. package/docs/sdk/models/shared/errorvalidationitem.md +10 -0
  210. package/docs/sdk/models/shared/groupreference.md +8 -0
  211. package/docs/sdk/models/shared/invoicelineitem.md +1 -1
  212. package/docs/sdk/models/shared/items.md +3 -4
  213. package/docs/sdk/models/shared/journalentryrecordref.md +11 -0
  214. package/docs/sdk/models/shared/journalentryrecordrefdatatype.md +20 -0
  215. package/docs/sdk/models/shared/journallinetracking.md +3 -3
  216. package/docs/sdk/models/shared/pulloperations.md +7 -7
  217. package/docs/sdk/models/shared/pushoperations.md +7 -7
  218. package/docs/sdk/models/shared/salesorderreference.md +4 -4
  219. package/docs/sdk/models/shared/sourcetype.md +2 -0
  220. package/docs/sdk/models/shared/tracking.md +1 -1
  221. package/docs/sdk/models/shared/trackingrecordref.md +11 -0
  222. package/docs/sdk/models/shared/trackingrecordrefdatatype.md +12 -0
  223. package/docs/sdk/models/shared/withholdingtaxitems.md +9 -0
  224. package/docs/sdks/accountbalances/README.md +1 -1
  225. package/docs/sdks/accounts/README.md +2 -2
  226. package/docs/sdks/accounttransactions/README.md +2 -2
  227. package/docs/sdks/balancesheet/README.md +2 -2
  228. package/docs/sdks/bankaccounts/README.md +2 -2
  229. package/docs/sdks/banktransactions/README.md +2 -2
  230. package/docs/sdks/billcreditnotes/README.md +2 -2
  231. package/docs/sdks/billpayments/README.md +2 -2
  232. package/docs/sdks/bills/README.md +5 -5
  233. package/docs/sdks/cashflow/README.md +1 -1
  234. package/docs/sdks/categorizedstatement/README.md +1 -1
  235. package/docs/sdks/codatlendingaccountingbankdata/README.md +1 -1
  236. package/docs/sdks/codatlendingaccounts/README.md +2 -2
  237. package/docs/sdks/codatlendingbankingtransactions/README.md +2 -2
  238. package/docs/sdks/codatlendingcustomers/README.md +2 -2
  239. package/docs/sdks/codatlendingdirectcosts/README.md +5 -5
  240. package/docs/sdks/codatlendingfinancialstatementsaccounts/README.md +2 -2
  241. package/docs/sdks/codatlendingloanwritebackaccounts/README.md +2 -2
  242. package/docs/sdks/codatlendingpayments/README.md +4 -3
  243. package/docs/sdks/codatlendingreports/README.md +2 -2
  244. package/docs/sdks/codatlendingsalespayments/README.md +2 -2
  245. package/docs/sdks/codatlendingsuppliers/README.md +26 -7
  246. package/docs/sdks/codatlendingtransactions/README.md +2 -2
  247. package/docs/sdks/codatlendingtransfers/README.md +2 -2
  248. package/docs/sdks/companies/README.md +38 -13
  249. package/docs/sdks/companyinfo/README.md +2 -2
  250. package/docs/sdks/connections/README.md +5 -5
  251. package/docs/sdks/createoperations/README.md +2 -2
  252. package/docs/sdks/creditnotes/README.md +2 -2
  253. package/docs/sdks/customers/README.md +5 -5
  254. package/docs/sdks/dataintegrity/README.md +3 -3
  255. package/docs/sdks/directcosts/README.md +10 -11
  256. package/docs/sdks/directincomes/README.md +5 -5
  257. package/docs/sdks/disputes/README.md +2 -2
  258. package/docs/sdks/excelreports/README.md +3 -3
  259. package/docs/sdks/fileupload/README.md +3 -3
  260. package/docs/sdks/invoices/README.md +7 -7
  261. package/docs/sdks/journalentries/README.md +2 -2
  262. package/docs/sdks/journals/README.md +2 -2
  263. package/docs/sdks/liabilities/README.md +4 -4
  264. package/docs/sdks/locations/README.md +2 -2
  265. package/docs/sdks/managedata/README.md +1 -1
  266. package/docs/sdks/metrics/README.md +3 -3
  267. package/docs/sdks/orders/README.md +2 -2
  268. package/docs/sdks/paymentmethods/README.md +2 -2
  269. package/docs/sdks/payments/README.md +2 -2
  270. package/docs/sdks/productcategories/README.md +2 -2
  271. package/docs/sdks/products/README.md +2 -2
  272. package/docs/sdks/profitandloss/README.md +2 -2
  273. package/docs/sdks/pulloperations/README.md +2 -2
  274. package/docs/sdks/refresh/README.md +2 -2
  275. package/docs/sdks/reports/README.md +4 -4
  276. package/docs/sdks/suppliers/README.md +5 -5
  277. package/docs/sdks/transactioncategories/README.md +2 -2
  278. package/docs/sdks/transfers/README.md +3 -4
  279. package/package.json +1 -1
  280. package/docs/sdk/models/shared/accountingdirectcostcontactref.md +0 -11
  281. package/docs/sdk/models/shared/directcostprototypecontactref.md +0 -11
@@ -1,18 +1,111 @@
1
1
  import { SpeakeasyBase } from "../../../internal/utils";
2
- import { AccountingDirectCost } from "./accountingdirectcost";
2
+ import { AccountingPaymentAllocation } from "./accountingpaymentallocation";
3
3
  import { DataType } from "./datatype";
4
+ import { DirectCostLineItem } from "./directcostlineitem";
5
+ import { Metadata } from "./metadata";
4
6
  import { PushOperationChange } from "./pushoperationchange";
5
7
  import { PushOperationStatus } from "./pushoperationstatus";
8
+ import { SupplementalData } from "./supplementaldata";
6
9
  import { Validation } from "./validation";
7
- export declare class AccountingCreateDirectCostResponse extends SpeakeasyBase {
10
+ /**
11
+ * Allowed name of the 'dataType'.
12
+ */
13
+ export declare enum AccountingCreateDirectCostResponseDataType {
14
+ Customers = "customers",
15
+ Suppliers = "suppliers"
16
+ }
17
+ /**
18
+ * A customer or supplier associated with the direct cost.
19
+ */
20
+ export declare class AccountingCreateDirectCostResponseContactReference extends SpeakeasyBase {
8
21
  /**
9
- * Contains a single entry that communicates which record has changed and the manner in which it changed.
22
+ * Allowed name of the 'dataType'.
10
23
  */
11
- changes?: PushOperationChange[];
24
+ dataType?: AccountingCreateDirectCostResponseDataType;
12
25
  /**
13
- * Unique identifier for your SMB in Codat.
26
+ * Unique identifier for a customer or supplier.
14
27
  */
15
- companyId: string;
28
+ id: string;
29
+ }
30
+ /**
31
+ * > **Language tip:** Direct costs may also be referred to as **Spend transactions**, **Spend money transactions**, or **Payments** in various accounting platforms.
32
+ *
33
+ * @remarks
34
+ *
35
+ * > View the coverage for direct costs in the <a className="external" href="https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts" target="_blank">Data coverage explorer</a>.
36
+ *
37
+ * ## Overview
38
+ *
39
+ * Direct costs are the expenses associated with a business' operations. For example, purchases of raw materials and service fees are considered direct costs.
40
+ *
41
+ * Direct costs include:
42
+ * * Purchasing an item and paying it off at the point of the purchase
43
+ * * Receiving cash from a refunded item if the refund is made by the supplier
44
+ * * Withdrawing money from a bank account
45
+ * * Writing a cheque
46
+ *
47
+ * Direct costs is a child data type of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction).
48
+ *
49
+ * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
50
+ */
51
+ export declare class AccountingCreateDirectCostResponseAccountingDirectCost extends SpeakeasyBase {
52
+ /**
53
+ * A customer or supplier associated with the direct cost.
54
+ */
55
+ contactRef?: AccountingCreateDirectCostResponseContactReference;
56
+ /**
57
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
58
+ *
59
+ * @remarks
60
+ *
61
+ * ## Unknown currencies
62
+ *
63
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
64
+ *
65
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
66
+ */
67
+ currency: string;
68
+ /**
69
+ * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.
70
+ *
71
+ * @remarks
72
+ *
73
+ * Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.
74
+ *
75
+ * It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.
76
+ *
77
+ * Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).
78
+ *
79
+ * For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.
80
+ *
81
+ * ## Examples with base currency of GBP
82
+ *
83
+ * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) |
84
+ * | :--------------- | :------------- | :------------ | :------------------------- |
85
+ * | **USD** | $20 | 0.781 | £15.62 |
86
+ * | **EUR** | €20 | 0.885 | £17.70 |
87
+ * | **RUB** | ₽20 | 0.011 | £0.22 |
88
+ *
89
+ * ## Examples with base currency of USD
90
+ *
91
+ * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) |
92
+ * | :--------------- | :------------- | :------------ | :------------------------- |
93
+ * | **GBP** | £20 | 1.277 | $25.54 |
94
+ * | **EUR** | €20 | 1.134 | $22.68 |
95
+ * | **RUB** | ₽20 | 0.015 | $0.30 |
96
+ *
97
+ *
98
+ * ### Integration-specific details
99
+ *
100
+ * | Integration | Scenario | System behavior |
101
+ * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
102
+ * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, include the required currency rate in the expense transaction. |
103
+ */
104
+ currencyRate?: number;
105
+ /**
106
+ * Identifier of the direct cost, unique for the company.
107
+ */
108
+ id?: string;
16
109
  /**
17
110
  * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
18
111
  *
@@ -36,27 +129,81 @@ export declare class AccountingCreateDirectCostResponse extends SpeakeasyBase {
36
129
  * > Not all dates from Codat will contain information about time zones.
37
130
  * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
38
131
  */
39
- completedOnUtc?: string;
132
+ issueDate: string;
133
+ /**
134
+ * An array of line items.
135
+ */
136
+ lineItems: DirectCostLineItem[];
137
+ metadata?: Metadata;
138
+ modifiedDate?: string;
139
+ /**
140
+ * A note attached to the direct cost.
141
+ */
142
+ note?: string;
143
+ /**
144
+ * An array of payment allocations.
145
+ */
146
+ paymentAllocations: AccountingPaymentAllocation[];
147
+ /**
148
+ * User-friendly reference for the direct cost.
149
+ */
150
+ reference?: string;
151
+ sourceModifiedDate?: string;
152
+ /**
153
+ * The total amount of the direct costs, excluding any taxes.
154
+ */
155
+ subTotal: number;
40
156
  /**
41
- * > **Language tip:** Direct costs may also be referred to as **Spend transactions**, **Spend money transactions**, or **Payments** in various accounting platforms.
157
+ * Supplemental data is additional data you can include in our standard data types.
42
158
  *
43
159
  * @remarks
44
160
  *
45
- * > View the coverage for direct costs in the <a className="external" href="https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts" target="_blank">Data coverage explorer</a>.
161
+ * It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
162
+ */
163
+ supplementalData?: SupplementalData;
164
+ /**
165
+ * The total amount of tax on the direct costs.
166
+ */
167
+ taxAmount: number;
168
+ /**
169
+ * The amount of the direct costs, inclusive of tax.
170
+ */
171
+ totalAmount: number;
172
+ }
173
+ export declare class AccountingCreateDirectCostResponse extends SpeakeasyBase {
174
+ /**
175
+ * Contains a single entry that communicates which record has changed and the manner in which it changed.
176
+ */
177
+ changes?: PushOperationChange[];
178
+ /**
179
+ * Unique identifier for your SMB in Codat.
180
+ */
181
+ companyId: string;
182
+ /**
183
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
184
+ *
185
+ * @remarks
186
+ *
187
+ * ```
188
+ * 2020-10-08T22:40:50Z
189
+ * 2021-01-01T00:00:00
190
+ * ```
46
191
  *
47
- * ## Overview
48
192
  *
49
- * Direct costs are the expenses associated with a business' operations. For example, purchases of raw materials and service fees are considered direct costs.
50
193
  *
51
- * Direct costs include:
52
- * * Purchasing an item and paying it off at the point of the purchase
53
- * * Receiving cash from a refunded item if the refund is made by the supplier
54
- * * Withdrawing money from a bank account
55
- * * Writing a cheque
194
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
56
195
  *
57
- * Direct costs is a child data type of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction).
196
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
197
+ * - Unqualified local time: `2021-11-15T01:00:00`
198
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
199
+ *
200
+ * > Time zones
201
+ * >
202
+ * > Not all dates from Codat will contain information about time zones.
203
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
58
204
  */
59
- data?: AccountingDirectCost;
205
+ completedOnUtc?: string;
206
+ data?: AccountingCreateDirectCostResponseAccountingDirectCost;
60
207
  /**
61
208
  * Unique identifier for a company's data connection.
62
209
  */
@@ -27,14 +27,160 @@ var __metadata = (this && this.__metadata) || function (k, v) {
27
27
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.AccountingCreateDirectCostResponse = void 0;
30
+ exports.AccountingCreateDirectCostResponse = exports.AccountingCreateDirectCostResponseAccountingDirectCost = exports.AccountingCreateDirectCostResponseContactReference = exports.AccountingCreateDirectCostResponseDataType = void 0;
31
31
  var utils_1 = require("../../../internal/utils");
32
- var accountingdirectcost_1 = require("./accountingdirectcost");
32
+ var accountingpaymentallocation_1 = require("./accountingpaymentallocation");
33
33
  var datatype_1 = require("./datatype");
34
+ var directcostlineitem_1 = require("./directcostlineitem");
35
+ var metadata_1 = require("./metadata");
34
36
  var pushoperationchange_1 = require("./pushoperationchange");
35
37
  var pushoperationstatus_1 = require("./pushoperationstatus");
38
+ var supplementaldata_1 = require("./supplementaldata");
36
39
  var validation_1 = require("./validation");
37
40
  var class_transformer_1 = require("class-transformer");
41
+ /**
42
+ * Allowed name of the 'dataType'.
43
+ */
44
+ var AccountingCreateDirectCostResponseDataType;
45
+ (function (AccountingCreateDirectCostResponseDataType) {
46
+ AccountingCreateDirectCostResponseDataType["Customers"] = "customers";
47
+ AccountingCreateDirectCostResponseDataType["Suppliers"] = "suppliers";
48
+ })(AccountingCreateDirectCostResponseDataType = exports.AccountingCreateDirectCostResponseDataType || (exports.AccountingCreateDirectCostResponseDataType = {}));
49
+ /**
50
+ * A customer or supplier associated with the direct cost.
51
+ */
52
+ var AccountingCreateDirectCostResponseContactReference = /** @class */ (function (_super) {
53
+ __extends(AccountingCreateDirectCostResponseContactReference, _super);
54
+ function AccountingCreateDirectCostResponseContactReference() {
55
+ return _super !== null && _super.apply(this, arguments) || this;
56
+ }
57
+ __decorate([
58
+ (0, utils_1.SpeakeasyMetadata)(),
59
+ (0, class_transformer_1.Expose)({ name: "dataType" }),
60
+ __metadata("design:type", String)
61
+ ], AccountingCreateDirectCostResponseContactReference.prototype, "dataType", void 0);
62
+ __decorate([
63
+ (0, utils_1.SpeakeasyMetadata)(),
64
+ (0, class_transformer_1.Expose)({ name: "id" }),
65
+ __metadata("design:type", String)
66
+ ], AccountingCreateDirectCostResponseContactReference.prototype, "id", void 0);
67
+ return AccountingCreateDirectCostResponseContactReference;
68
+ }(utils_1.SpeakeasyBase));
69
+ exports.AccountingCreateDirectCostResponseContactReference = AccountingCreateDirectCostResponseContactReference;
70
+ /**
71
+ * > **Language tip:** Direct costs may also be referred to as **Spend transactions**, **Spend money transactions**, or **Payments** in various accounting platforms.
72
+ *
73
+ * @remarks
74
+ *
75
+ * > View the coverage for direct costs in the <a className="external" href="https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts" target="_blank">Data coverage explorer</a>.
76
+ *
77
+ * ## Overview
78
+ *
79
+ * Direct costs are the expenses associated with a business' operations. For example, purchases of raw materials and service fees are considered direct costs.
80
+ *
81
+ * Direct costs include:
82
+ * * Purchasing an item and paying it off at the point of the purchase
83
+ * * Receiving cash from a refunded item if the refund is made by the supplier
84
+ * * Withdrawing money from a bank account
85
+ * * Writing a cheque
86
+ *
87
+ * Direct costs is a child data type of [account transactions](https://docs.codat.io/lending-api#/schemas/AccountTransaction).
88
+ *
89
+ * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
90
+ */
91
+ var AccountingCreateDirectCostResponseAccountingDirectCost = /** @class */ (function (_super) {
92
+ __extends(AccountingCreateDirectCostResponseAccountingDirectCost, _super);
93
+ function AccountingCreateDirectCostResponseAccountingDirectCost() {
94
+ return _super !== null && _super.apply(this, arguments) || this;
95
+ }
96
+ __decorate([
97
+ (0, utils_1.SpeakeasyMetadata)(),
98
+ (0, class_transformer_1.Expose)({ name: "contactRef" }),
99
+ (0, class_transformer_1.Type)(function () { return AccountingCreateDirectCostResponseContactReference; }),
100
+ __metadata("design:type", AccountingCreateDirectCostResponseContactReference)
101
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "contactRef", void 0);
102
+ __decorate([
103
+ (0, utils_1.SpeakeasyMetadata)(),
104
+ (0, class_transformer_1.Expose)({ name: "currency" }),
105
+ __metadata("design:type", String)
106
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "currency", void 0);
107
+ __decorate([
108
+ (0, utils_1.SpeakeasyMetadata)(),
109
+ (0, class_transformer_1.Expose)({ name: "currencyRate" }),
110
+ __metadata("design:type", Number)
111
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "currencyRate", void 0);
112
+ __decorate([
113
+ (0, utils_1.SpeakeasyMetadata)(),
114
+ (0, class_transformer_1.Expose)({ name: "id" }),
115
+ __metadata("design:type", String)
116
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "id", void 0);
117
+ __decorate([
118
+ (0, utils_1.SpeakeasyMetadata)(),
119
+ (0, class_transformer_1.Expose)({ name: "issueDate" }),
120
+ __metadata("design:type", String)
121
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "issueDate", void 0);
122
+ __decorate([
123
+ (0, utils_1.SpeakeasyMetadata)({ elemType: directcostlineitem_1.DirectCostLineItem }),
124
+ (0, class_transformer_1.Expose)({ name: "lineItems" }),
125
+ (0, class_transformer_1.Type)(function () { return directcostlineitem_1.DirectCostLineItem; }),
126
+ __metadata("design:type", Array)
127
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "lineItems", void 0);
128
+ __decorate([
129
+ (0, utils_1.SpeakeasyMetadata)(),
130
+ (0, class_transformer_1.Expose)({ name: "metadata" }),
131
+ (0, class_transformer_1.Type)(function () { return metadata_1.Metadata; }),
132
+ __metadata("design:type", metadata_1.Metadata)
133
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "metadata", void 0);
134
+ __decorate([
135
+ (0, utils_1.SpeakeasyMetadata)(),
136
+ (0, class_transformer_1.Expose)({ name: "modifiedDate" }),
137
+ __metadata("design:type", String)
138
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "modifiedDate", void 0);
139
+ __decorate([
140
+ (0, utils_1.SpeakeasyMetadata)(),
141
+ (0, class_transformer_1.Expose)({ name: "note" }),
142
+ __metadata("design:type", String)
143
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "note", void 0);
144
+ __decorate([
145
+ (0, utils_1.SpeakeasyMetadata)({ elemType: accountingpaymentallocation_1.AccountingPaymentAllocation }),
146
+ (0, class_transformer_1.Expose)({ name: "paymentAllocations" }),
147
+ (0, class_transformer_1.Type)(function () { return accountingpaymentallocation_1.AccountingPaymentAllocation; }),
148
+ __metadata("design:type", Array)
149
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "paymentAllocations", void 0);
150
+ __decorate([
151
+ (0, utils_1.SpeakeasyMetadata)(),
152
+ (0, class_transformer_1.Expose)({ name: "reference" }),
153
+ __metadata("design:type", String)
154
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "reference", void 0);
155
+ __decorate([
156
+ (0, utils_1.SpeakeasyMetadata)(),
157
+ (0, class_transformer_1.Expose)({ name: "sourceModifiedDate" }),
158
+ __metadata("design:type", String)
159
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "sourceModifiedDate", void 0);
160
+ __decorate([
161
+ (0, utils_1.SpeakeasyMetadata)(),
162
+ (0, class_transformer_1.Expose)({ name: "subTotal" }),
163
+ __metadata("design:type", Number)
164
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "subTotal", void 0);
165
+ __decorate([
166
+ (0, utils_1.SpeakeasyMetadata)(),
167
+ (0, class_transformer_1.Expose)({ name: "supplementalData" }),
168
+ (0, class_transformer_1.Type)(function () { return supplementaldata_1.SupplementalData; }),
169
+ __metadata("design:type", supplementaldata_1.SupplementalData)
170
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "supplementalData", void 0);
171
+ __decorate([
172
+ (0, utils_1.SpeakeasyMetadata)(),
173
+ (0, class_transformer_1.Expose)({ name: "taxAmount" }),
174
+ __metadata("design:type", Number)
175
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "taxAmount", void 0);
176
+ __decorate([
177
+ (0, utils_1.SpeakeasyMetadata)(),
178
+ (0, class_transformer_1.Expose)({ name: "totalAmount" }),
179
+ __metadata("design:type", Number)
180
+ ], AccountingCreateDirectCostResponseAccountingDirectCost.prototype, "totalAmount", void 0);
181
+ return AccountingCreateDirectCostResponseAccountingDirectCost;
182
+ }(utils_1.SpeakeasyBase));
183
+ exports.AccountingCreateDirectCostResponseAccountingDirectCost = AccountingCreateDirectCostResponseAccountingDirectCost;
38
184
  var AccountingCreateDirectCostResponse = /** @class */ (function (_super) {
39
185
  __extends(AccountingCreateDirectCostResponse, _super);
40
186
  function AccountingCreateDirectCostResponse() {
@@ -59,8 +205,8 @@ var AccountingCreateDirectCostResponse = /** @class */ (function (_super) {
59
205
  __decorate([
60
206
  (0, utils_1.SpeakeasyMetadata)(),
61
207
  (0, class_transformer_1.Expose)({ name: "data" }),
62
- (0, class_transformer_1.Type)(function () { return accountingdirectcost_1.AccountingDirectCost; }),
63
- __metadata("design:type", accountingdirectcost_1.AccountingDirectCost)
208
+ (0, class_transformer_1.Type)(function () { return AccountingCreateDirectCostResponseAccountingDirectCost; }),
209
+ __metadata("design:type", AccountingCreateDirectCostResponseAccountingDirectCost)
64
210
  ], AccountingCreateDirectCostResponse.prototype, "data", void 0);
65
211
  __decorate([
66
212
  (0, utils_1.SpeakeasyMetadata)(),