@apideck/unify 0.22.1 → 0.23.1

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 (299) hide show
  1. package/docs/sdks/connections/README.md +2 -6
  2. package/docs/sdks/connectionsettings/README.md +2 -6
  3. package/docs/sdks/employees/README.md +4 -0
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +4 -4
  6. package/lib/config.js +4 -4
  7. package/lib/matchers.d.ts +3 -1
  8. package/lib/matchers.d.ts.map +1 -1
  9. package/lib/matchers.js +12 -0
  10. package/lib/matchers.js.map +1 -1
  11. package/lib/sdks.js +7 -2
  12. package/lib/sdks.js.map +1 -1
  13. package/models/components/accountingdepartment.d.ts +10 -0
  14. package/models/components/accountingdepartment.d.ts.map +1 -1
  15. package/models/components/accountingdepartment.js +4 -0
  16. package/models/components/accountingdepartment.js.map +1 -1
  17. package/models/components/{billinput.d.ts → bill.d.ts} +75 -75
  18. package/models/components/bill.d.ts.map +1 -0
  19. package/models/components/{billinput.js → bill.js} +70 -70
  20. package/models/components/bill.js.map +1 -0
  21. package/models/components/{billlineiteminput.d.ts → billlineitem.d.ts} +59 -59
  22. package/models/components/billlineitem.d.ts.map +1 -0
  23. package/models/components/{billlineiteminput.js → billlineitem.js} +56 -56
  24. package/models/components/billlineitem.js.map +1 -0
  25. package/models/components/{billpaymentinput.d.ts → billpayment.d.ts} +102 -102
  26. package/models/components/billpayment.d.ts.map +1 -0
  27. package/models/components/{billpaymentinput.js → billpayment.js} +100 -100
  28. package/models/components/billpayment.js.map +1 -0
  29. package/models/components/{companyinput.d.ts → company.d.ts} +77 -77
  30. package/models/components/company.d.ts.map +1 -0
  31. package/models/components/{companyinput.js → company.js} +67 -67
  32. package/models/components/company.js.map +1 -0
  33. package/models/components/{connectioninput.d.ts → connection.d.ts} +139 -139
  34. package/models/components/connection.d.ts.map +1 -0
  35. package/models/components/{connectioninput.js → connection.js} +150 -150
  36. package/models/components/connection.js.map +1 -0
  37. package/models/components/createconnectionresponse.d.ts +1 -1
  38. package/models/components/createconnectionresponse.d.ts.map +1 -1
  39. package/models/components/createconnectionresponse.js +3 -3
  40. package/models/components/createconnectionresponse.js.map +1 -1
  41. package/models/components/creditnote.d.ts +1 -1
  42. package/models/components/creditnote.d.ts.map +1 -1
  43. package/models/components/creditnote.js +5 -5
  44. package/models/components/creditnote.js.map +1 -1
  45. package/models/components/{employeeinput.d.ts → employee.d.ts} +69 -69
  46. package/models/components/employee.d.ts.map +1 -0
  47. package/models/components/{employeeinput.js → employee.js} +66 -66
  48. package/models/components/employee.js.map +1 -0
  49. package/models/components/employeeschedules.d.ts +1 -1
  50. package/models/components/employeeschedules.d.ts.map +1 -1
  51. package/models/components/employeeschedules.js +3 -3
  52. package/models/components/employeeschedules.js.map +1 -1
  53. package/models/components/employeesfilter.d.ts +5 -0
  54. package/models/components/employeesfilter.d.ts.map +1 -1
  55. package/models/components/employeesfilter.js +2 -0
  56. package/models/components/employeesfilter.js.map +1 -1
  57. package/models/components/getbillpaymentresponse.d.ts +1 -1
  58. package/models/components/getbillpaymentresponse.d.ts.map +1 -1
  59. package/models/components/getbillpaymentresponse.js +3 -3
  60. package/models/components/getbillpaymentresponse.js.map +1 -1
  61. package/models/components/getbillpaymentsresponse.d.ts +1 -1
  62. package/models/components/getbillpaymentsresponse.d.ts.map +1 -1
  63. package/models/components/getbillpaymentsresponse.js +3 -3
  64. package/models/components/getbillpaymentsresponse.js.map +1 -1
  65. package/models/components/getbillresponse.d.ts +1 -1
  66. package/models/components/getbillresponse.d.ts.map +1 -1
  67. package/models/components/getbillresponse.js +3 -3
  68. package/models/components/getbillresponse.js.map +1 -1
  69. package/models/components/getbillsresponse.d.ts +1 -1
  70. package/models/components/getbillsresponse.d.ts.map +1 -1
  71. package/models/components/getbillsresponse.js +3 -3
  72. package/models/components/getbillsresponse.js.map +1 -1
  73. package/models/components/getcompaniesresponse.d.ts +1 -1
  74. package/models/components/getcompaniesresponse.d.ts.map +1 -1
  75. package/models/components/getcompaniesresponse.js +3 -3
  76. package/models/components/getcompaniesresponse.js.map +1 -1
  77. package/models/components/getcompanyresponse.d.ts +1 -1
  78. package/models/components/getcompanyresponse.d.ts.map +1 -1
  79. package/models/components/getcompanyresponse.js +3 -3
  80. package/models/components/getcompanyresponse.js.map +1 -1
  81. package/models/components/getconnectionresponse.d.ts +1 -1
  82. package/models/components/getconnectionresponse.d.ts.map +1 -1
  83. package/models/components/getconnectionresponse.js +3 -3
  84. package/models/components/getconnectionresponse.js.map +1 -1
  85. package/models/components/getconnectionsresponse.d.ts +1 -1
  86. package/models/components/getconnectionsresponse.d.ts.map +1 -1
  87. package/models/components/getconnectionsresponse.js +3 -3
  88. package/models/components/getconnectionsresponse.js.map +1 -1
  89. package/models/components/getemployeeresponse.d.ts +1 -1
  90. package/models/components/getemployeeresponse.d.ts.map +1 -1
  91. package/models/components/getemployeeresponse.js +3 -3
  92. package/models/components/getemployeeresponse.js.map +1 -1
  93. package/models/components/getemployeesresponse.d.ts +1 -1
  94. package/models/components/getemployeesresponse.d.ts.map +1 -1
  95. package/models/components/getemployeesresponse.js +3 -3
  96. package/models/components/getemployeesresponse.js.map +1 -1
  97. package/models/components/getmessageresponse.d.ts +1 -1
  98. package/models/components/getmessageresponse.d.ts.map +1 -1
  99. package/models/components/getmessageresponse.js +3 -3
  100. package/models/components/getmessageresponse.js.map +1 -1
  101. package/models/components/getmessagesresponse.d.ts +1 -1
  102. package/models/components/getmessagesresponse.d.ts.map +1 -1
  103. package/models/components/getmessagesresponse.js +3 -3
  104. package/models/components/getmessagesresponse.js.map +1 -1
  105. package/models/components/getticketresponse.d.ts +1 -1
  106. package/models/components/getticketresponse.d.ts.map +1 -1
  107. package/models/components/getticketresponse.js +3 -3
  108. package/models/components/getticketresponse.js.map +1 -1
  109. package/models/components/getticketsresponse.d.ts +1 -1
  110. package/models/components/getticketsresponse.d.ts.map +1 -1
  111. package/models/components/getticketsresponse.js +3 -3
  112. package/models/components/getticketsresponse.js.map +1 -1
  113. package/models/components/gettrackingcategoriesresponse.d.ts +1 -1
  114. package/models/components/gettrackingcategoriesresponse.d.ts.map +1 -1
  115. package/models/components/gettrackingcategoriesresponse.js +3 -3
  116. package/models/components/gettrackingcategoriesresponse.js.map +1 -1
  117. package/models/components/gettrackingcategoryresponse.d.ts +1 -1
  118. package/models/components/gettrackingcategoryresponse.d.ts.map +1 -1
  119. package/models/components/gettrackingcategoryresponse.js +3 -3
  120. package/models/components/gettrackingcategoryresponse.js.map +1 -1
  121. package/models/components/index.d.ts +10 -10
  122. package/models/components/index.d.ts.map +1 -1
  123. package/models/components/index.js +10 -10
  124. package/models/components/index.js.map +1 -1
  125. package/models/components/invoice.d.ts +1 -1
  126. package/models/components/invoice.d.ts.map +1 -1
  127. package/models/components/invoice.js +5 -5
  128. package/models/components/invoice.js.map +1 -1
  129. package/models/components/{invoicelineiteminput.d.ts → invoicelineitem.d.ts} +58 -55
  130. package/models/components/invoicelineitem.d.ts.map +1 -0
  131. package/models/components/{invoicelineiteminput.js → invoicelineitem.js} +55 -54
  132. package/models/components/invoicelineitem.js.map +1 -0
  133. package/models/components/{messageinput.d.ts → message.d.ts} +71 -71
  134. package/models/components/message.d.ts.map +1 -0
  135. package/models/components/{messageinput.js → message.js} +61 -61
  136. package/models/components/message.js.map +1 -0
  137. package/models/components/note.d.ts +5 -0
  138. package/models/components/note.d.ts.map +1 -1
  139. package/models/components/note.js +4 -0
  140. package/models/components/note.js.map +1 -1
  141. package/models/components/noteinput.d.ts +5 -0
  142. package/models/components/noteinput.d.ts.map +1 -1
  143. package/models/components/noteinput.js +4 -0
  144. package/models/components/noteinput.js.map +1 -1
  145. package/models/components/purchaseorder.d.ts +1 -1
  146. package/models/components/purchaseorder.d.ts.map +1 -1
  147. package/models/components/purchaseorder.js +5 -5
  148. package/models/components/purchaseorder.js.map +1 -1
  149. package/models/components/{ticketinput.d.ts → ticket.d.ts} +66 -66
  150. package/models/components/ticket.d.ts.map +1 -0
  151. package/models/components/{ticketinput.js → ticket.js} +59 -59
  152. package/models/components/ticket.js.map +1 -0
  153. package/models/components/{trackingcategoryinput.d.ts → trackingcategory.d.ts} +55 -55
  154. package/models/components/trackingcategory.d.ts.map +1 -0
  155. package/models/components/{trackingcategoryinput.js → trackingcategory.js} +52 -52
  156. package/models/components/trackingcategory.js.map +1 -0
  157. package/models/components/updateconnectionresponse.d.ts +1 -1
  158. package/models/components/updateconnectionresponse.d.ts.map +1 -1
  159. package/models/components/updateconnectionresponse.js +3 -3
  160. package/models/components/updateconnectionresponse.js.map +1 -1
  161. package/package.json +5 -1
  162. package/src/__tests__/activities.test.ts +783 -0
  163. package/src/__tests__/agedcreditors.test.ts +279 -0
  164. package/src/__tests__/ageddebtors.test.ts +279 -0
  165. package/src/__tests__/apideckcompanies.test.ts +712 -0
  166. package/src/__tests__/apideckcustomers.test.ts +360 -0
  167. package/src/__tests__/apideckdepartments.test.ts +319 -0
  168. package/src/__tests__/apiresources.test.ts +61 -0
  169. package/src/__tests__/apis.test.ts +214 -0
  170. package/src/__tests__/applicants.test.ts +976 -0
  171. package/src/__tests__/applications.test.ts +329 -0
  172. package/src/__tests__/assertions.ts +13 -0
  173. package/src/__tests__/attachments.test.ts +363 -0
  174. package/src/__tests__/balancesheet.test.ts +451 -0
  175. package/src/__tests__/billpayments.test.ts +666 -0
  176. package/src/__tests__/bills.test.ts +1133 -0
  177. package/src/__tests__/collections.test.ts +115 -0
  178. package/src/__tests__/collectiontags.test.ts +66 -0
  179. package/src/__tests__/collectionticketcomments.test.ts +318 -0
  180. package/src/__tests__/collectiontickets.test.ts +436 -0
  181. package/src/__tests__/collectionusers.test.ts +122 -0
  182. package/src/__tests__/companies.test.ts +1059 -0
  183. package/src/__tests__/companyinfo.test.ts +218 -0
  184. package/src/__tests__/connectioncustommappings.test.ts +67 -0
  185. package/src/__tests__/connections.test.ts +1713 -0
  186. package/src/__tests__/connectionsettings.test.ts +280 -0
  187. package/src/__tests__/connectordocs.test.ts +28 -0
  188. package/src/__tests__/connectors.test.ts +751 -0
  189. package/src/__tests__/consumerrequestcounts.test.ts +41 -0
  190. package/src/__tests__/consumers.test.ts +517 -0
  191. package/src/__tests__/contacts.test.ts +957 -0
  192. package/src/__tests__/createcallback.test.ts +34 -0
  193. package/src/__tests__/creditnotes.test.ts +1362 -0
  194. package/src/__tests__/customers.test.ts +1089 -0
  195. package/src/__tests__/customfields.test.ts +50 -0
  196. package/src/__tests__/custommappings.test.ts +63 -0
  197. package/src/__tests__/departments.test.ts +359 -0
  198. package/src/__tests__/drivegroups.test.ts +318 -0
  199. package/src/__tests__/drives.test.ts +311 -0
  200. package/src/__tests__/employeepayrolls.test.ts +487 -0
  201. package/src/__tests__/employees.test.ts +1682 -0
  202. package/src/__tests__/employeeschedules.test.ts +456 -0
  203. package/src/__tests__/eventlogs.test.ts +157 -0
  204. package/src/__tests__/expenses.test.ts +566 -0
  205. package/src/__tests__/files.test.ts +392 -0
  206. package/src/__tests__/files.ts +56 -0
  207. package/src/__tests__/folders.test.ts +103 -0
  208. package/src/__tests__/invoiceitems.test.ts +586 -0
  209. package/src/__tests__/invoices.test.ts +1561 -0
  210. package/src/__tests__/jobs.test.ts +837 -0
  211. package/src/__tests__/journalentries.test.ts +1053 -0
  212. package/src/__tests__/leads.test.ts +897 -0
  213. package/src/__tests__/ledgeraccounts.test.ts +594 -0
  214. package/src/__tests__/locations.test.ts +561 -0
  215. package/src/__tests__/logs.test.ts +135 -0
  216. package/src/__tests__/messages.test.ts +396 -0
  217. package/src/__tests__/mockserver/README.md +52 -0
  218. package/src/__tests__/notes.test.ts +335 -0
  219. package/src/__tests__/opportunities.test.ts +503 -0
  220. package/src/__tests__/orders.test.ts +849 -0
  221. package/src/__tests__/payments.test.ts +557 -0
  222. package/src/__tests__/payrolls.test.ts +481 -0
  223. package/src/__tests__/pipelines.test.ts +383 -0
  224. package/src/__tests__/products.test.ts +505 -0
  225. package/src/__tests__/profitandloss.test.ts +221 -0
  226. package/src/__tests__/purchaseorders.test.ts +1464 -0
  227. package/src/__tests__/sessions.test.ts +70 -0
  228. package/src/__tests__/sharedlinks.test.ts +331 -0
  229. package/src/__tests__/stores.test.ts +39 -0
  230. package/src/__tests__/subsidiaries.test.ts +316 -0
  231. package/src/__tests__/suppliers.test.ts +1071 -0
  232. package/src/__tests__/taxrates.test.ts +472 -0
  233. package/src/__tests__/testclient.ts +48 -0
  234. package/src/__tests__/timeoffrequests.test.ts +381 -0
  235. package/src/__tests__/trackingcategories.test.ts +329 -0
  236. package/src/__tests__/uploadsessions.test.ts +142 -0
  237. package/src/__tests__/users.test.ts +667 -0
  238. package/src/__tests__/validateconnection.test.ts +32 -0
  239. package/src/__tests__/webhooks.test.ts +248 -0
  240. package/src/lib/config.ts +4 -4
  241. package/src/lib/matchers.ts +20 -0
  242. package/src/lib/sdks.ts +8 -2
  243. package/src/models/components/accountingdepartment.ts +14 -0
  244. package/src/models/components/{billinput.ts → bill.ts} +248 -248
  245. package/src/models/components/createconnectionresponse.ts +1 -1
  246. package/src/models/components/creditnote.ts +1 -1
  247. package/src/models/components/employeeschedules.ts +1 -1
  248. package/src/models/components/employeesfilter.ts +7 -0
  249. package/src/models/components/getbillpaymentresponse.ts +1 -1
  250. package/src/models/components/getbillpaymentsresponse.ts +1 -1
  251. package/src/models/components/getbillresponse.ts +1 -1
  252. package/src/models/components/getbillsresponse.ts +1 -1
  253. package/src/models/components/getcompaniesresponse.ts +1 -1
  254. package/src/models/components/getcompanyresponse.ts +1 -1
  255. package/src/models/components/getconnectionresponse.ts +1 -1
  256. package/src/models/components/getconnectionsresponse.ts +1 -1
  257. package/src/models/components/getemployeeresponse.ts +1 -1
  258. package/src/models/components/getemployeesresponse.ts +1 -1
  259. package/src/models/components/getmessageresponse.ts +1 -1
  260. package/src/models/components/getmessagesresponse.ts +1 -1
  261. package/src/models/components/getticketresponse.ts +1 -1
  262. package/src/models/components/getticketsresponse.ts +1 -1
  263. package/src/models/components/gettrackingcategoriesresponse.ts +1 -1
  264. package/src/models/components/gettrackingcategoryresponse.ts +1 -1
  265. package/src/models/components/index.ts +10 -10
  266. package/src/models/components/invoice.ts +1 -1
  267. package/src/models/components/{invoicelineiteminput.ts → invoicelineitem.ts} +101 -100
  268. package/src/models/components/note.ts +9 -0
  269. package/src/models/components/noteinput.ts +9 -0
  270. package/src/models/components/purchaseorder.ts +1 -1
  271. package/src/models/components/updateconnectionresponse.ts +1 -1
  272. package/models/components/billinput.d.ts.map +0 -1
  273. package/models/components/billinput.js.map +0 -1
  274. package/models/components/billlineiteminput.d.ts.map +0 -1
  275. package/models/components/billlineiteminput.js.map +0 -1
  276. package/models/components/billpaymentinput.d.ts.map +0 -1
  277. package/models/components/billpaymentinput.js.map +0 -1
  278. package/models/components/companyinput.d.ts.map +0 -1
  279. package/models/components/companyinput.js.map +0 -1
  280. package/models/components/connectioninput.d.ts.map +0 -1
  281. package/models/components/connectioninput.js.map +0 -1
  282. package/models/components/employeeinput.d.ts.map +0 -1
  283. package/models/components/employeeinput.js.map +0 -1
  284. package/models/components/invoicelineiteminput.d.ts.map +0 -1
  285. package/models/components/invoicelineiteminput.js.map +0 -1
  286. package/models/components/messageinput.d.ts.map +0 -1
  287. package/models/components/messageinput.js.map +0 -1
  288. package/models/components/ticketinput.d.ts.map +0 -1
  289. package/models/components/ticketinput.js.map +0 -1
  290. package/models/components/trackingcategoryinput.d.ts.map +0 -1
  291. package/models/components/trackingcategoryinput.js.map +0 -1
  292. package/src/models/components/{billlineiteminput.ts → billlineitem.ts} +107 -107
  293. package/src/models/components/{billpaymentinput.ts → billpayment.ts} +183 -183
  294. package/src/models/components/{companyinput.ts → company.ts} +226 -226
  295. package/src/models/components/{connectioninput.ts → connection.ts} +355 -355
  296. package/src/models/components/{employeeinput.ts → employee.ts} +122 -122
  297. package/src/models/components/{messageinput.ts → message.ts} +133 -133
  298. package/src/models/components/{ticketinput.ts → ticket.ts} +125 -125
  299. package/src/models/components/{trackingcategoryinput.ts → trackingcategory.ts} +98 -98
