@thera-hr/api-sdk 0.0.1-prerelease2681-dev-anthony → 0.0.1-prerelease2682-dev

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 (347) 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/services/resources/file/client/Client.js +5 -5
  4. package/api/resources/api/resources/thera/client/Client.d.ts +3 -0
  5. package/api/resources/api/resources/thera/client/Client.js +29 -24
  6. package/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  7. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +18 -0
  8. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +93 -31
  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/{client/requests → types}/SetAutoPayRequest.d.ts +0 -8
  11. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetBulkAutoPayForTeamsRequest.d.ts +7 -0
  12. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +2 -0
  13. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +2 -0
  14. package/api/resources/api/resources/thera/resources/bridge/client/Client.d.ts +22 -0
  15. package/api/resources/api/resources/thera/resources/bridge/client/Client.js +17 -0
  16. package/api/resources/api/resources/thera/resources/bridge/client/index.d.ts +1 -0
  17. package/api/resources/api/resources/thera/resources/bridge/client/index.js +2 -0
  18. package/api/resources/api/resources/thera/resources/bridge/index.d.ts +2 -0
  19. package/api/resources/api/resources/thera/resources/bridge/index.js +18 -0
  20. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +164 -0
  21. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +735 -0
  22. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +1 -0
  23. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +17 -0
  24. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +14 -0
  25. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +18 -0
  26. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  27. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +2 -0
  28. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  29. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  30. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +11 -0
  31. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +15 -0
  32. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +7 -0
  33. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +5 -0
  34. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +10 -0
  35. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +5 -0
  36. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +12 -0
  37. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +5 -0
  38. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +7 -0
  39. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +5 -0
  40. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +6 -0
  41. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +5 -0
  42. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +7 -0
  43. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +5 -0
  44. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +8 -0
  45. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +5 -0
  46. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +6 -0
  47. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +5 -0
  48. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +8 -0
  49. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +5 -0
  50. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +10 -0
  51. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +5 -0
  52. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +12 -0
  53. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +28 -0
  54. package/api/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  55. package/api/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  56. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  57. package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/Manager.d.ts +1 -1
  58. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  59. package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  60. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  61. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  62. package/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  63. package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  64. package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  65. package/api/resources/api/resources/thera/resources/index.d.ts +1 -0
  66. package/api/resources/api/resources/thera/resources/index.js +2 -1
  67. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +5 -5
  68. package/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  69. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  70. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  71. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  72. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  73. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  74. package/api/resources/db/resources/company/types/Company.d.ts +1 -1
  75. package/api/resources/db/resources/company/types/CompanySettings.d.ts +1 -0
  76. package/{dist/api/resources/db/resources/company/types/MoniteCompanyDetails.d.ts → api/resources/db/resources/company/types/MercoaCompanyDetails.d.ts} +1 -1
  77. package/api/resources/db/resources/company/types/MercoaCompanyDetails.js +5 -0
  78. package/api/resources/db/resources/company/types/index.d.ts +1 -1
  79. package/api/resources/db/resources/company/types/index.js +1 -1
  80. package/api/resources/db/resources/migrations/types/LedgerMigrationMetadata.d.ts +1 -1
  81. package/api/resources/db/resources/user/types/BridgeUserDetails.d.ts +7 -0
  82. package/api/resources/db/resources/user/types/BridgeUserDetails.js +5 -0
  83. package/api/resources/db/resources/user/types/ComplianceDocumentType.d.ts +20 -1
  84. package/api/resources/db/resources/user/types/ComplianceDocumentType.js +19 -0
  85. package/api/resources/db/resources/user/types/{MoniteUserDetails.d.ts → MercoaUserDetails.d.ts} +1 -1
  86. package/api/resources/db/resources/user/types/MercoaUserDetails.js +5 -0
  87. package/api/resources/db/resources/user/types/User.d.ts +1 -1
  88. package/api/resources/db/resources/user/types/UserCompanySettings.d.ts +0 -1
  89. package/api/resources/db/resources/user/types/index.d.ts +2 -1
  90. package/api/resources/db/resources/user/types/index.js +2 -1
  91. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  92. package/dist/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  93. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  94. package/dist/api/resources/api/resources/thera/client/Client.d.ts +3 -0
  95. package/dist/api/resources/api/resources/thera/client/Client.js +29 -24
  96. package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  97. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +18 -0
  98. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +93 -31
  99. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +0 -1
  100. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/{client/requests → types}/SetAutoPayRequest.d.ts +0 -8
  101. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetAutoPayRequest.js +5 -0
  102. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetBulkAutoPayForTeamsRequest.d.ts +7 -0
  103. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetBulkAutoPayForTeamsRequest.js +5 -0
  104. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +2 -0
  105. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +2 -0
  106. package/dist/api/resources/api/resources/thera/resources/bridge/client/Client.d.ts +22 -0
  107. package/dist/api/resources/api/resources/thera/resources/bridge/client/Client.js +17 -0
  108. package/dist/api/resources/api/resources/thera/resources/bridge/client/index.d.ts +1 -0
  109. package/dist/api/resources/api/resources/thera/resources/bridge/client/index.js +2 -0
  110. package/dist/api/resources/api/resources/thera/resources/bridge/index.d.ts +2 -0
  111. package/dist/api/resources/api/resources/thera/resources/bridge/index.js +18 -0
  112. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +164 -0
  113. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +735 -0
  114. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +1 -0
  115. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +17 -0
  116. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +14 -0
  117. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +5 -0
  118. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +18 -0
  119. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +5 -0
  120. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  121. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +2 -0
  122. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  123. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  124. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +11 -0
  125. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +5 -0
  126. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +15 -0
  127. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +5 -0
  128. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +7 -0
  129. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +5 -0
  130. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +10 -0
  131. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +5 -0
  132. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +12 -0
  133. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +5 -0
  134. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +7 -0
  135. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +5 -0
  136. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +6 -0
  137. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +5 -0
  138. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +7 -0
  139. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +5 -0
  140. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +8 -0
  141. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +5 -0
  142. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +6 -0
  143. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +5 -0
  144. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +8 -0
  145. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +5 -0
  146. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +10 -0
  147. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +5 -0
  148. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +12 -0
  149. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +28 -0
  150. package/dist/api/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  151. package/dist/api/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  152. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  153. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/Manager.d.ts +1 -1
  154. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  155. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  156. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  157. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  158. package/dist/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  159. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  160. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  161. package/dist/api/resources/api/resources/thera/resources/index.d.ts +1 -0
  162. package/dist/api/resources/api/resources/thera/resources/index.js +2 -1
  163. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +5 -5
  164. package/dist/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  165. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  166. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  167. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  168. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  169. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  170. package/dist/api/resources/db/resources/company/types/Company.d.ts +1 -1
  171. package/dist/api/resources/db/resources/company/types/CompanySettings.d.ts +1 -0
  172. package/{api/resources/db/resources/company/types/MoniteCompanyDetails.d.ts → dist/api/resources/db/resources/company/types/MercoaCompanyDetails.d.ts} +1 -1
  173. package/dist/api/resources/db/resources/company/types/MercoaCompanyDetails.js +5 -0
  174. package/dist/api/resources/db/resources/company/types/index.d.ts +1 -1
  175. package/dist/api/resources/db/resources/company/types/index.js +1 -1
  176. package/dist/api/resources/db/resources/migrations/types/LedgerMigrationMetadata.d.ts +1 -1
  177. package/dist/api/resources/db/resources/user/types/BridgeUserDetails.d.ts +7 -0
  178. package/dist/api/resources/db/resources/user/types/BridgeUserDetails.js +5 -0
  179. package/dist/api/resources/db/resources/user/types/ComplianceDocumentType.d.ts +20 -1
  180. package/dist/api/resources/db/resources/user/types/ComplianceDocumentType.js +19 -0
  181. package/dist/api/resources/db/resources/user/types/{MoniteUserDetails.d.ts → MercoaUserDetails.d.ts} +1 -1
  182. package/dist/api/resources/db/resources/user/types/MercoaUserDetails.js +5 -0
  183. package/dist/api/resources/db/resources/user/types/User.d.ts +1 -1
  184. package/dist/api/resources/db/resources/user/types/UserCompanySettings.d.ts +0 -1
  185. package/dist/api/resources/db/resources/user/types/index.d.ts +2 -1
  186. package/dist/api/resources/db/resources/user/types/index.js +2 -1
  187. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +0 -1
  188. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.js +1 -3
  189. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetAutoPayRequest.d.ts +13 -0
  190. package/{serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests → dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types}/SetAutoPayRequest.js +1 -1
  191. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetBulkAutoPayForTeamsRequest.d.ts +13 -0
  192. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetBulkAutoPayForTeamsRequest.js +34 -0
  193. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +2 -0
  194. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +2 -0
  195. package/dist/serialization/resources/api/resources/thera/resources/bridge/index.d.ts +1 -0
  196. package/dist/serialization/resources/api/resources/thera/resources/bridge/index.js +17 -0
  197. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.d.ts +11 -0
  198. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.js +32 -0
  199. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +3 -0
  200. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +32 -0
  201. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.d.ts +11 -0
  202. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.js +32 -0
  203. package/{serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/SetAutoPayRequest.d.ts → dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts} +4 -4
  204. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +34 -0
  205. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +15 -0
  206. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +36 -0
  207. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  208. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +7 -0
  209. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  210. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  211. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +17 -0
  212. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +38 -0
  213. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +21 -0
  214. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +42 -0
  215. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +13 -0
  216. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +34 -0
  217. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +16 -0
  218. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +37 -0
  219. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +18 -0
  220. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +39 -0
  221. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +13 -0
  222. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +34 -0
  223. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +12 -0
  224. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +33 -0
  225. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +13 -0
  226. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +34 -0
  227. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +14 -0
  228. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +35 -0
  229. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +12 -0
  230. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +33 -0
  231. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +14 -0
  232. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +35 -0
  233. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +16 -0
  234. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +37 -0
  235. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +12 -0
  236. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +28 -0
  237. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  238. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  239. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/Manager.d.ts +2 -2
  240. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/Manager.js +2 -2
  241. package/dist/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
  242. package/dist/serialization/resources/api/resources/thera/resources/index.js +2 -1
  243. package/dist/serialization/resources/db/resources/company/types/Company.d.ts +2 -2
  244. package/dist/serialization/resources/db/resources/company/types/Company.js +2 -2
  245. package/dist/serialization/resources/db/resources/company/types/CompanySettings.d.ts +1 -0
  246. package/dist/serialization/resources/db/resources/company/types/CompanySettings.js +1 -0
  247. package/{serialization/resources/db/resources/company/types/MoniteCompanyDetails.d.ts → dist/serialization/resources/db/resources/company/types/MercoaCompanyDetails.d.ts} +2 -2
  248. package/{serialization/resources/db/resources/company/types/MoniteCompanyDetails.js → dist/serialization/resources/db/resources/company/types/MercoaCompanyDetails.js} +2 -2
  249. package/dist/serialization/resources/db/resources/company/types/index.d.ts +1 -1
  250. package/dist/serialization/resources/db/resources/company/types/index.js +1 -1
  251. package/dist/serialization/resources/db/resources/migrations/types/LedgerMigrationMetadata.js +1 -1
  252. package/dist/serialization/resources/db/resources/user/types/BridgeUserDetails.d.ts +13 -0
  253. package/dist/serialization/resources/db/resources/user/types/BridgeUserDetails.js +34 -0
  254. package/dist/serialization/resources/db/resources/user/types/ComplianceDocumentType.d.ts +1 -1
  255. package/dist/serialization/resources/db/resources/user/types/ComplianceDocumentType.js +19 -0
  256. package/dist/serialization/resources/db/resources/user/types/{MoniteUserDetails.d.ts → MercoaUserDetails.d.ts} +2 -2
  257. package/dist/serialization/resources/db/resources/user/types/{MoniteUserDetails.js → MercoaUserDetails.js} +2 -2
  258. package/dist/serialization/resources/db/resources/user/types/User.d.ts +2 -2
  259. package/dist/serialization/resources/db/resources/user/types/User.js +2 -2
  260. package/dist/serialization/resources/db/resources/user/types/UserCompanySettings.d.ts +0 -1
  261. package/dist/serialization/resources/db/resources/user/types/UserCompanySettings.js +0 -1
  262. package/dist/serialization/resources/db/resources/user/types/index.d.ts +2 -1
  263. package/dist/serialization/resources/db/resources/user/types/index.js +2 -1
  264. package/package.json +1 -1
  265. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +0 -1
  266. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.js +1 -3
  267. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetAutoPayRequest.d.ts +13 -0
  268. package/{dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests → serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types}/SetAutoPayRequest.js +1 -1
  269. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetBulkAutoPayForTeamsRequest.d.ts +13 -0
  270. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetBulkAutoPayForTeamsRequest.js +34 -0
  271. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +2 -0
  272. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +2 -0
  273. package/serialization/resources/api/resources/thera/resources/bridge/index.d.ts +1 -0
  274. package/serialization/resources/api/resources/thera/resources/bridge/index.js +17 -0
  275. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.d.ts +11 -0
  276. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.js +32 -0
  277. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +3 -0
  278. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +32 -0
  279. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.d.ts +11 -0
  280. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.js +32 -0
  281. package/{dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/SetAutoPayRequest.d.ts → serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts} +4 -4
  282. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +34 -0
  283. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +15 -0
  284. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +36 -0
  285. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  286. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +7 -0
  287. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  288. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  289. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +17 -0
  290. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +38 -0
  291. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +21 -0
  292. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +42 -0
  293. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +13 -0
  294. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +34 -0
  295. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +16 -0
  296. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +37 -0
  297. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +18 -0
  298. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +39 -0
  299. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +13 -0
  300. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +34 -0
  301. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +12 -0
  302. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +33 -0
  303. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +13 -0
  304. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +34 -0
  305. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +14 -0
  306. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +35 -0
  307. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +12 -0
  308. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +33 -0
  309. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +14 -0
  310. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +35 -0
  311. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +16 -0
  312. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +37 -0
  313. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +12 -0
  314. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +28 -0
  315. package/serialization/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  316. package/serialization/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  317. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/Manager.d.ts +2 -2
  318. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/Manager.js +2 -2
  319. package/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
  320. package/serialization/resources/api/resources/thera/resources/index.js +2 -1
  321. package/serialization/resources/db/resources/company/types/Company.d.ts +2 -2
  322. package/serialization/resources/db/resources/company/types/Company.js +2 -2
  323. package/serialization/resources/db/resources/company/types/CompanySettings.d.ts +1 -0
  324. package/serialization/resources/db/resources/company/types/CompanySettings.js +1 -0
  325. package/{dist/serialization/resources/db/resources/company/types/MoniteCompanyDetails.d.ts → serialization/resources/db/resources/company/types/MercoaCompanyDetails.d.ts} +2 -2
  326. package/{dist/serialization/resources/db/resources/company/types/MoniteCompanyDetails.js → serialization/resources/db/resources/company/types/MercoaCompanyDetails.js} +2 -2
  327. package/serialization/resources/db/resources/company/types/index.d.ts +1 -1
  328. package/serialization/resources/db/resources/company/types/index.js +1 -1
  329. package/serialization/resources/db/resources/migrations/types/LedgerMigrationMetadata.js +1 -1
  330. package/serialization/resources/db/resources/user/types/BridgeUserDetails.d.ts +13 -0
  331. package/serialization/resources/db/resources/user/types/BridgeUserDetails.js +34 -0
  332. package/serialization/resources/db/resources/user/types/ComplianceDocumentType.d.ts +1 -1
  333. package/serialization/resources/db/resources/user/types/ComplianceDocumentType.js +19 -0
  334. package/serialization/resources/db/resources/user/types/{MoniteUserDetails.d.ts → MercoaUserDetails.d.ts} +2 -2
  335. package/serialization/resources/db/resources/user/types/{MoniteUserDetails.js → MercoaUserDetails.js} +2 -2
  336. package/serialization/resources/db/resources/user/types/User.d.ts +2 -2
  337. package/serialization/resources/db/resources/user/types/User.js +2 -2
  338. package/serialization/resources/db/resources/user/types/UserCompanySettings.d.ts +0 -1
  339. package/serialization/resources/db/resources/user/types/UserCompanySettings.js +0 -1
  340. package/serialization/resources/db/resources/user/types/index.d.ts +2 -1
  341. package/serialization/resources/db/resources/user/types/index.js +2 -1
  342. /package/api/resources/api/resources/thera/resources/bank/resources/bankApi/{client/requests → types}/SetAutoPayRequest.js +0 -0
  343. /package/api/resources/{db/resources/company/types/MoniteCompanyDetails.js → api/resources/thera/resources/bank/resources/bankApi/types/SetBulkAutoPayForTeamsRequest.js} +0 -0
  344. /package/api/resources/{db/resources/user/types/MoniteUserDetails.js → api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js} +0 -0
  345. /package/{dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/SetAutoPayRequest.js → api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js} +0 -0
  346. /package/{dist/api/resources/db/resources/company/types/MoniteCompanyDetails.js → api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js} +0 -0
  347. /package/{dist/api/resources/db/resources/user/types/MoniteUserDetails.js → api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js} +0 -0
