@thera-hr/api-sdk 0.0.1-prerelease3181-dev-3 → 0.0.1-prerelease3181-dev-4

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 (402) hide show
  1. package/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  2. package/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  3. package/api/resources/api/resources/external/resources/externalApi/client/Client.js +1 -1
  4. package/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  5. package/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  6. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +7 -7
  7. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +44 -44
  8. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.d.ts +2 -1
  9. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +2 -0
  10. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +26 -24
  11. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +1 -0
  12. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +1 -0
  13. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  14. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.d.ts +21 -0
  15. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +97 -3
  16. package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  17. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  18. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  19. package/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  20. package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  21. package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  22. package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +3 -3
  23. package/api/resources/api/resources/thera/resources/incorporation/resources/incorporationApi/client/Client.js +3 -3
  24. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +7 -7
  25. package/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -0
  26. package/api/resources/api/resources/thera/resources/payroll/client/Client.js +11 -6
  27. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/Client.d.ts +158 -0
  28. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/Client.js +662 -0
  29. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/index.d.ts +1 -0
  30. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/index.js +17 -0
  31. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkApproveW2ExpenseRequest.d.ts +12 -0
  32. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkApproveW2ExpenseRequest.js +5 -0
  33. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkDenyW2ExpenseRequest.d.ts +12 -0
  34. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkDenyW2ExpenseRequest.js +5 -0
  35. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/CreateExpenseRequest.d.ts +32 -0
  36. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/CreateExpenseRequest.js +5 -0
  37. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/index.d.ts +3 -0
  38. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/index.js +2 -0
  39. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/index.d.ts +2 -0
  40. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/index.js +18 -0
  41. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseRequest.d.ts +14 -0
  42. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseRequest.js +5 -0
  43. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseStatusRequest.d.ts +8 -0
  44. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseStatusRequest.js +10 -0
  45. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/index.d.ts +2 -0
  46. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/index.js +18 -0
  47. package/api/resources/api/resources/thera/resources/payroll/resources/index.d.ts +4 -0
  48. package/api/resources/api/resources/thera/resources/payroll/resources/index.js +5 -1
  49. package/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  50. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +14 -0
  51. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +58 -5
  52. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.d.ts +1 -1
  53. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.js +15 -0
  54. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/AddEmployeeToOncycleChecksRequest.d.ts +12 -0
  55. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/AddEmployeeToOncycleChecksRequest.js +5 -0
  56. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/index.d.ts +1 -0
  57. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/index.js +2 -0
  58. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.js +7 -7
  59. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.d.ts +57 -2
  60. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +118 -16
  61. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/requests/GetHolidayDatesByUserIdRequest.d.ts +14 -0
  62. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/requests/GetHolidayDatesByUserIdRequest.js +5 -0
  63. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/requests/index.d.ts +1 -0
  64. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/AddTimeOffPolicyRequest.d.ts +1 -0
  65. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/GetHolidayDatesByUserIdResponse.d.ts +10 -0
  66. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/GetHolidayDatesByUserIdResponse.js +5 -0
  67. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/UpdateTimeOffPolicyRequest.d.ts +1 -0
  68. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/index.d.ts +1 -0
  69. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/index.js +1 -0
  70. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  71. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.d.ts +2 -1
  72. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +13 -12
  73. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.d.ts +1 -0
  74. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -4
  75. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -4
  76. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  77. package/api/resources/db/resources/company/types/AssociateUsersToHolidayPolicyResponse.d.ts +5 -0
  78. package/api/resources/db/resources/company/types/AssociateUsersToHolidayPolicyResponse.js +5 -0
  79. package/api/resources/db/resources/company/types/CompanyHolidaysResponse.d.ts +8 -0
  80. package/api/resources/db/resources/company/types/CompanyHolidaysResponse.js +5 -0
  81. package/api/resources/db/resources/company/types/DeleteCustomHolidayResponse.d.ts +5 -0
  82. package/api/resources/db/resources/company/types/DeleteCustomHolidayResponse.js +5 -0
  83. package/api/resources/db/resources/company/types/Holiday.d.ts +15 -0
  84. package/api/resources/db/resources/company/types/Holiday.js +5 -0
  85. package/api/resources/db/resources/company/types/HolidayDate.d.ts +9 -0
  86. package/api/resources/db/resources/company/types/HolidayDate.js +5 -0
  87. package/api/resources/db/resources/company/types/HolidaySettings.d.ts +8 -0
  88. package/api/resources/db/resources/company/types/HolidaySettings.js +5 -0
  89. package/api/resources/db/resources/company/types/HolidayType.d.ts +8 -0
  90. package/api/resources/db/resources/company/types/HolidayType.js +10 -0
  91. package/api/resources/db/resources/company/types/TimeOffPolicy.d.ts +1 -0
  92. package/api/resources/db/resources/company/types/TimeOffType.d.ts +2 -1
  93. package/api/resources/db/resources/company/types/TimeOffType.js +1 -0
  94. package/api/resources/db/resources/company/types/UserHolidaysResponse.d.ts +11 -0
  95. package/api/resources/db/resources/company/types/UserHolidaysResponse.js +5 -0
  96. package/api/resources/db/resources/company/types/W2Payroll.d.ts +0 -1
  97. package/api/resources/db/resources/company/types/index.d.ts +8 -0
  98. package/api/resources/db/resources/company/types/index.js +8 -0
  99. package/api/resources/db/resources/expense/index.d.ts +1 -0
  100. package/api/resources/db/resources/expense/index.js +17 -0
  101. package/api/resources/db/resources/expense/types/Expense.d.ts +24 -0
  102. package/api/resources/db/resources/expense/types/Expense.js +5 -0
  103. package/api/resources/db/resources/expense/types/ExpenseStatus.d.ts +13 -0
  104. package/api/resources/db/resources/expense/types/ExpenseStatus.js +15 -0
  105. package/api/resources/db/resources/expense/types/ExpenseType.d.ts +7 -0
  106. package/api/resources/db/resources/expense/types/ExpenseType.js +9 -0
  107. package/api/resources/db/resources/expense/types/index.d.ts +3 -0
  108. package/api/resources/db/resources/expense/types/index.js +19 -0
  109. package/api/resources/db/resources/index.d.ts +2 -0
  110. package/api/resources/db/resources/index.js +3 -1
  111. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  112. package/dist/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  113. package/dist/api/resources/api/resources/external/resources/externalApi/client/Client.js +1 -1
  114. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  115. package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  116. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +7 -7
  117. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +44 -44
  118. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.d.ts +2 -1
  119. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +2 -0
  120. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +26 -24
  121. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +1 -0
  122. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +1 -0
  123. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  124. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.d.ts +21 -0
  125. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +97 -3
  126. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  127. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  128. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  129. package/dist/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  130. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  131. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  132. package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +3 -3
  133. package/dist/api/resources/api/resources/thera/resources/incorporation/resources/incorporationApi/client/Client.js +3 -3
  134. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +7 -7
  135. package/dist/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -0
  136. package/dist/api/resources/api/resources/thera/resources/payroll/client/Client.js +11 -6
  137. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/Client.d.ts +158 -0
  138. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/Client.js +662 -0
  139. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/index.d.ts +1 -0
  140. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/index.js +17 -0
  141. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkApproveW2ExpenseRequest.d.ts +12 -0
  142. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkApproveW2ExpenseRequest.js +5 -0
  143. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkDenyW2ExpenseRequest.d.ts +12 -0
  144. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkDenyW2ExpenseRequest.js +5 -0
  145. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/CreateExpenseRequest.d.ts +32 -0
  146. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/CreateExpenseRequest.js +5 -0
  147. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/index.d.ts +3 -0
  148. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/index.js +2 -0
  149. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/index.d.ts +2 -0
  150. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/index.js +18 -0
  151. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseRequest.d.ts +14 -0
  152. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseRequest.js +5 -0
  153. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseStatusRequest.d.ts +8 -0
  154. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseStatusRequest.js +10 -0
  155. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/index.d.ts +2 -0
  156. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/index.js +18 -0
  157. package/dist/api/resources/api/resources/thera/resources/payroll/resources/index.d.ts +4 -0
  158. package/dist/api/resources/api/resources/thera/resources/payroll/resources/index.js +5 -1
  159. package/dist/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  160. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +14 -0
  161. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +58 -5
  162. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.d.ts +1 -1
  163. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.js +15 -0
  164. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/AddEmployeeToOncycleChecksRequest.d.ts +12 -0
  165. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/AddEmployeeToOncycleChecksRequest.js +5 -0
  166. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/index.d.ts +1 -0
  167. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/index.js +2 -0
  168. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.js +7 -7
  169. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.d.ts +57 -2
  170. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +118 -16
  171. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/requests/GetHolidayDatesByUserIdRequest.d.ts +14 -0
  172. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/requests/GetHolidayDatesByUserIdRequest.js +5 -0
  173. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/requests/index.d.ts +1 -0
  174. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/AddTimeOffPolicyRequest.d.ts +1 -0
  175. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/GetHolidayDatesByUserIdResponse.d.ts +10 -0
  176. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/GetHolidayDatesByUserIdResponse.js +5 -0
  177. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/UpdateTimeOffPolicyRequest.d.ts +1 -0
  178. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/index.d.ts +1 -0
  179. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/index.js +1 -0
  180. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  181. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.d.ts +2 -1
  182. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +13 -12
  183. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.d.ts +1 -0
  184. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -4
  185. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -4
  186. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  187. package/dist/api/resources/db/resources/company/types/AssociateUsersToHolidayPolicyResponse.d.ts +5 -0
  188. package/dist/api/resources/db/resources/company/types/AssociateUsersToHolidayPolicyResponse.js +5 -0
  189. package/dist/api/resources/db/resources/company/types/CompanyHolidaysResponse.d.ts +8 -0
  190. package/dist/api/resources/db/resources/company/types/CompanyHolidaysResponse.js +5 -0
  191. package/dist/api/resources/db/resources/company/types/DeleteCustomHolidayResponse.d.ts +5 -0
  192. package/dist/api/resources/db/resources/company/types/DeleteCustomHolidayResponse.js +5 -0
  193. package/dist/api/resources/db/resources/company/types/Holiday.d.ts +15 -0
  194. package/dist/api/resources/db/resources/company/types/Holiday.js +5 -0
  195. package/dist/api/resources/db/resources/company/types/HolidayDate.d.ts +9 -0
  196. package/dist/api/resources/db/resources/company/types/HolidayDate.js +5 -0
  197. package/dist/api/resources/db/resources/company/types/HolidaySettings.d.ts +8 -0
  198. package/dist/api/resources/db/resources/company/types/HolidaySettings.js +5 -0
  199. package/dist/api/resources/db/resources/company/types/HolidayType.d.ts +8 -0
  200. package/dist/api/resources/db/resources/company/types/HolidayType.js +10 -0
  201. package/dist/api/resources/db/resources/company/types/TimeOffPolicy.d.ts +1 -0
  202. package/dist/api/resources/db/resources/company/types/TimeOffType.d.ts +2 -1
  203. package/dist/api/resources/db/resources/company/types/TimeOffType.js +1 -0
  204. package/dist/api/resources/db/resources/company/types/UserHolidaysResponse.d.ts +11 -0
  205. package/dist/api/resources/db/resources/company/types/UserHolidaysResponse.js +5 -0
  206. package/dist/api/resources/db/resources/company/types/W2Payroll.d.ts +0 -1
  207. package/dist/api/resources/db/resources/company/types/index.d.ts +8 -0
  208. package/dist/api/resources/db/resources/company/types/index.js +8 -0
  209. package/dist/api/resources/db/resources/expense/index.d.ts +1 -0
  210. package/dist/api/resources/db/resources/expense/index.js +17 -0
  211. package/dist/api/resources/db/resources/expense/types/Expense.d.ts +24 -0
  212. package/dist/api/resources/db/resources/expense/types/Expense.js +5 -0
  213. package/dist/api/resources/db/resources/expense/types/ExpenseStatus.d.ts +13 -0
  214. package/dist/api/resources/db/resources/expense/types/ExpenseStatus.js +15 -0
  215. package/dist/api/resources/db/resources/expense/types/ExpenseType.d.ts +7 -0
  216. package/dist/api/resources/db/resources/expense/types/ExpenseType.js +9 -0
  217. package/dist/api/resources/db/resources/expense/types/index.d.ts +3 -0
  218. package/dist/api/resources/db/resources/expense/types/index.js +19 -0
  219. package/dist/api/resources/db/resources/index.d.ts +2 -0
  220. package/dist/api/resources/db/resources/index.js +3 -1
  221. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.d.ts +2 -1
  222. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.js +2 -1
  223. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +1 -0
  224. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +1 -0
  225. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +1 -0
  226. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +1 -0
  227. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/bulkApproveW2Expense.d.ts +11 -0
  228. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/bulkApproveW2Expense.js +42 -0
  229. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/bulkDenyW2Expense.d.ts +11 -0
  230. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/bulkDenyW2Expense.js +42 -0
  231. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/index.d.ts +5 -0
  232. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/index.js +44 -0
  233. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/listW2Expenses.d.ts +11 -0
  234. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/listW2Expenses.js +42 -0
  235. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/listW2ExpensesByContract.d.ts +11 -0
  236. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/listW2ExpensesByContract.js +42 -0
  237. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkApproveW2ExpenseRequest.d.ts +12 -0
  238. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkApproveW2ExpenseRequest.js +43 -0
  239. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkDenyW2ExpenseRequest.d.ts +12 -0
  240. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkDenyW2ExpenseRequest.js +43 -0
  241. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/CreateExpenseRequest.d.ts +21 -0
  242. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/CreateExpenseRequest.js +52 -0
  243. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/index.d.ts +3 -0
  244. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/index.js +9 -0
  245. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/index.d.ts +2 -0
  246. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/index.js +18 -0
  247. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseRequest.d.ts +19 -0
  248. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseRequest.js +50 -0
  249. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseStatusRequest.d.ts +10 -0
  250. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseStatusRequest.js +41 -0
  251. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/index.d.ts +2 -0
  252. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/index.js +18 -0
  253. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/index.d.ts +4 -0
  254. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/index.js +5 -1
  255. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.d.ts +1 -0
  256. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.js +4 -0
  257. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/AddEmployeeToOncycleChecksRequest.d.ts +12 -0
  258. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/AddEmployeeToOncycleChecksRequest.js +43 -0
  259. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/index.d.ts +1 -0
  260. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/index.js +5 -0
  261. package/dist/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/AddTimeOffPolicyRequest.d.ts +2 -0
  262. package/dist/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/AddTimeOffPolicyRequest.js +2 -0
  263. package/dist/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/GetHolidayDatesByUserIdResponse.d.ts +16 -0
  264. package/dist/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/GetHolidayDatesByUserIdResponse.js +47 -0
  265. package/dist/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/UpdateTimeOffPolicyRequest.d.ts +2 -0
  266. package/dist/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/UpdateTimeOffPolicyRequest.js +2 -0
  267. package/dist/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/index.d.ts +1 -0
  268. package/dist/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/index.js +1 -0
  269. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.d.ts +1 -0
  270. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.js +1 -0
  271. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -4
  272. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -4
  273. package/dist/serialization/resources/db/resources/company/types/AssociateUsersToHolidayPolicyResponse.d.ts +11 -0
  274. package/dist/serialization/resources/db/resources/company/types/AssociateUsersToHolidayPolicyResponse.js +41 -0
  275. package/dist/serialization/resources/db/resources/company/types/CompanyHolidaysResponse.d.ts +14 -0
  276. package/dist/serialization/resources/db/resources/company/types/CompanyHolidaysResponse.js +45 -0
  277. package/dist/serialization/resources/db/resources/company/types/DeleteCustomHolidayResponse.d.ts +11 -0
  278. package/dist/serialization/resources/db/resources/company/types/DeleteCustomHolidayResponse.js +41 -0
  279. package/dist/serialization/resources/db/resources/company/types/Holiday.d.ts +21 -0
  280. package/dist/serialization/resources/db/resources/company/types/Holiday.js +52 -0
  281. package/dist/serialization/resources/db/resources/company/types/HolidayDate.d.ts +15 -0
  282. package/dist/serialization/resources/db/resources/company/types/HolidayDate.js +46 -0
  283. package/dist/serialization/resources/db/resources/company/types/HolidaySettings.d.ts +14 -0
  284. package/dist/serialization/resources/db/resources/company/types/HolidaySettings.js +45 -0
  285. package/dist/serialization/resources/db/resources/company/types/HolidayType.d.ts +10 -0
  286. package/dist/serialization/resources/db/resources/company/types/HolidayType.js +41 -0
  287. package/dist/serialization/resources/db/resources/company/types/TimeOffPolicy.d.ts +2 -0
  288. package/dist/serialization/resources/db/resources/company/types/TimeOffPolicy.js +2 -0
  289. package/dist/serialization/resources/db/resources/company/types/TimeOffType.d.ts +1 -1
  290. package/dist/serialization/resources/db/resources/company/types/TimeOffType.js +1 -1
  291. package/dist/serialization/resources/db/resources/company/types/UserHolidaysResponse.d.ts +17 -0
  292. package/dist/serialization/resources/db/resources/company/types/UserHolidaysResponse.js +48 -0
  293. package/dist/serialization/resources/db/resources/company/types/W2Payroll.d.ts +0 -1
  294. package/dist/serialization/resources/db/resources/company/types/W2Payroll.js +0 -1
  295. package/dist/serialization/resources/db/resources/company/types/index.d.ts +8 -0
  296. package/dist/serialization/resources/db/resources/company/types/index.js +8 -0
  297. package/dist/serialization/resources/db/resources/expense/index.d.ts +1 -0
  298. package/dist/serialization/resources/db/resources/expense/index.js +17 -0
  299. package/dist/serialization/resources/db/resources/expense/types/Expense.d.ts +28 -0
  300. package/dist/serialization/resources/db/resources/expense/types/Expense.js +59 -0
  301. package/dist/serialization/resources/db/resources/expense/types/ExpenseStatus.d.ts +10 -0
  302. package/dist/serialization/resources/db/resources/expense/types/ExpenseStatus.js +41 -0
  303. package/dist/serialization/resources/db/resources/expense/types/ExpenseType.d.ts +10 -0
  304. package/dist/serialization/resources/db/resources/expense/types/ExpenseType.js +41 -0
  305. package/dist/serialization/resources/db/resources/expense/types/index.d.ts +3 -0
  306. package/dist/serialization/resources/db/resources/expense/types/index.js +19 -0
  307. package/dist/serialization/resources/db/resources/index.d.ts +2 -0
  308. package/dist/serialization/resources/db/resources/index.js +3 -1
  309. package/dist/version.d.ts +1 -1
  310. package/dist/version.js +1 -1
  311. package/package.json +1 -1
  312. package/reference.md +1127 -113
  313. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.d.ts +2 -1
  314. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.js +2 -1
  315. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +1 -0
  316. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +1 -0
  317. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +1 -0
  318. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +1 -0
  319. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/bulkApproveW2Expense.d.ts +11 -0
  320. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/bulkApproveW2Expense.js +42 -0
  321. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/bulkDenyW2Expense.d.ts +11 -0
  322. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/bulkDenyW2Expense.js +42 -0
  323. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/index.d.ts +5 -0
  324. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/index.js +44 -0
  325. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/listW2Expenses.d.ts +11 -0
  326. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/listW2Expenses.js +42 -0
  327. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/listW2ExpensesByContract.d.ts +11 -0
  328. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/listW2ExpensesByContract.js +42 -0
  329. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkApproveW2ExpenseRequest.d.ts +12 -0
  330. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkApproveW2ExpenseRequest.js +43 -0
  331. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkDenyW2ExpenseRequest.d.ts +12 -0
  332. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/BulkDenyW2ExpenseRequest.js +43 -0
  333. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/CreateExpenseRequest.d.ts +21 -0
  334. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/CreateExpenseRequest.js +52 -0
  335. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/index.d.ts +3 -0
  336. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/requests/index.js +9 -0
  337. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/index.d.ts +2 -0
  338. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/index.js +18 -0
  339. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseRequest.d.ts +19 -0
  340. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseRequest.js +50 -0
  341. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseStatusRequest.d.ts +10 -0
  342. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/UpdateExpenseStatusRequest.js +41 -0
  343. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/index.d.ts +2 -0
  344. package/serialization/resources/api/resources/thera/resources/payroll/resources/expenseApi/types/index.js +18 -0
  345. package/serialization/resources/api/resources/thera/resources/payroll/resources/index.d.ts +4 -0
  346. package/serialization/resources/api/resources/thera/resources/payroll/resources/index.js +5 -1
  347. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.d.ts +1 -0
  348. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.js +4 -0
  349. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/AddEmployeeToOncycleChecksRequest.d.ts +12 -0
  350. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/AddEmployeeToOncycleChecksRequest.js +43 -0
  351. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/index.d.ts +1 -0
  352. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/requests/index.js +5 -0
  353. package/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/AddTimeOffPolicyRequest.d.ts +2 -0
  354. package/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/AddTimeOffPolicyRequest.js +2 -0
  355. package/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/GetHolidayDatesByUserIdResponse.d.ts +16 -0
  356. package/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/GetHolidayDatesByUserIdResponse.js +47 -0
  357. package/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/UpdateTimeOffPolicyRequest.d.ts +2 -0
  358. package/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/UpdateTimeOffPolicyRequest.js +2 -0
  359. package/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/index.d.ts +1 -0
  360. package/serialization/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/types/index.js +1 -0
  361. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.d.ts +1 -0
  362. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.js +1 -0
  363. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -4
  364. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -4
  365. package/serialization/resources/db/resources/company/types/AssociateUsersToHolidayPolicyResponse.d.ts +11 -0
  366. package/serialization/resources/db/resources/company/types/AssociateUsersToHolidayPolicyResponse.js +41 -0
  367. package/serialization/resources/db/resources/company/types/CompanyHolidaysResponse.d.ts +14 -0
  368. package/serialization/resources/db/resources/company/types/CompanyHolidaysResponse.js +45 -0
  369. package/serialization/resources/db/resources/company/types/DeleteCustomHolidayResponse.d.ts +11 -0
  370. package/serialization/resources/db/resources/company/types/DeleteCustomHolidayResponse.js +41 -0
  371. package/serialization/resources/db/resources/company/types/Holiday.d.ts +21 -0
  372. package/serialization/resources/db/resources/company/types/Holiday.js +52 -0
  373. package/serialization/resources/db/resources/company/types/HolidayDate.d.ts +15 -0
  374. package/serialization/resources/db/resources/company/types/HolidayDate.js +46 -0
  375. package/serialization/resources/db/resources/company/types/HolidaySettings.d.ts +14 -0
  376. package/serialization/resources/db/resources/company/types/HolidaySettings.js +45 -0
  377. package/serialization/resources/db/resources/company/types/HolidayType.d.ts +10 -0
  378. package/serialization/resources/db/resources/company/types/HolidayType.js +41 -0
  379. package/serialization/resources/db/resources/company/types/TimeOffPolicy.d.ts +2 -0
  380. package/serialization/resources/db/resources/company/types/TimeOffPolicy.js +2 -0
  381. package/serialization/resources/db/resources/company/types/TimeOffType.d.ts +1 -1
  382. package/serialization/resources/db/resources/company/types/TimeOffType.js +1 -1
  383. package/serialization/resources/db/resources/company/types/UserHolidaysResponse.d.ts +17 -0
  384. package/serialization/resources/db/resources/company/types/UserHolidaysResponse.js +48 -0
  385. package/serialization/resources/db/resources/company/types/W2Payroll.d.ts +0 -1
  386. package/serialization/resources/db/resources/company/types/W2Payroll.js +0 -1
  387. package/serialization/resources/db/resources/company/types/index.d.ts +8 -0
  388. package/serialization/resources/db/resources/company/types/index.js +8 -0
  389. package/serialization/resources/db/resources/expense/index.d.ts +1 -0
  390. package/serialization/resources/db/resources/expense/index.js +17 -0
  391. package/serialization/resources/db/resources/expense/types/Expense.d.ts +28 -0
  392. package/serialization/resources/db/resources/expense/types/Expense.js +59 -0
  393. package/serialization/resources/db/resources/expense/types/ExpenseStatus.d.ts +10 -0
  394. package/serialization/resources/db/resources/expense/types/ExpenseStatus.js +41 -0
  395. package/serialization/resources/db/resources/expense/types/ExpenseType.d.ts +10 -0
  396. package/serialization/resources/db/resources/expense/types/ExpenseType.js +41 -0
  397. package/serialization/resources/db/resources/expense/types/index.d.ts +3 -0
  398. package/serialization/resources/db/resources/expense/types/index.js +19 -0
  399. package/serialization/resources/db/resources/index.d.ts +2 -0
  400. package/serialization/resources/db/resources/index.js +3 -1
  401. package/version.d.ts +1 -1
  402. package/version.js +1 -1
