@thera-hr/api-sdk 0.0.1-prerelease2759-dev-2 → 0.0.1-prerelease2761-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 (353) 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 +31 -26
  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.js +33 -33
  8. package/api/resources/api/resources/thera/resources/bridge/client/Client.d.ts +22 -0
  9. package/api/resources/api/resources/thera/resources/bridge/client/Client.js +17 -0
  10. package/api/resources/api/resources/thera/resources/bridge/client/index.d.ts +1 -0
  11. package/api/resources/api/resources/thera/resources/bridge/client/index.js +2 -0
  12. package/api/resources/api/resources/thera/resources/bridge/index.d.ts +2 -0
  13. package/api/resources/api/resources/thera/resources/bridge/index.js +18 -0
  14. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +313 -0
  15. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +1252 -0
  16. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +1 -0
  17. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +17 -0
  18. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +14 -0
  19. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +5 -0
  20. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +21 -0
  21. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +5 -0
  22. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  23. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +2 -0
  24. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  25. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  26. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +11 -0
  27. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +5 -0
  28. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.d.ts +8 -0
  29. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.js +5 -0
  30. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.d.ts +6 -0
  31. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.js +5 -0
  32. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.d.ts +8 -0
  33. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.js +5 -0
  34. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +15 -0
  35. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +5 -0
  36. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +12 -0
  37. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +5 -0
  38. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +10 -0
  39. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +5 -0
  40. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +12 -0
  41. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +5 -0
  42. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +23 -0
  43. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +5 -0
  44. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +23 -0
  45. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +5 -0
  46. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +8 -0
  47. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +5 -0
  48. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +7 -0
  49. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +5 -0
  50. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +8 -0
  51. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +5 -0
  52. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +6 -0
  53. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +5 -0
  54. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +12 -0
  55. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +5 -0
  56. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +15 -0
  57. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +5 -0
  58. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +12 -0
  59. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +5 -0
  60. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsFlow.d.ts +8 -0
  61. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsFlow.js +10 -0
  62. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +8 -0
  63. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +5 -0
  64. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +10 -0
  65. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +5 -0
  66. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +7 -0
  67. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +5 -0
  68. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +7 -0
  69. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +5 -0
  70. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +10 -0
  71. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +5 -0
  72. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +23 -0
  73. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +39 -0
  74. package/api/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  75. package/api/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  76. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  77. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  78. package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  79. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  80. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  81. package/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  82. package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  83. package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  84. package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +2 -2
  85. package/api/resources/api/resources/thera/resources/index.d.ts +1 -0
  86. package/api/resources/api/resources/thera/resources/index.js +2 -1
  87. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +6 -6
  88. package/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  89. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  90. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  91. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  92. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  93. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  94. package/api/resources/db/resources/user/types/BridgeUserDetails.d.ts +10 -0
  95. package/api/resources/db/resources/user/types/BridgeUserDetails.js +5 -0
  96. package/api/resources/db/resources/user/types/User.d.ts +1 -0
  97. package/api/resources/db/resources/user/types/index.d.ts +1 -0
  98. package/api/resources/db/resources/user/types/index.js +1 -0
  99. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  100. package/dist/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  101. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  102. package/dist/api/resources/api/resources/thera/client/Client.d.ts +3 -0
  103. package/dist/api/resources/api/resources/thera/client/Client.js +31 -26
  104. package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  105. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +33 -33
  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 +313 -0
  113. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +1252 -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 +21 -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/BridgeAccountDetails.d.ts +8 -0
  127. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.js +5 -0
  128. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.d.ts +6 -0
  129. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.js +5 -0
  130. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.d.ts +8 -0
  131. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.js +5 -0
  132. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +15 -0
  133. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +5 -0
  134. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +12 -0
  135. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +5 -0
  136. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +10 -0
  137. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +5 -0
  138. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +12 -0
  139. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +5 -0
  140. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +23 -0
  141. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +5 -0
  142. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +23 -0
  143. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +5 -0
  144. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +8 -0
  145. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +5 -0
  146. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +7 -0
  147. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +5 -0
  148. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +8 -0
  149. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +5 -0
  150. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +6 -0
  151. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +5 -0
  152. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +12 -0
  153. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +5 -0
  154. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +15 -0
  155. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +5 -0
  156. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +12 -0
  157. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +5 -0
  158. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsFlow.d.ts +8 -0
  159. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsFlow.js +10 -0
  160. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +8 -0
  161. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +5 -0
  162. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +10 -0
  163. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +5 -0
  164. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +7 -0
  165. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +5 -0
  166. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +7 -0
  167. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +5 -0
  168. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +10 -0
  169. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +5 -0
  170. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +23 -0
  171. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +39 -0
  172. package/dist/api/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  173. package/dist/api/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  174. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  175. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  176. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  177. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  178. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  179. package/dist/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  180. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  181. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  182. package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +2 -2
  183. package/dist/api/resources/api/resources/thera/resources/index.d.ts +1 -0
  184. package/dist/api/resources/api/resources/thera/resources/index.js +2 -1
  185. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +6 -6
  186. package/dist/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  187. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  188. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  189. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  190. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  191. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  192. package/dist/api/resources/db/resources/user/types/BridgeUserDetails.d.ts +10 -0
  193. package/dist/api/resources/db/resources/user/types/BridgeUserDetails.js +5 -0
  194. package/dist/api/resources/db/resources/user/types/User.d.ts +1 -0
  195. package/dist/api/resources/db/resources/user/types/index.d.ts +1 -0
  196. package/dist/api/resources/db/resources/user/types/index.js +1 -0
  197. package/dist/serialization/resources/api/resources/thera/resources/bridge/index.d.ts +1 -0
  198. package/dist/serialization/resources/api/resources/thera/resources/bridge/index.js +17 -0
  199. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.d.ts +11 -0
  200. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.js +32 -0
  201. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +5 -0
  202. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +34 -0
  203. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.d.ts +11 -0
  204. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.js +32 -0
  205. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.d.ts +11 -0
  206. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.js +32 -0
  207. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.d.ts +11 -0
  208. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.js +32 -0
  209. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +13 -0
  210. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +34 -0
  211. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +17 -0
  212. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +38 -0
  213. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  214. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +7 -0
  215. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  216. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  217. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +17 -0
  218. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +38 -0
  219. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.d.ts +14 -0
  220. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.js +35 -0
  221. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.d.ts +12 -0
  222. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.js +33 -0
  223. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.d.ts +14 -0
  224. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.js +35 -0
  225. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +21 -0
  226. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +42 -0
  227. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +18 -0
  228. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +39 -0
  229. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +16 -0
  230. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +37 -0
  231. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +18 -0
  232. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +39 -0
  233. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +32 -0
  234. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +53 -0
  235. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +32 -0
  236. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +53 -0
  237. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +14 -0
  238. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +35 -0
  239. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +13 -0
  240. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +34 -0
  241. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +14 -0
  242. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +35 -0
  243. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +12 -0
  244. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +33 -0
  245. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +19 -0
  246. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +40 -0
  247. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +21 -0
  248. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +42 -0
  249. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +18 -0
  250. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +39 -0
  251. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsFlow.d.ts +10 -0
  252. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsFlow.js +31 -0
  253. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +14 -0
  254. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +35 -0
  255. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +16 -0
  256. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +37 -0
  257. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +13 -0
  258. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +34 -0
  259. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +13 -0
  260. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +34 -0
  261. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +16 -0
  262. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +37 -0
  263. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +23 -0
  264. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +39 -0
  265. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  266. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  267. package/dist/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
  268. package/dist/serialization/resources/api/resources/thera/resources/index.js +2 -1
  269. package/dist/serialization/resources/db/resources/user/types/BridgeUserDetails.d.ts +16 -0
  270. package/dist/serialization/resources/db/resources/user/types/BridgeUserDetails.js +37 -0
  271. package/dist/serialization/resources/db/resources/user/types/User.d.ts +2 -0
  272. package/dist/serialization/resources/db/resources/user/types/User.js +2 -0
  273. package/dist/serialization/resources/db/resources/user/types/index.d.ts +1 -0
  274. package/dist/serialization/resources/db/resources/user/types/index.js +1 -0
  275. package/package.json +1 -1
  276. package/serialization/resources/api/resources/thera/resources/bridge/index.d.ts +1 -0
  277. package/serialization/resources/api/resources/thera/resources/bridge/index.js +17 -0
  278. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.d.ts +11 -0
  279. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.js +32 -0
  280. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +5 -0
  281. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +34 -0
  282. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.d.ts +11 -0
  283. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.js +32 -0
  284. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.d.ts +11 -0
  285. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.js +32 -0
  286. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.d.ts +11 -0
  287. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.js +32 -0
  288. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +13 -0
  289. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +34 -0
  290. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +17 -0
  291. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +38 -0
  292. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  293. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +7 -0
  294. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  295. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  296. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +17 -0
  297. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +38 -0
  298. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.d.ts +14 -0
  299. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.js +35 -0
  300. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.d.ts +12 -0
  301. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.js +33 -0
  302. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.d.ts +14 -0
  303. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.js +35 -0
  304. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +21 -0
  305. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +42 -0
  306. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +18 -0
  307. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +39 -0
  308. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +16 -0
  309. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +37 -0
  310. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +18 -0
  311. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +39 -0
  312. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +32 -0
  313. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +53 -0
  314. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +32 -0
  315. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +53 -0
  316. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +14 -0
  317. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +35 -0
  318. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +13 -0
  319. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +34 -0
  320. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +14 -0
  321. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +35 -0
  322. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +12 -0
  323. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +33 -0
  324. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +19 -0
  325. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +40 -0
  326. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +21 -0
  327. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +42 -0
  328. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +18 -0
  329. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +39 -0
  330. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsFlow.d.ts +10 -0
  331. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsFlow.js +31 -0
  332. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +14 -0
  333. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +35 -0
  334. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +16 -0
  335. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +37 -0
  336. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +13 -0
  337. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +34 -0
  338. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +13 -0
  339. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +34 -0
  340. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +16 -0
  341. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +37 -0
  342. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +23 -0
  343. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +39 -0
  344. package/serialization/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  345. package/serialization/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  346. package/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
  347. package/serialization/resources/api/resources/thera/resources/index.js +2 -1
  348. package/serialization/resources/db/resources/user/types/BridgeUserDetails.d.ts +16 -0
  349. package/serialization/resources/db/resources/user/types/BridgeUserDetails.js +37 -0
  350. package/serialization/resources/db/resources/user/types/User.d.ts +2 -0
  351. package/serialization/resources/db/resources/user/types/User.js +2 -0
  352. package/serialization/resources/db/resources/user/types/index.d.ts +1 -0
  353. package/serialization/resources/db/resources/user/types/index.js +1 -0