@@ -0,0 +1,735 @@
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 (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.BridgeApi = void 0;
42
+ const core = __importStar(require("../../../../../../../../../../core"));
43
+ const url_join_1 = __importDefault(require("url-join"));
44
+ const serializers = __importStar(require("../../../../../../../../../../serialization/index"));
45
+ const errors = __importStar(require("../../../../../../../../../../errors/index"));
46
+ class BridgeApi {
47
+ constructor(_options) {
48
+ this._options = _options;
49
+ }
50
+ /**
51
+ * Customers need to accept Bridge's terms of service before KYC processing.
52
+ *
53
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @example
56
+ * await client.api.thera.bridge.bridgeApi.requestTosLink()
57
+ */
58
+ requestTosLink(requestOptions) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ const _response = yield core.fetcher({
61
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "customers/tos_links"),
62
+ method: "POST",
63
+ headers: {
64
+ Authorization: yield this._getAuthorizationHeader(),
65
+ "X-Fern-Language": "JavaScript",
66
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
67
+ "X-Fern-SDK-Version": "0.0.1-prerelease2682-dev",
68
+ "X-Fern-Runtime": core.RUNTIME.type,
69
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
70
+ },
71
+ contentType: "application/json",
72
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
73
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
74
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
75
+ });
76
+ if (_response.ok) {
77
+ return yield serializers.api.thera.bridge.TosLinkResponse.parseOrThrow(_response.body, {
78
+ unrecognizedObjectKeys: "passthrough",
79
+ allowUnrecognizedUnionMembers: true,
80
+ allowUnrecognizedEnumValues: true,
81
+ skipValidation: true,
82
+ breadcrumbsPrefix: ["response"],
83
+ });
84
+ }
85
+ if (_response.error.reason === "status-code") {
86
+ throw new errors.TheraApiError({
87
+ statusCode: _response.error.statusCode,
88
+ body: _response.error.body,
89
+ });
90
+ }
91
+ switch (_response.error.reason) {
92
+ case "non-json":
93
+ throw new errors.TheraApiError({
94
+ statusCode: _response.error.statusCode,
95
+ body: _response.error.rawBody,
96
+ });
97
+ case "timeout":
98
+ throw new errors.TheraApiTimeoutError();
99
+ case "unknown":
100
+ throw new errors.TheraApiError({
101
+ message: _response.error.errorMessage,
102
+ });
103
+ }
104
+ });
105
+ }
106
+ /**
107
+ * Create a new customer and start the KYC process.
108
+ *
109
+ * @param {TheraApi.api.thera.bridge.CreateCustomer} request
110
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
111
+ *
112
+ * @example
113
+ * await client.api.thera.bridge.bridgeApi.createCustomer({
114
+ * type: "string",
115
+ * firstName: "string",
116
+ * lastName: "string",
117
+ * email: "string",
118
+ * phone: "string",
119
+ * address: {
120
+ * streetLine1: "string",
121
+ * streetLine2: "string",
122
+ * city: "string",
123
+ * state: "string",
124
+ * postalCode: "string",
125
+ * country: "string"
126
+ * },
127
+ * signedAgreementId: "string",
128
+ * birthDate: "string",
129
+ * taxIdentificationNumber: "string"
130
+ * })
131
+ */
132
+ createCustomer(request, requestOptions) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ const _response = yield core.fetcher({
135
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "customers"),
136
+ method: "POST",
137
+ headers: {
138
+ Authorization: yield this._getAuthorizationHeader(),
139
+ "X-Fern-Language": "JavaScript",
140
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
141
+ "X-Fern-SDK-Version": "0.0.1-prerelease2682-dev",
142
+ "X-Fern-Runtime": core.RUNTIME.type,
143
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
144
+ },
145
+ contentType: "application/json",
146
+ body: yield serializers.api.thera.bridge.CreateCustomer.jsonOrThrow(request, {
147
+ unrecognizedObjectKeys: "strip",
148
+ }),
149
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
150
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
151
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
152
+ });
153
+ if (_response.ok) {
154
+ return yield serializers.api.thera.bridge.CreateCustomerResponse.parseOrThrow(_response.body, {
155
+ unrecognizedObjectKeys: "passthrough",
156
+ allowUnrecognizedUnionMembers: true,
157
+ allowUnrecognizedEnumValues: true,
158
+ skipValidation: true,
159
+ breadcrumbsPrefix: ["response"],
160
+ });
161
+ }
162
+ if (_response.error.reason === "status-code") {
163
+ throw new errors.TheraApiError({
164
+ statusCode: _response.error.statusCode,
165
+ body: _response.error.body,
166
+ });
167
+ }
168
+ switch (_response.error.reason) {
169
+ case "non-json":
170
+ throw new errors.TheraApiError({
171
+ statusCode: _response.error.statusCode,
172
+ body: _response.error.rawBody,
173
+ });
174
+ case "timeout":
175
+ throw new errors.TheraApiTimeoutError();
176
+ case "unknown":
177
+ throw new errors.TheraApiError({
178
+ message: _response.error.errorMessage,
179
+ });
180
+ }
181
+ });
182
+ }
183
+ /**
184
+ * Links an external crypto wallet to a customer.
185
+ *
186
+ * @param {string} customerId
187
+ * @param {TheraApi.api.thera.bridge.ExternalAccount} request
188
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
189
+ *
190
+ * @example
191
+ * await client.api.thera.bridge.bridgeApi.linkExternalAccount("string", {
192
+ * address: "string",
193
+ * currency: "string"
194
+ * })
195
+ */
196
+ linkExternalAccount(customerId, request, requestOptions) {
197
+ return __awaiter(this, void 0, void 0, function* () {
198
+ const _response = yield core.fetcher({
199
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `external-accounts/${encodeURIComponent(customerId)}/accounts`),
200
+ method: "POST",
201
+ headers: {
202
+ Authorization: yield this._getAuthorizationHeader(),
203
+ "X-Fern-Language": "JavaScript",
204
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
205
+ "X-Fern-SDK-Version": "0.0.1-prerelease2682-dev",
206
+ "X-Fern-Runtime": core.RUNTIME.type,
207
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
208
+ },
209
+ contentType: "application/json",
210
+ body: yield serializers.api.thera.bridge.ExternalAccount.jsonOrThrow(request, {
211
+ unrecognizedObjectKeys: "strip",
212
+ }),
213
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
214
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
215
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
216
+ });
217
+ if (_response.ok) {
218
+ return yield serializers.api.thera.bridge.LinkExternalAccountResponse.parseOrThrow(_response.body, {
219
+ unrecognizedObjectKeys: "passthrough",
220
+ allowUnrecognizedUnionMembers: true,
221
+ allowUnrecognizedEnumValues: true,
222
+ skipValidation: true,
223
+ breadcrumbsPrefix: ["response"],
224
+ });
225
+ }
226
+ if (_response.error.reason === "status-code") {
227
+ throw new errors.TheraApiError({
228
+ statusCode: _response.error.statusCode,
229
+ body: _response.error.body,
230
+ });
231
+ }
232
+ switch (_response.error.reason) {
233
+ case "non-json":
234
+ throw new errors.TheraApiError({
235
+ statusCode: _response.error.statusCode,
236
+ body: _response.error.rawBody,
237
+ });
238
+ case "timeout":
239
+ throw new errors.TheraApiTimeoutError();
240
+ case "unknown":
241
+ throw new errors.TheraApiError({
242
+ message: _response.error.errorMessage,
243
+ });
244
+ }
245
+ });
246
+ }
247
+ /**
248
+ * Retrieve customer details, including linked accounts and KYC status.
249
+ *
250
+ * @param {string} customerId
251
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
252
+ *
253
+ * @example
254
+ * await client.api.thera.bridge.bridgeApi.getCustomerDetails("string")
255
+ */
256
+ getCustomerDetails(customerId, requestOptions) {
257
+ return __awaiter(this, void 0, void 0, function* () {
258
+ const _response = yield core.fetcher({
259
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `customers/${encodeURIComponent(customerId)}`),
260
+ method: "GET",
261
+ headers: {
262
+ Authorization: yield this._getAuthorizationHeader(),
263
+ "X-Fern-Language": "JavaScript",
264
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
265
+ "X-Fern-SDK-Version": "0.0.1-prerelease2682-dev",
266
+ "X-Fern-Runtime": core.RUNTIME.type,
267
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
268
+ },
269
+ contentType: "application/json",
270
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
271
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
272
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
273
+ });
274
+ if (_response.ok) {
275
+ return yield serializers.api.thera.bridge.CustomerDetails.parseOrThrow(_response.body, {
276
+ unrecognizedObjectKeys: "passthrough",
277
+ allowUnrecognizedUnionMembers: true,
278
+ allowUnrecognizedEnumValues: true,
279
+ skipValidation: true,
280
+ breadcrumbsPrefix: ["response"],
281
+ });
282
+ }
283
+ if (_response.error.reason === "status-code") {
284
+ throw new errors.TheraApiError({
285
+ statusCode: _response.error.statusCode,
286
+ body: _response.error.body,
287
+ });
288
+ }
289
+ switch (_response.error.reason) {
290
+ case "non-json":
291
+ throw new errors.TheraApiError({
292
+ statusCode: _response.error.statusCode,
293
+ body: _response.error.rawBody,
294
+ });
295
+ case "timeout":
296
+ throw new errors.TheraApiTimeoutError();
297
+ case "unknown":
298
+ throw new errors.TheraApiError({
299
+ message: _response.error.errorMessage,
300
+ });
301
+ }
302
+ });
303
+ }
304
+ /**
305
+ * Retrieve a list of all registered customers.
306
+ *
307
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
308
+ *
309
+ * @example
310
+ * await client.api.thera.bridge.bridgeApi.getAllCustomers()
311
+ */
312
+ getAllCustomers(requestOptions) {
313
+ return __awaiter(this, void 0, void 0, function* () {
314
+ const _response = yield core.fetcher({
315
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "customers"),
316
+ method: "GET",
317
+ headers: {
318
+ Authorization: yield this._getAuthorizationHeader(),
319
+ "X-Fern-Language": "JavaScript",
320
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
321
+ "X-Fern-SDK-Version": "0.0.1-prerelease2682-dev",
322
+ "X-Fern-Runtime": core.RUNTIME.type,
323
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
324
+ },
325
+ contentType: "application/json",
326
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
327
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
328
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
329
+ });
330
+ if (_response.ok) {
331
+ return yield serializers.api.thera.bridge.bridgeApi.getAllCustomers.Response.parseOrThrow(_response.body, {
332
+ unrecognizedObjectKeys: "passthrough",
333
+ allowUnrecognizedUnionMembers: true,
334
+ allowUnrecognizedEnumValues: true,
335
+ skipValidation: true,
336
+ breadcrumbsPrefix: ["response"],
337
+ });
338
+ }
339
+ if (_response.error.reason === "status-code") {
340
+ throw new errors.TheraApiError({
341
+ statusCode: _response.error.statusCode,
342
+ body: _response.error.body,
343
+ });
344
+ }
345
+ switch (_response.error.reason) {
346
+ case "non-json":
347
+ throw new errors.TheraApiError({
348
+ statusCode: _response.error.statusCode,
349
+ body: _response.error.rawBody,
350
+ });
351
+ case "timeout":
352
+ throw new errors.TheraApiTimeoutError();
353
+ case "unknown":
354
+ throw new errors.TheraApiError({
355
+ message: _response.error.errorMessage,
356
+ });
357
+ }
358
+ });
359
+ }
360
+ /**
361
+ * Initiates a payout transaction to an external crypto wallet.
362
+ *
363
+ * @param {TheraApi.api.thera.bridge.CryptoPayout} request
364
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
365
+ *
366
+ * @example
367
+ * await client.api.thera.bridge.bridgeApi.processCryptoPayout({
368
+ * customerId: "string",
369
+ * amount: "string",
370
+ * currency: "string",
371
+ * recipientWallet: "string",
372
+ * network: "string"
373
+ * })
374
+ */
375
+ processCryptoPayout(request, requestOptions) {
376
+ return __awaiter(this, void 0, void 0, function* () {
377
+ const _response = yield core.fetcher({
378
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "payments/crypto"),
379
+ method: "POST",
380
+ headers: {
381
+ Authorization: yield this._getAuthorizationHeader(),
382
+ "X-Fern-Language": "JavaScript",
383
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
384
+ "X-Fern-SDK-Version": "0.0.1-prerelease2682-dev",
385
+ "X-Fern-Runtime": core.RUNTIME.type,
386
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
387
+ },
388
+ contentType: "application/json",
389
+ body: yield serializers.api.thera.bridge.CryptoPayout.jsonOrThrow(request, {
390
+ unrecognizedObjectKeys: "strip",
391
+ }),
392
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
393
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
394
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
395
+ });
396
+ if (_response.ok) {
397
+ return yield serializers.api.thera.bridge.PayoutResponse.parseOrThrow(_response.body, {
398
+ unrecognizedObjectKeys: "passthrough",
399
+ allowUnrecognizedUnionMembers: true,
400
+ allowUnrecognizedEnumValues: true,
401
+ skipValidation: true,
402
+ breadcrumbsPrefix: ["response"],
403
+ });
404
+ }
405
+ if (_response.error.reason === "status-code") {
406
+ throw new errors.TheraApiError({
407
+ statusCode: _response.error.statusCode,
408
+ body: _response.error.body,
409
+ });
410
+ }
411
+ switch (_response.error.reason) {
412
+ case "non-json":
413
+ throw new errors.TheraApiError({
414
+ statusCode: _response.error.statusCode,
415
+ body: _response.error.rawBody,
416
+ });
417
+ case "timeout":
418
+ throw new errors.TheraApiTimeoutError();
419
+ case "unknown":
420
+ throw new errors.TheraApiError({
421
+ message: _response.error.errorMessage,
422
+ });
423
+ }
424
+ });
425
+ }
426
+ /**
427
+ * Retrieve the status of a previously processed crypto payout.
428
+ *
429
+ * @param {string} transactionId
430
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
431
+ *
432
+ * @example
433
+ * await client.api.thera.bridge.bridgeApi.getPayoutStatus("string")
434
+ */
435
+ getPayoutStatus(transactionId, requestOptions) {
436
+ return __awaiter(this, void 0, void 0, function* () {
437
+ const _response = yield core.fetcher({
438
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `payments/crypto/${encodeURIComponent(transactionId)}`),
439
+ method: "GET",
440
+ headers: {
441
+ Authorization: yield this._getAuthorizationHeader(),
442
+ "X-Fern-Language": "JavaScript",
443
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
444
+ "X-Fern-SDK-Version": "0.0.1-prerelease2682-dev",
445
+ "X-Fern-Runtime": core.RUNTIME.type,
446
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
447
+ },
448
+ contentType: "application/json",
449
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
450
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
451
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
452
+ });
453
+ if (_response.ok) {
454
+ return yield serializers.api.thera.bridge.PayoutStatus.parseOrThrow(_response.body, {
455
+ unrecognizedObjectKeys: "passthrough",
456
+ allowUnrecognizedUnionMembers: true,
457
+ allowUnrecognizedEnumValues: true,
458
+ skipValidation: true,
459
+ breadcrumbsPrefix: ["response"],
460
+ });
461
+ }
462
+ if (_response.error.reason === "status-code") {
463
+ throw new errors.TheraApiError({
464
+ statusCode: _response.error.statusCode,
465
+ body: _response.error.body,
466
+ });
467
+ }
468
+ switch (_response.error.reason) {
469
+ case "non-json":
470
+ throw new errors.TheraApiError({
471
+ statusCode: _response.error.statusCode,
472
+ body: _response.error.rawBody,
473
+ });
474
+ case "timeout":
475
+ throw new errors.TheraApiTimeoutError();
476
+ case "unknown":
477
+ throw new errors.TheraApiError({
478
+ message: _response.error.errorMessage,
479
+ });
480
+ }
481
+ });
482
+ }
483
+ /**
484
+ * Creates a new custodial wallet for a customer.
485
+ *
486
+ * @param {TheraApi.api.thera.bridge.CreateWalletRequest} request
487
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
488
+ *
489
+ * @example
490
+ * await client.api.thera.bridge.bridgeApi.createWallet({
491
+ * customerId: "string",
492
+ * currency: "string"
493
+ * })
494
+ */
495
+ createWallet(request, requestOptions) {
496
+ return __awaiter(this, void 0, void 0, function* () {
497
+ const _response = yield core.fetcher({
498
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "wallets"),
499
+ method: "POST",
500
+ headers: {
501
+ Authorization: yield this._getAuthorizationHeader(),
502
+ "X-Fern-Language": "JavaScript",
503
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
504
+ "X-Fern-SDK-Version": "0.0.1-prerelease2682-dev",
505
+ "X-Fern-Runtime": core.RUNTIME.type,
506
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
507
+ },
508
+ contentType: "application/json",
509
+ body: yield serializers.api.thera.bridge.CreateWalletRequest.jsonOrThrow(request, {
510
+ unrecognizedObjectKeys: "strip",
511
+ }),
512
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
513
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
514
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
515
+ });
516
+ if (_response.ok) {
517
+ return yield serializers.api.thera.bridge.WalletDetails.parseOrThrow(_response.body, {
518
+ unrecognizedObjectKeys: "passthrough",
519
+ allowUnrecognizedUnionMembers: true,
520
+ allowUnrecognizedEnumValues: true,
521
+ skipValidation: true,
522
+ breadcrumbsPrefix: ["response"],
523
+ });
524
+ }
525
+ if (_response.error.reason === "status-code") {
526
+ throw new errors.TheraApiError({
527
+ statusCode: _response.error.statusCode,
528
+ body: _response.error.body,
529
+ });
530
+ }
531
+ switch (_response.error.reason) {
532
+ case "non-json":
533
+ throw new errors.TheraApiError({
534
+ statusCode: _response.error.statusCode,
535
+ body: _response.error.rawBody,
536
+ });
537
+ case "timeout":
538
+ throw new errors.TheraApiTimeoutError();
539
+ case "unknown":
540
+ throw new errors.TheraApiError({
541
+ message: _response.error.errorMessage,
542
+ });
543
+ }
544
+ });
545
+ }
546
+ /**
547
+ * Retrieves details of a specific wallet.
548
+ *
549
+ * @param {string} walletId
550
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
551
+ *
552
+ * @example
553
+ * await client.api.thera.bridge.bridgeApi.getWalletDetails("string")
554
+ */
555
+ getWalletDetails(walletId, requestOptions) {
556
+ return __awaiter(this, void 0, void 0, function* () {
557
+ const _response = yield core.fetcher({
558
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `wallets/${encodeURIComponent(walletId)}`),
559
+ method: "GET",
560
+ headers: {
561
+ Authorization: yield this._getAuthorizationHeader(),
562
+ "X-Fern-Language": "JavaScript",
563
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
564
+ "X-Fern-SDK-Version": "0.0.1-prerelease2682-dev",
565
+ "X-Fern-Runtime": core.RUNTIME.type,
566
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
567
+ },
568
+ contentType: "application/json",
569
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
570
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
571
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
572
+ });
573
+ if (_response.ok) {
574
+ return yield serializers.api.thera.bridge.WalletDetails.parseOrThrow(_response.body, {
575
+ unrecognizedObjectKeys: "passthrough",
576
+ allowUnrecognizedUnionMembers: true,
577
+ allowUnrecognizedEnumValues: true,
578
+ skipValidation: true,
579
+ breadcrumbsPrefix: ["response"],
580
+ });
581
+ }
582
+ if (_response.error.reason === "status-code") {
583
+ throw new errors.TheraApiError({
584
+ statusCode: _response.error.statusCode,
585
+ body: _response.error.body,
586
+ });
587
+ }
588
+ switch (_response.error.reason) {
589
+ case "non-json":
590
+ throw new errors.TheraApiError({
591
+ statusCode: _response.error.statusCode,
592
+ body: _response.error.rawBody,
593
+ });
594
+ case "timeout":
595
+ throw new errors.TheraApiTimeoutError();
596
+ case "unknown":
597
+ throw new errors.TheraApiError({
598
+ message: _response.error.errorMessage,
599
+ });
600
+ }
601
+ });
602
+ }
603
+ /**
604
+ * Retrieves all wallets associated with a customer.
605
+ *
606
+ * @param {string} customerId
607
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
608
+ *
609
+ * @example
610
+ * await client.api.thera.bridge.bridgeApi.listWallets("string")
611
+ */
612
+ listWallets(customerId, requestOptions) {
613
+ return __awaiter(this, void 0, void 0, function* () {
614
+ const _response = yield core.fetcher({
615
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `customers/${encodeURIComponent(customerId)}/wallets`),
616
+ method: "GET",
617
+ headers: {
618
+ Authorization: yield this._getAuthorizationHeader(),
619
+ "X-Fern-Language": "JavaScript",
620
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
621
+ "X-Fern-SDK-Version": "0.0.1-prerelease2682-dev",
622
+ "X-Fern-Runtime": core.RUNTIME.type,
623
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
624
+ },
625
+ contentType: "application/json",
626
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
627
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
628
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
629
+ });
630
+ if (_response.ok) {
631
+ return yield serializers.api.thera.bridge.bridgeApi.listWallets.Response.parseOrThrow(_response.body, {
632
+ unrecognizedObjectKeys: "passthrough",
633
+ allowUnrecognizedUnionMembers: true,
634
+ allowUnrecognizedEnumValues: true,
635
+ skipValidation: true,
636
+ breadcrumbsPrefix: ["response"],
637
+ });
638
+ }
639
+ if (_response.error.reason === "status-code") {
640
+ throw new errors.TheraApiError({
641
+ statusCode: _response.error.statusCode,
642
+ body: _response.error.body,
643
+ });
644
+ }
645
+ switch (_response.error.reason) {
646
+ case "non-json":
647
+ throw new errors.TheraApiError({
648
+ statusCode: _response.error.statusCode,
649
+ body: _response.error.rawBody,
650
+ });
651
+ case "timeout":
652
+ throw new errors.TheraApiTimeoutError();
653
+ case "unknown":
654
+ throw new errors.TheraApiError({
655
+ message: _response.error.errorMessage,
656
+ });
657
+ }
658
+ });
659
+ }
660
+ /**
661
+ * Transfers funds between custodial wallets.
662
+ *
663
+ * @param {TheraApi.api.thera.bridge.TransferFundsRequest} request
664
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
665
+ *
666
+ * @example
667
+ * await client.api.thera.bridge.bridgeApi.transferFunds({
668
+ * fromWalletId: "string",
669
+ * toWalletId: "string",
670
+ * amount: "string",
671
+ * currency: "string"
672
+ * })
673
+ */
674
+ transferFunds(request, requestOptions) {
675
+ return __awaiter(this, void 0, void 0, function* () {
676
+ const _response = yield core.fetcher({
677
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "wallets/transfer"),
678
+ method: "POST",
679
+ headers: {
680
+ Authorization: yield this._getAuthorizationHeader(),
681
+ "X-Fern-Language": "JavaScript",
682
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
683
+ "X-Fern-SDK-Version": "0.0.1-prerelease2682-dev",
684
+ "X-Fern-Runtime": core.RUNTIME.type,
685
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
686
+ },
687
+ contentType: "application/json",
688
+ body: yield serializers.api.thera.bridge.TransferFundsRequest.jsonOrThrow(request, {
689
+ unrecognizedObjectKeys: "strip",
690
+ }),
691
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
692
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
693
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
694
+ });
695
+ if (_response.ok) {
696
+ return yield serializers.api.thera.bridge.TransferFundsResponse.parseOrThrow(_response.body, {
697
+ unrecognizedObjectKeys: "passthrough",
698
+ allowUnrecognizedUnionMembers: true,
699
+ allowUnrecognizedEnumValues: true,
700
+ skipValidation: true,
701
+ breadcrumbsPrefix: ["response"],
702
+ });
703
+ }
704
+ if (_response.error.reason === "status-code") {
705
+ throw new errors.TheraApiError({
706
+ statusCode: _response.error.statusCode,
707
+ body: _response.error.body,
708
+ });
709
+ }
710
+ switch (_response.error.reason) {
711
+ case "non-json":
712
+ throw new errors.TheraApiError({
713
+ statusCode: _response.error.statusCode,
714
+ body: _response.error.rawBody,
715
+ });
716
+ case "timeout":
717
+ throw new errors.TheraApiTimeoutError();
718
+ case "unknown":
719
+ throw new errors.TheraApiError({
720
+ message: _response.error.errorMessage,
721
+ });
722
+ }
723
+ });
724
+ }
725
+ _getAuthorizationHeader() {
726
+ return __awaiter(this, void 0, void 0, function* () {
727
+ const bearer = yield core.Supplier.get(this._options.token);
728
+ if (bearer != null) {
729
+ return `Bearer ${bearer}`;
730
+ }
731
+ return undefined;
732
+ });
733
+ }
734
+ }
735
+ exports.BridgeApi = BridgeApi;