@@ -100,7 +100,7 @@ export type BillPaymentAllocationType = ClosedEnum<
100
100
  typeof BillPaymentAllocationType
101
101
  >;
102
102
 
103
- export type BillPaymentAllocations = {
103
+ export type Allocations = {
104
104
  /**
105
105
  * A unique identifier for an object.
106
106
  */
@@ -109,6 +109,7 @@ export type BillPaymentAllocations = {
109
109
  * Type of entity this payment should be attributed to.
110
110
  */
111
111
  type?: BillPaymentAllocationType | undefined;
112
+ code?: string | undefined;
112
113
  /**
113
114
  * Amount of payment that should be attributed to this allocation. If null, the total_amount will be used.
114
115
  */
@@ -119,7 +120,15 @@ export type BillPaymentAllocations = {
119
120
  allocationId?: string | undefined;
120
121
  };
121
122
 
122
- export type BillPaymentInput = {
123
+ export type BillPayment = {
124
+ /**
125
+ * A unique identifier for an object.
126
+ */
127
+ id: string;
128
+ /**
129
+ * The third-party API ID of original entity
130
+ */
131
+ downstreamId?: string | null | undefined;
123
132
  /**
124
133
  * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
125
134
  */
@@ -148,7 +157,7 @@ export type BillPaymentInput = {
148
157
  * A unique identifier for an object.
149
158
  */
150
159
  paymentMethodId?: string | null | undefined;
151
- account?: LinkedLedgerAccountInput | null | undefined;
160
+ account?: LinkedLedgerAccount | null | undefined;
152
161
  /**
153
162
  * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD
154
163
  */
@@ -156,7 +165,7 @@ export type BillPaymentInput = {
156
165
  /**
157
166
  * The supplier this entity is linked to.
158
167
  */
159
- supplier?: LinkedSupplierInput | null | undefined;
168
+ supplier?: LinkedSupplier | null | undefined;
160
169
  /**
161
170
  * The company or subsidiary id the transaction belongs to
162
171
  */
@@ -173,7 +182,7 @@ export type BillPaymentInput = {
173
182
  * Type of payment
174
183
  */
175
184
  type?: BillPaymentType | undefined;
176
- allocations?: Array<BillPaymentAllocations> | undefined;
185
+ allocations?: Array<Allocations> | undefined;
177
186
  /**
178
187
  * Note associated with the transaction
179
188
  */
@@ -195,13 +204,33 @@ export type BillPaymentInput = {
195
204
  * Id to be displayed.
196
205
  */
197
206
  displayId?: string | null | undefined;
207
+ /**
208
+ * When custom mappings are configured on the resource, the result is included here.
209
+ */
210
+ customMappings?: CustomMappings | null | undefined;
211
+ /**
212
+ * The user who last updated the object.
213
+ */
214
+ updatedBy?: string | null | undefined;
215
+ /**
216
+ * The user who created the object.
217
+ */
218
+ createdBy?: string | null | undefined;
219
+ /**
220
+ * The date and time when the object was created.
221
+ */
222
+ createdAt?: Date | null | undefined;
223
+ /**
224
+ * The date and time when the object was last updated.
225
+ */
226
+ updatedAt?: Date | null | undefined;
198
227
  /**
199
228
  * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
200
229
  */
201
230
  passThrough?: Array<PassThroughBody> | undefined;
202
231
  };
203
232
 
204
- export type Allocations = {
233
+ export type BillPaymentAllocations = {
205
234
  /**
206
235
  * A unique identifier for an object.
207
236
  */
@@ -210,7 +239,6 @@ export type Allocations = {
210
239
  * Type of entity this payment should be attributed to.
211
240
  */
212
241
  type?: BillPaymentAllocationType | undefined;
213
- code?: string | undefined;
214
242
  /**
215
243
  * Amount of payment that should be attributed to this allocation. If null, the total_amount will be used.
216
244
  */
@@ -221,15 +249,7 @@ export type Allocations = {
221
249
  allocationId?: string | undefined;
222
250
  };
223
251
 
224
- export type BillPayment = {
225
- /**
226
- * A unique identifier for an object.
227
- */
228
- id: string;
229
- /**
230
- * The third-party API ID of original entity
231
- */
232
- downstreamId?: string | null | undefined;
252
+ export type BillPaymentInput = {
233
253
  /**
234
254
  * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
235
255
  */
@@ -258,7 +278,7 @@ export type BillPayment = {
258
278
  * A unique identifier for an object.
259
279
  */
260
280
  paymentMethodId?: string | null | undefined;
261
- account?: LinkedLedgerAccount | null | undefined;
281
+ account?: LinkedLedgerAccountInput | null | undefined;
262
282
  /**
263
283
  * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD
264
284
  */
@@ -266,7 +286,7 @@ export type BillPayment = {
266
286
  /**
267
287
  * The supplier this entity is linked to.
268
288
  */
269
- supplier?: LinkedSupplier | null | undefined;
289
+ supplier?: LinkedSupplierInput | null | undefined;
270
290
  /**
271
291
  * The company or subsidiary id the transaction belongs to
272
292
  */
@@ -283,7 +303,7 @@ export type BillPayment = {
283
303
  * Type of payment
284
304
  */
285
305
  type?: BillPaymentType | undefined;
286
- allocations?: Array<Allocations> | undefined;
306
+ allocations?: Array<BillPaymentAllocations> | undefined;
287
307
  /**
288
308
  * Note associated with the transaction
289
309
  */
@@ -305,26 +325,6 @@ export type BillPayment = {
305
325
  * Id to be displayed.
306
326
  */
307
327
  displayId?: string | null | undefined;
308
- /**
309
- * When custom mappings are configured on the resource, the result is included here.
310
- */
311
- customMappings?: CustomMappings | null | undefined;
312
- /**
313
- * The user who last updated the object.
314
- */
315
- updatedBy?: string | null | undefined;
316
- /**
317
- * The user who created the object.
318
- */
319
- createdBy?: string | null | undefined;
320
- /**
321
- * The date and time when the object was created.
322
- */
323
- createdAt?: Date | null | undefined;
324
- /**
325
- * The date and time when the object was last updated.
326
- */
327
- updatedAt?: Date | null | undefined;
328
328
  /**
329
329
  * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
330
330
  */
@@ -374,13 +374,14 @@ export namespace BillPaymentAllocationType$ {
374
374
  }
375
375
 
376
376
  /** @internal */
377
- export const BillPaymentAllocations$inboundSchema: z.ZodType<
378
- BillPaymentAllocations,
377
+ export const Allocations$inboundSchema: z.ZodType<
378
+ Allocations,
379
379
  z.ZodTypeDef,
380
380
  unknown
381
381
  > = z.object({
382
382
  id: z.nullable(z.string()).optional(),
383
383
  type: BillPaymentAllocationType$inboundSchema.optional(),
384
+ code: z.string().optional(),
384
385
  amount: z.nullable(z.number()).optional(),
385
386
  allocation_id: z.string().optional(),
386
387
  }).transform((v) => {
@@ -390,21 +391,23 @@ export const BillPaymentAllocations$inboundSchema: z.ZodType<
390
391
  });
391
392
 
392
393
  /** @internal */
393
- export type BillPaymentAllocations$Outbound = {
394
+ export type Allocations$Outbound = {
394
395
  id?: string | null | undefined;
395
396
  type?: string | undefined;
397
+ code?: string | undefined;
396
398
  amount?: number | null | undefined;
397
399
  allocation_id?: string | undefined;
398
400
  };
399
401
 
400
402
  /** @internal */
401
- export const BillPaymentAllocations$outboundSchema: z.ZodType<
402
- BillPaymentAllocations$Outbound,
403
+ export const Allocations$outboundSchema: z.ZodType<
404
+ Allocations$Outbound,
403
405
  z.ZodTypeDef,
404
- BillPaymentAllocations
406
+ Allocations
405
407
  > = z.object({
406
408
  id: z.nullable(z.string()).optional(),
407
409
  type: BillPaymentAllocationType$outboundSchema.optional(),
410
+ code: z.string().optional(),
408
411
  amount: z.nullable(z.number()).optional(),
409
412
  allocationId: z.string().optional(),
410
413
  }).transform((v) => {
@@ -417,39 +420,37 @@ export const BillPaymentAllocations$outboundSchema: z.ZodType<
417
420
  * @internal
418
421
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
419
422
  */
420
- export namespace BillPaymentAllocations$ {
421
- /** @deprecated use `BillPaymentAllocations$inboundSchema` instead. */
422
- export const inboundSchema = BillPaymentAllocations$inboundSchema;
423
- /** @deprecated use `BillPaymentAllocations$outboundSchema` instead. */
424
- export const outboundSchema = BillPaymentAllocations$outboundSchema;
425
- /** @deprecated use `BillPaymentAllocations$Outbound` instead. */
426
- export type Outbound = BillPaymentAllocations$Outbound;
423
+ export namespace Allocations$ {
424
+ /** @deprecated use `Allocations$inboundSchema` instead. */
425
+ export const inboundSchema = Allocations$inboundSchema;
426
+ /** @deprecated use `Allocations$outboundSchema` instead. */
427
+ export const outboundSchema = Allocations$outboundSchema;
428
+ /** @deprecated use `Allocations$Outbound` instead. */
429
+ export type Outbound = Allocations$Outbound;
427
430
  }
428
431
 
429
- export function billPaymentAllocationsToJSON(
430
- billPaymentAllocations: BillPaymentAllocations,
431
- ): string {
432
- return JSON.stringify(
433
- BillPaymentAllocations$outboundSchema.parse(billPaymentAllocations),
434
- );
432
+ export function allocationsToJSON(allocations: Allocations): string {
433
+ return JSON.stringify(Allocations$outboundSchema.parse(allocations));
435
434
  }
436
435
 
437
- export function billPaymentAllocationsFromJSON(
436
+ export function allocationsFromJSON(
438
437
  jsonString: string,
439
- ): SafeParseResult<BillPaymentAllocations, SDKValidationError> {
438
+ ): SafeParseResult<Allocations, SDKValidationError> {
440
439
  return safeParse(
441
440
  jsonString,
442
- (x) => BillPaymentAllocations$inboundSchema.parse(JSON.parse(x)),
443
- `Failed to parse 'BillPaymentAllocations' from JSON`,
441
+ (x) => Allocations$inboundSchema.parse(JSON.parse(x)),
442
+ `Failed to parse 'Allocations' from JSON`,
444
443
  );
445
444
  }
446
445
 
447
446
  /** @internal */
448
- export const BillPaymentInput$inboundSchema: z.ZodType<
449
- BillPaymentInput,
447
+ export const BillPayment$inboundSchema: z.ZodType<
448
+ BillPayment,
450
449
  z.ZodTypeDef,
451
450
  unknown
452
451
  > = z.object({
452
+ id: z.string(),
453
+ downstream_id: z.nullable(z.string()).optional(),
453
454
  currency: z.nullable(Currency$inboundSchema).optional(),
454
455
  currency_rate: z.nullable(z.number()).optional(),
455
456
  total_amount: z.nullable(z.number()),
@@ -457,17 +458,16 @@ export const BillPaymentInput$inboundSchema: z.ZodType<
457
458
  payment_method: z.nullable(z.string()).optional(),
458
459
  payment_method_reference: z.nullable(z.string()).optional(),
459
460
  payment_method_id: z.nullable(z.string()).optional(),
460
- account: z.nullable(LinkedLedgerAccountInput$inboundSchema).optional(),
461
+ account: z.nullable(LinkedLedgerAccount$inboundSchema).optional(),
461
462
  transaction_date: z.nullable(
462
463
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
463
464
  ),
464
- supplier: z.nullable(LinkedSupplierInput$inboundSchema).optional(),
465
+ supplier: z.nullable(LinkedSupplier$inboundSchema).optional(),
465
466
  company_id: z.nullable(z.string()).optional(),
466
467
  reconciled: z.nullable(z.boolean()).optional(),
467
468
  status: PaymentStatus$inboundSchema.optional(),
468
469
  type: BillPaymentType$inboundSchema.optional(),
469
- allocations: z.array(z.lazy(() => BillPaymentAllocations$inboundSchema))
470
- .optional(),
470
+ allocations: z.array(z.lazy(() => Allocations$inboundSchema)).optional(),
471
471
  note: z.nullable(z.string()).optional(),
472
472
  number: z.nullable(z.string()).optional(),
473
473
  tracking_categories: z.nullable(
@@ -476,9 +476,19 @@ export const BillPaymentInput$inboundSchema: z.ZodType<
476
476
  custom_fields: z.array(CustomField$inboundSchema).optional(),
477
477
  row_version: z.nullable(z.string()).optional(),
478
478
  display_id: z.nullable(z.string()).optional(),
479
+ custom_mappings: z.nullable(CustomMappings$inboundSchema).optional(),
480
+ updated_by: z.nullable(z.string()).optional(),
481
+ created_by: z.nullable(z.string()).optional(),
482
+ created_at: z.nullable(
483
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
484
+ ).optional(),
485
+ updated_at: z.nullable(
486
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
487
+ ).optional(),
479
488
  pass_through: z.array(PassThroughBody$inboundSchema).optional(),
480
489
  }).transform((v) => {
481
490
  return remap$(v, {
491
+ "downstream_id": "downstreamId",
482
492
  "currency_rate": "currencyRate",
483
493
  "total_amount": "totalAmount",
484
494
  "payment_method": "paymentMethod",
@@ -490,12 +500,19 @@ export const BillPaymentInput$inboundSchema: z.ZodType<
490
500
  "custom_fields": "customFields",
491
501
  "row_version": "rowVersion",
492
502
  "display_id": "displayId",
503
+ "custom_mappings": "customMappings",
504
+ "updated_by": "updatedBy",
505
+ "created_by": "createdBy",
506
+ "created_at": "createdAt",
507
+ "updated_at": "updatedAt",
493
508
  "pass_through": "passThrough",
494
509
  });
495
510
  });
496
511
 
497
512
  /** @internal */
498
- export type BillPaymentInput$Outbound = {
513
+ export type BillPayment$Outbound = {
514
+ id: string;
515
+ downstream_id?: string | null | undefined;
499
516
  currency?: string | null | undefined;
500
517
  currency_rate?: number | null | undefined;
501
518
  total_amount: number | null;
@@ -503,14 +520,14 @@ export type BillPaymentInput$Outbound = {
503
520
  payment_method?: string | null | undefined;
504
521
  payment_method_reference?: string | null | undefined;
505
522
  payment_method_id?: string | null | undefined;
506
- account?: LinkedLedgerAccountInput$Outbound | null | undefined;
523
+ account?: LinkedLedgerAccount$Outbound | null | undefined;
507
524
  transaction_date: string | null;
508
- supplier?: LinkedSupplierInput$Outbound | null | undefined;
525
+ supplier?: LinkedSupplier$Outbound | null | undefined;
509
526
  company_id?: string | null | undefined;
510
527
  reconciled?: boolean | null | undefined;
511
528
  status?: string | undefined;
512
529
  type?: string | undefined;
513
- allocations?: Array<BillPaymentAllocations$Outbound> | undefined;
530
+ allocations?: Array<Allocations$Outbound> | undefined;
514
531
  note?: string | null | undefined;
515
532
  number?: string | null | undefined;
516
533
  tracking_categories?:
@@ -520,15 +537,22 @@ export type BillPaymentInput$Outbound = {
520
537
  custom_fields?: Array<CustomField$Outbound> | undefined;
521
538
  row_version?: string | null | undefined;
522
539
  display_id?: string | null | undefined;
540
+ custom_mappings?: CustomMappings$Outbound | null | undefined;
541
+ updated_by?: string | null | undefined;
542
+ created_by?: string | null | undefined;
543
+ created_at?: string | null | undefined;
544
+ updated_at?: string | null | undefined;
523
545
  pass_through?: Array<PassThroughBody$Outbound> | undefined;
524
546
  };
525
547
 
526
548
  /** @internal */
527
- export const BillPaymentInput$outboundSchema: z.ZodType<
528
- BillPaymentInput$Outbound,
549
+ export const BillPayment$outboundSchema: z.ZodType<
550
+ BillPayment$Outbound,
529
551
  z.ZodTypeDef,
530
- BillPaymentInput
552
+ BillPayment
531
553
  > = z.object({
554
+ id: z.string(),
555
+ downstreamId: z.nullable(z.string()).optional(),
532
556
  currency: z.nullable(Currency$outboundSchema).optional(),
533
557
  currencyRate: z.nullable(z.number()).optional(),
534
558
  totalAmount: z.nullable(z.number()),
@@ -536,15 +560,14 @@ export const BillPaymentInput$outboundSchema: z.ZodType<
536
560
  paymentMethod: z.nullable(z.string()).optional(),
537
561
  paymentMethodReference: z.nullable(z.string()).optional(),
538
562
  paymentMethodId: z.nullable(z.string()).optional(),
539
- account: z.nullable(LinkedLedgerAccountInput$outboundSchema).optional(),
563
+ account: z.nullable(LinkedLedgerAccount$outboundSchema).optional(),
540
564
  transactionDate: z.nullable(z.date().transform(v => v.toISOString())),
541
- supplier: z.nullable(LinkedSupplierInput$outboundSchema).optional(),
565
+ supplier: z.nullable(LinkedSupplier$outboundSchema).optional(),
542
566
  companyId: z.nullable(z.string()).optional(),
543
567
  reconciled: z.nullable(z.boolean()).optional(),
544
568
  status: PaymentStatus$outboundSchema.optional(),
545
569
  type: BillPaymentType$outboundSchema.optional(),
546
- allocations: z.array(z.lazy(() => BillPaymentAllocations$outboundSchema))
547
- .optional(),
570
+ allocations: z.array(z.lazy(() => Allocations$outboundSchema)).optional(),
548
571
  note: z.nullable(z.string()).optional(),
549
572
  number: z.nullable(z.string()).optional(),
550
573
  trackingCategories: z.nullable(
@@ -553,9 +576,15 @@ export const BillPaymentInput$outboundSchema: z.ZodType<
553
576
  customFields: z.array(CustomField$outboundSchema).optional(),
554
577
  rowVersion: z.nullable(z.string()).optional(),
555
578
  displayId: z.nullable(z.string()).optional(),
579
+ customMappings: z.nullable(CustomMappings$outboundSchema).optional(),
580
+ updatedBy: z.nullable(z.string()).optional(),
581
+ createdBy: z.nullable(z.string()).optional(),
582
+ createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
583
+ updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
556
584
  passThrough: z.array(PassThroughBody$outboundSchema).optional(),
557
585
  }).transform((v) => {
558
586
  return remap$(v, {
587
+ downstreamId: "downstream_id",
559
588
  currencyRate: "currency_rate",
560
589
  totalAmount: "total_amount",
561
590
  paymentMethod: "payment_method",
@@ -567,6 +596,11 @@ export const BillPaymentInput$outboundSchema: z.ZodType<
567
596
  customFields: "custom_fields",
568
597
  rowVersion: "row_version",
569
598
  displayId: "display_id",
599
+ customMappings: "custom_mappings",
600
+ updatedBy: "updated_by",
601
+ createdBy: "created_by",
602
+ createdAt: "created_at",
603
+ updatedAt: "updated_at",
570
604
  passThrough: "pass_through",
571
605
  });
572
606
  });
@@ -575,42 +609,37 @@ export const BillPaymentInput$outboundSchema: z.ZodType<
575
609
  * @internal
576
610
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
577
611
  */
578
- export namespace BillPaymentInput$ {
579
- /** @deprecated use `BillPaymentInput$inboundSchema` instead. */
580
- export const inboundSchema = BillPaymentInput$inboundSchema;
581
- /** @deprecated use `BillPaymentInput$outboundSchema` instead. */
582
- export const outboundSchema = BillPaymentInput$outboundSchema;
583
- /** @deprecated use `BillPaymentInput$Outbound` instead. */
584
- export type Outbound = BillPaymentInput$Outbound;
612
+ export namespace BillPayment$ {
613
+ /** @deprecated use `BillPayment$inboundSchema` instead. */
614
+ export const inboundSchema = BillPayment$inboundSchema;
615
+ /** @deprecated use `BillPayment$outboundSchema` instead. */
616
+ export const outboundSchema = BillPayment$outboundSchema;
617
+ /** @deprecated use `BillPayment$Outbound` instead. */
618
+ export type Outbound = BillPayment$Outbound;
585
619
  }
586
620
 
587
- export function billPaymentInputToJSON(
588
- billPaymentInput: BillPaymentInput,
589
- ): string {
590
- return JSON.stringify(
591
- BillPaymentInput$outboundSchema.parse(billPaymentInput),
592
- );
621
+ export function billPaymentToJSON(billPayment: BillPayment): string {
622
+ return JSON.stringify(BillPayment$outboundSchema.parse(billPayment));
593
623
  }
594
624
 
595
- export function billPaymentInputFromJSON(
625
+ export function billPaymentFromJSON(
596
626
  jsonString: string,
597
- ): SafeParseResult<BillPaymentInput, SDKValidationError> {
627
+ ): SafeParseResult<BillPayment, SDKValidationError> {
598
628
  return safeParse(
599
629
  jsonString,
600
- (x) => BillPaymentInput$inboundSchema.parse(JSON.parse(x)),
601
- `Failed to parse 'BillPaymentInput' from JSON`,
630
+ (x) => BillPayment$inboundSchema.parse(JSON.parse(x)),
631
+ `Failed to parse 'BillPayment' from JSON`,
602
632
  );
603
633
  }
604
634
 
605
635
  /** @internal */
606
- export const Allocations$inboundSchema: z.ZodType<
607
- Allocations,
636
+ export const BillPaymentAllocations$inboundSchema: z.ZodType<
637
+ BillPaymentAllocations,
608
638
  z.ZodTypeDef,
609
639
  unknown
610
640
  > = z.object({
611
641
  id: z.nullable(z.string()).optional(),
612
642
  type: BillPaymentAllocationType$inboundSchema.optional(),
613
- code: z.string().optional(),
614
643
  amount: z.nullable(z.number()).optional(),
615
644
  allocation_id: z.string().optional(),
616
645
  }).transform((v) => {
@@ -620,23 +649,21 @@ export const Allocations$inboundSchema: z.ZodType<
620
649
  });
621
650
 
622
651
  /** @internal */
623
- export type Allocations$Outbound = {
652
+ export type BillPaymentAllocations$Outbound = {
624
653
  id?: string | null | undefined;
625
654
  type?: string | undefined;
626
- code?: string | undefined;
627
655
  amount?: number | null | undefined;
628
656
  allocation_id?: string | undefined;
629
657
  };
630
658
 
631
659
  /** @internal */
632
- export const Allocations$outboundSchema: z.ZodType<
633
- Allocations$Outbound,
660
+ export const BillPaymentAllocations$outboundSchema: z.ZodType<
661
+ BillPaymentAllocations$Outbound,
634
662
  z.ZodTypeDef,
635
- Allocations
663
+ BillPaymentAllocations
636
664
  > = z.object({
637
665
  id: z.nullable(z.string()).optional(),
638
666
  type: BillPaymentAllocationType$outboundSchema.optional(),
639
- code: z.string().optional(),
640
667
  amount: z.nullable(z.number()).optional(),
641
668
  allocationId: z.string().optional(),
642
669
  }).transform((v) => {
@@ -649,37 +676,39 @@ export const Allocations$outboundSchema: z.ZodType<
649
676
  * @internal
650
677
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
651
678
  */
652
- export namespace Allocations$ {
653
- /** @deprecated use `Allocations$inboundSchema` instead. */
654
- export const inboundSchema = Allocations$inboundSchema;
655
- /** @deprecated use `Allocations$outboundSchema` instead. */
656
- export const outboundSchema = Allocations$outboundSchema;
657
- /** @deprecated use `Allocations$Outbound` instead. */
658
- export type Outbound = Allocations$Outbound;
679
+ export namespace BillPaymentAllocations$ {
680
+ /** @deprecated use `BillPaymentAllocations$inboundSchema` instead. */
681
+ export const inboundSchema = BillPaymentAllocations$inboundSchema;
682
+ /** @deprecated use `BillPaymentAllocations$outboundSchema` instead. */
683
+ export const outboundSchema = BillPaymentAllocations$outboundSchema;
684
+ /** @deprecated use `BillPaymentAllocations$Outbound` instead. */
685
+ export type Outbound = BillPaymentAllocations$Outbound;
659
686
  }
660
687
 
661
- export function allocationsToJSON(allocations: Allocations): string {
662
- return JSON.stringify(Allocations$outboundSchema.parse(allocations));
688
+ export function billPaymentAllocationsToJSON(
689
+ billPaymentAllocations: BillPaymentAllocations,
690
+ ): string {
691
+ return JSON.stringify(
692
+ BillPaymentAllocations$outboundSchema.parse(billPaymentAllocations),
693
+ );
663
694
  }
664
695
 
665
- export function allocationsFromJSON(
696
+ export function billPaymentAllocationsFromJSON(
666
697
  jsonString: string,
667
- ): SafeParseResult<Allocations, SDKValidationError> {
698
+ ): SafeParseResult<BillPaymentAllocations, SDKValidationError> {
668
699
  return safeParse(
669
700
  jsonString,
670
- (x) => Allocations$inboundSchema.parse(JSON.parse(x)),
671
- `Failed to parse 'Allocations' from JSON`,
701
+ (x) => BillPaymentAllocations$inboundSchema.parse(JSON.parse(x)),
702
+ `Failed to parse 'BillPaymentAllocations' from JSON`,
672
703
  );
673
704
  }
674
705
 
675
706
  /** @internal */
676
- export const BillPayment$inboundSchema: z.ZodType<
677
- BillPayment,
707
+ export const BillPaymentInput$inboundSchema: z.ZodType<
708
+ BillPaymentInput,
678
709
  z.ZodTypeDef,
679
710
  unknown
680
711
  > = z.object({
681
- id: z.string(),
682
- downstream_id: z.nullable(z.string()).optional(),
683
712
  currency: z.nullable(Currency$inboundSchema).optional(),
684
713
  currency_rate: z.nullable(z.number()).optional(),
685
714
  total_amount: z.nullable(z.number()),
@@ -687,16 +716,17 @@ export const BillPayment$inboundSchema: z.ZodType<
687
716
  payment_method: z.nullable(z.string()).optional(),
688
717
  payment_method_reference: z.nullable(z.string()).optional(),
689
718
  payment_method_id: z.nullable(z.string()).optional(),
690
- account: z.nullable(LinkedLedgerAccount$inboundSchema).optional(),
719
+ account: z.nullable(LinkedLedgerAccountInput$inboundSchema).optional(),
691
720
  transaction_date: z.nullable(
692
721
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
693
722
  ),
694
- supplier: z.nullable(LinkedSupplier$inboundSchema).optional(),
723
+ supplier: z.nullable(LinkedSupplierInput$inboundSchema).optional(),
695
724
  company_id: z.nullable(z.string()).optional(),
696
725
  reconciled: z.nullable(z.boolean()).optional(),
697
726
  status: PaymentStatus$inboundSchema.optional(),
698
727
  type: BillPaymentType$inboundSchema.optional(),
699
- allocations: z.array(z.lazy(() => Allocations$inboundSchema)).optional(),
728
+ allocations: z.array(z.lazy(() => BillPaymentAllocations$inboundSchema))
729
+ .optional(),
700
730
  note: z.nullable(z.string()).optional(),
701
731
  number: z.nullable(z.string()).optional(),
702
732
  tracking_categories: z.nullable(
@@ -705,19 +735,9 @@ export const BillPayment$inboundSchema: z.ZodType<
705
735
  custom_fields: z.array(CustomField$inboundSchema).optional(),
706
736
  row_version: z.nullable(z.string()).optional(),
707
737
  display_id: z.nullable(z.string()).optional(),
708
- custom_mappings: z.nullable(CustomMappings$inboundSchema).optional(),
709
- updated_by: z.nullable(z.string()).optional(),
710
- created_by: z.nullable(z.string()).optional(),
711
- created_at: z.nullable(
712
- z.string().datetime({ offset: true }).transform(v => new Date(v)),
713
- ).optional(),
714
- updated_at: z.nullable(
715
- z.string().datetime({ offset: true }).transform(v => new Date(v)),
716
- ).optional(),
717
738
  pass_through: z.array(PassThroughBody$inboundSchema).optional(),
718
739
  }).transform((v) => {
719
740
  return remap$(v, {
720
- "downstream_id": "downstreamId",
721
741
  "currency_rate": "currencyRate",
722
742
  "total_amount": "totalAmount",
723
743
  "payment_method": "paymentMethod",
@@ -729,19 +749,12 @@ export const BillPayment$inboundSchema: z.ZodType<
729
749
  "custom_fields": "customFields",
730
750
  "row_version": "rowVersion",
731
751
  "display_id": "displayId",
732
- "custom_mappings": "customMappings",
733
- "updated_by": "updatedBy",
734
- "created_by": "createdBy",
735
- "created_at": "createdAt",
736
- "updated_at": "updatedAt",
737
752
  "pass_through": "passThrough",
738
753
  });
739
754
  });
740
755
 
741
756
  /** @internal */
742
- export type BillPayment$Outbound = {
743
- id: string;
744
- downstream_id?: string | null | undefined;
757
+ export type BillPaymentInput$Outbound = {
745
758
  currency?: string | null | undefined;
746
759
  currency_rate?: number | null | undefined;
747
760
  total_amount: number | null;
@@ -749,14 +762,14 @@ export type BillPayment$Outbound = {
749
762
  payment_method?: string | null | undefined;
750
763
  payment_method_reference?: string | null | undefined;
751
764
  payment_method_id?: string | null | undefined;
752
- account?: LinkedLedgerAccount$Outbound | null | undefined;
765
+ account?: LinkedLedgerAccountInput$Outbound | null | undefined;
753
766
  transaction_date: string | null;
754
- supplier?: LinkedSupplier$Outbound | null | undefined;
767
+ supplier?: LinkedSupplierInput$Outbound | null | undefined;
755
768
  company_id?: string | null | undefined;
756
769
  reconciled?: boolean | null | undefined;
757
770
  status?: string | undefined;
758
771
  type?: string | undefined;
759
- allocations?: Array<Allocations$Outbound> | undefined;
772
+ allocations?: Array<BillPaymentAllocations$Outbound> | undefined;
760
773
  note?: string | null | undefined;
761
774
  number?: string | null | undefined;
762
775
  tracking_categories?:
@@ -766,22 +779,15 @@ export type BillPayment$Outbound = {
766
779
  custom_fields?: Array<CustomField$Outbound> | undefined;
767
780
  row_version?: string | null | undefined;
768
781
  display_id?: string | null | undefined;
769
- custom_mappings?: CustomMappings$Outbound | null | undefined;
770
- updated_by?: string | null | undefined;
771
- created_by?: string | null | undefined;
772
- created_at?: string | null | undefined;
773
- updated_at?: string | null | undefined;
774
782
  pass_through?: Array<PassThroughBody$Outbound> | undefined;
775
783
  };
776
784
 
777
785
  /** @internal */
778
- export const BillPayment$outboundSchema: z.ZodType<
779
- BillPayment$Outbound,
786
+ export const BillPaymentInput$outboundSchema: z.ZodType<
787
+ BillPaymentInput$Outbound,
780
788
  z.ZodTypeDef,
781
- BillPayment
789
+ BillPaymentInput
782
790
  > = z.object({
783
- id: z.string(),
784
- downstreamId: z.nullable(z.string()).optional(),
785
791
  currency: z.nullable(Currency$outboundSchema).optional(),
786
792
  currencyRate: z.nullable(z.number()).optional(),
787
793
  totalAmount: z.nullable(z.number()),
@@ -789,14 +795,15 @@ export const BillPayment$outboundSchema: z.ZodType<
789
795
  paymentMethod: z.nullable(z.string()).optional(),
790
796
  paymentMethodReference: z.nullable(z.string()).optional(),
791
797
  paymentMethodId: z.nullable(z.string()).optional(),
792
- account: z.nullable(LinkedLedgerAccount$outboundSchema).optional(),
798
+ account: z.nullable(LinkedLedgerAccountInput$outboundSchema).optional(),
793
799
  transactionDate: z.nullable(z.date().transform(v => v.toISOString())),
794
- supplier: z.nullable(LinkedSupplier$outboundSchema).optional(),
800
+ supplier: z.nullable(LinkedSupplierInput$outboundSchema).optional(),
795
801
  companyId: z.nullable(z.string()).optional(),
796
802
  reconciled: z.nullable(z.boolean()).optional(),
797
803
  status: PaymentStatus$outboundSchema.optional(),
798
804
  type: BillPaymentType$outboundSchema.optional(),
799
- allocations: z.array(z.lazy(() => Allocations$outboundSchema)).optional(),
805
+ allocations: z.array(z.lazy(() => BillPaymentAllocations$outboundSchema))
806
+ .optional(),
800
807
  note: z.nullable(z.string()).optional(),
801
808
  number: z.nullable(z.string()).optional(),
802
809
  trackingCategories: z.nullable(
@@ -805,15 +812,9 @@ export const BillPayment$outboundSchema: z.ZodType<
805
812
  customFields: z.array(CustomField$outboundSchema).optional(),
806
813
  rowVersion: z.nullable(z.string()).optional(),
807
814
  displayId: z.nullable(z.string()).optional(),
808
- customMappings: z.nullable(CustomMappings$outboundSchema).optional(),
809
- updatedBy: z.nullable(z.string()).optional(),
810
- createdBy: z.nullable(z.string()).optional(),
811
- createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
812
- updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
813
815
  passThrough: z.array(PassThroughBody$outboundSchema).optional(),
814
816
  }).transform((v) => {
815
817
  return remap$(v, {
816
- downstreamId: "downstream_id",
817
818
  currencyRate: "currency_rate",
818
819
  totalAmount: "total_amount",
819
820
  paymentMethod: "payment_method",
@@ -825,11 +826,6 @@ export const BillPayment$outboundSchema: z.ZodType<
825
826
  customFields: "custom_fields",
826
827
  rowVersion: "row_version",
827
828
  displayId: "display_id",
828
- customMappings: "custom_mappings",
829
- updatedBy: "updated_by",
830
- createdBy: "created_by",
831
- createdAt: "created_at",
832
- updatedAt: "updated_at",
833
829
  passThrough: "pass_through",
834
830
  });
835
831
  });
@@ -838,25 +834,29 @@ export const BillPayment$outboundSchema: z.ZodType<
838
834
  * @internal
839
835
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
840
836
  */
841
- export namespace BillPayment$ {
842
- /** @deprecated use `BillPayment$inboundSchema` instead. */
843
- export const inboundSchema = BillPayment$inboundSchema;
844
- /** @deprecated use `BillPayment$outboundSchema` instead. */
845
- export const outboundSchema = BillPayment$outboundSchema;
846
- /** @deprecated use `BillPayment$Outbound` instead. */
847
- export type Outbound = BillPayment$Outbound;
837
+ export namespace BillPaymentInput$ {
838
+ /** @deprecated use `BillPaymentInput$inboundSchema` instead. */
839
+ export const inboundSchema = BillPaymentInput$inboundSchema;
840
+ /** @deprecated use `BillPaymentInput$outboundSchema` instead. */
841
+ export const outboundSchema = BillPaymentInput$outboundSchema;
842
+ /** @deprecated use `BillPaymentInput$Outbound` instead. */
843
+ export type Outbound = BillPaymentInput$Outbound;
848
844
  }
849
845
 
850
- export function billPaymentToJSON(billPayment: BillPayment): string {
851
- return JSON.stringify(BillPayment$outboundSchema.parse(billPayment));
846
+ export function billPaymentInputToJSON(
847
+ billPaymentInput: BillPaymentInput,
848
+ ): string {
849
+ return JSON.stringify(
850
+ BillPaymentInput$outboundSchema.parse(billPaymentInput),
851
+ );
852
852
  }
853
853
 
854
- export function billPaymentFromJSON(
854
+ export function billPaymentInputFromJSON(
855
855
  jsonString: string,
856
- ): SafeParseResult<BillPayment, SDKValidationError> {
856
+ ): SafeParseResult<BillPaymentInput, SDKValidationError> {
857
857
  return safeParse(
858
858
  jsonString,
859
- (x) => BillPayment$inboundSchema.parse(JSON.parse(x)),
860
- `Failed to parse 'BillPayment' from JSON`,
859
+ (x) => BillPaymentInput$inboundSchema.parse(JSON.parse(x)),
860
+ `Failed to parse 'BillPaymentInput' from JSON`,
861
861
  );
862
862
  }