@thera-hr/api-sdk 0.0.1-prerelease3080-dev-3 → 0.0.1-prerelease3082-production

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 (294) 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 +31 -0
  7. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +157 -33
  8. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWorkerWithdrawalQuote.d.ts +16 -0
  9. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWorkerWithdrawalQuote.js +5 -0
  10. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +1 -0
  11. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.d.ts +2 -1
  12. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.d.ts +8 -0
  13. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.js +10 -0
  14. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.d.ts +14 -0
  15. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.js +5 -0
  16. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.d.ts +23 -0
  17. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.js +5 -0
  18. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.d.ts +15 -0
  19. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.js +5 -0
  20. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.d.ts +7 -0
  21. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.js +5 -0
  22. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +5 -0
  23. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +5 -0
  24. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +1 -0
  25. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +25 -24
  26. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +1 -0
  27. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  28. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  29. package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  30. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  31. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  32. package/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  33. package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  34. package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  35. package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +3 -3
  36. package/api/resources/api/resources/thera/resources/incorporation/resources/incorporationApi/client/Client.js +3 -3
  37. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +7 -7
  38. package/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -0
  39. package/api/resources/api/resources/thera/resources/payroll/client/Client.js +5 -0
  40. package/api/resources/api/resources/thera/resources/payroll/resources/index.d.ts +3 -0
  41. package/api/resources/api/resources/thera/resources/payroll/resources/index.js +4 -1
  42. package/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  43. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +18 -5
  44. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +66 -11
  45. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/types/OnCycleChecksResponse.d.ts +1 -0
  46. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.d.ts +126 -0
  47. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.js +465 -0
  48. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.d.ts +1 -0
  49. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.js +17 -0
  50. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.d.ts +14 -0
  51. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.js +5 -0
  52. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.d.ts +24 -0
  53. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.js +5 -0
  54. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.d.ts +26 -0
  55. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.js +5 -0
  56. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.d.ts +3 -0
  57. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.js +2 -0
  58. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.d.ts +2 -0
  59. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.js +18 -0
  60. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.d.ts +6 -0
  61. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.js +5 -0
  62. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.d.ts +14 -0
  63. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.js +5 -0
  64. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.d.ts +9 -0
  65. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.js +5 -0
  66. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPaySchedulePaydaysResponse.d.ts +10 -0
  67. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPaySchedulePaydaysResponse.js +5 -0
  68. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.d.ts +15 -0
  69. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.js +5 -0
  70. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.d.ts +10 -0
  71. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.js +12 -0
  72. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.d.ts +6 -0
  73. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.js +22 -0
  74. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  75. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  76. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.d.ts +2 -1
  77. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +13 -12
  78. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.d.ts +1 -0
  79. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -4
  80. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -4
  81. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  82. package/api/resources/db/resources/company/types/W2Payroll.d.ts +2 -0
  83. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  84. package/dist/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  85. package/dist/api/resources/api/resources/external/resources/externalApi/client/Client.js +1 -1
  86. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  87. package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  88. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +31 -0
  89. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +157 -33
  90. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWorkerWithdrawalQuote.d.ts +16 -0
  91. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWorkerWithdrawalQuote.js +5 -0
  92. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +1 -0
  93. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.d.ts +2 -1
  94. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.d.ts +8 -0
  95. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.js +10 -0
  96. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.d.ts +14 -0
  97. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.js +5 -0
  98. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.d.ts +23 -0
  99. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.js +5 -0
  100. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.d.ts +15 -0
  101. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.js +5 -0
  102. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.d.ts +7 -0
  103. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.js +5 -0
  104. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +5 -0
  105. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +5 -0
  106. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +1 -0
  107. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +25 -24
  108. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +1 -0
  109. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  110. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  111. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  112. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  113. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  114. package/dist/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  115. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  116. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  117. package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +3 -3
  118. package/dist/api/resources/api/resources/thera/resources/incorporation/resources/incorporationApi/client/Client.js +3 -3
  119. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +7 -7
  120. package/dist/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -0
  121. package/dist/api/resources/api/resources/thera/resources/payroll/client/Client.js +5 -0
  122. package/dist/api/resources/api/resources/thera/resources/payroll/resources/index.d.ts +3 -0
  123. package/dist/api/resources/api/resources/thera/resources/payroll/resources/index.js +4 -1
  124. package/dist/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  125. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +18 -5
  126. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +66 -11
  127. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/types/OnCycleChecksResponse.d.ts +1 -0
  128. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.d.ts +126 -0
  129. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.js +465 -0
  130. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.d.ts +1 -0
  131. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.js +17 -0
  132. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.d.ts +14 -0
  133. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.js +5 -0
  134. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.d.ts +24 -0
  135. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.js +5 -0
  136. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.d.ts +26 -0
  137. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.js +5 -0
  138. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.d.ts +3 -0
  139. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.js +2 -0
  140. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.d.ts +2 -0
  141. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.js +18 -0
  142. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.d.ts +6 -0
  143. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.js +5 -0
  144. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.d.ts +14 -0
  145. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.js +5 -0
  146. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.d.ts +9 -0
  147. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.js +5 -0
  148. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPaySchedulePaydaysResponse.d.ts +10 -0
  149. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPaySchedulePaydaysResponse.js +5 -0
  150. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.d.ts +15 -0
  151. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.js +5 -0
  152. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.d.ts +10 -0
  153. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.js +12 -0
  154. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.d.ts +6 -0
  155. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.js +22 -0
  156. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  157. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  158. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.d.ts +2 -1
  159. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +13 -12
  160. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.d.ts +1 -0
  161. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -4
  162. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -4
  163. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  164. package/dist/api/resources/db/resources/company/types/W2Payroll.d.ts +2 -0
  165. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.d.ts +2 -1
  166. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.js +2 -1
  167. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.d.ts +10 -0
  168. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.js +41 -0
  169. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.d.ts +15 -0
  170. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.js +46 -0
  171. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.d.ts +19 -0
  172. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.js +50 -0
  173. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.d.ts +17 -0
  174. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.js +48 -0
  175. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.d.ts +12 -0
  176. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.js +43 -0
  177. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +5 -0
  178. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +5 -0
  179. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +1 -0
  180. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +1 -0
  181. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/index.d.ts +3 -0
  182. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/index.js +4 -1
  183. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleCheckDetails.d.ts +11 -0
  184. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleCheckDetails.js +8 -0
  185. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleChecks.d.ts +2 -2
  186. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleChecks.js +35 -1
  187. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.d.ts +1 -0
  188. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.js +2 -1
  189. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/types/OnCycleChecksResponse.d.ts +1 -0
  190. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/types/OnCycleChecksResponse.js +1 -0
  191. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/getSomePaySchedulePaydays.d.ts +11 -0
  192. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/getSomePaySchedulePaydays.js +42 -0
  193. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.d.ts +3 -0
  194. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.js +42 -0
  195. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/listW2PaySchedules.d.ts +11 -0
  196. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/listW2PaySchedules.js +42 -0
  197. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.d.ts +12 -0
  198. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.js +43 -0
  199. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.d.ts +18 -0
  200. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.js +49 -0
  201. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.d.ts +19 -0
  202. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.js +50 -0
  203. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.d.ts +3 -0
  204. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.js +9 -0
  205. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.d.ts +2 -0
  206. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.js +18 -0
  207. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.d.ts +12 -0
  208. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.js +43 -0
  209. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.d.ts +20 -0
  210. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.js +51 -0
  211. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.d.ts +13 -0
  212. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.js +44 -0
  213. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPaySchedulePaydaysResponse.d.ts +16 -0
  214. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPaySchedulePaydaysResponse.js +47 -0
  215. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.d.ts +21 -0
  216. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.js +52 -0
  217. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.d.ts +10 -0
  218. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.js +41 -0
  219. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.d.ts +6 -0
  220. package/dist/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.js +22 -0
  221. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.d.ts +1 -0
  222. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.js +1 -0
  223. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -4
  224. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -4
  225. package/dist/serialization/resources/db/resources/company/types/W2Payroll.d.ts +1 -0
  226. package/dist/serialization/resources/db/resources/company/types/W2Payroll.js +1 -0
  227. package/dist/version.d.ts +1 -1
  228. package/dist/version.js +1 -1
  229. package/package.json +1 -1
  230. package/reference.md +743 -5
  231. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.d.ts +2 -1
  232. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.js +2 -1
  233. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.d.ts +10 -0
  234. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.js +41 -0
  235. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.d.ts +15 -0
  236. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.js +46 -0
  237. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.d.ts +19 -0
  238. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.js +50 -0
  239. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.d.ts +17 -0
  240. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.js +48 -0
  241. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.d.ts +12 -0
  242. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.js +43 -0
  243. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +5 -0
  244. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +5 -0
  245. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +1 -0
  246. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +1 -0
  247. package/serialization/resources/api/resources/thera/resources/payroll/resources/index.d.ts +3 -0
  248. package/serialization/resources/api/resources/thera/resources/payroll/resources/index.js +4 -1
  249. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleCheckDetails.d.ts +11 -0
  250. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleCheckDetails.js +8 -0
  251. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleChecks.d.ts +2 -2
  252. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/getOnCycleChecks.js +35 -1
  253. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.d.ts +1 -0
  254. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/index.js +2 -1
  255. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/types/OnCycleChecksResponse.d.ts +1 -0
  256. package/serialization/resources/api/resources/thera/resources/payroll/resources/oncycleApi/types/OnCycleChecksResponse.js +1 -0
  257. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/getSomePaySchedulePaydays.d.ts +11 -0
  258. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/getSomePaySchedulePaydays.js +42 -0
  259. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.d.ts +3 -0
  260. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/index.js +42 -0
  261. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/listW2PaySchedules.d.ts +11 -0
  262. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/listW2PaySchedules.js +42 -0
  263. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.d.ts +12 -0
  264. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/AssignW2EmployeeToPayScheduleRequest.js +43 -0
  265. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.d.ts +18 -0
  266. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/CreatePayScheduleRequest.js +49 -0
  267. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.d.ts +19 -0
  268. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/UpdatePayScheduleRequest.js +50 -0
  269. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.d.ts +3 -0
  270. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/requests/index.js +9 -0
  271. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.d.ts +2 -0
  272. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/index.js +18 -0
  273. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.d.ts +12 -0
  274. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/AssignW2EmployeeToPayScheduleResponse.js +43 -0
  275. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.d.ts +20 -0
  276. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckGetPayScheduleResponse.js +51 -0
  277. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.d.ts +13 -0
  278. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/CheckPayScheduleMetadata.js +44 -0
  279. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPaySchedulePaydaysResponse.d.ts +16 -0
  280. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPaySchedulePaydaysResponse.js +47 -0
  281. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.d.ts +21 -0
  282. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/GetPayScheduleResponse.js +52 -0
  283. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.d.ts +10 -0
  284. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/PaySchedulePayFrequency.js +41 -0
  285. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.d.ts +6 -0
  286. package/serialization/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/types/index.js +22 -0
  287. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.d.ts +1 -0
  288. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.js +1 -0
  289. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -4
  290. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -4
  291. package/serialization/resources/db/resources/company/types/W2Payroll.d.ts +1 -0
  292. package/serialization/resources/db/resources/company/types/W2Payroll.js +1 -0
  293. package/version.d.ts +1 -1
  294. package/version.js +1 -1