@@ -0,0 +1,1252 @@
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), "/bridge/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-prerelease2761-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), "/bridge/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-prerelease2761-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.createExternalAccount("string", {
192
+ * currency: "string",
193
+ * bankName: "string",
194
+ * accountOwnerName: "string",
195
+ * accountNumber: "string",
196
+ * routingNumber: "string",
197
+ * accountType: "string",
198
+ * iban: {
199
+ * ibanNumber: "string"
200
+ * },
201
+ * swift: {
202
+ * account: "string",
203
+ * address: {
204
+ * streetLine1: "string",
205
+ * streetLine2: "string",
206
+ * city: "string",
207
+ * state: "string",
208
+ * postalCode: "string",
209
+ * country: "string"
210
+ * }
211
+ * },
212
+ * account: {
213
+ * accountNumber: "string",
214
+ * routingNumber: "string",
215
+ * checkingOrSavings: {
216
+ * "key": "value"
217
+ * }
218
+ * },
219
+ * address: {
220
+ * streetLine1: "string",
221
+ * streetLine2: "string",
222
+ * city: "string",
223
+ * state: "string",
224
+ * postalCode: "string",
225
+ * country: "string"
226
+ * },
227
+ * category: "string",
228
+ * purposeOfFunds: ["string"],
229
+ * shortBusinessDescription: "string",
230
+ * accountOwnerType: "string",
231
+ * firstName: "string",
232
+ * lastName: "string",
233
+ * businessName: "string"
234
+ * })
235
+ */
236
+ createExternalAccount(customerId, request, requestOptions) {
237
+ return __awaiter(this, void 0, void 0, function* () {
238
+ const _response = yield core.fetcher({
239
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/external-accounts/${encodeURIComponent(customerId)}/accounts`),
240
+ method: "POST",
241
+ headers: {
242
+ Authorization: yield this._getAuthorizationHeader(),
243
+ "X-Fern-Language": "JavaScript",
244
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
245
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
246
+ "X-Fern-Runtime": core.RUNTIME.type,
247
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
248
+ },
249
+ contentType: "application/json",
250
+ body: yield serializers.api.thera.bridge.ExternalAccount.jsonOrThrow(request, {
251
+ unrecognizedObjectKeys: "strip",
252
+ }),
253
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
254
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
255
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
256
+ });
257
+ if (_response.ok) {
258
+ return yield serializers.api.thera.bridge.LinkExternalAccountResponse.parseOrThrow(_response.body, {
259
+ unrecognizedObjectKeys: "passthrough",
260
+ allowUnrecognizedUnionMembers: true,
261
+ allowUnrecognizedEnumValues: true,
262
+ skipValidation: true,
263
+ breadcrumbsPrefix: ["response"],
264
+ });
265
+ }
266
+ if (_response.error.reason === "status-code") {
267
+ throw new errors.TheraApiError({
268
+ statusCode: _response.error.statusCode,
269
+ body: _response.error.body,
270
+ });
271
+ }
272
+ switch (_response.error.reason) {
273
+ case "non-json":
274
+ throw new errors.TheraApiError({
275
+ statusCode: _response.error.statusCode,
276
+ body: _response.error.rawBody,
277
+ });
278
+ case "timeout":
279
+ throw new errors.TheraApiTimeoutError();
280
+ case "unknown":
281
+ throw new errors.TheraApiError({
282
+ message: _response.error.errorMessage,
283
+ });
284
+ }
285
+ });
286
+ }
287
+ /**
288
+ * Retrieve customer details, including linked accounts and KYC status.
289
+ *
290
+ * @param {string} customerId
291
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
292
+ *
293
+ * @example
294
+ * await client.api.thera.bridge.bridgeApi.getCustomerDetails("string")
295
+ */
296
+ getCustomerDetails(customerId, requestOptions) {
297
+ return __awaiter(this, void 0, void 0, function* () {
298
+ const _response = yield core.fetcher({
299
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/customers/${encodeURIComponent(customerId)}`),
300
+ method: "GET",
301
+ headers: {
302
+ Authorization: yield this._getAuthorizationHeader(),
303
+ "X-Fern-Language": "JavaScript",
304
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
305
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
306
+ "X-Fern-Runtime": core.RUNTIME.type,
307
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
308
+ },
309
+ contentType: "application/json",
310
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
311
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
312
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
313
+ });
314
+ if (_response.ok) {
315
+ return yield serializers.api.thera.bridge.CustomerDetails.parseOrThrow(_response.body, {
316
+ unrecognizedObjectKeys: "passthrough",
317
+ allowUnrecognizedUnionMembers: true,
318
+ allowUnrecognizedEnumValues: true,
319
+ skipValidation: true,
320
+ breadcrumbsPrefix: ["response"],
321
+ });
322
+ }
323
+ if (_response.error.reason === "status-code") {
324
+ throw new errors.TheraApiError({
325
+ statusCode: _response.error.statusCode,
326
+ body: _response.error.body,
327
+ });
328
+ }
329
+ switch (_response.error.reason) {
330
+ case "non-json":
331
+ throw new errors.TheraApiError({
332
+ statusCode: _response.error.statusCode,
333
+ body: _response.error.rawBody,
334
+ });
335
+ case "timeout":
336
+ throw new errors.TheraApiTimeoutError();
337
+ case "unknown":
338
+ throw new errors.TheraApiError({
339
+ message: _response.error.errorMessage,
340
+ });
341
+ }
342
+ });
343
+ }
344
+ /**
345
+ * Retrieve a list of all registered customers.
346
+ *
347
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
348
+ *
349
+ * @example
350
+ * await client.api.thera.bridge.bridgeApi.getAllCustomers()
351
+ */
352
+ getAllCustomers(requestOptions) {
353
+ return __awaiter(this, void 0, void 0, function* () {
354
+ const _response = yield core.fetcher({
355
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/bridge/customers"),
356
+ method: "GET",
357
+ headers: {
358
+ Authorization: yield this._getAuthorizationHeader(),
359
+ "X-Fern-Language": "JavaScript",
360
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
361
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
362
+ "X-Fern-Runtime": core.RUNTIME.type,
363
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
364
+ },
365
+ contentType: "application/json",
366
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
367
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
368
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
369
+ });
370
+ if (_response.ok) {
371
+ return yield serializers.api.thera.bridge.bridgeApi.getAllCustomers.Response.parseOrThrow(_response.body, {
372
+ unrecognizedObjectKeys: "passthrough",
373
+ allowUnrecognizedUnionMembers: true,
374
+ allowUnrecognizedEnumValues: true,
375
+ skipValidation: true,
376
+ breadcrumbsPrefix: ["response"],
377
+ });
378
+ }
379
+ if (_response.error.reason === "status-code") {
380
+ throw new errors.TheraApiError({
381
+ statusCode: _response.error.statusCode,
382
+ body: _response.error.body,
383
+ });
384
+ }
385
+ switch (_response.error.reason) {
386
+ case "non-json":
387
+ throw new errors.TheraApiError({
388
+ statusCode: _response.error.statusCode,
389
+ body: _response.error.rawBody,
390
+ });
391
+ case "timeout":
392
+ throw new errors.TheraApiTimeoutError();
393
+ case "unknown":
394
+ throw new errors.TheraApiError({
395
+ message: _response.error.errorMessage,
396
+ });
397
+ }
398
+ });
399
+ }
400
+ /**
401
+ * Initiates a payout transaction to an external crypto wallet.
402
+ *
403
+ * @param {TheraApi.api.thera.bridge.CryptoPayout} request
404
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
405
+ *
406
+ * @example
407
+ * await client.api.thera.bridge.bridgeApi.processCryptoPayout({
408
+ * customerId: "string",
409
+ * amount: "string",
410
+ * currency: "string",
411
+ * recipientWallet: "string",
412
+ * network: "string"
413
+ * })
414
+ */
415
+ processCryptoPayout(request, requestOptions) {
416
+ return __awaiter(this, void 0, void 0, function* () {
417
+ const _response = yield core.fetcher({
418
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/bridge/payments/crypto"),
419
+ method: "POST",
420
+ headers: {
421
+ Authorization: yield this._getAuthorizationHeader(),
422
+ "X-Fern-Language": "JavaScript",
423
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
424
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
425
+ "X-Fern-Runtime": core.RUNTIME.type,
426
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
427
+ },
428
+ contentType: "application/json",
429
+ body: yield serializers.api.thera.bridge.CryptoPayout.jsonOrThrow(request, {
430
+ unrecognizedObjectKeys: "strip",
431
+ }),
432
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
433
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
434
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
435
+ });
436
+ if (_response.ok) {
437
+ return yield serializers.api.thera.bridge.PayoutResponse.parseOrThrow(_response.body, {
438
+ unrecognizedObjectKeys: "passthrough",
439
+ allowUnrecognizedUnionMembers: true,
440
+ allowUnrecognizedEnumValues: true,
441
+ skipValidation: true,
442
+ breadcrumbsPrefix: ["response"],
443
+ });
444
+ }
445
+ if (_response.error.reason === "status-code") {
446
+ throw new errors.TheraApiError({
447
+ statusCode: _response.error.statusCode,
448
+ body: _response.error.body,
449
+ });
450
+ }
451
+ switch (_response.error.reason) {
452
+ case "non-json":
453
+ throw new errors.TheraApiError({
454
+ statusCode: _response.error.statusCode,
455
+ body: _response.error.rawBody,
456
+ });
457
+ case "timeout":
458
+ throw new errors.TheraApiTimeoutError();
459
+ case "unknown":
460
+ throw new errors.TheraApiError({
461
+ message: _response.error.errorMessage,
462
+ });
463
+ }
464
+ });
465
+ }
466
+ /**
467
+ * Retrieve the status of a previously processed crypto payout.
468
+ *
469
+ * @param {string} transactionId
470
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
471
+ *
472
+ * @example
473
+ * await client.api.thera.bridge.bridgeApi.getPayoutStatus("string")
474
+ */
475
+ getPayoutStatus(transactionId, requestOptions) {
476
+ return __awaiter(this, void 0, void 0, function* () {
477
+ const _response = yield core.fetcher({
478
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/payments/crypto/${encodeURIComponent(transactionId)}`),
479
+ method: "GET",
480
+ headers: {
481
+ Authorization: yield this._getAuthorizationHeader(),
482
+ "X-Fern-Language": "JavaScript",
483
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
484
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
485
+ "X-Fern-Runtime": core.RUNTIME.type,
486
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
487
+ },
488
+ contentType: "application/json",
489
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
490
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
491
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
492
+ });
493
+ if (_response.ok) {
494
+ return yield serializers.api.thera.bridge.PayoutStatus.parseOrThrow(_response.body, {
495
+ unrecognizedObjectKeys: "passthrough",
496
+ allowUnrecognizedUnionMembers: true,
497
+ allowUnrecognizedEnumValues: true,
498
+ skipValidation: true,
499
+ breadcrumbsPrefix: ["response"],
500
+ });
501
+ }
502
+ if (_response.error.reason === "status-code") {
503
+ throw new errors.TheraApiError({
504
+ statusCode: _response.error.statusCode,
505
+ body: _response.error.body,
506
+ });
507
+ }
508
+ switch (_response.error.reason) {
509
+ case "non-json":
510
+ throw new errors.TheraApiError({
511
+ statusCode: _response.error.statusCode,
512
+ body: _response.error.rawBody,
513
+ });
514
+ case "timeout":
515
+ throw new errors.TheraApiTimeoutError();
516
+ case "unknown":
517
+ throw new errors.TheraApiError({
518
+ message: _response.error.errorMessage,
519
+ });
520
+ }
521
+ });
522
+ }
523
+ /**
524
+ * Creates a new bridge wallet for a customer.
525
+ *
526
+ * @param {TheraApi.api.thera.bridge.CreateWalletRequest} request
527
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
528
+ *
529
+ * @example
530
+ * await client.api.thera.bridge.bridgeApi.createWallet({
531
+ * userId: "string",
532
+ * chain: "string"
533
+ * })
534
+ */
535
+ createWallet(request, requestOptions) {
536
+ return __awaiter(this, void 0, void 0, function* () {
537
+ const _response = yield core.fetcher({
538
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/bridge/wallets"),
539
+ method: "POST",
540
+ headers: {
541
+ Authorization: yield this._getAuthorizationHeader(),
542
+ "X-Fern-Language": "JavaScript",
543
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
544
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
545
+ "X-Fern-Runtime": core.RUNTIME.type,
546
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
547
+ },
548
+ contentType: "application/json",
549
+ body: yield serializers.api.thera.bridge.CreateWalletRequest.jsonOrThrow(request, {
550
+ unrecognizedObjectKeys: "strip",
551
+ }),
552
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
553
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
554
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
555
+ });
556
+ if (_response.ok) {
557
+ return yield serializers.api.thera.bridge.WalletDetails.parseOrThrow(_response.body, {
558
+ unrecognizedObjectKeys: "passthrough",
559
+ allowUnrecognizedUnionMembers: true,
560
+ allowUnrecognizedEnumValues: true,
561
+ skipValidation: true,
562
+ breadcrumbsPrefix: ["response"],
563
+ });
564
+ }
565
+ if (_response.error.reason === "status-code") {
566
+ throw new errors.TheraApiError({
567
+ statusCode: _response.error.statusCode,
568
+ body: _response.error.body,
569
+ });
570
+ }
571
+ switch (_response.error.reason) {
572
+ case "non-json":
573
+ throw new errors.TheraApiError({
574
+ statusCode: _response.error.statusCode,
575
+ body: _response.error.rawBody,
576
+ });
577
+ case "timeout":
578
+ throw new errors.TheraApiTimeoutError();
579
+ case "unknown":
580
+ throw new errors.TheraApiError({
581
+ message: _response.error.errorMessage,
582
+ });
583
+ }
584
+ });
585
+ }
586
+ /**
587
+ * Retrieves details of a specific wallet.
588
+ *
589
+ * @param {string} walletId
590
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
591
+ *
592
+ * @example
593
+ * await client.api.thera.bridge.bridgeApi.getWalletDetails("string")
594
+ */
595
+ getWalletDetails(walletId, requestOptions) {
596
+ return __awaiter(this, void 0, void 0, function* () {
597
+ const _response = yield core.fetcher({
598
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/wallets/${encodeURIComponent(walletId)}`),
599
+ method: "GET",
600
+ headers: {
601
+ Authorization: yield this._getAuthorizationHeader(),
602
+ "X-Fern-Language": "JavaScript",
603
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
604
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
605
+ "X-Fern-Runtime": core.RUNTIME.type,
606
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
607
+ },
608
+ contentType: "application/json",
609
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
610
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
611
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
612
+ });
613
+ if (_response.ok) {
614
+ return yield serializers.api.thera.bridge.WalletDetails.parseOrThrow(_response.body, {
615
+ unrecognizedObjectKeys: "passthrough",
616
+ allowUnrecognizedUnionMembers: true,
617
+ allowUnrecognizedEnumValues: true,
618
+ skipValidation: true,
619
+ breadcrumbsPrefix: ["response"],
620
+ });
621
+ }
622
+ if (_response.error.reason === "status-code") {
623
+ throw new errors.TheraApiError({
624
+ statusCode: _response.error.statusCode,
625
+ body: _response.error.body,
626
+ });
627
+ }
628
+ switch (_response.error.reason) {
629
+ case "non-json":
630
+ throw new errors.TheraApiError({
631
+ statusCode: _response.error.statusCode,
632
+ body: _response.error.rawBody,
633
+ });
634
+ case "timeout":
635
+ throw new errors.TheraApiTimeoutError();
636
+ case "unknown":
637
+ throw new errors.TheraApiError({
638
+ message: _response.error.errorMessage,
639
+ });
640
+ }
641
+ });
642
+ }
643
+ /**
644
+ * Retrieves all wallets associated with a customer.
645
+ *
646
+ * @param {string} customerId
647
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
648
+ *
649
+ * @example
650
+ * await client.api.thera.bridge.bridgeApi.listWallets("string")
651
+ */
652
+ listWallets(customerId, requestOptions) {
653
+ return __awaiter(this, void 0, void 0, function* () {
654
+ const _response = yield core.fetcher({
655
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/customers/${encodeURIComponent(customerId)}/wallets`),
656
+ method: "GET",
657
+ headers: {
658
+ Authorization: yield this._getAuthorizationHeader(),
659
+ "X-Fern-Language": "JavaScript",
660
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
661
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
662
+ "X-Fern-Runtime": core.RUNTIME.type,
663
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
664
+ },
665
+ contentType: "application/json",
666
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
667
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
668
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
669
+ });
670
+ if (_response.ok) {
671
+ return yield serializers.api.thera.bridge.bridgeApi.listWallets.Response.parseOrThrow(_response.body, {
672
+ unrecognizedObjectKeys: "passthrough",
673
+ allowUnrecognizedUnionMembers: true,
674
+ allowUnrecognizedEnumValues: true,
675
+ skipValidation: true,
676
+ breadcrumbsPrefix: ["response"],
677
+ });
678
+ }
679
+ if (_response.error.reason === "status-code") {
680
+ throw new errors.TheraApiError({
681
+ statusCode: _response.error.statusCode,
682
+ body: _response.error.body,
683
+ });
684
+ }
685
+ switch (_response.error.reason) {
686
+ case "non-json":
687
+ throw new errors.TheraApiError({
688
+ statusCode: _response.error.statusCode,
689
+ body: _response.error.rawBody,
690
+ });
691
+ case "timeout":
692
+ throw new errors.TheraApiTimeoutError();
693
+ case "unknown":
694
+ throw new errors.TheraApiError({
695
+ message: _response.error.errorMessage,
696
+ });
697
+ }
698
+ });
699
+ }
700
+ /**
701
+ * Transfers funds between custodial wallets.
702
+ *
703
+ * @param {TheraApi.api.thera.bridge.TransferFundsRequest} request
704
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
705
+ *
706
+ * @example
707
+ * await client.api.thera.bridge.bridgeApi.transferFunds({
708
+ * fromWalletId: "string",
709
+ * toWalletId: "string",
710
+ * amount: "string",
711
+ * currency: "string",
712
+ * flow: TheraApi.api.thera.bridge.TransferFundsFlow.PayoutWallet
713
+ * })
714
+ */
715
+ transferFunds(request, requestOptions) {
716
+ return __awaiter(this, void 0, void 0, function* () {
717
+ const _response = yield core.fetcher({
718
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/bridge/wallets/transfer"),
719
+ method: "POST",
720
+ headers: {
721
+ Authorization: yield this._getAuthorizationHeader(),
722
+ "X-Fern-Language": "JavaScript",
723
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
724
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
725
+ "X-Fern-Runtime": core.RUNTIME.type,
726
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
727
+ },
728
+ contentType: "application/json",
729
+ body: yield serializers.api.thera.bridge.TransferFundsRequest.jsonOrThrow(request, {
730
+ unrecognizedObjectKeys: "strip",
731
+ }),
732
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
733
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
734
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
735
+ });
736
+ if (_response.ok) {
737
+ return yield serializers.api.thera.bridge.TransferFundsResponse.parseOrThrow(_response.body, {
738
+ unrecognizedObjectKeys: "passthrough",
739
+ allowUnrecognizedUnionMembers: true,
740
+ allowUnrecognizedEnumValues: true,
741
+ skipValidation: true,
742
+ breadcrumbsPrefix: ["response"],
743
+ });
744
+ }
745
+ if (_response.error.reason === "status-code") {
746
+ throw new errors.TheraApiError({
747
+ statusCode: _response.error.statusCode,
748
+ body: _response.error.body,
749
+ });
750
+ }
751
+ switch (_response.error.reason) {
752
+ case "non-json":
753
+ throw new errors.TheraApiError({
754
+ statusCode: _response.error.statusCode,
755
+ body: _response.error.rawBody,
756
+ });
757
+ case "timeout":
758
+ throw new errors.TheraApiTimeoutError();
759
+ case "unknown":
760
+ throw new errors.TheraApiError({
761
+ message: _response.error.errorMessage,
762
+ });
763
+ }
764
+ });
765
+ }
766
+ /**
767
+ * Retrieve details of a linked external crypto account.
768
+ *
769
+ * @param {string} accountId
770
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
771
+ *
772
+ * @example
773
+ * await client.api.thera.bridge.bridgeApi.getExternalAccount("string")
774
+ */
775
+ getExternalAccount(accountId, requestOptions) {
776
+ return __awaiter(this, void 0, void 0, function* () {
777
+ const _response = yield core.fetcher({
778
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/external-accounts/${encodeURIComponent(accountId)}`),
779
+ method: "GET",
780
+ headers: {
781
+ Authorization: yield this._getAuthorizationHeader(),
782
+ "X-Fern-Language": "JavaScript",
783
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
784
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
785
+ "X-Fern-Runtime": core.RUNTIME.type,
786
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
787
+ },
788
+ contentType: "application/json",
789
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
790
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
791
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
792
+ });
793
+ if (_response.ok) {
794
+ return yield serializers.api.thera.bridge.ExternalAccountDetails.parseOrThrow(_response.body, {
795
+ unrecognizedObjectKeys: "passthrough",
796
+ allowUnrecognizedUnionMembers: true,
797
+ allowUnrecognizedEnumValues: true,
798
+ skipValidation: true,
799
+ breadcrumbsPrefix: ["response"],
800
+ });
801
+ }
802
+ if (_response.error.reason === "status-code") {
803
+ throw new errors.TheraApiError({
804
+ statusCode: _response.error.statusCode,
805
+ body: _response.error.body,
806
+ });
807
+ }
808
+ switch (_response.error.reason) {
809
+ case "non-json":
810
+ throw new errors.TheraApiError({
811
+ statusCode: _response.error.statusCode,
812
+ body: _response.error.rawBody,
813
+ });
814
+ case "timeout":
815
+ throw new errors.TheraApiTimeoutError();
816
+ case "unknown":
817
+ throw new errors.TheraApiError({
818
+ message: _response.error.errorMessage,
819
+ });
820
+ }
821
+ });
822
+ }
823
+ /**
824
+ * Retrieve a list of all external accounts linked to customers.
825
+ *
826
+ * @param {string} customerId
827
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
828
+ *
829
+ * @example
830
+ * await client.api.thera.bridge.bridgeApi.listExternalAccounts("string")
831
+ */
832
+ listExternalAccounts(customerId, requestOptions) {
833
+ return __awaiter(this, void 0, void 0, function* () {
834
+ const _response = yield core.fetcher({
835
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/${encodeURIComponent(customerId)}/external-accounts`),
836
+ method: "GET",
837
+ headers: {
838
+ Authorization: yield this._getAuthorizationHeader(),
839
+ "X-Fern-Language": "JavaScript",
840
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
841
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
842
+ "X-Fern-Runtime": core.RUNTIME.type,
843
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
844
+ },
845
+ contentType: "application/json",
846
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
847
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
848
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
849
+ });
850
+ if (_response.ok) {
851
+ return yield serializers.api.thera.bridge.bridgeApi.listExternalAccounts.Response.parseOrThrow(_response.body, {
852
+ unrecognizedObjectKeys: "passthrough",
853
+ allowUnrecognizedUnionMembers: true,
854
+ allowUnrecognizedEnumValues: true,
855
+ skipValidation: true,
856
+ breadcrumbsPrefix: ["response"],
857
+ });
858
+ }
859
+ if (_response.error.reason === "status-code") {
860
+ throw new errors.TheraApiError({
861
+ statusCode: _response.error.statusCode,
862
+ body: _response.error.body,
863
+ });
864
+ }
865
+ switch (_response.error.reason) {
866
+ case "non-json":
867
+ throw new errors.TheraApiError({
868
+ statusCode: _response.error.statusCode,
869
+ body: _response.error.rawBody,
870
+ });
871
+ case "timeout":
872
+ throw new errors.TheraApiTimeoutError();
873
+ case "unknown":
874
+ throw new errors.TheraApiError({
875
+ message: _response.error.errorMessage,
876
+ });
877
+ }
878
+ });
879
+ }
880
+ /**
881
+ * Update details of a linked external account.
882
+ *
883
+ * @param {string} accountId
884
+ * @param {TheraApi.api.thera.bridge.UpdateExternalAccountRequest} request
885
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
886
+ *
887
+ * @example
888
+ * await client.api.thera.bridge.bridgeApi.updateExternalAccount("string", {
889
+ * nickname: "string",
890
+ * accountStatus: "string"
891
+ * })
892
+ */
893
+ updateExternalAccount(accountId, request, requestOptions) {
894
+ return __awaiter(this, void 0, void 0, function* () {
895
+ const _response = yield core.fetcher({
896
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/external-accounts/${encodeURIComponent(accountId)}`),
897
+ method: "PUT",
898
+ headers: {
899
+ Authorization: yield this._getAuthorizationHeader(),
900
+ "X-Fern-Language": "JavaScript",
901
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
902
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
903
+ "X-Fern-Runtime": core.RUNTIME.type,
904
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
905
+ },
906
+ contentType: "application/json",
907
+ body: yield serializers.api.thera.bridge.UpdateExternalAccountRequest.jsonOrThrow(request, {
908
+ unrecognizedObjectKeys: "strip",
909
+ }),
910
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
911
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
912
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
913
+ });
914
+ if (_response.ok) {
915
+ return yield serializers.api.thera.bridge.UpdateExternalAccountResponse.parseOrThrow(_response.body, {
916
+ unrecognizedObjectKeys: "passthrough",
917
+ allowUnrecognizedUnionMembers: true,
918
+ allowUnrecognizedEnumValues: true,
919
+ skipValidation: true,
920
+ breadcrumbsPrefix: ["response"],
921
+ });
922
+ }
923
+ if (_response.error.reason === "status-code") {
924
+ throw new errors.TheraApiError({
925
+ statusCode: _response.error.statusCode,
926
+ body: _response.error.body,
927
+ });
928
+ }
929
+ switch (_response.error.reason) {
930
+ case "non-json":
931
+ throw new errors.TheraApiError({
932
+ statusCode: _response.error.statusCode,
933
+ body: _response.error.rawBody,
934
+ });
935
+ case "timeout":
936
+ throw new errors.TheraApiTimeoutError();
937
+ case "unknown":
938
+ throw new errors.TheraApiError({
939
+ message: _response.error.errorMessage,
940
+ });
941
+ }
942
+ });
943
+ }
944
+ /**
945
+ * Unlinks an external crypto account from a customer.
946
+ *
947
+ * @param {string} accountId
948
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
949
+ *
950
+ * @example
951
+ * await client.api.thera.bridge.bridgeApi.unlinkExternalAccount("string")
952
+ */
953
+ unlinkExternalAccount(accountId, requestOptions) {
954
+ return __awaiter(this, void 0, void 0, function* () {
955
+ const _response = yield core.fetcher({
956
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/external-accounts/${encodeURIComponent(accountId)}`),
957
+ method: "DELETE",
958
+ headers: {
959
+ Authorization: yield this._getAuthorizationHeader(),
960
+ "X-Fern-Language": "JavaScript",
961
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
962
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
963
+ "X-Fern-Runtime": core.RUNTIME.type,
964
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
965
+ },
966
+ contentType: "application/json",
967
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
968
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
969
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
970
+ });
971
+ if (_response.ok) {
972
+ return;
973
+ }
974
+ if (_response.error.reason === "status-code") {
975
+ throw new errors.TheraApiError({
976
+ statusCode: _response.error.statusCode,
977
+ body: _response.error.body,
978
+ });
979
+ }
980
+ switch (_response.error.reason) {
981
+ case "non-json":
982
+ throw new errors.TheraApiError({
983
+ statusCode: _response.error.statusCode,
984
+ body: _response.error.rawBody,
985
+ });
986
+ case "timeout":
987
+ throw new errors.TheraApiTimeoutError();
988
+ case "unknown":
989
+ throw new errors.TheraApiError({
990
+ message: _response.error.errorMessage,
991
+ });
992
+ }
993
+ });
994
+ }
995
+ /**
996
+ * Reactivates a previously unlinked external account.
997
+ *
998
+ * @param {string} accountId
999
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
1000
+ *
1001
+ * @example
1002
+ * await client.api.thera.bridge.bridgeApi.reactivateExternalAccount("string")
1003
+ */
1004
+ reactivateExternalAccount(accountId, requestOptions) {
1005
+ return __awaiter(this, void 0, void 0, function* () {
1006
+ const _response = yield core.fetcher({
1007
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/external-accounts/${encodeURIComponent(accountId)}/reactivate`),
1008
+ method: "POST",
1009
+ headers: {
1010
+ Authorization: yield this._getAuthorizationHeader(),
1011
+ "X-Fern-Language": "JavaScript",
1012
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
1013
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
1014
+ "X-Fern-Runtime": core.RUNTIME.type,
1015
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1016
+ },
1017
+ contentType: "application/json",
1018
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1019
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1020
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1021
+ });
1022
+ if (_response.ok) {
1023
+ return;
1024
+ }
1025
+ if (_response.error.reason === "status-code") {
1026
+ throw new errors.TheraApiError({
1027
+ statusCode: _response.error.statusCode,
1028
+ body: _response.error.body,
1029
+ });
1030
+ }
1031
+ switch (_response.error.reason) {
1032
+ case "non-json":
1033
+ throw new errors.TheraApiError({
1034
+ statusCode: _response.error.statusCode,
1035
+ body: _response.error.rawBody,
1036
+ });
1037
+ case "timeout":
1038
+ throw new errors.TheraApiTimeoutError();
1039
+ case "unknown":
1040
+ throw new errors.TheraApiError({
1041
+ message: _response.error.errorMessage,
1042
+ });
1043
+ }
1044
+ });
1045
+ }
1046
+ /**
1047
+ * Initiates a transfer transaction between accounts.
1048
+ *
1049
+ * @param {TheraApi.api.thera.bridge.Transfer} request
1050
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
1051
+ *
1052
+ * @example
1053
+ * await client.api.thera.bridge.bridgeApi.createTransfer({
1054
+ * clientReferenceId: "string",
1055
+ * amount: "string",
1056
+ * onBehalfOf: "string",
1057
+ * developerFee: "string",
1058
+ * source: {
1059
+ * currency: "string",
1060
+ * paymentRail: "string",
1061
+ * externalAccountId: "string",
1062
+ * bridgeWalletId: "string",
1063
+ * fromAddress: "string"
1064
+ * },
1065
+ * destination: {
1066
+ * currency: "string",
1067
+ * paymentRail: "string",
1068
+ * externalAccountId: "string",
1069
+ * bridgeWalletId: "string",
1070
+ * toAddress: "string",
1071
+ * wireMessage: "string",
1072
+ * sepaReference: "string",
1073
+ * swiftReference: "string",
1074
+ * swiftCharges: "string",
1075
+ * achReference: "string"
1076
+ * }
1077
+ * })
1078
+ */
1079
+ createTransfer(request, requestOptions) {
1080
+ return __awaiter(this, void 0, void 0, function* () {
1081
+ const _response = yield core.fetcher({
1082
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/bridge/transfers"),
1083
+ method: "POST",
1084
+ headers: {
1085
+ Authorization: yield this._getAuthorizationHeader(),
1086
+ "X-Fern-Language": "JavaScript",
1087
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
1088
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
1089
+ "X-Fern-Runtime": core.RUNTIME.type,
1090
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1091
+ },
1092
+ contentType: "application/json",
1093
+ body: yield serializers.api.thera.bridge.Transfer.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1094
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1095
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1096
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1097
+ });
1098
+ if (_response.ok) {
1099
+ return yield serializers.api.thera.bridge.TransferFundsResponse.parseOrThrow(_response.body, {
1100
+ unrecognizedObjectKeys: "passthrough",
1101
+ allowUnrecognizedUnionMembers: true,
1102
+ allowUnrecognizedEnumValues: true,
1103
+ skipValidation: true,
1104
+ breadcrumbsPrefix: ["response"],
1105
+ });
1106
+ }
1107
+ if (_response.error.reason === "status-code") {
1108
+ throw new errors.TheraApiError({
1109
+ statusCode: _response.error.statusCode,
1110
+ body: _response.error.body,
1111
+ });
1112
+ }
1113
+ switch (_response.error.reason) {
1114
+ case "non-json":
1115
+ throw new errors.TheraApiError({
1116
+ statusCode: _response.error.statusCode,
1117
+ body: _response.error.rawBody,
1118
+ });
1119
+ case "timeout":
1120
+ throw new errors.TheraApiTimeoutError();
1121
+ case "unknown":
1122
+ throw new errors.TheraApiError({
1123
+ message: _response.error.errorMessage,
1124
+ });
1125
+ }
1126
+ });
1127
+ }
1128
+ /**
1129
+ * Retrieve details of a specific transfer.
1130
+ *
1131
+ * @param {string} transactionId
1132
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
1133
+ *
1134
+ * @example
1135
+ * await client.api.thera.bridge.bridgeApi.getTransferDetails("string")
1136
+ */
1137
+ getTransferDetails(transactionId, requestOptions) {
1138
+ return __awaiter(this, void 0, void 0, function* () {
1139
+ const _response = yield core.fetcher({
1140
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/transfers/${encodeURIComponent(transactionId)}`),
1141
+ method: "GET",
1142
+ headers: {
1143
+ Authorization: yield this._getAuthorizationHeader(),
1144
+ "X-Fern-Language": "JavaScript",
1145
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
1146
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
1147
+ "X-Fern-Runtime": core.RUNTIME.type,
1148
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1149
+ },
1150
+ contentType: "application/json",
1151
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1152
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1153
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1154
+ });
1155
+ if (_response.ok) {
1156
+ return yield serializers.api.thera.bridge.TransferDetails.parseOrThrow(_response.body, {
1157
+ unrecognizedObjectKeys: "passthrough",
1158
+ allowUnrecognizedUnionMembers: true,
1159
+ allowUnrecognizedEnumValues: true,
1160
+ skipValidation: true,
1161
+ breadcrumbsPrefix: ["response"],
1162
+ });
1163
+ }
1164
+ if (_response.error.reason === "status-code") {
1165
+ throw new errors.TheraApiError({
1166
+ statusCode: _response.error.statusCode,
1167
+ body: _response.error.body,
1168
+ });
1169
+ }
1170
+ switch (_response.error.reason) {
1171
+ case "non-json":
1172
+ throw new errors.TheraApiError({
1173
+ statusCode: _response.error.statusCode,
1174
+ body: _response.error.rawBody,
1175
+ });
1176
+ case "timeout":
1177
+ throw new errors.TheraApiTimeoutError();
1178
+ case "unknown":
1179
+ throw new errors.TheraApiError({
1180
+ message: _response.error.errorMessage,
1181
+ });
1182
+ }
1183
+ });
1184
+ }
1185
+ /**
1186
+ * Retrieves all transfers.
1187
+ *
1188
+ * @param {string} customerId
1189
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
1190
+ *
1191
+ * @example
1192
+ * await client.api.thera.bridge.bridgeApi.listTransfers("string")
1193
+ */
1194
+ listTransfers(customerId, requestOptions) {
1195
+ return __awaiter(this, void 0, void 0, function* () {
1196
+ const _response = yield core.fetcher({
1197
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/${encodeURIComponent(customerId)}/transfers`),
1198
+ method: "GET",
1199
+ headers: {
1200
+ Authorization: yield this._getAuthorizationHeader(),
1201
+ "X-Fern-Language": "JavaScript",
1202
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
1203
+ "X-Fern-SDK-Version": "0.0.1-prerelease2761-dev",
1204
+ "X-Fern-Runtime": core.RUNTIME.type,
1205
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1206
+ },
1207
+ contentType: "application/json",
1208
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1209
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1210
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1211
+ });
1212
+ if (_response.ok) {
1213
+ return yield serializers.api.thera.bridge.bridgeApi.listTransfers.Response.parseOrThrow(_response.body, {
1214
+ unrecognizedObjectKeys: "passthrough",
1215
+ allowUnrecognizedUnionMembers: true,
1216
+ allowUnrecognizedEnumValues: true,
1217
+ skipValidation: true,
1218
+ breadcrumbsPrefix: ["response"],
1219
+ });
1220
+ }
1221
+ if (_response.error.reason === "status-code") {
1222
+ throw new errors.TheraApiError({
1223
+ statusCode: _response.error.statusCode,
1224
+ body: _response.error.body,
1225
+ });
1226
+ }
1227
+ switch (_response.error.reason) {
1228
+ case "non-json":
1229
+ throw new errors.TheraApiError({
1230
+ statusCode: _response.error.statusCode,
1231
+ body: _response.error.rawBody,
1232
+ });
1233
+ case "timeout":
1234
+ throw new errors.TheraApiTimeoutError();
1235
+ case "unknown":
1236
+ throw new errors.TheraApiError({
1237
+ message: _response.error.errorMessage,
1238
+ });
1239
+ }
1240
+ });
1241
+ }
1242
+ _getAuthorizationHeader() {
1243
+ return __awaiter(this, void 0, void 0, function* () {
1244
+ const bearer = yield core.Supplier.get(this._options.token);
1245
+ if (bearer != null) {
1246
+ return `Bearer ${bearer}`;
1247
+ }
1248
+ return undefined;
1249
+ });
1250
+ }
1251
+ }
1252
+ exports.BridgeApi = BridgeApi;