@unified-api/typescript-sdk 2.85.37 → 2.85.38

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 (350) hide show
  1. package/README.md +12 -0
  2. package/dist/commonjs/funcs/accountingCreateAccountingPaymentterm.d.ts +15 -0
  3. package/dist/commonjs/funcs/accountingCreateAccountingPaymentterm.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/accountingCreateAccountingPaymentterm.js +125 -0
  5. package/dist/commonjs/funcs/accountingCreateAccountingPaymentterm.js.map +1 -0
  6. package/dist/commonjs/funcs/accountingGetAccountingPaymentterm.d.ts +15 -0
  7. package/dist/commonjs/funcs/accountingGetAccountingPaymentterm.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/accountingGetAccountingPaymentterm.js +126 -0
  9. package/dist/commonjs/funcs/accountingGetAccountingPaymentterm.js.map +1 -0
  10. package/dist/commonjs/funcs/accountingListAccountingPaymentterms.d.ts +15 -0
  11. package/dist/commonjs/funcs/accountingListAccountingPaymentterms.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/accountingListAccountingPaymentterms.js +131 -0
  13. package/dist/commonjs/funcs/accountingListAccountingPaymentterms.js.map +1 -0
  14. package/dist/commonjs/funcs/accountingPatchAccountingPaymentterm.d.ts +15 -0
  15. package/dist/commonjs/funcs/accountingPatchAccountingPaymentterm.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/accountingPatchAccountingPaymentterm.js +129 -0
  17. package/dist/commonjs/funcs/accountingPatchAccountingPaymentterm.js.map +1 -0
  18. package/dist/commonjs/funcs/accountingRemoveAccountingPaymentterm.d.ts +14 -0
  19. package/dist/commonjs/funcs/accountingRemoveAccountingPaymentterm.d.ts.map +1 -0
  20. package/dist/commonjs/funcs/accountingRemoveAccountingPaymentterm.js +123 -0
  21. package/dist/commonjs/funcs/accountingRemoveAccountingPaymentterm.js.map +1 -0
  22. package/dist/commonjs/funcs/accountingUpdateAccountingPaymentterm.d.ts +15 -0
  23. package/dist/commonjs/funcs/accountingUpdateAccountingPaymentterm.d.ts.map +1 -0
  24. package/dist/commonjs/funcs/accountingUpdateAccountingPaymentterm.js +129 -0
  25. package/dist/commonjs/funcs/accountingUpdateAccountingPaymentterm.js.map +1 -0
  26. package/dist/commonjs/lib/config.d.ts +2 -2
  27. package/dist/commonjs/lib/config.js +2 -2
  28. package/dist/commonjs/sdk/accounting.d.ts +24 -0
  29. package/dist/commonjs/sdk/accounting.d.ts.map +1 -1
  30. package/dist/commonjs/sdk/accounting.js +42 -0
  31. package/dist/commonjs/sdk/accounting.js.map +1 -1
  32. package/dist/commonjs/sdk/models/operations/createaccountingbill.d.ts +1 -0
  33. package/dist/commonjs/sdk/models/operations/createaccountingbill.d.ts.map +1 -1
  34. package/dist/commonjs/sdk/models/operations/createaccountingbill.js +1 -0
  35. package/dist/commonjs/sdk/models/operations/createaccountingbill.js.map +1 -1
  36. package/dist/commonjs/sdk/models/operations/createaccountingcontact.d.ts +1 -0
  37. package/dist/commonjs/sdk/models/operations/createaccountingcontact.d.ts.map +1 -1
  38. package/dist/commonjs/sdk/models/operations/createaccountingcontact.js +1 -0
  39. package/dist/commonjs/sdk/models/operations/createaccountingcontact.js.map +1 -1
  40. package/dist/commonjs/sdk/models/operations/createaccountinginvoice.d.ts +1 -0
  41. package/dist/commonjs/sdk/models/operations/createaccountinginvoice.d.ts.map +1 -1
  42. package/dist/commonjs/sdk/models/operations/createaccountinginvoice.js +1 -0
  43. package/dist/commonjs/sdk/models/operations/createaccountinginvoice.js.map +1 -1
  44. package/dist/commonjs/sdk/models/operations/createaccountingpaymentterm.d.ts +51 -0
  45. package/dist/commonjs/sdk/models/operations/createaccountingpaymentterm.d.ts.map +1 -0
  46. package/dist/commonjs/sdk/models/operations/createaccountingpaymentterm.js +82 -0
  47. package/dist/commonjs/sdk/models/operations/createaccountingpaymentterm.js.map +1 -0
  48. package/dist/commonjs/sdk/models/operations/getaccountingbill.d.ts +1 -0
  49. package/dist/commonjs/sdk/models/operations/getaccountingbill.d.ts.map +1 -1
  50. package/dist/commonjs/sdk/models/operations/getaccountingbill.js +1 -0
  51. package/dist/commonjs/sdk/models/operations/getaccountingbill.js.map +1 -1
  52. package/dist/commonjs/sdk/models/operations/getaccountingcontact.d.ts +1 -0
  53. package/dist/commonjs/sdk/models/operations/getaccountingcontact.d.ts.map +1 -1
  54. package/dist/commonjs/sdk/models/operations/getaccountingcontact.js +1 -0
  55. package/dist/commonjs/sdk/models/operations/getaccountingcontact.js.map +1 -1
  56. package/dist/commonjs/sdk/models/operations/getaccountinginvoice.d.ts +1 -0
  57. package/dist/commonjs/sdk/models/operations/getaccountinginvoice.d.ts.map +1 -1
  58. package/dist/commonjs/sdk/models/operations/getaccountinginvoice.js +1 -0
  59. package/dist/commonjs/sdk/models/operations/getaccountinginvoice.js.map +1 -1
  60. package/dist/commonjs/sdk/models/operations/getaccountingpaymentterm.d.ts +53 -0
  61. package/dist/commonjs/sdk/models/operations/getaccountingpaymentterm.d.ts.map +1 -0
  62. package/dist/commonjs/sdk/models/operations/getaccountingpaymentterm.js +80 -0
  63. package/dist/commonjs/sdk/models/operations/getaccountingpaymentterm.js.map +1 -0
  64. package/dist/commonjs/sdk/models/operations/index.d.ts +6 -0
  65. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  66. package/dist/commonjs/sdk/models/operations/index.js +6 -0
  67. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  68. package/dist/commonjs/sdk/models/operations/listaccountingbills.d.ts +1 -0
  69. package/dist/commonjs/sdk/models/operations/listaccountingbills.d.ts.map +1 -1
  70. package/dist/commonjs/sdk/models/operations/listaccountingbills.js +1 -0
  71. package/dist/commonjs/sdk/models/operations/listaccountingbills.js.map +1 -1
  72. package/dist/commonjs/sdk/models/operations/listaccountingcontacts.d.ts +1 -0
  73. package/dist/commonjs/sdk/models/operations/listaccountingcontacts.d.ts.map +1 -1
  74. package/dist/commonjs/sdk/models/operations/listaccountingcontacts.js +1 -0
  75. package/dist/commonjs/sdk/models/operations/listaccountingcontacts.js.map +1 -1
  76. package/dist/commonjs/sdk/models/operations/listaccountinginvoices.d.ts +1 -0
  77. package/dist/commonjs/sdk/models/operations/listaccountinginvoices.d.ts.map +1 -1
  78. package/dist/commonjs/sdk/models/operations/listaccountinginvoices.js +1 -0
  79. package/dist/commonjs/sdk/models/operations/listaccountinginvoices.js.map +1 -1
  80. package/dist/commonjs/sdk/models/operations/listaccountingpaymentterms.d.ts +73 -0
  81. package/dist/commonjs/sdk/models/operations/listaccountingpaymentterms.d.ts.map +1 -0
  82. package/dist/commonjs/sdk/models/operations/listaccountingpaymentterms.js +89 -0
  83. package/dist/commonjs/sdk/models/operations/listaccountingpaymentterms.js.map +1 -0
  84. package/dist/commonjs/sdk/models/operations/patchaccountingbill.d.ts +1 -0
  85. package/dist/commonjs/sdk/models/operations/patchaccountingbill.d.ts.map +1 -1
  86. package/dist/commonjs/sdk/models/operations/patchaccountingbill.js +1 -0
  87. package/dist/commonjs/sdk/models/operations/patchaccountingbill.js.map +1 -1
  88. package/dist/commonjs/sdk/models/operations/patchaccountingcontact.d.ts +1 -0
  89. package/dist/commonjs/sdk/models/operations/patchaccountingcontact.d.ts.map +1 -1
  90. package/dist/commonjs/sdk/models/operations/patchaccountingcontact.js +1 -0
  91. package/dist/commonjs/sdk/models/operations/patchaccountingcontact.js.map +1 -1
  92. package/dist/commonjs/sdk/models/operations/patchaccountinginvoice.d.ts +1 -0
  93. package/dist/commonjs/sdk/models/operations/patchaccountinginvoice.d.ts.map +1 -1
  94. package/dist/commonjs/sdk/models/operations/patchaccountinginvoice.js +1 -0
  95. package/dist/commonjs/sdk/models/operations/patchaccountinginvoice.js.map +1 -1
  96. package/dist/commonjs/sdk/models/operations/patchaccountingpaymentterm.d.ts +56 -0
  97. package/dist/commonjs/sdk/models/operations/patchaccountingpaymentterm.d.ts.map +1 -0
  98. package/dist/commonjs/sdk/models/operations/patchaccountingpaymentterm.js +83 -0
  99. package/dist/commonjs/sdk/models/operations/patchaccountingpaymentterm.js.map +1 -0
  100. package/dist/commonjs/sdk/models/operations/removeaccountingpaymentterm.d.ts +30 -0
  101. package/dist/commonjs/sdk/models/operations/removeaccountingpaymentterm.d.ts.map +1 -0
  102. package/dist/commonjs/sdk/models/operations/removeaccountingpaymentterm.js +68 -0
  103. package/dist/commonjs/sdk/models/operations/removeaccountingpaymentterm.js.map +1 -0
  104. package/dist/commonjs/sdk/models/operations/updateaccountingbill.d.ts +1 -0
  105. package/dist/commonjs/sdk/models/operations/updateaccountingbill.d.ts.map +1 -1
  106. package/dist/commonjs/sdk/models/operations/updateaccountingbill.js +1 -0
  107. package/dist/commonjs/sdk/models/operations/updateaccountingbill.js.map +1 -1
  108. package/dist/commonjs/sdk/models/operations/updateaccountingcontact.d.ts +1 -0
  109. package/dist/commonjs/sdk/models/operations/updateaccountingcontact.d.ts.map +1 -1
  110. package/dist/commonjs/sdk/models/operations/updateaccountingcontact.js +1 -0
  111. package/dist/commonjs/sdk/models/operations/updateaccountingcontact.js.map +1 -1
  112. package/dist/commonjs/sdk/models/operations/updateaccountinginvoice.d.ts +1 -0
  113. package/dist/commonjs/sdk/models/operations/updateaccountinginvoice.d.ts.map +1 -1
  114. package/dist/commonjs/sdk/models/operations/updateaccountinginvoice.js +1 -0
  115. package/dist/commonjs/sdk/models/operations/updateaccountinginvoice.js.map +1 -1
  116. package/dist/commonjs/sdk/models/operations/updateaccountingpaymentterm.d.ts +56 -0
  117. package/dist/commonjs/sdk/models/operations/updateaccountingpaymentterm.d.ts.map +1 -0
  118. package/dist/commonjs/sdk/models/operations/updateaccountingpaymentterm.js +83 -0
  119. package/dist/commonjs/sdk/models/operations/updateaccountingpaymentterm.js.map +1 -0
  120. package/dist/commonjs/sdk/models/shared/accountingbill.d.ts +2 -0
  121. package/dist/commonjs/sdk/models/shared/accountingbill.d.ts.map +1 -1
  122. package/dist/commonjs/sdk/models/shared/accountingbill.js +4 -0
  123. package/dist/commonjs/sdk/models/shared/accountingbill.js.map +1 -1
  124. package/dist/commonjs/sdk/models/shared/accountingcontact.d.ts +2 -0
  125. package/dist/commonjs/sdk/models/shared/accountingcontact.d.ts.map +1 -1
  126. package/dist/commonjs/sdk/models/shared/accountingcontact.js +4 -0
  127. package/dist/commonjs/sdk/models/shared/accountingcontact.js.map +1 -1
  128. package/dist/commonjs/sdk/models/shared/accountinginvoice.d.ts +2 -0
  129. package/dist/commonjs/sdk/models/shared/accountinginvoice.d.ts.map +1 -1
  130. package/dist/commonjs/sdk/models/shared/accountinginvoice.js +4 -0
  131. package/dist/commonjs/sdk/models/shared/accountinginvoice.js.map +1 -1
  132. package/dist/commonjs/sdk/models/shared/accountingpaymentterm.d.ts +83 -0
  133. package/dist/commonjs/sdk/models/shared/accountingpaymentterm.d.ts.map +1 -0
  134. package/dist/commonjs/sdk/models/shared/accountingpaymentterm.js +147 -0
  135. package/dist/commonjs/sdk/models/shared/accountingpaymentterm.js.map +1 -0
  136. package/dist/commonjs/sdk/models/shared/index.d.ts +1 -0
  137. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  138. package/dist/commonjs/sdk/models/shared/index.js +1 -0
  139. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  140. package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.d.ts +2 -0
  141. package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  142. package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.js +2 -0
  143. package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  144. package/dist/commonjs/sdk/models/shared/webhook.d.ts +1 -0
  145. package/dist/commonjs/sdk/models/shared/webhook.d.ts.map +1 -1
  146. package/dist/commonjs/sdk/models/shared/webhook.js +1 -0
  147. package/dist/commonjs/sdk/models/shared/webhook.js.map +1 -1
  148. package/dist/commonjs/sdk/paymentterm.d.ts +30 -0
  149. package/dist/commonjs/sdk/paymentterm.d.ts.map +1 -0
  150. package/dist/commonjs/sdk/paymentterm.js +54 -0
  151. package/dist/commonjs/sdk/paymentterm.js.map +1 -0
  152. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  153. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  154. package/dist/commonjs/sdk/sdk.js +4 -0
  155. package/dist/commonjs/sdk/sdk.js.map +1 -1
  156. package/dist/esm/funcs/accountingCreateAccountingPaymentterm.d.ts +15 -0
  157. package/dist/esm/funcs/accountingCreateAccountingPaymentterm.d.ts.map +1 -0
  158. package/dist/esm/funcs/accountingCreateAccountingPaymentterm.js +89 -0
  159. package/dist/esm/funcs/accountingCreateAccountingPaymentterm.js.map +1 -0
  160. package/dist/esm/funcs/accountingGetAccountingPaymentterm.d.ts +15 -0
  161. package/dist/esm/funcs/accountingGetAccountingPaymentterm.d.ts.map +1 -0
  162. package/dist/esm/funcs/accountingGetAccountingPaymentterm.js +90 -0
  163. package/dist/esm/funcs/accountingGetAccountingPaymentterm.js.map +1 -0
  164. package/dist/esm/funcs/accountingListAccountingPaymentterms.d.ts +15 -0
  165. package/dist/esm/funcs/accountingListAccountingPaymentterms.d.ts.map +1 -0
  166. package/dist/esm/funcs/accountingListAccountingPaymentterms.js +95 -0
  167. package/dist/esm/funcs/accountingListAccountingPaymentterms.js.map +1 -0
  168. package/dist/esm/funcs/accountingPatchAccountingPaymentterm.d.ts +15 -0
  169. package/dist/esm/funcs/accountingPatchAccountingPaymentterm.d.ts.map +1 -0
  170. package/dist/esm/funcs/accountingPatchAccountingPaymentterm.js +93 -0
  171. package/dist/esm/funcs/accountingPatchAccountingPaymentterm.js.map +1 -0
  172. package/dist/esm/funcs/accountingRemoveAccountingPaymentterm.d.ts +14 -0
  173. package/dist/esm/funcs/accountingRemoveAccountingPaymentterm.d.ts.map +1 -0
  174. package/dist/esm/funcs/accountingRemoveAccountingPaymentterm.js +87 -0
  175. package/dist/esm/funcs/accountingRemoveAccountingPaymentterm.js.map +1 -0
  176. package/dist/esm/funcs/accountingUpdateAccountingPaymentterm.d.ts +15 -0
  177. package/dist/esm/funcs/accountingUpdateAccountingPaymentterm.d.ts.map +1 -0
  178. package/dist/esm/funcs/accountingUpdateAccountingPaymentterm.js +93 -0
  179. package/dist/esm/funcs/accountingUpdateAccountingPaymentterm.js.map +1 -0
  180. package/dist/esm/lib/config.d.ts +2 -2
  181. package/dist/esm/lib/config.js +2 -2
  182. package/dist/esm/sdk/accounting.d.ts +24 -0
  183. package/dist/esm/sdk/accounting.d.ts.map +1 -1
  184. package/dist/esm/sdk/accounting.js +42 -0
  185. package/dist/esm/sdk/accounting.js.map +1 -1
  186. package/dist/esm/sdk/models/operations/createaccountingbill.d.ts +1 -0
  187. package/dist/esm/sdk/models/operations/createaccountingbill.d.ts.map +1 -1
  188. package/dist/esm/sdk/models/operations/createaccountingbill.js +1 -0
  189. package/dist/esm/sdk/models/operations/createaccountingbill.js.map +1 -1
  190. package/dist/esm/sdk/models/operations/createaccountingcontact.d.ts +1 -0
  191. package/dist/esm/sdk/models/operations/createaccountingcontact.d.ts.map +1 -1
  192. package/dist/esm/sdk/models/operations/createaccountingcontact.js +1 -0
  193. package/dist/esm/sdk/models/operations/createaccountingcontact.js.map +1 -1
  194. package/dist/esm/sdk/models/operations/createaccountinginvoice.d.ts +1 -0
  195. package/dist/esm/sdk/models/operations/createaccountinginvoice.d.ts.map +1 -1
  196. package/dist/esm/sdk/models/operations/createaccountinginvoice.js +1 -0
  197. package/dist/esm/sdk/models/operations/createaccountinginvoice.js.map +1 -1
  198. package/dist/esm/sdk/models/operations/createaccountingpaymentterm.d.ts +51 -0
  199. package/dist/esm/sdk/models/operations/createaccountingpaymentterm.d.ts.map +1 -0
  200. package/dist/esm/sdk/models/operations/createaccountingpaymentterm.js +45 -0
  201. package/dist/esm/sdk/models/operations/createaccountingpaymentterm.js.map +1 -0
  202. package/dist/esm/sdk/models/operations/getaccountingbill.d.ts +1 -0
  203. package/dist/esm/sdk/models/operations/getaccountingbill.d.ts.map +1 -1
  204. package/dist/esm/sdk/models/operations/getaccountingbill.js +1 -0
  205. package/dist/esm/sdk/models/operations/getaccountingbill.js.map +1 -1
  206. package/dist/esm/sdk/models/operations/getaccountingcontact.d.ts +1 -0
  207. package/dist/esm/sdk/models/operations/getaccountingcontact.d.ts.map +1 -1
  208. package/dist/esm/sdk/models/operations/getaccountingcontact.js +1 -0
  209. package/dist/esm/sdk/models/operations/getaccountingcontact.js.map +1 -1
  210. package/dist/esm/sdk/models/operations/getaccountinginvoice.d.ts +1 -0
  211. package/dist/esm/sdk/models/operations/getaccountinginvoice.d.ts.map +1 -1
  212. package/dist/esm/sdk/models/operations/getaccountinginvoice.js +1 -0
  213. package/dist/esm/sdk/models/operations/getaccountinginvoice.js.map +1 -1
  214. package/dist/esm/sdk/models/operations/getaccountingpaymentterm.d.ts +53 -0
  215. package/dist/esm/sdk/models/operations/getaccountingpaymentterm.d.ts.map +1 -0
  216. package/dist/esm/sdk/models/operations/getaccountingpaymentterm.js +43 -0
  217. package/dist/esm/sdk/models/operations/getaccountingpaymentterm.js.map +1 -0
  218. package/dist/esm/sdk/models/operations/index.d.ts +6 -0
  219. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  220. package/dist/esm/sdk/models/operations/index.js +6 -0
  221. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  222. package/dist/esm/sdk/models/operations/listaccountingbills.d.ts +1 -0
  223. package/dist/esm/sdk/models/operations/listaccountingbills.d.ts.map +1 -1
  224. package/dist/esm/sdk/models/operations/listaccountingbills.js +1 -0
  225. package/dist/esm/sdk/models/operations/listaccountingbills.js.map +1 -1
  226. package/dist/esm/sdk/models/operations/listaccountingcontacts.d.ts +1 -0
  227. package/dist/esm/sdk/models/operations/listaccountingcontacts.d.ts.map +1 -1
  228. package/dist/esm/sdk/models/operations/listaccountingcontacts.js +1 -0
  229. package/dist/esm/sdk/models/operations/listaccountingcontacts.js.map +1 -1
  230. package/dist/esm/sdk/models/operations/listaccountinginvoices.d.ts +1 -0
  231. package/dist/esm/sdk/models/operations/listaccountinginvoices.d.ts.map +1 -1
  232. package/dist/esm/sdk/models/operations/listaccountinginvoices.js +1 -0
  233. package/dist/esm/sdk/models/operations/listaccountinginvoices.js.map +1 -1
  234. package/dist/esm/sdk/models/operations/listaccountingpaymentterms.d.ts +73 -0
  235. package/dist/esm/sdk/models/operations/listaccountingpaymentterms.d.ts.map +1 -0
  236. package/dist/esm/sdk/models/operations/listaccountingpaymentterms.js +52 -0
  237. package/dist/esm/sdk/models/operations/listaccountingpaymentterms.js.map +1 -0
  238. package/dist/esm/sdk/models/operations/patchaccountingbill.d.ts +1 -0
  239. package/dist/esm/sdk/models/operations/patchaccountingbill.d.ts.map +1 -1
  240. package/dist/esm/sdk/models/operations/patchaccountingbill.js +1 -0
  241. package/dist/esm/sdk/models/operations/patchaccountingbill.js.map +1 -1
  242. package/dist/esm/sdk/models/operations/patchaccountingcontact.d.ts +1 -0
  243. package/dist/esm/sdk/models/operations/patchaccountingcontact.d.ts.map +1 -1
  244. package/dist/esm/sdk/models/operations/patchaccountingcontact.js +1 -0
  245. package/dist/esm/sdk/models/operations/patchaccountingcontact.js.map +1 -1
  246. package/dist/esm/sdk/models/operations/patchaccountinginvoice.d.ts +1 -0
  247. package/dist/esm/sdk/models/operations/patchaccountinginvoice.d.ts.map +1 -1
  248. package/dist/esm/sdk/models/operations/patchaccountinginvoice.js +1 -0
  249. package/dist/esm/sdk/models/operations/patchaccountinginvoice.js.map +1 -1
  250. package/dist/esm/sdk/models/operations/patchaccountingpaymentterm.d.ts +56 -0
  251. package/dist/esm/sdk/models/operations/patchaccountingpaymentterm.d.ts.map +1 -0
  252. package/dist/esm/sdk/models/operations/patchaccountingpaymentterm.js +46 -0
  253. package/dist/esm/sdk/models/operations/patchaccountingpaymentterm.js.map +1 -0
  254. package/dist/esm/sdk/models/operations/removeaccountingpaymentterm.d.ts +30 -0
  255. package/dist/esm/sdk/models/operations/removeaccountingpaymentterm.d.ts.map +1 -0
  256. package/dist/esm/sdk/models/operations/removeaccountingpaymentterm.js +30 -0
  257. package/dist/esm/sdk/models/operations/removeaccountingpaymentterm.js.map +1 -0
  258. package/dist/esm/sdk/models/operations/updateaccountingbill.d.ts +1 -0
  259. package/dist/esm/sdk/models/operations/updateaccountingbill.d.ts.map +1 -1
  260. package/dist/esm/sdk/models/operations/updateaccountingbill.js +1 -0
  261. package/dist/esm/sdk/models/operations/updateaccountingbill.js.map +1 -1
  262. package/dist/esm/sdk/models/operations/updateaccountingcontact.d.ts +1 -0
  263. package/dist/esm/sdk/models/operations/updateaccountingcontact.d.ts.map +1 -1
  264. package/dist/esm/sdk/models/operations/updateaccountingcontact.js +1 -0
  265. package/dist/esm/sdk/models/operations/updateaccountingcontact.js.map +1 -1
  266. package/dist/esm/sdk/models/operations/updateaccountinginvoice.d.ts +1 -0
  267. package/dist/esm/sdk/models/operations/updateaccountinginvoice.d.ts.map +1 -1
  268. package/dist/esm/sdk/models/operations/updateaccountinginvoice.js +1 -0
  269. package/dist/esm/sdk/models/operations/updateaccountinginvoice.js.map +1 -1
  270. package/dist/esm/sdk/models/operations/updateaccountingpaymentterm.d.ts +56 -0
  271. package/dist/esm/sdk/models/operations/updateaccountingpaymentterm.d.ts.map +1 -0
  272. package/dist/esm/sdk/models/operations/updateaccountingpaymentterm.js +46 -0
  273. package/dist/esm/sdk/models/operations/updateaccountingpaymentterm.js.map +1 -0
  274. package/dist/esm/sdk/models/shared/accountingbill.d.ts +2 -0
  275. package/dist/esm/sdk/models/shared/accountingbill.d.ts.map +1 -1
  276. package/dist/esm/sdk/models/shared/accountingbill.js +4 -0
  277. package/dist/esm/sdk/models/shared/accountingbill.js.map +1 -1
  278. package/dist/esm/sdk/models/shared/accountingcontact.d.ts +2 -0
  279. package/dist/esm/sdk/models/shared/accountingcontact.d.ts.map +1 -1
  280. package/dist/esm/sdk/models/shared/accountingcontact.js +4 -0
  281. package/dist/esm/sdk/models/shared/accountingcontact.js.map +1 -1
  282. package/dist/esm/sdk/models/shared/accountinginvoice.d.ts +2 -0
  283. package/dist/esm/sdk/models/shared/accountinginvoice.d.ts.map +1 -1
  284. package/dist/esm/sdk/models/shared/accountinginvoice.js +4 -0
  285. package/dist/esm/sdk/models/shared/accountinginvoice.js.map +1 -1
  286. package/dist/esm/sdk/models/shared/accountingpaymentterm.d.ts +83 -0
  287. package/dist/esm/sdk/models/shared/accountingpaymentterm.d.ts.map +1 -0
  288. package/dist/esm/sdk/models/shared/accountingpaymentterm.js +109 -0
  289. package/dist/esm/sdk/models/shared/accountingpaymentterm.js.map +1 -0
  290. package/dist/esm/sdk/models/shared/index.d.ts +1 -0
  291. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  292. package/dist/esm/sdk/models/shared/index.js +1 -0
  293. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  294. package/dist/esm/sdk/models/shared/propertyconnectionpermissions.d.ts +2 -0
  295. package/dist/esm/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  296. package/dist/esm/sdk/models/shared/propertyconnectionpermissions.js +2 -0
  297. package/dist/esm/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  298. package/dist/esm/sdk/models/shared/webhook.d.ts +1 -0
  299. package/dist/esm/sdk/models/shared/webhook.d.ts.map +1 -1
  300. package/dist/esm/sdk/models/shared/webhook.js +1 -0
  301. package/dist/esm/sdk/models/shared/webhook.js.map +1 -1
  302. package/dist/esm/sdk/paymentterm.d.ts +30 -0
  303. package/dist/esm/sdk/paymentterm.d.ts.map +1 -0
  304. package/dist/esm/sdk/paymentterm.js +50 -0
  305. package/dist/esm/sdk/paymentterm.js.map +1 -0
  306. package/dist/esm/sdk/sdk.d.ts +3 -0
  307. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  308. package/dist/esm/sdk/sdk.js +4 -0
  309. package/dist/esm/sdk/sdk.js.map +1 -1
  310. package/jsr.json +1 -1
  311. package/package.json +1 -1
  312. package/src/funcs/accountingCreateAccountingPaymentterm.ts +176 -0
  313. package/src/funcs/accountingGetAccountingPaymentterm.ts +177 -0
  314. package/src/funcs/accountingListAccountingPaymentterms.ts +182 -0
  315. package/src/funcs/accountingPatchAccountingPaymentterm.ts +180 -0
  316. package/src/funcs/accountingRemoveAccountingPaymentterm.ts +182 -0
  317. package/src/funcs/accountingUpdateAccountingPaymentterm.ts +180 -0
  318. package/src/lib/config.ts +2 -2
  319. package/src/sdk/accounting.ts +90 -0
  320. package/src/sdk/models/operations/createaccountingbill.ts +1 -0
  321. package/src/sdk/models/operations/createaccountingcontact.ts +1 -0
  322. package/src/sdk/models/operations/createaccountinginvoice.ts +1 -0
  323. package/src/sdk/models/operations/createaccountingpaymentterm.ts +88 -0
  324. package/src/sdk/models/operations/getaccountingbill.ts +1 -0
  325. package/src/sdk/models/operations/getaccountingcontact.ts +1 -0
  326. package/src/sdk/models/operations/getaccountinginvoice.ts +1 -0
  327. package/src/sdk/models/operations/getaccountingpaymentterm.ts +89 -0
  328. package/src/sdk/models/operations/index.ts +6 -0
  329. package/src/sdk/models/operations/listaccountingbills.ts +1 -0
  330. package/src/sdk/models/operations/listaccountingcontacts.ts +1 -0
  331. package/src/sdk/models/operations/listaccountinginvoices.ts +1 -0
  332. package/src/sdk/models/operations/listaccountingpaymentterms.ts +118 -0
  333. package/src/sdk/models/operations/patchaccountingbill.ts +1 -0
  334. package/src/sdk/models/operations/patchaccountingcontact.ts +1 -0
  335. package/src/sdk/models/operations/patchaccountinginvoice.ts +1 -0
  336. package/src/sdk/models/operations/patchaccountingpaymentterm.ts +94 -0
  337. package/src/sdk/models/operations/removeaccountingpaymentterm.ts +78 -0
  338. package/src/sdk/models/operations/updateaccountingbill.ts +1 -0
  339. package/src/sdk/models/operations/updateaccountingcontact.ts +1 -0
  340. package/src/sdk/models/operations/updateaccountinginvoice.ts +1 -0
  341. package/src/sdk/models/operations/updateaccountingpaymentterm.ts +94 -0
  342. package/src/sdk/models/shared/accountingbill.ts +6 -0
  343. package/src/sdk/models/shared/accountingcontact.ts +6 -0
  344. package/src/sdk/models/shared/accountinginvoice.ts +6 -0
  345. package/src/sdk/models/shared/accountingpaymentterm.ts +202 -0
  346. package/src/sdk/models/shared/index.ts +1 -0
  347. package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
  348. package/src/sdk/models/shared/webhook.ts +1 -0
  349. package/src/sdk/paymentterm.ts +100 -0
  350. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1,176 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { UnifiedToCore } from "../core.js";