@@ -0,0 +1,662 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.ExpenseApi = void 0;
52
+ const core = __importStar(require("../../../../../../../../../../core"));
53
+ const serializers = __importStar(require("../../../../../../../../../../serialization/index"));
54
+ const url_join_1 = __importDefault(require("url-join"));
55
+ const errors = __importStar(require("../../../../../../../../../../errors/index"));
56
+ class ExpenseApi {
57
+ constructor(_options) {
58
+ this._options = _options;
59
+ }
60
+ /**
61
+ *
62
+ *
63
+ * @param {string} companyId
64
+ * @param {TheraApi.api.thera.payroll.CreateExpenseRequest} request
65
+ * @param {ExpenseApi.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @example
68
+ * await client.api.thera.payroll.expenseApi.createW2Expense("string", {
69
+ * contractId: "string",
70
+ * incurredDateTime: "string",
71
+ * type: "US_PAYROLL",
72
+ * categoryType: "string",
73
+ * description: "string",
74
+ * amount: 1000000,
75
+ * createdDateTime: "string",
76
+ * createdBy: "string",
77
+ * attachmentId: "string"
78
+ * })
79
+ */
80
+ createW2Expense(companyId, request, requestOptions) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ var _a;
83
+ const _response = yield core.fetcher({
84
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/w2-payroll/expense`),
85
+ method: "POST",
86
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease3181-dev-4", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3181-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
+ contentType: "application/json",
88
+ requestType: "json",
89
+ body: serializers.api.thera.payroll.CreateExpenseRequest.jsonOrThrow(request, {
90
+ unrecognizedObjectKeys: "strip",
91
+ }),
92
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
93
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
94
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
95
+ });
96
+ if (_response.ok) {
97
+ return serializers.db.Expense.parseOrThrow(_response.body, {
98
+ unrecognizedObjectKeys: "passthrough",
99
+ allowUnrecognizedUnionMembers: true,
100
+ allowUnrecognizedEnumValues: true,
101
+ skipValidation: true,
102
+ breadcrumbsPrefix: ["response"],
103
+ });
104
+ }
105
+ if (_response.error.reason === "status-code") {
106
+ throw new errors.TheraApiError({
107
+ statusCode: _response.error.statusCode,
108
+ body: _response.error.body,
109
+ });
110
+ }
111
+ switch (_response.error.reason) {
112
+ case "non-json":
113
+ throw new errors.TheraApiError({
114
+ statusCode: _response.error.statusCode,
115
+ body: _response.error.rawBody,
116
+ });
117
+ case "timeout":
118
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling POST /companies/{companyId}/w2-payroll/expense.");
119
+ case "unknown":
120
+ throw new errors.TheraApiError({
121
+ message: _response.error.errorMessage,
122
+ });
123
+ }
124
+ });
125
+ }
126
+ /**
127
+ *
128
+ *
129
+ * @param {string} companyId
130
+ * @param {string} expenseId
131
+ * @param {ExpenseApi.RequestOptions} requestOptions - Request-specific configuration.
132
+ *
133
+ * @example
134
+ * await client.api.thera.payroll.expenseApi.getW2Expense("string", "string")
135
+ */
136
+ getW2Expense(companyId, expenseId, requestOptions) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ var _a;
139
+ const _response = yield core.fetcher({
140
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/w2-payroll/expenses/${encodeURIComponent(expenseId)}`),
141
+ method: "GET",
142
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease3181-dev-4", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3181-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
143
+ contentType: "application/json",
144
+ requestType: "json",
145
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
146
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
147
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
148
+ });
149
+ if (_response.ok) {
150
+ return serializers.db.Expense.parseOrThrow(_response.body, {
151
+ unrecognizedObjectKeys: "passthrough",
152
+ allowUnrecognizedUnionMembers: true,
153
+ allowUnrecognizedEnumValues: true,
154
+ skipValidation: true,
155
+ breadcrumbsPrefix: ["response"],
156
+ });
157
+ }
158
+ if (_response.error.reason === "status-code") {
159
+ throw new errors.TheraApiError({
160
+ statusCode: _response.error.statusCode,
161
+ body: _response.error.body,
162
+ });
163
+ }
164
+ switch (_response.error.reason) {
165
+ case "non-json":
166
+ throw new errors.TheraApiError({
167
+ statusCode: _response.error.statusCode,
168
+ body: _response.error.rawBody,
169
+ });
170
+ case "timeout":
171
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /companies/{companyId}/w2-payroll/expenses/{expenseId}.");
172
+ case "unknown":
173
+ throw new errors.TheraApiError({
174
+ message: _response.error.errorMessage,
175
+ });
176
+ }
177
+ });
178
+ }
179
+ /**
180
+ *
181
+ *
182
+ * @param {string} companyId
183
+ * @param {ExpenseApi.RequestOptions} requestOptions - Request-specific configuration.
184
+ *
185
+ * @example
186
+ * await client.api.thera.payroll.expenseApi.listW2Expenses("string")
187
+ */
188
+ listW2Expenses(companyId, requestOptions) {
189
+ return __awaiter(this, void 0, void 0, function* () {
190
+ var _a;
191
+ const _response = yield core.fetcher({
192
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/w2-payroll/expenses`),
193
+ method: "GET",
194
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease3181-dev-4", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3181-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
195
+ contentType: "application/json",
196
+ requestType: "json",
197
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
198
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
199
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
200
+ });
201
+ if (_response.ok) {
202
+ return serializers.api.thera.payroll.expenseApi.listW2Expenses.Response.parseOrThrow(_response.body, {
203
+ unrecognizedObjectKeys: "passthrough",
204
+ allowUnrecognizedUnionMembers: true,
205
+ allowUnrecognizedEnumValues: true,
206
+ skipValidation: true,
207
+ breadcrumbsPrefix: ["response"],
208
+ });
209
+ }
210
+ if (_response.error.reason === "status-code") {
211
+ throw new errors.TheraApiError({
212
+ statusCode: _response.error.statusCode,
213
+ body: _response.error.body,
214
+ });
215
+ }
216
+ switch (_response.error.reason) {
217
+ case "non-json":
218
+ throw new errors.TheraApiError({
219
+ statusCode: _response.error.statusCode,
220
+ body: _response.error.rawBody,
221
+ });
222
+ case "timeout":
223
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /companies/{companyId}/w2-payroll/expenses.");
224
+ case "unknown":
225
+ throw new errors.TheraApiError({
226
+ message: _response.error.errorMessage,
227
+ });
228
+ }
229
+ });
230
+ }
231
+ /**
232
+ *
233
+ *
234
+ * @param {string} contractId
235
+ * @param {ExpenseApi.RequestOptions} requestOptions - Request-specific configuration.
236
+ *
237
+ * @example
238
+ * await client.api.thera.payroll.expenseApi.listW2ExpensesByContract("string")
239
+ */
240
+ listW2ExpensesByContract(contractId, requestOptions) {
241
+ return __awaiter(this, void 0, void 0, function* () {
242
+ var _a;
243
+ const _response = yield core.fetcher({
244
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `contracts/${encodeURIComponent(contractId)}/w2-payroll/expenses`),
245
+ method: "GET",
246
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease3181-dev-4", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3181-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
247
+ contentType: "application/json",
248
+ requestType: "json",
249
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
250
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
251
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
252
+ });
253
+ if (_response.ok) {
254
+ return serializers.api.thera.payroll.expenseApi.listW2ExpensesByContract.Response.parseOrThrow(_response.body, {
255
+ unrecognizedObjectKeys: "passthrough",
256
+ allowUnrecognizedUnionMembers: true,
257
+ allowUnrecognizedEnumValues: true,
258
+ skipValidation: true,
259
+ breadcrumbsPrefix: ["response"],
260
+ });
261
+ }
262
+ if (_response.error.reason === "status-code") {
263
+ throw new errors.TheraApiError({
264
+ statusCode: _response.error.statusCode,
265
+ body: _response.error.body,
266
+ });
267
+ }
268
+ switch (_response.error.reason) {
269
+ case "non-json":
270
+ throw new errors.TheraApiError({
271
+ statusCode: _response.error.statusCode,
272
+ body: _response.error.rawBody,
273
+ });
274
+ case "timeout":
275
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /contracts/{contractId}/w2-payroll/expenses.");
276
+ case "unknown":
277
+ throw new errors.TheraApiError({
278
+ message: _response.error.errorMessage,
279
+ });
280
+ }
281
+ });
282
+ }
283
+ /**
284
+ * @param {string} companyId
285
+ * @param {string} expenseId
286
+ * @param {ExpenseApi.RequestOptions} requestOptions - Request-specific configuration.
287
+ *
288
+ * @example
289
+ * await client.api.thera.payroll.expenseApi.deleteW2Expense("string", "string")
290
+ */
291
+ deleteW2Expense(companyId, expenseId, requestOptions) {
292
+ return __awaiter(this, void 0, void 0, function* () {
293
+ var _a;
294
+ const _response = yield core.fetcher({
295
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/w2-payroll/expenses/${encodeURIComponent(expenseId)}`),
296
+ method: "DELETE",
297
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease3181-dev-4", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3181-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
298
+ contentType: "application/json",
299
+ requestType: "json",
300
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
301
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
302
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
303
+ });
304
+ if (_response.ok) {
305
+ return;
306
+ }
307
+ if (_response.error.reason === "status-code") {
308
+ throw new errors.TheraApiError({
309
+ statusCode: _response.error.statusCode,
310
+ body: _response.error.body,
311
+ });
312
+ }
313
+ switch (_response.error.reason) {
314
+ case "non-json":
315
+ throw new errors.TheraApiError({
316
+ statusCode: _response.error.statusCode,
317
+ body: _response.error.rawBody,
318
+ });
319
+ case "timeout":
320
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling DELETE /companies/{companyId}/w2-payroll/expenses/{expenseId}.");
321
+ case "unknown":
322
+ throw new errors.TheraApiError({
323
+ message: _response.error.errorMessage,
324
+ });
325
+ }
326
+ });
327
+ }
328
+ /**
329
+ *
330
+ *
331
+ * @param {string} companyId
332
+ * @param {string} expenseId
333
+ * @param {TheraApi.api.thera.payroll.UpdateExpenseRequest} request
334
+ * @param {ExpenseApi.RequestOptions} requestOptions - Request-specific configuration.
335
+ *
336
+ * @example
337
+ * await client.api.thera.payroll.expenseApi.updateW2Expense("string", "string", {
338
+ * id: "string",
339
+ * incurredDateTime: "string",
340
+ * type: "US_PAYROLL",
341
+ * categoryType: "string",
342
+ * description: "string",
343
+ * amount: 1000000,
344
+ * attachmentId: "string"
345
+ * })
346
+ */
347
+ updateW2Expense(companyId, expenseId, request, requestOptions) {
348
+ return __awaiter(this, void 0, void 0, function* () {
349
+ var _a;
350
+ const _response = yield core.fetcher({
351
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/w2-payroll/expenses/${encodeURIComponent(expenseId)}`),
352
+ method: "PUT",
353
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease3181-dev-4", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3181-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
354
+ contentType: "application/json",
355
+ requestType: "json",
356
+ body: serializers.api.thera.payroll.UpdateExpenseRequest.jsonOrThrow(request, {
357
+ unrecognizedObjectKeys: "strip",
358
+ }),
359
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
360
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
361
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
362
+ });
363
+ if (_response.ok) {
364
+ return serializers.db.Expense.parseOrThrow(_response.body, {
365
+ unrecognizedObjectKeys: "passthrough",
366
+ allowUnrecognizedUnionMembers: true,
367
+ allowUnrecognizedEnumValues: true,
368
+ skipValidation: true,
369
+ breadcrumbsPrefix: ["response"],
370
+ });
371
+ }
372
+ if (_response.error.reason === "status-code") {
373
+ throw new errors.TheraApiError({
374
+ statusCode: _response.error.statusCode,
375
+ body: _response.error.body,
376
+ });
377
+ }
378
+ switch (_response.error.reason) {
379
+ case "non-json":
380
+ throw new errors.TheraApiError({
381
+ statusCode: _response.error.statusCode,
382
+ body: _response.error.rawBody,
383
+ });
384
+ case "timeout":
385
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling PUT /companies/{companyId}/w2-payroll/expenses/{expenseId}.");
386
+ case "unknown":
387
+ throw new errors.TheraApiError({
388
+ message: _response.error.errorMessage,
389
+ });
390
+ }
391
+ });
392
+ }
393
+ /**
394
+ * @param {string} companyId
395
+ * @param {string} expenseId
396
+ * @param {ExpenseApi.RequestOptions} requestOptions - Request-specific configuration.
397
+ *
398
+ * @example
399
+ * await client.api.thera.payroll.expenseApi.approveW2Expense("string", "string")
400
+ */
401
+ approveW2Expense(companyId, expenseId, requestOptions) {
402
+ return __awaiter(this, void 0, void 0, function* () {
403
+ var _a;
404
+ const _response = yield core.fetcher({
405
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/w2-payroll/expenses/${encodeURIComponent(expenseId)}/approve`),
406
+ method: "POST",
407
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease3181-dev-4", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3181-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
408
+ contentType: "application/json",
409
+ requestType: "json",
410
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
411
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
412
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
413
+ });
414
+ if (_response.ok) {
415
+ return serializers.db.Expense.parseOrThrow(_response.body, {
416
+ unrecognizedObjectKeys: "passthrough",
417
+ allowUnrecognizedUnionMembers: true,
418
+ allowUnrecognizedEnumValues: true,
419
+ skipValidation: true,
420
+ breadcrumbsPrefix: ["response"],
421
+ });
422
+ }
423
+ if (_response.error.reason === "status-code") {
424
+ throw new errors.TheraApiError({
425
+ statusCode: _response.error.statusCode,
426
+ body: _response.error.body,
427
+ });
428
+ }
429
+ switch (_response.error.reason) {
430
+ case "non-json":
431
+ throw new errors.TheraApiError({
432
+ statusCode: _response.error.statusCode,
433
+ body: _response.error.rawBody,
434
+ });
435
+ case "timeout":
436
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling POST /companies/{companyId}/w2-payroll/expenses/{expenseId}/approve.");
437
+ case "unknown":
438
+ throw new errors.TheraApiError({
439
+ message: _response.error.errorMessage,
440
+ });
441
+ }
442
+ });
443
+ }
444
+ /**
445
+ * @param {string} companyId
446
+ * @param {TheraApi.api.thera.payroll.BulkApproveW2ExpenseRequest} request
447
+ * @param {ExpenseApi.RequestOptions} requestOptions - Request-specific configuration.
448
+ *
449
+ * @example
450
+ * await client.api.thera.payroll.expenseApi.bulkApproveW2Expense("string", {
451
+ * expenseIds: ["string"]
452
+ * })
453
+ */
454
+ bulkApproveW2Expense(companyId, request, requestOptions) {
455
+ return __awaiter(this, void 0, void 0, function* () {
456
+ var _a;
457
+ const _response = yield core.fetcher({
458
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/w2-payroll/expenses/bulk-approve`),
459
+ method: "POST",
460
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease3181-dev-4", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3181-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
461
+ contentType: "application/json",
462
+ requestType: "json",
463
+ body: serializers.api.thera.payroll.BulkApproveW2ExpenseRequest.jsonOrThrow(request, {
464
+ unrecognizedObjectKeys: "strip",
465
+ }),
466
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
467
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
468
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
469
+ });
470
+ if (_response.ok) {
471
+ return serializers.api.thera.payroll.expenseApi.bulkApproveW2Expense.Response.parseOrThrow(_response.body, {
472
+ unrecognizedObjectKeys: "passthrough",
473
+ allowUnrecognizedUnionMembers: true,
474
+ allowUnrecognizedEnumValues: true,
475
+ skipValidation: true,
476
+ breadcrumbsPrefix: ["response"],
477
+ });
478
+ }
479
+ if (_response.error.reason === "status-code") {
480
+ throw new errors.TheraApiError({
481
+ statusCode: _response.error.statusCode,
482
+ body: _response.error.body,
483
+ });
484
+ }
485
+ switch (_response.error.reason) {
486
+ case "non-json":
487
+ throw new errors.TheraApiError({
488
+ statusCode: _response.error.statusCode,
489
+ body: _response.error.rawBody,
490
+ });
491
+ case "timeout":
492
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling POST /companies/{companyId}/w2-payroll/expenses/bulk-approve.");
493
+ case "unknown":
494
+ throw new errors.TheraApiError({
495
+ message: _response.error.errorMessage,
496
+ });
497
+ }
498
+ });
499
+ }
500
+ /**
501
+ * @param {string} companyId
502
+ * @param {TheraApi.api.thera.payroll.BulkDenyW2ExpenseRequest} request
503
+ * @param {ExpenseApi.RequestOptions} requestOptions - Request-specific configuration.
504
+ *
505
+ * @example
506
+ * await client.api.thera.payroll.expenseApi.bulkDenyW2Expense("string", {
507
+ * expenseIds: ["string"]
508
+ * })
509
+ */
510
+ bulkDenyW2Expense(companyId, request, requestOptions) {
511
+ return __awaiter(this, void 0, void 0, function* () {
512
+ var _a;
513
+ const _response = yield core.fetcher({
514
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/w2-payroll/expenses/bulk-deny`),
515
+ method: "POST",
516
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease3181-dev-4", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3181-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
517
+ contentType: "application/json",
518
+ requestType: "json",
519
+ body: serializers.api.thera.payroll.BulkDenyW2ExpenseRequest.jsonOrThrow(request, {
520
+ unrecognizedObjectKeys: "strip",
521
+ }),
522
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
523
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
524
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
525
+ });
526
+ if (_response.ok) {
527
+ return serializers.api.thera.payroll.expenseApi.bulkDenyW2Expense.Response.parseOrThrow(_response.body, {
528
+ unrecognizedObjectKeys: "passthrough",
529
+ allowUnrecognizedUnionMembers: true,
530
+ allowUnrecognizedEnumValues: true,
531
+ skipValidation: true,
532
+ breadcrumbsPrefix: ["response"],
533
+ });
534
+ }
535
+ if (_response.error.reason === "status-code") {
536
+ throw new errors.TheraApiError({
537
+ statusCode: _response.error.statusCode,
538
+ body: _response.error.body,
539
+ });
540
+ }
541
+ switch (_response.error.reason) {
542
+ case "non-json":
543
+ throw new errors.TheraApiError({
544
+ statusCode: _response.error.statusCode,
545
+ body: _response.error.rawBody,
546
+ });
547
+ case "timeout":
548
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling POST /companies/{companyId}/w2-payroll/expenses/bulk-deny.");
549
+ case "unknown":
550
+ throw new errors.TheraApiError({
551
+ message: _response.error.errorMessage,
552
+ });
553
+ }
554
+ });
555
+ }
556
+ /**
557
+ * @param {string} companyId
558
+ * @param {string} expenseId
559
+ * @param {ExpenseApi.RequestOptions} requestOptions - Request-specific configuration.
560
+ *
561
+ * @example
562
+ * await client.api.thera.payroll.expenseApi.denyW2Expense("string", "string")
563
+ */
564
+ denyW2Expense(companyId, expenseId, requestOptions) {
565
+ return __awaiter(this, void 0, void 0, function* () {
566
+ var _a;
567
+ const _response = yield core.fetcher({
568
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/w2-payroll/expenses/${encodeURIComponent(expenseId)}/deny`),
569
+ method: "POST",
570
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease3181-dev-4", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3181-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
571
+ contentType: "application/json",
572
+ requestType: "json",
573
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
574
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
575
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
576
+ });
577
+ if (_response.ok) {
578
+ return serializers.db.Expense.parseOrThrow(_response.body, {
579
+ unrecognizedObjectKeys: "passthrough",
580
+ allowUnrecognizedUnionMembers: true,
581
+ allowUnrecognizedEnumValues: true,
582
+ skipValidation: true,
583
+ breadcrumbsPrefix: ["response"],
584
+ });
585
+ }
586
+ if (_response.error.reason === "status-code") {
587
+ throw new errors.TheraApiError({
588
+ statusCode: _response.error.statusCode,
589
+ body: _response.error.body,
590
+ });
591
+ }
592
+ switch (_response.error.reason) {
593
+ case "non-json":
594
+ throw new errors.TheraApiError({
595
+ statusCode: _response.error.statusCode,
596
+ body: _response.error.rawBody,
597
+ });
598
+ case "timeout":
599
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling POST /companies/{companyId}/w2-payroll/expenses/{expenseId}/deny.");
600
+ case "unknown":
601
+ throw new errors.TheraApiError({
602
+ message: _response.error.errorMessage,
603
+ });
604
+ }
605
+ });
606
+ }
607
+ /**
608
+ * @param {string} companyId
609
+ * @param {string} expenseId
610
+ * @param {ExpenseApi.RequestOptions} requestOptions - Request-specific configuration.
611
+ *
612
+ * @example
613
+ * await client.api.thera.payroll.expenseApi.removeW2ExpenseFromPayroll("string", "string")
614
+ */
615
+ removeW2ExpenseFromPayroll(companyId, expenseId, requestOptions) {
616
+ return __awaiter(this, void 0, void 0, function* () {
617
+ var _a;
618
+ const _response = yield core.fetcher({
619
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/w2-payroll/expenses/${encodeURIComponent(expenseId)}/remove`),
620
+ method: "DELETE",
621
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease3181-dev-4", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3181-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
622
+ contentType: "application/json",
623
+ requestType: "json",
624
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
625
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
626
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
627
+ });
628
+ if (_response.ok) {
629
+ return;
630
+ }
631
+ if (_response.error.reason === "status-code") {
632
+ throw new errors.TheraApiError({
633
+ statusCode: _response.error.statusCode,
634
+ body: _response.error.body,
635
+ });
636
+ }
637
+ switch (_response.error.reason) {
638
+ case "non-json":
639
+ throw new errors.TheraApiError({
640
+ statusCode: _response.error.statusCode,
641
+ body: _response.error.rawBody,
642
+ });
643
+ case "timeout":
644
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling DELETE /companies/{companyId}/w2-payroll/expenses/{expenseId}/remove.");
645
+ case "unknown":
646
+ throw new errors.TheraApiError({
647
+ message: _response.error.errorMessage,
648
+ });
649
+ }
650
+ });
651
+ }
652
+ _getAuthorizationHeader() {
653
+ return __awaiter(this, void 0, void 0, function* () {
654
+ const bearer = yield core.Supplier.get(this._options.token);
655
+ if (bearer != null) {
656
+ return `Bearer ${bearer}`;
657
+ }
658
+ return undefined;
659
+ });
660
+ }
661
+ }
662
+ exports.ExpenseApi = ExpenseApi;