@@ -0,0 +1,465 @@
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
+ * autopilotEnabled: true
75
+ * })
76
+ */
77
+ createW2PaySchedule(companyId, request, requestOptions) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ var _a;
80
+ const _response = yield core.fetcher({
81
+ 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`),
82
+ method: "POST",
83
+ 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-prerelease3082-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3082-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
+ contentType: "application/json",
85
+ requestType: "json",
86
+ body: serializers.api.thera.payroll.CreatePayScheduleRequest.jsonOrThrow(request, {
87
+ unrecognizedObjectKeys: "strip",
88
+ }),
89
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
90
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
91
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
92
+ });
93
+ if (_response.ok) {
94
+ return serializers.api.thera.payroll.GetPayScheduleResponse.parseOrThrow(_response.body, {
95
+ unrecognizedObjectKeys: "passthrough",
96
+ allowUnrecognizedUnionMembers: true,
97
+ allowUnrecognizedEnumValues: true,
98
+ skipValidation: true,
99
+ breadcrumbsPrefix: ["response"],
100
+ });
101
+ }
102
+ if (_response.error.reason === "status-code") {
103
+ throw new errors.TheraApiError({
104
+ statusCode: _response.error.statusCode,
105
+ body: _response.error.body,
106
+ });
107
+ }
108
+ switch (_response.error.reason) {
109
+ case "non-json":
110
+ throw new errors.TheraApiError({
111
+ statusCode: _response.error.statusCode,
112
+ body: _response.error.rawBody,
113
+ });
114
+ case "timeout":
115
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling POST /companies/{companyId}/w2-payroll/pay-schedule.");
116
+ case "unknown":
117
+ throw new errors.TheraApiError({
118
+ message: _response.error.errorMessage,
119
+ });
120
+ }
121
+ });
122
+ }
123
+ /**
124
+ *
125
+ *
126
+ * @param {string} companyId
127
+ * @param {string} checkPayScheduleId
128
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
129
+ *
130
+ * @example
131
+ * await client.api.thera.payroll.payscheduleApi.getW2PaySchedule("string", "string")
132
+ */
133
+ getW2PaySchedule(companyId, checkPayScheduleId, requestOptions) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ var _a;
136
+ const _response = yield core.fetcher({
137
+ 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)}`),
138
+ method: "GET",
139
+ 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-prerelease3082-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3082-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
140
+ contentType: "application/json",
141
+ requestType: "json",
142
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
143
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
144
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
145
+ });
146
+ if (_response.ok) {
147
+ return serializers.api.thera.payroll.GetPayScheduleResponse.parseOrThrow(_response.body, {
148
+ unrecognizedObjectKeys: "passthrough",
149
+ allowUnrecognizedUnionMembers: true,
150
+ allowUnrecognizedEnumValues: true,
151
+ skipValidation: true,
152
+ breadcrumbsPrefix: ["response"],
153
+ });
154
+ }
155
+ if (_response.error.reason === "status-code") {
156
+ throw new errors.TheraApiError({
157
+ statusCode: _response.error.statusCode,
158
+ body: _response.error.body,
159
+ });
160
+ }
161
+ switch (_response.error.reason) {
162
+ case "non-json":
163
+ throw new errors.TheraApiError({
164
+ statusCode: _response.error.statusCode,
165
+ body: _response.error.rawBody,
166
+ });
167
+ case "timeout":
168
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /companies/{companyId}/w2-payroll/pay-schedules/{checkPayScheduleId}.");
169
+ case "unknown":
170
+ throw new errors.TheraApiError({
171
+ message: _response.error.errorMessage,
172
+ });
173
+ }
174
+ });
175
+ }
176
+ /**
177
+ *
178
+ *
179
+ * @param {string} companyId
180
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
181
+ *
182
+ * @example
183
+ * await client.api.thera.payroll.payscheduleApi.listW2PaySchedules("string")
184
+ */
185
+ listW2PaySchedules(companyId, requestOptions) {
186
+ return __awaiter(this, void 0, void 0, function* () {
187
+ var _a;
188
+ const _response = yield core.fetcher({
189
+ 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`),
190
+ method: "GET",
191
+ 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-prerelease3082-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3082-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
192
+ contentType: "application/json",
193
+ requestType: "json",
194
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
195
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
196
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
197
+ });
198
+ if (_response.ok) {
199
+ return serializers.api.thera.payroll.payscheduleApi.listW2PaySchedules.Response.parseOrThrow(_response.body, {
200
+ unrecognizedObjectKeys: "passthrough",
201
+ allowUnrecognizedUnionMembers: true,
202
+ allowUnrecognizedEnumValues: true,
203
+ skipValidation: true,
204
+ breadcrumbsPrefix: ["response"],
205
+ });
206
+ }
207
+ if (_response.error.reason === "status-code") {
208
+ throw new errors.TheraApiError({
209
+ statusCode: _response.error.statusCode,
210
+ body: _response.error.body,
211
+ });
212
+ }
213
+ switch (_response.error.reason) {
214
+ case "non-json":
215
+ throw new errors.TheraApiError({
216
+ statusCode: _response.error.statusCode,
217
+ body: _response.error.rawBody,
218
+ });
219
+ case "timeout":
220
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /companies/{companyId}/w2-payroll/pay-schedules.");
221
+ case "unknown":
222
+ throw new errors.TheraApiError({
223
+ message: _response.error.errorMessage,
224
+ });
225
+ }
226
+ });
227
+ }
228
+ /**
229
+ * 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
230
+ *
231
+ * @param {string} companyId
232
+ * @param {string} checkPayScheduleId
233
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
234
+ *
235
+ * @example
236
+ * await client.api.thera.payroll.payscheduleApi.deleteW2PaySchedule("string", "string")
237
+ */
238
+ deleteW2PaySchedule(companyId, checkPayScheduleId, requestOptions) {
239
+ return __awaiter(this, void 0, void 0, function* () {
240
+ var _a;
241
+ const _response = yield core.fetcher({
242
+ 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)}`),
243
+ method: "DELETE",
244
+ 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-prerelease3082-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3082-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
245
+ contentType: "application/json",
246
+ requestType: "json",
247
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
248
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
249
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
250
+ });
251
+ if (_response.ok) {
252
+ return;
253
+ }
254
+ if (_response.error.reason === "status-code") {
255
+ throw new errors.TheraApiError({
256
+ statusCode: _response.error.statusCode,
257
+ body: _response.error.body,
258
+ });
259
+ }
260
+ switch (_response.error.reason) {
261
+ case "non-json":
262
+ throw new errors.TheraApiError({
263
+ statusCode: _response.error.statusCode,
264
+ body: _response.error.rawBody,
265
+ });
266
+ case "timeout":
267
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling DELETE /companies/{companyId}/w2-payroll/pay-schedules/{checkPayScheduleId}.");
268
+ case "unknown":
269
+ throw new errors.TheraApiError({
270
+ message: _response.error.errorMessage,
271
+ });
272
+ }
273
+ });
274
+ }
275
+ /**
276
+ *
277
+ *
278
+ * @param {string} companyId
279
+ * @param {string} checkPayScheduleId
280
+ * @param {TheraApi.api.thera.payroll.UpdatePayScheduleRequest} request
281
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
282
+ *
283
+ * @example
284
+ * await client.api.thera.payroll.payscheduleApi.updateW2PaySchedule("string", "string", {
285
+ * name: "string",
286
+ * payFrequency: "weekly",
287
+ * firstPeriodEndDate: "2023-01-15",
288
+ * firstPayDate: "2023-01-15",
289
+ * secondPayDate: "2023-01-15",
290
+ * metadata: {
291
+ * deleted: "string",
292
+ * autopilotEnabled: "string"
293
+ * }
294
+ * })
295
+ */
296
+ updateW2PaySchedule(companyId_1, checkPayScheduleId_1) {
297
+ return __awaiter(this, arguments, void 0, function* (companyId, checkPayScheduleId, request = {}, requestOptions) {
298
+ var _a;
299
+ const _response = yield core.fetcher({
300
+ 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)}`),
301
+ method: "PUT",
302
+ 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-prerelease3082-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3082-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
303
+ contentType: "application/json",
304
+ requestType: "json",
305
+ body: serializers.api.thera.payroll.UpdatePayScheduleRequest.jsonOrThrow(request, {
306
+ unrecognizedObjectKeys: "strip",
307
+ }),
308
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
309
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
310
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
311
+ });
312
+ if (_response.ok) {
313
+ return serializers.api.thera.payroll.GetPayScheduleResponse.parseOrThrow(_response.body, {
314
+ unrecognizedObjectKeys: "passthrough",
315
+ allowUnrecognizedUnionMembers: true,
316
+ allowUnrecognizedEnumValues: true,
317
+ skipValidation: true,
318
+ breadcrumbsPrefix: ["response"],
319
+ });
320
+ }
321
+ if (_response.error.reason === "status-code") {
322
+ throw new errors.TheraApiError({
323
+ statusCode: _response.error.statusCode,
324
+ body: _response.error.body,
325
+ });
326
+ }
327
+ switch (_response.error.reason) {
328
+ case "non-json":
329
+ throw new errors.TheraApiError({
330
+ statusCode: _response.error.statusCode,
331
+ body: _response.error.rawBody,
332
+ });
333
+ case "timeout":
334
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling PUT /companies/{companyId}/w2-payroll/pay-schedules/{checkPayScheduleId}.");
335
+ case "unknown":
336
+ throw new errors.TheraApiError({
337
+ message: _response.error.errorMessage,
338
+ });
339
+ }
340
+ });
341
+ }
342
+ /**
343
+ * 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
344
+ *
345
+ * @param {string} companyId
346
+ * @param {TheraApi.api.thera.payroll.AssignW2EmployeeToPayScheduleRequest} request
347
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
348
+ *
349
+ * @example
350
+ * await client.api.thera.payroll.payscheduleApi.assignW2EmployeesPaySchedule("string", {
351
+ * checkPayScheduleIdByUserId: {
352
+ * "string": "string"
353
+ * }
354
+ * })
355
+ */
356
+ assignW2EmployeesPaySchedule(companyId, request, requestOptions) {
357
+ return __awaiter(this, void 0, void 0, function* () {
358
+ var _a;
359
+ const _response = yield core.fetcher({
360
+ 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/assign-to-employees`),
361
+ method: "PUT",
362
+ 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-prerelease3082-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3082-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
363
+ contentType: "application/json",
364
+ requestType: "json",
365
+ body: serializers.api.thera.payroll.AssignW2EmployeeToPayScheduleRequest.jsonOrThrow(request, {
366
+ unrecognizedObjectKeys: "strip",
367
+ }),
368
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
369
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
370
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
371
+ });
372
+ if (_response.ok) {
373
+ return serializers.api.thera.payroll.AssignW2EmployeeToPayScheduleResponse.parseOrThrow(_response.body, {
374
+ unrecognizedObjectKeys: "passthrough",
375
+ allowUnrecognizedUnionMembers: true,
376
+ allowUnrecognizedEnumValues: true,
377
+ skipValidation: true,
378
+ breadcrumbsPrefix: ["response"],
379
+ });
380
+ }
381
+ if (_response.error.reason === "status-code") {
382
+ throw new errors.TheraApiError({
383
+ statusCode: _response.error.statusCode,
384
+ body: _response.error.body,
385
+ });
386
+ }
387
+ switch (_response.error.reason) {
388
+ case "non-json":
389
+ throw new errors.TheraApiError({
390
+ statusCode: _response.error.statusCode,
391
+ body: _response.error.rawBody,
392
+ });
393
+ case "timeout":
394
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling PUT /companies/{companyId}/w2-payroll/pay-schedules/assign-to-employees.");
395
+ case "unknown":
396
+ throw new errors.TheraApiError({
397
+ message: _response.error.errorMessage,
398
+ });
399
+ }
400
+ });
401
+ }
402
+ /**
403
+ * Return several upcoming paydays (not all of them!)
404
+ *
405
+ * @param {string} companyId
406
+ * @param {string} checkPayScheduleId
407
+ * @param {PayscheduleApi.RequestOptions} requestOptions - Request-specific configuration.
408
+ *
409
+ * @example
410
+ * await client.api.thera.payroll.payscheduleApi.getSomePaySchedulePaydays("string", "string")
411
+ */
412
+ getSomePaySchedulePaydays(companyId, checkPayScheduleId, requestOptions) {
413
+ return __awaiter(this, void 0, void 0, function* () {
414
+ var _a;
415
+ const _response = yield core.fetcher({
416
+ 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)}/paydays`),
417
+ method: "GET",
418
+ 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-prerelease3082-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3082-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
419
+ contentType: "application/json",
420
+ requestType: "json",
421
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
422
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
423
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
424
+ });
425
+ if (_response.ok) {
426
+ return serializers.api.thera.payroll.payscheduleApi.getSomePaySchedulePaydays.Response.parseOrThrow(_response.body, {
427
+ unrecognizedObjectKeys: "passthrough",
428
+ allowUnrecognizedUnionMembers: true,
429
+ allowUnrecognizedEnumValues: true,
430
+ skipValidation: true,
431
+ breadcrumbsPrefix: ["response"],
432
+ });
433
+ }
434
+ if (_response.error.reason === "status-code") {
435
+ throw new errors.TheraApiError({
436
+ statusCode: _response.error.statusCode,
437
+ body: _response.error.body,
438
+ });
439
+ }
440
+ switch (_response.error.reason) {
441
+ case "non-json":
442
+ throw new errors.TheraApiError({
443
+ statusCode: _response.error.statusCode,
444
+ body: _response.error.rawBody,
445
+ });
446
+ case "timeout":
447
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /companies/{companyId}/w2-payroll/pay-schedules/{checkPayScheduleId}/paydays.");
448
+ case "unknown":
449
+ throw new errors.TheraApiError({
450
+ message: _response.error.errorMessage,
451
+ });
452
+ }
453
+ });
454
+ }
455
+ _getAuthorizationHeader() {
456
+ return __awaiter(this, void 0, void 0, function* () {
457
+ const bearer = yield core.Supplier.get(this._options.token);
458
+ if (bearer != null) {
459
+ return `Bearer ${bearer}`;
460
+ }
461
+ return undefined;
462
+ });
463
+ }
464
+ }
465
+ 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,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
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
+ * autopilotEnabled: true
14
+ * }
15
+ */
16
+ export interface CreatePayScheduleRequest {
17
+ name: string;
18
+ payFrequency: TheraApi.api.thera.payroll.PaySchedulePayFrequency;
19
+ firstPayDate: string;
20
+ /** 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. */
21
+ secondPayDate?: string;
22
+ firstPeriodEndDate: string;
23
+ autopilotEnabled: boolean;
24
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
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
+ * autopilotEnabled: "string"
16
+ * }
17
+ * }
18
+ */
19
+ export interface UpdatePayScheduleRequest {
20
+ name?: string;
21
+ payFrequency?: TheraApi.api.thera.payroll.PaySchedulePayFrequency;
22
+ firstPeriodEndDate?: string;
23
+ firstPayDate?: string;
24
+ secondPayDate?: string;
25
+ metadata?: TheraApi.api.thera.payroll.CheckPayScheduleMetadata;
26
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as TheraApi from "../../../../../../../../../index";
5
+ export interface CheckGetPayScheduleResponse {
6
+ id: string;
7
+ company: string;
8
+ name: string;
9
+ payFrequency: TheraApi.api.thera.payroll.PaySchedulePayFrequency;
10
+ firstPayday: string;
11
+ secondPayday?: string;
12
+ firstPeriodEnd: string;
13
+ metadata?: unknown;
14
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });