@thera-hr/api-sdk 0.0.1-prerelease3032-dev-2 → 0.0.1-prerelease3032-dev-anthony

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 (282) 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 +1 -27
  7. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +35 -155
  8. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetPayInHistoryRequest.d.ts +1 -5
  9. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +0 -1
  10. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetPayInHistoryResponse.d.ts +0 -1
  11. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +0 -1
  12. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +0 -1
  13. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +24 -24
  14. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  15. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -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/misc/resources/misc/client/Client.js +7 -7
  24. package/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -0
  25. package/api/resources/api/resources/thera/resources/payroll/client/Client.js +5 -0
  26. package/api/resources/api/resources/thera/resources/payroll/resources/index.d.ts +3 -0
  27. package/api/resources/api/resources/thera/resources/payroll/resources/index.js +4 -1
  28. package/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  29. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +18 -5
  30. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +66 -11
  31. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/types/OnCycleChecksResponse.d.ts +1 -0
  32. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.d.ts +114 -0
  33. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.js +411 -0
  34. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.d.ts +1 -0
  35. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.js +17 -0
  36. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.d.ts +14 -0
  37. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.d.ts +22 -0
  38. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.d.ts +25 -0
  39. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.d.ts +3 -0
  40. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.js +2 -0
  41. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.d.ts +2 -0
  42. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.js +18 -0
  43. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.d.ts +6 -0
  44. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.d.ts +14 -0
  45. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.js +5 -0
  46. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.d.ts +7 -0
  47. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.js +5 -0
  48. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.d.ts +14 -0
  49. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.js +5 -0
  50. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.d.ts +10 -0
  51. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.js +12 -0
  52. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.d.ts +5 -0
  53. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.js +21 -0
  54. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  55. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  56. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.d.ts +40 -0
  57. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +89 -10
  58. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalAch.d.ts +8 -0
  59. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalAch.js +5 -0
  60. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalTheraCash.d.ts +10 -0
  61. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalTheraCash.js +5 -0
  62. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWire.d.ts +11 -0
  63. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWire.js +5 -0
  64. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWireAddress.d.ts +11 -0
  65. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWireAddress.js +5 -0
  66. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -0
  67. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -0
  68. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  69. package/api/resources/db/resources/company/types/TpCompanyInformation.d.ts +1 -0
  70. package/api/resources/db/resources/company/types/W2Payroll.d.ts +2 -0
  71. package/api/resources/db/resources/company/types/WithdrawalTpBankInfo.d.ts +10 -0
  72. package/api/resources/db/resources/company/types/WithdrawalTpBankInfo.js +5 -0
  73. package/api/resources/db/resources/company/types/index.d.ts +1 -0
  74. package/api/resources/db/resources/company/types/index.js +1 -0
  75. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  76. package/dist/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  77. package/dist/api/resources/api/resources/external/resources/externalApi/client/Client.js +1 -1
  78. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  79. package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  80. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +1 -27
  81. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +35 -155
  82. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetPayInHistoryRequest.d.ts +1 -5
  83. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +0 -1
  84. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetPayInHistoryResponse.d.ts +0 -1
  85. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +0 -1
  86. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +0 -1
  87. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +24 -24
  88. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  89. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  90. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  91. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  92. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  93. package/dist/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  94. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  95. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  96. package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +3 -3
  97. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +7 -7
  98. package/dist/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -0
  99. package/dist/api/resources/api/resources/thera/resources/payroll/client/Client.js +5 -0
  100. package/dist/api/resources/api/resources/thera/resources/payroll/resources/index.d.ts +3 -0
  101. package/dist/api/resources/api/resources/thera/resources/payroll/resources/index.js +4 -1
  102. package/dist/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  103. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +18 -5
  104. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +66 -11
  105. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/types/OnCycleChecksResponse.d.ts +1 -0
  106. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.d.ts +114 -0
  107. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.js +411 -0
  108. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.d.ts +1 -0
  109. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.js +17 -0
  110. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.d.ts +14 -0
  111. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.js +5 -0
  112. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.d.ts +22 -0
  113. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.js +5 -0
  114. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.d.ts +25 -0
  115. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.js +5 -0
  116. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.d.ts +3 -0
  117. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.js +2 -0
  118. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.d.ts +2 -0
  119. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.js +18 -0
  120. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.d.ts +6 -0
  121. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.js +5 -0
  122. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.d.ts +14 -0
  123. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.js +5 -0
  124. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.d.ts +7 -0
  125. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.js +5 -0
  126. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.d.ts +14 -0
  127. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.js +5 -0
  128. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.d.ts +10 -0
  129. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.js +12 -0
  130. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.d.ts +5 -0
  131. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.js +21 -0
  132. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  133. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  134. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.d.ts +40 -0
  135. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +89 -10
  136. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalAch.d.ts +8 -0
  137. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalAch.js +5 -0
  138. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalTheraCash.d.ts +10 -0
  139. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalTheraCash.js +5 -0
  140. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWire.d.ts +11 -0
  141. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWire.js +5 -0
  142. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWireAddress.d.ts +11 -0
  143. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWireAddress.js +5 -0
  144. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -0
  145. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -0
  146. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  147. package/dist/api/resources/db/resources/company/types/TpCompanyInformation.d.ts +1 -0
  148. package/dist/api/resources/db/resources/company/types/W2Payroll.d.ts +2 -0
  149. package/dist/api/resources/db/resources/company/types/WithdrawalTpBankInfo.d.ts +10 -0
  150. package/dist/api/resources/db/resources/company/types/WithdrawalTpBankInfo.js +5 -0
  151. package/dist/api/resources/db/resources/company/types/index.d.ts +1 -0
  152. package/dist/api/resources/db/resources/company/types/index.js +1 -0
  153. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetPayInHistoryResponse.d.ts +0 -1
  154. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetPayInHistoryResponse.js +0 -1
  155. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +0 -1
  156. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +0 -1
  157. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/index.d.ts +3 -0
  158. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/index.js +4 -1
  159. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleCheckDetails.d.ts +11 -0
  160. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleCheckDetails.js +8 -0
  161. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleChecks.d.ts +2 -2
  162. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleChecks.js +35 -1
  163. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.d.ts +1 -0
  164. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.js +2 -1
  165. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/types/OnCycleChecksResponse.d.ts +1 -0
  166. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/types/OnCycleChecksResponse.js +1 -0
  167. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.d.ts +2 -0
  168. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.js +41 -0
  169. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/listW2PaySchedules.d.ts +11 -0
  170. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/listW2PaySchedules.js +42 -0
  171. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.d.ts +12 -0
  172. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.js +43 -0
  173. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.d.ts +17 -0
  174. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.js +48 -0
  175. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.d.ts +19 -0
  176. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.js +50 -0
  177. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.d.ts +3 -0
  178. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.js +9 -0
  179. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.d.ts +2 -0
  180. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.js +18 -0
  181. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.d.ts +12 -0
  182. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.js +43 -0
  183. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.d.ts +20 -0
  184. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.js +51 -0
  185. package/dist/serialization/resources/api/resources/thera/resources/{bank/resources/bankApi/types/GetPayInCountResponse.d.ts → payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.d.ts} +3 -3
  186. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.js +43 -0
  187. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.d.ts +20 -0
  188. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.js +51 -0
  189. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.d.ts +10 -0
  190. package/dist/serialization/resources/api/resources/thera/resources/{bank/resources/bankApi/types/GetPayInCountResponse.js → payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.js} +2 -4
  191. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.d.ts +5 -0
  192. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.js +21 -0
  193. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalAch.d.ts +14 -0
  194. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalAch.js +45 -0
  195. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalTheraCash.d.ts +17 -0
  196. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalTheraCash.js +48 -0
  197. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWire.d.ts +17 -0
  198. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWire.js +48 -0
  199. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWireAddress.d.ts +17 -0
  200. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWireAddress.js +48 -0
  201. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -0
  202. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -0
  203. package/dist/serialization/resources/db/resources/company/types/TpCompanyInformation.d.ts +2 -0
  204. package/dist/serialization/resources/db/resources/company/types/TpCompanyInformation.js +2 -0
  205. package/dist/serialization/resources/db/resources/company/types/W2Payroll.d.ts +1 -0
  206. package/dist/serialization/resources/db/resources/company/types/W2Payroll.js +1 -0
  207. package/dist/serialization/resources/db/resources/company/types/WithdrawalTpBankInfo.d.ts +16 -0
  208. package/dist/serialization/resources/db/resources/company/types/WithdrawalTpBankInfo.js +47 -0
  209. package/dist/serialization/resources/db/resources/company/types/index.d.ts +1 -0
  210. package/dist/serialization/resources/db/resources/company/types/index.js +1 -0
  211. package/dist/version.d.ts +1 -1
  212. package/dist/version.js +1 -1
  213. package/package.json +1 -1
  214. package/reference.md +740 -254
  215. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetPayInHistoryResponse.d.ts +0 -1
  216. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetPayInHistoryResponse.js +0 -1
  217. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +0 -1
  218. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +0 -1
  219. package/serialization/resources/api/resources/thera/resources/payroll/resources/index.d.ts +3 -0
  220. package/serialization/resources/api/resources/thera/resources/payroll/resources/index.js +4 -1
  221. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleCheckDetails.d.ts +11 -0
  222. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleCheckDetails.js +8 -0
  223. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleChecks.d.ts +2 -2
  224. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleChecks.js +35 -1
  225. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.d.ts +1 -0
  226. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.js +2 -1
  227. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/types/OnCycleChecksResponse.d.ts +1 -0
  228. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/types/OnCycleChecksResponse.js +1 -0
  229. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.d.ts +2 -0
  230. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.js +41 -0
  231. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/listW2PaySchedules.d.ts +11 -0
  232. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/listW2PaySchedules.js +42 -0
  233. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.d.ts +12 -0
  234. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.js +43 -0
  235. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.d.ts +17 -0
  236. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.js +48 -0
  237. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.d.ts +19 -0
  238. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.js +50 -0
  239. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.d.ts +3 -0
  240. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.js +9 -0
  241. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.d.ts +2 -0
  242. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.js +18 -0
  243. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.d.ts +12 -0
  244. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.js +43 -0
  245. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.d.ts +20 -0
  246. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.js +51 -0
  247. package/serialization/resources/api/resources/thera/resources/{bank/resources/bankApi/types/GetPayInCountResponse.d.ts → payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.d.ts} +3 -3
  248. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.js +43 -0
  249. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.d.ts +20 -0
  250. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.js +51 -0
  251. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.d.ts +10 -0
  252. package/serialization/resources/api/resources/thera/resources/{bank/resources/bankApi/types/GetPayInCountResponse.js → payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.js} +2 -4
  253. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.d.ts +5 -0
  254. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.js +21 -0
  255. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalAch.d.ts +14 -0
  256. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalAch.js +45 -0
  257. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalTheraCash.d.ts +17 -0
  258. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalTheraCash.js +48 -0
  259. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWire.d.ts +17 -0
  260. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWire.js +48 -0
  261. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWireAddress.d.ts +17 -0
  262. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/WithdrawalWireAddress.js +48 -0
  263. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -0
  264. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -0
  265. package/serialization/resources/db/resources/company/types/TpCompanyInformation.d.ts +2 -0
  266. package/serialization/resources/db/resources/company/types/TpCompanyInformation.js +2 -0
  267. package/serialization/resources/db/resources/company/types/W2Payroll.d.ts +1 -0
  268. package/serialization/resources/db/resources/company/types/W2Payroll.js +1 -0
  269. package/serialization/resources/db/resources/company/types/WithdrawalTpBankInfo.d.ts +16 -0
  270. package/serialization/resources/db/resources/company/types/WithdrawalTpBankInfo.js +47 -0
  271. package/serialization/resources/db/resources/company/types/index.d.ts +1 -0
  272. package/serialization/resources/db/resources/company/types/index.js +1 -0
  273. package/version.d.ts +1 -1
  274. package/version.js +1 -1
  275. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetPaymentByTypeRequest.d.ts +0 -12
  276. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetPayInCountResponse.d.ts +0 -6
  277. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetPaymentByTypeRequest.d.ts +0 -12
  278. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetPayInCountResponse.d.ts +0 -6
  279. /package/api/resources/api/resources/thera/resources/{bank/resources/bankApi/client/requests/GetPaymentByTypeRequest.js → payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.js} +0 -0
  280. /package/api/resources/api/resources/thera/resources/{bank/resources/bankApi/types/GetPayInCountResponse.js → payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.js} +0 -0
  281. /package/{dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetPaymentByTypeRequest.js → api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.js} +0 -0
  282. /package/{dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetPayInCountResponse.js → api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.js} +0 -0