6
+ import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../sdk/models/errors/httpclienterrors.js";
21
+ import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
22
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
23
+ import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
24
+ import * as operations from "../sdk/models/operations/index.js";
25
+ import * as shared from "../sdk/models/shared/index.js";
26
+ import { APICall, APIPromise } from "../sdk/types/async.js";
27
+ import { Result } from "../sdk/types/fp.js";
28
+
29
+ /**
30
+ * Create a paymentterm
31
+ */
32
+ export function accountingCreateAccountingPaymentterm(
33
+ client: UnifiedToCore,
34
+ request: operations.CreateAccountingPaymenttermRequest,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ shared.AccountingPaymentterm,
39
+ | UnifiedToError
40
+ | ResponseValidationError
41
+ | ConnectionError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | InvalidRequestError
45
+ | UnexpectedClientError
46
+ | SDKValidationError
47
+ >
48
+ > {
49
+ return new APIPromise($do(
50
+ client,
51
+ request,
52
+ options,
53
+ ));
54
+ }
55
+
56
+ async function $do(
57
+ client: UnifiedToCore,
58
+ request: operations.CreateAccountingPaymenttermRequest,
59
+ options?: RequestOptions,
60
+ ): Promise<
61
+ [
62
+ Result<
63
+ shared.AccountingPaymentterm,
64
+ | UnifiedToError
65
+ | ResponseValidationError
66
+ | ConnectionError
67
+ | RequestAbortedError
68
+ | RequestTimeoutError
69
+ | InvalidRequestError
70
+ | UnexpectedClientError
71
+ | SDKValidationError
72
+ >,
73
+ APICall,
74
+ ]
75
+ > {
76
+ const parsed = safeParse(
77
+ request,
78
+ (value) =>
79
+ operations.CreateAccountingPaymenttermRequest$outboundSchema.parse(value),
80
+ "Input validation failed",
81
+ );
82
+ if (!parsed.ok) {
83
+ return [parsed, { status: "invalid" }];
84
+ }
85
+ const payload = parsed.value;
86
+ const body = encodeJSON("body", payload.AccountingPaymentterm, {
87
+ explode: true,
88
+ });
89
+
90
+ const pathParams = {
91
+ connection_id: encodeSimple("connection_id", payload.connection_id, {
92
+ explode: false,
93
+ charEncoding: "percent",
94
+ }),
95
+ };
96
+ const path = pathToFunc("/accounting/{connection_id}/paymentterm")(
97
+ pathParams,
98
+ );
99
+
100
+ const query = encodeFormQuery({
101
+ "fields": payload.fields,
102
+ "raw": payload.raw,
103
+ });
104
+
105
+ const headers = new Headers(compactMap({
106
+ "Content-Type": "application/json",
107
+ Accept: "application/json",
108
+ }));
109
+
110
+ const securityInput = await extractSecurity(client._options.security);
111
+ const requestSecurity = resolveGlobalSecurity(securityInput);
112
+
113
+ const context = {
114
+ options: client._options,
115
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
116
+ operationID: "createAccountingPaymentterm",
117
+ oAuth2Scopes: null,
118
+
119
+ resolvedSecurity: requestSecurity,
120
+
121
+ securitySource: client._options.security,
122
+ retryConfig: options?.retries
123
+ || client._options.retryConfig
124
+ || { strategy: "none" },
125
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
126
+ };
127
+
128
+ const requestRes = client._createRequest(context, {
129
+ security: requestSecurity,
130
+ method: "POST",
131
+ baseURL: options?.serverURL,
132
+ path: path,
133
+ headers: headers,
134
+ query: query,
135
+ body: body,
136
+ userAgent: client._options.userAgent,
137
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
138
+ }, options);
139
+ if (!requestRes.ok) {
140
+ return [requestRes, { status: "invalid" }];
141
+ }
142
+ const req = requestRes.value;
143
+
144
+ const doResult = await client._do(req, {
145
+ context,
146
+ isErrorStatusCode: (statusCode: number) =>
147
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
148
+ retryConfig: context.retryConfig,
149
+ retryCodes: context.retryCodes,
150
+ });
151
+ if (!doResult.ok) {
152
+ return [doResult, { status: "request-error", request: req }];
153
+ }
154
+ const response = doResult.value;
155
+
156
+ const [result] = await M.match<
157
+ shared.AccountingPaymentterm,
158
+ | UnifiedToError
159
+ | ResponseValidationError
160
+ | ConnectionError
161
+ | RequestAbortedError
162
+ | RequestTimeoutError
163
+ | InvalidRequestError
164
+ | UnexpectedClientError
165
+ | SDKValidationError
166
+ >(
167
+ M.json(200, shared.AccountingPaymentterm$inboundSchema),
168
+ M.fail("4XX"),
169
+ M.fail("5XX"),
170
+ )(response, req);
171
+ if (!result.ok) {
172
+ return [result, { status: "complete", request: req, response }];
173
+ }
174
+
175
+ return [result, { status: "complete", request: req, response }];
176
+ }
@@ -0,0 +1,177 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { UnifiedToCore } from "../core.js";
6
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../sdk/models/errors/httpclienterrors.js";
21
+ import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
22
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
23
+ import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
24
+ import * as operations from "../sdk/models/operations/index.js";
25
+ import * as shared from "../sdk/models/shared/index.js";
26
+ import { APICall, APIPromise } from "../sdk/types/async.js";
27
+ import { Result } from "../sdk/types/fp.js";
28
+
29
+ /**
30
+ * Retrieve a paymentterm
31
+ */
32
+ export function accountingGetAccountingPaymentterm(
33
+ client: UnifiedToCore,
34
+ request: operations.GetAccountingPaymenttermRequest,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ shared.AccountingPaymentterm,
39
+ | UnifiedToError
40
+ | ResponseValidationError
41
+ | ConnectionError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | InvalidRequestError
45
+ | UnexpectedClientError
46
+ | SDKValidationError
47
+ >
48
+ > {
49
+ return new APIPromise($do(
50
+ client,
51
+ request,
52
+ options,
53
+ ));
54
+ }
55
+
56
+ async function $do(
57
+ client: UnifiedToCore,
58
+ request: operations.GetAccountingPaymenttermRequest,
59
+ options?: RequestOptions,
60
+ ): Promise<
61
+ [
62
+ Result<
63
+ shared.AccountingPaymentterm,
64
+ | UnifiedToError
65
+ | ResponseValidationError
66
+ | ConnectionError
67
+ | RequestAbortedError
68
+ | RequestTimeoutError
69
+ | InvalidRequestError
70
+ | UnexpectedClientError
71
+ | SDKValidationError
72
+ >,
73
+ APICall,
74
+ ]
75
+ > {
76
+ const parsed = safeParse(
77
+ request,
78
+ (value) =>
79
+ operations.GetAccountingPaymenttermRequest$outboundSchema.parse(value),
80
+ "Input validation failed",
81
+ );
82
+ if (!parsed.ok) {
83
+ return [parsed, { status: "invalid" }];
84
+ }
85
+ const payload = parsed.value;
86
+ const body = null;
87
+
88
+ const pathParams = {
89
+ connection_id: encodeSimple("connection_id", payload.connection_id, {
90
+ explode: false,
91
+ charEncoding: "percent",
92
+ }),
93
+ id: encodeSimple("id", payload.id, {
94
+ explode: false,
95
+ charEncoding: "percent",
96
+ }),
97
+ };
98
+ const path = pathToFunc("/accounting/{connection_id}/paymentterm/{id}")(
99
+ pathParams,
100
+ );
101
+
102
+ const query = encodeFormQuery({
103
+ "fields": payload.fields,
104
+ "raw": payload.raw,
105
+ });
106
+
107
+ const headers = new Headers(compactMap({
108
+ Accept: "application/json",
109
+ }));
110
+
111
+ const securityInput = await extractSecurity(client._options.security);
112
+ const requestSecurity = resolveGlobalSecurity(securityInput);
113
+
114
+ const context = {
115
+ options: client._options,
116
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
117
+ operationID: "getAccountingPaymentterm",
118
+ oAuth2Scopes: null,
119
+
120
+ resolvedSecurity: requestSecurity,
121
+
122
+ securitySource: client._options.security,
123
+ retryConfig: options?.retries
124
+ || client._options.retryConfig
125
+ || { strategy: "none" },
126
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
127
+ };
128
+
129
+ const requestRes = client._createRequest(context, {
130
+ security: requestSecurity,
131
+ method: "GET",
132
+ baseURL: options?.serverURL,
133
+ path: path,
134
+ headers: headers,
135
+ query: query,
136
+ body: body,
137
+ userAgent: client._options.userAgent,
138
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
139
+ }, options);
140
+ if (!requestRes.ok) {
141
+ return [requestRes, { status: "invalid" }];
142
+ }
143
+ const req = requestRes.value;
144
+
145
+ const doResult = await client._do(req, {
146
+ context,
147
+ isErrorStatusCode: (statusCode: number) =>
148
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
149
+ retryConfig: context.retryConfig,
150
+ retryCodes: context.retryCodes,
151
+ });
152
+ if (!doResult.ok) {
153
+ return [doResult, { status: "request-error", request: req }];
154
+ }
155
+ const response = doResult.value;
156
+
157
+ const [result] = await M.match<
158
+ shared.AccountingPaymentterm,
159
+ | UnifiedToError
160
+ | ResponseValidationError
161
+ | ConnectionError
162
+ | RequestAbortedError
163
+ | RequestTimeoutError
164
+ | InvalidRequestError
165
+ | UnexpectedClientError
166
+ | SDKValidationError
167
+ >(
168
+ M.json(200, shared.AccountingPaymentterm$inboundSchema),
169
+ M.fail("4XX"),
170
+ M.fail("5XX"),
171
+ )(response, req);
172
+ if (!result.ok) {
173
+ return [result, { status: "complete", request: req, response }];
174
+ }
175
+
176
+ return [result, { status: "complete", request: req, response }];
177
+ }
@@ -0,0 +1,182 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { UnifiedToCore } from "../core.js";
7
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
8
+ import { matchStatusCode } from "../lib/http.js";
9
+ import * as M from "../lib/matchers.js";
10
+ import { compactMap } from "../lib/primitives.js";
11
+ import { safeParse } from "../lib/schemas.js";
12
+ import { RequestOptions } from "../lib/sdks.js";
13
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
14
+ import { pathToFunc } from "../lib/url.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../sdk/models/errors/httpclienterrors.js";
22
+ import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
24
+ import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
25
+ import * as operations from "../sdk/models/operations/index.js";
26
+ import * as shared from "../sdk/models/shared/index.js";
27
+ import { APICall, APIPromise } from "../sdk/types/async.js";
28
+ import { Result } from "../sdk/types/fp.js";
29
+
30
+ /**
31
+ * List all paymentterms
32
+ */
33
+ export function accountingListAccountingPaymentterms(
34
+ client: UnifiedToCore,
35
+ request: operations.ListAccountingPaymenttermsRequest,
36
+ options?: RequestOptions,
37
+ ): APIPromise<
38
+ Result<
39
+ Array<shared.AccountingPaymentterm>,
40
+ | UnifiedToError
41
+ | ResponseValidationError
42
+ | ConnectionError
43
+ | RequestAbortedError
44
+ | RequestTimeoutError
45
+ | InvalidRequestError
46
+ | UnexpectedClientError
47
+ | SDKValidationError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ async function $do(
58
+ client: UnifiedToCore,
59
+ request: operations.ListAccountingPaymenttermsRequest,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ Array<shared.AccountingPaymentterm>,
65
+ | UnifiedToError
66
+ | ResponseValidationError
67
+ | ConnectionError
68
+ | RequestAbortedError
69
+ | RequestTimeoutError
70
+ | InvalidRequestError
71
+ | UnexpectedClientError
72
+ | SDKValidationError
73
+ >,
74
+ APICall,
75
+ ]
76
+ > {
77
+ const parsed = safeParse(
78
+ request,
79
+ (value) =>
80
+ operations.ListAccountingPaymenttermsRequest$outboundSchema.parse(value),
81
+ "Input validation failed",
82
+ );
83
+ if (!parsed.ok) {
84
+ return [parsed, { status: "invalid" }];
85
+ }
86
+ const payload = parsed.value;
87
+ const body = null;
88
+
89
+ const pathParams = {
90
+ connection_id: encodeSimple("connection_id", payload.connection_id, {
91
+ explode: false,
92
+ charEncoding: "percent",
93
+ }),
94
+ };
95
+ const path = pathToFunc("/accounting/{connection_id}/paymentterm")(
96
+ pathParams,
97
+ );
98
+
99
+ const query = encodeFormQuery({
100
+ "fields": payload.fields,
101
+ "limit": payload.limit,
102
+ "offset": payload.offset,
103
+ "order": payload.order,
104
+ "org_id": payload.org_id,
105
+ "query": payload.query,
106
+ "raw": payload.raw,
107
+ "sort": payload.sort,
108
+ "type": payload.type,
109
+ "updated_gte": payload.updated_gte,
110
+ });
111
+
112
+ const headers = new Headers(compactMap({
113
+ Accept: "application/json",
114
+ }));
115
+
116
+ const securityInput = await extractSecurity(client._options.security);
117
+ const requestSecurity = resolveGlobalSecurity(securityInput);
118
+
119
+ const context = {
120
+ options: client._options,
121
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
122
+ operationID: "listAccountingPaymentterms",
123
+ oAuth2Scopes: null,
124
+
125
+ resolvedSecurity: requestSecurity,
126
+
127
+ securitySource: client._options.security,
128
+ retryConfig: options?.retries
129
+ || client._options.retryConfig
130
+ || { strategy: "none" },
131
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
132
+ };
133
+
134
+ const requestRes = client._createRequest(context, {
135
+ security: requestSecurity,
136
+ method: "GET",
137
+ baseURL: options?.serverURL,
138
+ path: path,
139
+ headers: headers,
140
+ query: query,
141
+ body: body,
142
+ userAgent: client._options.userAgent,
143
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
144
+ }, options);
145
+ if (!requestRes.ok) {
146
+ return [requestRes, { status: "invalid" }];
147
+ }
148
+ const req = requestRes.value;
149
+
150
+ const doResult = await client._do(req, {
151
+ context,
152
+ isErrorStatusCode: (statusCode: number) =>
153
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
154
+ retryConfig: context.retryConfig,
155
+ retryCodes: context.retryCodes,
156
+ });
157
+ if (!doResult.ok) {
158
+ return [doResult, { status: "request-error", request: req }];
159
+ }
160
+ const response = doResult.value;
161
+
162
+ const [result] = await M.match<
163
+ Array<shared.AccountingPaymentterm>,
164
+ | UnifiedToError
165
+ | ResponseValidationError
166
+ | ConnectionError
167
+ | RequestAbortedError
168
+ | RequestTimeoutError
169
+ | InvalidRequestError
170
+ | UnexpectedClientError
171
+ | SDKValidationError
172
+ >(
173
+ M.json(200, z.array(shared.AccountingPaymentterm$inboundSchema)),
174
+ M.fail("4XX"),
175
+ M.fail("5XX"),
176
+ )(response, req);
177
+ if (!result.ok) {
178
+ return [result, { status: "complete", request: req, response }];
179
+ }
180
+
181
+ return [result, { status: "complete", request: req, response }];
182
+ }
@@ -0,0 +1,180 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { UnifiedToCore } from "../core.js";
6
+ import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../sdk/models/errors/httpclienterrors.js";
21
+ import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
22
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
23
+ import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
24
+ import * as operations from "../sdk/models/operations/index.js";
25
+ import * as shared from "../sdk/models/shared/index.js";
26
+ import { APICall, APIPromise } from "../sdk/types/async.js";
27
+ import { Result } from "../sdk/types/fp.js";
28
+
29
+ /**
30
+ * Update a paymentterm
31
+ */
32
+ export function accountingPatchAccountingPaymentterm(
33
+ client: UnifiedToCore,
34
+ request: operations.PatchAccountingPaymenttermRequest,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ shared.AccountingPaymentterm,
39
+ | UnifiedToError
40
+ | ResponseValidationError
41
+ | ConnectionError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | InvalidRequestError
45
+ | UnexpectedClientError
46
+ | SDKValidationError
47
+ >
48
+ > {
49
+ return new APIPromise($do(
50
+ client,
51
+ request,
52
+ options,
53
+ ));
54
+ }
55
+
56
+ async function $do(
57
+ client: UnifiedToCore,
58
+ request: operations.PatchAccountingPaymenttermRequest,
59
+ options?: RequestOptions,
60
+ ): Promise<
61
+ [
62
+ Result<
63
+ shared.AccountingPaymentterm,
64
+ | UnifiedToError
65
+ | ResponseValidationError
66
+ | ConnectionError
67
+ | RequestAbortedError
68
+ | RequestTimeoutError
69
+ | InvalidRequestError
70
+ | UnexpectedClientError
71
+ | SDKValidationError
72
+ >,
73
+ APICall,
74
+ ]
75
+ > {
76
+ const parsed = safeParse(
77
+ request,
78
+ (value) =>
79
+ operations.PatchAccountingPaymenttermRequest$outboundSchema.parse(value),
80
+ "Input validation failed",
81
+ );
82
+ if (!parsed.ok) {
83
+ return [parsed, { status: "invalid" }];
84
+ }
85
+ const payload = parsed.value;
86
+ const body = encodeJSON("body", payload.AccountingPaymentterm, {
87
+ explode: true,
88
+ });
89
+
90
+ const pathParams = {
91
+ connection_id: encodeSimple("connection_id", payload.connection_id, {
92
+ explode: false,
93
+ charEncoding: "percent",
94
+ }),
95
+ id: encodeSimple("id", payload.id, {
96
+ explode: false,
97
+ charEncoding: "percent",
98
+ }),
99
+ };
100
+ const path = pathToFunc("/accounting/{connection_id}/paymentterm/{id}")(
101
+ pathParams,
102
+ );
103
+
104
+ const query = encodeFormQuery({
105
+ "fields": payload.fields,
106
+ "raw": payload.raw,
107
+ });
108
+
109
+ const headers = new Headers(compactMap({
110
+ "Content-Type": "application/json",
111
+ Accept: "application/json",
112
+ }));
113
+
114
+ const securityInput = await extractSecurity(client._options.security);
115
+ const requestSecurity = resolveGlobalSecurity(securityInput);
116
+
117
+ const context = {
118
+ options: client._options,
119
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
120
+ operationID: "patchAccountingPaymentterm",
121
+ oAuth2Scopes: null,
122
+
123
+ resolvedSecurity: requestSecurity,
124
+
125
+ securitySource: client._options.security,
126
+ retryConfig: options?.retries
127
+ || client._options.retryConfig
128
+ || { strategy: "none" },
129
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
130
+ };
131
+
132
+ const requestRes = client._createRequest(context, {
133
+ security: requestSecurity,
134
+ method: "PATCH",
135
+ baseURL: options?.serverURL,
136
+ path: path,
137
+ headers: headers,
138
+ query: query,
139
+ body: body,
140
+ userAgent: client._options.userAgent,
141
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
142
+ }, options);
143
+ if (!requestRes.ok) {
144
+ return [requestRes, { status: "invalid" }];
145
+ }
146
+ const req = requestRes.value;
147
+
148
+ const doResult = await client._do(req, {
149
+ context,
150
+ isErrorStatusCode: (statusCode: number) =>
151
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
152
+ retryConfig: context.retryConfig,
153
+ retryCodes: context.retryCodes,
154
+ });
155
+ if (!doResult.ok) {
156
+ return [doResult, { status: "request-error", request: req }];
157
+ }
158
+ const response = doResult.value;
159
+
160
+ const [result] = await M.match<
161
+ shared.AccountingPaymentterm,
162
+ | UnifiedToError
163
+ | ResponseValidationError
164
+ | ConnectionError
165
+ | RequestAbortedError
166
+ | RequestTimeoutError
167
+ | InvalidRequestError
168
+ | UnexpectedClientError
169
+ | SDKValidationError
170
+ >(
171
+ M.json(200, shared.AccountingPaymentterm$inboundSchema),
172
+ M.fail("4XX"),
173
+ M.fail("5XX"),
174
+ )(response, req);
175
+ if (!result.ok) {
176
+ return [result, { status: "complete", request: req, response }];
177
+ }
178
+
179
+ return [result, { status: "complete", request: req, response }];
180
+ }