@@ -0,0 +1,114 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../../../../../../../core";
5
+ import * as TheraApi from "../../../../../../../../../index";
6
+ export declare namespace PayscheduleApi {
7
+ interface Options {
8
+ environment: core.Supplier<string>;
9
+ /** Specify a custom URL to connect the client to. */
10
+ baseUrl?: core.Supplier<string>;
11
+ token?: core.Supplier<core.BearerToken | undefined>;
12
+ }
13
+ interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
15
+ timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
17
+ maxRetries?: number;
18
+ /** A hook to abort the request. */
19
+ abortSignal?: AbortSignal;
20
+ /** Additional headers to include in the request. */
21
+ headers?: Record<string, string>;
22
+ }
23
+ }
24
+ export declare class PayscheduleApi {
25
+ protected readonly _options: PayscheduleApi.Options;
26
+ constructor(_options: PayscheduleApi.Options);
27
+ /**
28
+ *
29
+ *
30
+ * @param {string} companyId
31
+ * @param {TheraApi.api.thera.payroll.CreatePayScheduleRequest} request
32
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
33
+ *
34
+ * @example
35
+ * await client.api.thera.payroll.payscheduleApi.createW2PaySchedule("string", {
36
+ * name: "string",
37
+ * payFrequency: "weekly",
38
+ * firstPayDate: "2023-01-15",
39
+ * secondPayDate: "2023-01-15",
40
+ * firstPeriodEndDate: "2023-01-15"
41
+ * })
42
+ */
43
+ createW2PaySchedule(companyId: string, request: TheraApi.api.thera.payroll.CreatePayScheduleRequest, requestOptions?: PayscheduleApi.RequestOptions): Promise<TheraApi.api.thera.payroll.GetPayScheduleResponse>;
44
+ /**
45
+ *
46
+ *
47
+ * @param {string} companyId
48
+ * @param {string} checkPayScheduleId
49
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
50
+ *
51
+ * @example
52
+ * await client.api.thera.payroll.payscheduleApi.getW2PaySchedule("string", "string")
53
+ */
54
+ getW2PaySchedule(companyId: string, checkPayScheduleId: string, requestOptions?: PayscheduleApi.RequestOptions): Promise<TheraApi.api.thera.payroll.GetPayScheduleResponse>;
55
+ /**
56
+ *
57
+ *
58
+ * @param {string} companyId
59
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
60
+ *
61
+ * @example
62
+ * await client.api.thera.payroll.payscheduleApi.listW2PaySchedules("string")
63
+ */
64
+ listW2PaySchedules(companyId: string, requestOptions?: PayscheduleApi.RequestOptions): Promise<TheraApi.api.thera.payroll.GetPayScheduleResponse[]>;
65
+ /**
66
+ * Delete W2 Pay Schedule in Check by setting the metadata flag, as we can't delete Check W2 Pay Schedule by API. https://support.checkhq.com/hc/en-us/articles/24948436554263-Pay-Schedules
67
+ *
68
+ * @param {string} companyId
69
+ * @param {string} checkPayScheduleId
70
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
71
+ *
72
+ * @example
73
+ * await client.api.thera.payroll.payscheduleApi.deleteW2PaySchedule("string", "string")
74
+ */
75
+ deleteW2PaySchedule(companyId: string, checkPayScheduleId: string, requestOptions?: PayscheduleApi.RequestOptions): Promise<void>;
76
+ /**
77
+ *
78
+ *
79
+ * @param {string} companyId
80
+ * @param {string} checkPayScheduleId
81
+ * @param {TheraApi.api.thera.payroll.UpdatePayScheduleRequest} request
82
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
83
+ *
84
+ * @example
85
+ * await client.api.thera.payroll.payscheduleApi.updateW2PaySchedule("string", "string", {
86
+ * name: "string",
87
+ * payFrequency: "weekly",
88
+ * firstPeriodEndDate: "2023-01-15",
89
+ * firstPayDate: "2023-01-15",
90
+ * secondPayDate: "2023-01-15",
91
+ * metadata: {
92
+ * deleted: "string"
93
+ * }
94
+ * })
95
+ */
96
+ updateW2PaySchedule(companyId: string, checkPayScheduleId: string, request: TheraApi.api.thera.payroll.UpdatePayScheduleRequest, requestOptions?: PayscheduleApi.RequestOptions): Promise<TheraApi.api.thera.payroll.GetPayScheduleResponse>;
97
+ /**
98
+ * If user ID is not provided in the request, it'll use the old value in DB. The response body always return the schedules for all employees
99
+ *
100
+ * @param {string} companyId
101
+ * @param {string} checkPayScheduleId
102
+ * @param {TheraApi.api.thera.payroll.AssignW2EmployeeToPayScheduleRequest} request
103
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
104
+ *
105
+ * @example
106
+ * await client.api.thera.payroll.payscheduleApi.assignW2EmployeesPaySchedule("string", "string", {
107
+ * checkPayScheduleIdByUserId: {
108
+ * "string": "string"
109
+ * }
110
+ * })
111
+ */
112
+ assignW2EmployeesPaySchedule(companyId: string, checkPayScheduleId: string, request: TheraApi.api.thera.payroll.AssignW2EmployeeToPayScheduleRequest, requestOptions?: PayscheduleApi.RequestOptions): Promise<TheraApi.api.thera.payroll.AssignW2EmployeeToPayScheduleResponse>;
113
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
114
+ }
@@ -0,0 +1,411 @@
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.PayscheduleApi = 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 PayscheduleApi {
57
+ constructor(_options) {
58
+ this._options = _options;
59
+ }
60
+ /**
61
+ *
62
+ *
63
+ * @param {string} companyId
64
+ * @param {TheraApi.api.thera.payroll.CreatePayScheduleRequest} request
65
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @example
68
+ * await client.api.thera.payroll.payscheduleApi.createW2PaySchedule("string", {
69
+ * name: "string",
70
+ * payFrequency: "weekly",
71
+ * firstPayDate: "2023-01-15",
72
+ * secondPayDate: "2023-01-15",
73
+ * firstPeriodEndDate: "2023-01-15"
74
+ * })
75
+ */
76
+ createW2PaySchedule(companyId, request, requestOptions) {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ var _a;
79
+ const _response = yield core.fetcher({
80
+ 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/pay-schedule`),
81
+ method: "POST",
82
+ 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-prerelease3032-dev-anthony", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3032-dev-anthony", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ contentType: "application/json",
84
+ requestType: "json",
85
+ body: serializers.api.thera.payroll.CreatePayScheduleRequest.jsonOrThrow(request, {
86
+ unrecognizedObjectKeys: "strip",
87
+ }),
88
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
89
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
90
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
91
+ });
92
+ if (_response.ok) {
93
+ return serializers.api.thera.payroll.GetPayScheduleResponse.parseOrThrow(_response.body, {
94
+ unrecognizedObjectKeys: "passthrough",
95
+ allowUnrecognizedUnionMembers: true,
96
+ allowUnrecognizedEnumValues: true,
97
+ skipValidation: true,
98
+ breadcrumbsPrefix: ["response"],
99
+ });
100
+ }
101
+ if (_response.error.reason === "status-code") {
102
+ throw new errors.TheraApiError({
103
+ statusCode: _response.error.statusCode,
104
+ body: _response.error.body,
105
+ });
106
+ }
107
+ switch (_response.error.reason) {
108
+ case "non-json":
109
+ throw new errors.TheraApiError({
110
+ statusCode: _response.error.statusCode,
111
+ body: _response.error.rawBody,
112
+ });
113
+ case "timeout":
114
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling POST /companies/{companyId}/w2-payroll/pay-schedule.");
115
+ case "unknown":
116
+ throw new errors.TheraApiError({
117
+ message: _response.error.errorMessage,
118
+ });
119
+ }
120
+ });
121
+ }
122
+ /**
123
+ *
124
+ *
125
+ * @param {string} companyId
126
+ * @param {string} checkPayScheduleId
127
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
128
+ *
129
+ * @example
130
+ * await client.api.thera.payroll.payscheduleApi.getW2PaySchedule("string", "string")
131
+ */
132
+ getW2PaySchedule(companyId, checkPayScheduleId, requestOptions) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ var _a;
135
+ const _response = yield core.fetcher({
136
+ 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/pay-schedules/${encodeURIComponent(checkPayScheduleId)}`),
137
+ method: "GET",
138
+ 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-prerelease3032-dev-anthony", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3032-dev-anthony", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
139
+ contentType: "application/json",
140
+ requestType: "json",
141
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
142
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
143
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
144
+ });
145
+ if (_response.ok) {
146
+ return serializers.api.thera.payroll.GetPayScheduleResponse.parseOrThrow(_response.body, {
147
+ unrecognizedObjectKeys: "passthrough",
148
+ allowUnrecognizedUnionMembers: true,
149
+ allowUnrecognizedEnumValues: true,
150
+ skipValidation: true,
151
+ breadcrumbsPrefix: ["response"],
152
+ });
153
+ }
154
+ if (_response.error.reason === "status-code") {
155
+ throw new errors.TheraApiError({
156
+ statusCode: _response.error.statusCode,
157
+ body: _response.error.body,
158
+ });
159
+ }
160
+ switch (_response.error.reason) {
161
+ case "non-json":
162
+ throw new errors.TheraApiError({
163
+ statusCode: _response.error.statusCode,
164
+ body: _response.error.rawBody,
165
+ });
166
+ case "timeout":
167
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /companies/{companyId}/w2-payroll/pay-schedules/{checkPayScheduleId}.");
168
+ case "unknown":
169
+ throw new errors.TheraApiError({
170
+ message: _response.error.errorMessage,
171
+ });
172
+ }
173
+ });
174
+ }
175
+ /**
176
+ *
177
+ *
178
+ * @param {string} companyId
179
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
180
+ *
181
+ * @example
182
+ * await client.api.thera.payroll.payscheduleApi.listW2PaySchedules("string")
183
+ */
184
+ listW2PaySchedules(companyId, requestOptions) {
185
+ return __awaiter(this, void 0, void 0, function* () {
186
+ var _a;
187
+ const _response = yield core.fetcher({
188
+ 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/pay-schedules`),
189
+ method: "GET",
190
+ 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-prerelease3032-dev-anthony", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3032-dev-anthony", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
191
+ contentType: "application/json",
192
+ requestType: "json",
193
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
194
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
195
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
196
+ });
197
+ if (_response.ok) {
198
+ return serializers.api.thera.payroll.payscheduleApi.listW2PaySchedules.Response.parseOrThrow(_response.body, {
199
+ unrecognizedObjectKeys: "passthrough",
200
+ allowUnrecognizedUnionMembers: true,
201
+ allowUnrecognizedEnumValues: true,
202
+ skipValidation: true,
203
+ breadcrumbsPrefix: ["response"],
204
+ });
205
+ }
206
+ if (_response.error.reason === "status-code") {
207
+ throw new errors.TheraApiError({
208
+ statusCode: _response.error.statusCode,
209
+ body: _response.error.body,
210
+ });
211
+ }
212
+ switch (_response.error.reason) {
213
+ case "non-json":
214
+ throw new errors.TheraApiError({
215
+ statusCode: _response.error.statusCode,
216
+ body: _response.error.rawBody,
217
+ });
218
+ case "timeout":
219
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /companies/{companyId}/w2-payroll/pay-schedules.");
220
+ case "unknown":
221
+ throw new errors.TheraApiError({
222
+ message: _response.error.errorMessage,
223
+ });
224
+ }
225
+ });
226
+ }
227
+ /**
228
+ * Delete W2 Pay Schedule in Check by setting the metadata flag, as we can't delete Check W2 Pay Schedule by API. https://support.checkhq.com/hc/en-us/articles/24948436554263-Pay-Schedules
229
+ *
230
+ * @param {string} companyId
231
+ * @param {string} checkPayScheduleId
232
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
233
+ *
234
+ * @example
235
+ * await client.api.thera.payroll.payscheduleApi.deleteW2PaySchedule("string", "string")
236
+ */
237
+ deleteW2PaySchedule(companyId, checkPayScheduleId, requestOptions) {
238
+ return __awaiter(this, void 0, void 0, function* () {
239
+ var _a;
240
+ const _response = yield core.fetcher({
241
+ 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/pay-schedules/${encodeURIComponent(checkPayScheduleId)}`),
242
+ method: "DELETE",
243
+ 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-prerelease3032-dev-anthony", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3032-dev-anthony", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
244
+ contentType: "application/json",
245
+ requestType: "json",
246
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
247
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
248
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
249
+ });
250
+ if (_response.ok) {
251
+ return;
252
+ }
253
+ if (_response.error.reason === "status-code") {
254
+ throw new errors.TheraApiError({
255
+ statusCode: _response.error.statusCode,
256
+ body: _response.error.body,
257
+ });
258
+ }
259
+ switch (_response.error.reason) {
260
+ case "non-json":
261
+ throw new errors.TheraApiError({
262
+ statusCode: _response.error.statusCode,
263
+ body: _response.error.rawBody,
264
+ });
265
+ case "timeout":
266
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling DELETE /companies/{companyId}/w2-payroll/pay-schedules/{checkPayScheduleId}.");
267
+ case "unknown":
268
+ throw new errors.TheraApiError({
269
+ message: _response.error.errorMessage,
270
+ });
271
+ }
272
+ });
273
+ }
274
+ /**
275
+ *
276
+ *
277
+ * @param {string} companyId
278
+ * @param {string} checkPayScheduleId
279
+ * @param {TheraApi.api.thera.payroll.UpdatePayScheduleRequest} request
280
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
281
+ *
282
+ * @example
283
+ * await client.api.thera.payroll.payscheduleApi.updateW2PaySchedule("string", "string", {
284
+ * name: "string",
285
+ * payFrequency: "weekly",
286
+ * firstPeriodEndDate: "2023-01-15",
287
+ * firstPayDate: "2023-01-15",
288
+ * secondPayDate: "2023-01-15",
289
+ * metadata: {
290
+ * deleted: "string"
291
+ * }
292
+ * })
293
+ */
294
+ updateW2PaySchedule(companyId, checkPayScheduleId, request, requestOptions) {
295
+ return __awaiter(this, void 0, void 0, function* () {
296
+ var _a;
297
+ const _response = yield core.fetcher({
298
+ 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/pay-schedules/${encodeURIComponent(checkPayScheduleId)}`),
299
+ method: "PUT",
300
+ 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-prerelease3032-dev-anthony", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3032-dev-anthony", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
301
+ contentType: "application/json",
302
+ requestType: "json",
303
+ body: serializers.api.thera.payroll.UpdatePayScheduleRequest.jsonOrThrow(request, {
304
+ unrecognizedObjectKeys: "strip",
305
+ }),
306
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
307
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
308
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
309
+ });
310
+ if (_response.ok) {
311
+ return serializers.api.thera.payroll.GetPayScheduleResponse.parseOrThrow(_response.body, {
312
+ unrecognizedObjectKeys: "passthrough",
313
+ allowUnrecognizedUnionMembers: true,
314
+ allowUnrecognizedEnumValues: true,
315
+ skipValidation: true,
316
+ breadcrumbsPrefix: ["response"],
317
+ });
318
+ }
319
+ if (_response.error.reason === "status-code") {
320
+ throw new errors.TheraApiError({
321
+ statusCode: _response.error.statusCode,
322
+ body: _response.error.body,
323
+ });
324
+ }
325
+ switch (_response.error.reason) {
326
+ case "non-json":
327
+ throw new errors.TheraApiError({
328
+ statusCode: _response.error.statusCode,
329
+ body: _response.error.rawBody,
330
+ });
331
+ case "timeout":
332
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling PUT /companies/{companyId}/w2-payroll/pay-schedules/{checkPayScheduleId}.");
333
+ case "unknown":
334
+ throw new errors.TheraApiError({
335
+ message: _response.error.errorMessage,
336
+ });
337
+ }
338
+ });
339
+ }
340
+ /**
341
+ * If user ID is not provided in the request, it'll use the old value in DB. The response body always return the schedules for all employees
342
+ *
343
+ * @param {string} companyId
344
+ * @param {string} checkPayScheduleId
345
+ * @param {TheraApi.api.thera.payroll.AssignW2EmployeeToPayScheduleRequest} request
346
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
347
+ *
348
+ * @example
349
+ * await client.api.thera.payroll.payscheduleApi.assignW2EmployeesPaySchedule("string", "string", {
350
+ * checkPayScheduleIdByUserId: {
351
+ * "string": "string"
352
+ * }
353
+ * })
354
+ */
355
+ assignW2EmployeesPaySchedule(companyId, checkPayScheduleId, request, requestOptions) {
356
+ return __awaiter(this, void 0, void 0, function* () {
357
+ var _a;
358
+ const _response = yield core.fetcher({
359
+ 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/pay-schedules/${encodeURIComponent(checkPayScheduleId)}/assign-to-employees`),
360
+ method: "PUT",
361
+ 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-prerelease3032-dev-anthony", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3032-dev-anthony", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
362
+ contentType: "application/json",
363
+ requestType: "json",
364
+ body: serializers.api.thera.payroll.AssignW2EmployeeToPayScheduleRequest.jsonOrThrow(request, {
365
+ unrecognizedObjectKeys: "strip",
366
+ }),
367
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
368
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
369
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
370
+ });
371
+ if (_response.ok) {
372
+ return serializers.api.thera.payroll.AssignW2EmployeeToPayScheduleResponse.parseOrThrow(_response.body, {
373
+ unrecognizedObjectKeys: "passthrough",
374
+ allowUnrecognizedUnionMembers: true,
375
+ allowUnrecognizedEnumValues: true,
376
+ skipValidation: true,
377
+ breadcrumbsPrefix: ["response"],
378
+ });
379
+ }
380
+ if (_response.error.reason === "status-code") {
381
+ throw new errors.TheraApiError({
382
+ statusCode: _response.error.statusCode,
383
+ body: _response.error.body,
384
+ });
385
+ }
386
+ switch (_response.error.reason) {
387
+ case "non-json":
388
+ throw new errors.TheraApiError({
389
+ statusCode: _response.error.statusCode,
390
+ body: _response.error.rawBody,
391
+ });
392
+ case "timeout":
393
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling PUT /companies/{companyId}/w2-payroll/pay-schedules/{checkPayScheduleId}/assign-to-employees.");
394
+ case "unknown":
395
+ throw new errors.TheraApiError({
396
+ message: _response.error.errorMessage,
397
+ });
398
+ }
399
+ });
400
+ }
401
+ _getAuthorizationHeader() {
402
+ return __awaiter(this, void 0, void 0, function* () {
403
+ const bearer = yield core.Supplier.get(this._options.token);
404
+ if (bearer != null) {
405
+ return `Bearer ${bearer}`;
406
+ }
407
+ return undefined;
408
+ });
409
+ }
410
+ }
411
+ exports.PayscheduleApi = PayscheduleApi;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * checkPayScheduleIdByUserId: {
8
+ * "string": "string"
9
+ * }
10
+ * }
11
+ */
12
+ export interface AssignW2EmployeeToPayScheduleRequest {
13
+ checkPayScheduleIdByUserId: Record<string, string>;
14
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as TheraApi from "../../../../../../../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * name: "string",
9
+ * payFrequency: "weekly",
10
+ * firstPayDate: "2023-01-15",
11
+ * secondPayDate: "2023-01-15",
12
+ * firstPeriodEndDate: "2023-01-15"
13
+ * }
14
+ */
15
+ export interface CreatePayScheduleRequest {
16
+ name: string;
17
+ payFrequency: TheraApi.api.thera.payroll.PaySchedulePayFrequency;
18
+ firstPayDate: string;
19
+ /** Only used with SEMIMONTHLY frequency. The payday date of the the second payroll the company will run on Check on this pay schedule. This field should only be used with the semimonthly frequency to specify custom paydays besides the 15th and last day of the month. second_payday must be between one day and one month after first_payday. */
20
+ secondPayDate?: string;
21
+ firstPeriodEndDate: string;
22
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as TheraApi from "../../../../../../../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * name: "string",
9
+ * payFrequency: "weekly",
10
+ * firstPeriodEndDate: "2023-01-15",
11
+ * firstPayDate: "2023-01-15",
12
+ * secondPayDate: "2023-01-15",
13
+ * metadata: {
14
+ * deleted: "string"
15
+ * }
16
+ * }
17
+ */
18
+ export interface UpdatePayScheduleRequest {
19
+ name: string;
20
+ payFrequency: TheraApi.api.thera.payroll.PaySchedulePayFrequency;
21
+ firstPeriodEndDate: string;
22
+ firstPayDate: string;
23
+ secondPayDate?: string;
24
+ metadata: TheraApi.api.thera.payroll.CheckPayScheduleMetadata;
25
+ }
@@ -0,0 +1,3 @@
1
+ export { type CreatePayScheduleRequest } from "./CreatePayScheduleRequest";
2
+ export { type UpdatePayScheduleRequest } from "./UpdatePayScheduleRequest";
3
+ export { type AssignW2EmployeeToPayScheduleRequest } from "./AssignW2EmployeeToPayScheduleRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./client";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
18
+ __exportStar(require("./client"), exports);
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface AssignW2EmployeeToPayScheduleResponse {
5
+ checkPayScheduleIdByUserId: Record<string, string>;
6
+ }