@thera-hr/api-sdk 0.0.1-prerelease2690-dev-3 → 0.0.1-prerelease2692-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 (337) hide show
  1. package/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  2. package/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  3. package/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  4. package/api/resources/api/resources/thera/client/Client.d.ts +3 -0
  5. package/api/resources/api/resources/thera/client/Client.js +29 -24
  6. package/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  7. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +32 -32
  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 +310 -0
  15. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +1249 -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 +18 -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 +7 -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/TransferFundsResponse.d.ts +8 -0
  61. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +5 -0
  62. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +10 -0
  63. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +5 -0
  64. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +7 -0
  65. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +5 -0
  66. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +7 -0
  67. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +5 -0
  68. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +10 -0
  69. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +5 -0
  70. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +22 -0
  71. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +38 -0
  72. package/api/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  73. package/api/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  74. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  75. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  76. package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  77. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  78. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  79. package/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  80. package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  81. package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  82. package/api/resources/api/resources/thera/resources/index.d.ts +1 -0
  83. package/api/resources/api/resources/thera/resources/index.js +2 -1
  84. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +6 -6
  85. package/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  86. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  87. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  88. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  89. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  90. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  91. package/api/resources/db/resources/user/types/BridgeUserDetails.d.ts +7 -0
  92. package/api/resources/db/resources/user/types/BridgeUserDetails.js +5 -0
  93. package/api/resources/db/resources/user/types/index.d.ts +1 -0
  94. package/api/resources/db/resources/user/types/index.js +1 -0
  95. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  96. package/dist/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  97. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  98. package/dist/api/resources/api/resources/thera/client/Client.d.ts +3 -0
  99. package/dist/api/resources/api/resources/thera/client/Client.js +29 -24
  100. package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  101. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +32 -32
  102. package/dist/api/resources/api/resources/thera/resources/bridge/client/Client.d.ts +22 -0
  103. package/dist/api/resources/api/resources/thera/resources/bridge/client/Client.js +17 -0
  104. package/dist/api/resources/api/resources/thera/resources/bridge/client/index.d.ts +1 -0
  105. package/dist/api/resources/api/resources/thera/resources/bridge/client/index.js +2 -0
  106. package/dist/api/resources/api/resources/thera/resources/bridge/index.d.ts +2 -0
  107. package/dist/api/resources/api/resources/thera/resources/bridge/index.js +18 -0
  108. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +310 -0
  109. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +1249 -0
  110. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +1 -0
  111. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +17 -0
  112. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +14 -0
  113. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +5 -0
  114. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +18 -0
  115. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +5 -0
  116. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  117. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +2 -0
  118. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  119. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  120. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +11 -0
  121. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +5 -0
  122. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.d.ts +8 -0
  123. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.js +5 -0
  124. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.d.ts +6 -0
  125. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.js +5 -0
  126. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.d.ts +8 -0
  127. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.js +5 -0
  128. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +15 -0
  129. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +5 -0
  130. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +7 -0
  131. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +5 -0
  132. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +10 -0
  133. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +5 -0
  134. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +12 -0
  135. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +5 -0
  136. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +23 -0
  137. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +5 -0
  138. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +23 -0
  139. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +5 -0
  140. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +8 -0
  141. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +5 -0
  142. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +7 -0
  143. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +5 -0
  144. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +8 -0
  145. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +5 -0
  146. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +6 -0
  147. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +5 -0
  148. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +12 -0
  149. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +5 -0
  150. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +15 -0
  151. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +5 -0
  152. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +12 -0
  153. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +5 -0
  154. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +8 -0
  155. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +5 -0
  156. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +10 -0
  157. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +5 -0
  158. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +7 -0
  159. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +5 -0
  160. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +7 -0
  161. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +5 -0
  162. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +10 -0
  163. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +5 -0
  164. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +22 -0
  165. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +38 -0
  166. package/dist/api/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  167. package/dist/api/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  168. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  169. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  170. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  171. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  172. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  173. package/dist/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  174. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  175. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  176. package/dist/api/resources/api/resources/thera/resources/index.d.ts +1 -0
  177. package/dist/api/resources/api/resources/thera/resources/index.js +2 -1
  178. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +6 -6
  179. package/dist/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  180. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  181. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  182. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  183. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  184. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  185. package/dist/api/resources/db/resources/user/types/BridgeUserDetails.d.ts +7 -0
  186. package/dist/api/resources/db/resources/user/types/BridgeUserDetails.js +5 -0
  187. package/dist/api/resources/db/resources/user/types/index.d.ts +1 -0
  188. package/dist/api/resources/db/resources/user/types/index.js +1 -0
  189. package/dist/serialization/resources/api/resources/thera/resources/bridge/index.d.ts +1 -0
  190. package/dist/serialization/resources/api/resources/thera/resources/bridge/index.js +17 -0
  191. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.d.ts +11 -0
  192. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.js +32 -0
  193. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +5 -0
  194. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +34 -0
  195. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.d.ts +11 -0
  196. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.js +32 -0
  197. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.d.ts +11 -0
  198. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.js +32 -0
  199. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.d.ts +11 -0
  200. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.js +32 -0
  201. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +13 -0
  202. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +34 -0
  203. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +15 -0
  204. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +36 -0
  205. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  206. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +7 -0
  207. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  208. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  209. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +17 -0
  210. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +38 -0
  211. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.d.ts +14 -0
  212. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.js +35 -0
  213. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.d.ts +12 -0
  214. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.js +33 -0
  215. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.d.ts +14 -0
  216. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.js +35 -0
  217. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +21 -0
  218. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +42 -0
  219. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +13 -0
  220. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +34 -0
  221. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +16 -0
  222. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +37 -0
  223. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +18 -0
  224. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +39 -0
  225. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +32 -0
  226. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +53 -0
  227. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +32 -0
  228. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +53 -0
  229. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +14 -0
  230. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +35 -0
  231. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +13 -0
  232. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +34 -0
  233. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +14 -0
  234. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +35 -0
  235. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +12 -0
  236. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +33 -0
  237. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +19 -0
  238. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +40 -0
  239. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +21 -0
  240. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +42 -0
  241. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +18 -0
  242. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +39 -0
  243. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +14 -0
  244. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +35 -0
  245. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +16 -0
  246. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +37 -0
  247. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +13 -0
  248. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +34 -0
  249. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +13 -0
  250. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +34 -0
  251. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +16 -0
  252. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +37 -0
  253. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +22 -0
  254. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +38 -0
  255. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  256. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  257. package/dist/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
  258. package/dist/serialization/resources/api/resources/thera/resources/index.js +2 -1
  259. package/dist/serialization/resources/db/resources/user/types/BridgeUserDetails.d.ts +13 -0
  260. package/dist/serialization/resources/db/resources/user/types/BridgeUserDetails.js +34 -0
  261. package/dist/serialization/resources/db/resources/user/types/index.d.ts +1 -0
  262. package/dist/serialization/resources/db/resources/user/types/index.js +1 -0
  263. package/package.json +1 -1
  264. package/serialization/resources/api/resources/thera/resources/bridge/index.d.ts +1 -0
  265. package/serialization/resources/api/resources/thera/resources/bridge/index.js +17 -0
  266. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.d.ts +11 -0
  267. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.js +32 -0
  268. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +5 -0
  269. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +34 -0
  270. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.d.ts +11 -0
  271. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.js +32 -0
  272. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.d.ts +11 -0
  273. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.js +32 -0
  274. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.d.ts +11 -0
  275. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.js +32 -0
  276. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +13 -0
  277. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +34 -0
  278. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +15 -0
  279. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +36 -0
  280. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  281. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +7 -0
  282. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  283. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  284. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +17 -0
  285. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +38 -0
  286. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.d.ts +14 -0
  287. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.js +35 -0
  288. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.d.ts +12 -0
  289. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.js +33 -0
  290. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.d.ts +14 -0
  291. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.js +35 -0
  292. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +21 -0
  293. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +42 -0
  294. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +13 -0
  295. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +34 -0
  296. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +16 -0
  297. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +37 -0
  298. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +18 -0
  299. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +39 -0
  300. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +32 -0
  301. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +53 -0
  302. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +32 -0
  303. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +53 -0
  304. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +14 -0
  305. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +35 -0
  306. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +13 -0
  307. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +34 -0
  308. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +14 -0
  309. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +35 -0
  310. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +12 -0
  311. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +33 -0
  312. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +19 -0
  313. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +40 -0
  314. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +21 -0
  315. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +42 -0
  316. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +18 -0
  317. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +39 -0
  318. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +14 -0
  319. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +35 -0
  320. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +16 -0
  321. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +37 -0
  322. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +13 -0
  323. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +34 -0
  324. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +13 -0
  325. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +34 -0
  326. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +16 -0
  327. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +37 -0
  328. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +22 -0
  329. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +38 -0
  330. package/serialization/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  331. package/serialization/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  332. package/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
  333. package/serialization/resources/api/resources/thera/resources/index.js +2 -1
  334. package/serialization/resources/db/resources/user/types/BridgeUserDetails.d.ts +13 -0
  335. package/serialization/resources/db/resources/user/types/BridgeUserDetails.js +34 -0
  336. package/serialization/resources/db/resources/user/types/index.d.ts +1 -0
  337. package/serialization/resources/db/resources/user/types/index.js +1 -0
@@ -0,0 +1,1249 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.BridgeApi = void 0;
42
+ const core = __importStar(require("../../../../../../../../../../core"));
43
+ const url_join_1 = __importDefault(require("url-join"));
44
+ const serializers = __importStar(require("../../../../../../../../../../serialization/index"));
45
+ const errors = __importStar(require("../../../../../../../../../../errors/index"));
46
+ class BridgeApi {
47
+ constructor(_options) {
48
+ this._options = _options;
49
+ }
50
+ /**
51
+ * Customers need to accept Bridge's terms of service before KYC processing.
52
+ *
53
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @example
56
+ * await client.api.thera.bridge.bridgeApi.requestTosLink()
57
+ */
58
+ requestTosLink(requestOptions) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ const _response = yield core.fetcher({
61
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "customers/tos_links"),
62
+ method: "POST",
63
+ headers: {
64
+ Authorization: yield this._getAuthorizationHeader(),
65
+ "X-Fern-Language": "JavaScript",
66
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
67
+ "X-Fern-SDK-Version": "0.0.1-prerelease2692-dev",
68
+ "X-Fern-Runtime": core.RUNTIME.type,
69
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
70
+ },
71
+ contentType: "application/json",
72
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
73
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
74
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
75
+ });
76
+ if (_response.ok) {
77
+ return yield serializers.api.thera.bridge.TosLinkResponse.parseOrThrow(_response.body, {
78
+ unrecognizedObjectKeys: "passthrough",
79
+ allowUnrecognizedUnionMembers: true,
80
+ allowUnrecognizedEnumValues: true,
81
+ skipValidation: true,
82
+ breadcrumbsPrefix: ["response"],
83
+ });
84
+ }
85
+ if (_response.error.reason === "status-code") {
86
+ throw new errors.TheraApiError({
87
+ statusCode: _response.error.statusCode,
88
+ body: _response.error.body,
89
+ });
90
+ }
91
+ switch (_response.error.reason) {
92
+ case "non-json":
93
+ throw new errors.TheraApiError({
94
+ statusCode: _response.error.statusCode,
95
+ body: _response.error.rawBody,
96
+ });
97
+ case "timeout":
98
+ throw new errors.TheraApiTimeoutError();
99
+ case "unknown":
100
+ throw new errors.TheraApiError({
101
+ message: _response.error.errorMessage,
102
+ });
103
+ }
104
+ });
105
+ }
106
+ /**
107
+ * Create a new customer and start the KYC process.
108
+ *
109
+ * @param {TheraApi.api.thera.bridge.CreateCustomer} request
110
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
111
+ *
112
+ * @example
113
+ * await client.api.thera.bridge.bridgeApi.createCustomer({
114
+ * type: "string",
115
+ * firstName: "string",
116
+ * lastName: "string",
117
+ * email: "string",
118
+ * phone: "string",
119
+ * address: {
120
+ * streetLine1: "string",
121
+ * streetLine2: "string",
122
+ * city: "string",
123
+ * state: "string",
124
+ * postalCode: "string",
125
+ * country: "string"
126
+ * },
127
+ * signedAgreementId: "string",
128
+ * birthDate: "string",
129
+ * taxIdentificationNumber: "string"
130
+ * })
131
+ */
132
+ createCustomer(request, requestOptions) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ const _response = yield core.fetcher({
135
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "customers"),
136
+ method: "POST",
137
+ headers: {
138
+ Authorization: yield this._getAuthorizationHeader(),
139
+ "X-Fern-Language": "JavaScript",
140
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
141
+ "X-Fern-SDK-Version": "0.0.1-prerelease2692-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), `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-prerelease2692-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), `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-prerelease2692-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), "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-prerelease2692-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), "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-prerelease2692-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), `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-prerelease2692-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 custodial 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
+ * customerId: "string",
532
+ * currency: "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), "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-prerelease2692-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), `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-prerelease2692-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), `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-prerelease2692-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
+ * })
713
+ */
714
+ transferFunds(request, requestOptions) {
715
+ return __awaiter(this, void 0, void 0, function* () {
716
+ const _response = yield core.fetcher({
717
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "wallets/transfer"),
718
+ method: "POST",
719
+ headers: {
720
+ Authorization: yield this._getAuthorizationHeader(),
721
+ "X-Fern-Language": "JavaScript",
722
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
723
+ "X-Fern-SDK-Version": "0.0.1-prerelease2692-dev",
724
+ "X-Fern-Runtime": core.RUNTIME.type,
725
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
726
+ },
727
+ contentType: "application/json",
728
+ body: yield serializers.api.thera.bridge.TransferFundsRequest.jsonOrThrow(request, {
729
+ unrecognizedObjectKeys: "strip",
730
+ }),
731
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
732
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
733
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
734
+ });
735
+ if (_response.ok) {
736
+ return yield serializers.api.thera.bridge.TransferFundsResponse.parseOrThrow(_response.body, {
737
+ unrecognizedObjectKeys: "passthrough",
738
+ allowUnrecognizedUnionMembers: true,
739
+ allowUnrecognizedEnumValues: true,
740
+ skipValidation: true,
741
+ breadcrumbsPrefix: ["response"],
742
+ });
743
+ }
744
+ if (_response.error.reason === "status-code") {
745
+ throw new errors.TheraApiError({
746
+ statusCode: _response.error.statusCode,
747
+ body: _response.error.body,
748
+ });
749
+ }
750
+ switch (_response.error.reason) {
751
+ case "non-json":
752
+ throw new errors.TheraApiError({
753
+ statusCode: _response.error.statusCode,
754
+ body: _response.error.rawBody,
755
+ });
756
+ case "timeout":
757
+ throw new errors.TheraApiTimeoutError();
758
+ case "unknown":
759
+ throw new errors.TheraApiError({
760
+ message: _response.error.errorMessage,
761
+ });
762
+ }
763
+ });
764
+ }
765
+ /**
766
+ * Retrieve details of a linked external crypto account.
767
+ *
768
+ * @param {string} accountId
769
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
770
+ *
771
+ * @example
772
+ * await client.api.thera.bridge.bridgeApi.getExternalAccount("string")
773
+ */
774
+ getExternalAccount(accountId, requestOptions) {
775
+ return __awaiter(this, void 0, void 0, function* () {
776
+ const _response = yield core.fetcher({
777
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `external-accounts/${encodeURIComponent(accountId)}`),
778
+ method: "GET",
779
+ headers: {
780
+ Authorization: yield this._getAuthorizationHeader(),
781
+ "X-Fern-Language": "JavaScript",
782
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
783
+ "X-Fern-SDK-Version": "0.0.1-prerelease2692-dev",
784
+ "X-Fern-Runtime": core.RUNTIME.type,
785
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
786
+ },
787
+ contentType: "application/json",
788
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
789
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
790
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
791
+ });
792
+ if (_response.ok) {
793
+ return yield serializers.api.thera.bridge.ExternalAccountDetails.parseOrThrow(_response.body, {
794
+ unrecognizedObjectKeys: "passthrough",
795
+ allowUnrecognizedUnionMembers: true,
796
+ allowUnrecognizedEnumValues: true,
797
+ skipValidation: true,
798
+ breadcrumbsPrefix: ["response"],
799
+ });
800
+ }
801
+ if (_response.error.reason === "status-code") {
802
+ throw new errors.TheraApiError({
803
+ statusCode: _response.error.statusCode,
804
+ body: _response.error.body,
805
+ });
806
+ }
807
+ switch (_response.error.reason) {
808
+ case "non-json":
809
+ throw new errors.TheraApiError({
810
+ statusCode: _response.error.statusCode,
811
+ body: _response.error.rawBody,
812
+ });
813
+ case "timeout":
814
+ throw new errors.TheraApiTimeoutError();
815
+ case "unknown":
816
+ throw new errors.TheraApiError({
817
+ message: _response.error.errorMessage,
818
+ });
819
+ }
820
+ });
821
+ }
822
+ /**
823
+ * Retrieve a list of all external accounts linked to customers.
824
+ *
825
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
826
+ *
827
+ * @example
828
+ * await client.api.thera.bridge.bridgeApi.listExternalAccounts()
829
+ */
830
+ listExternalAccounts(requestOptions) {
831
+ return __awaiter(this, void 0, void 0, function* () {
832
+ const _response = yield core.fetcher({
833
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "external-accounts"),
834
+ method: "GET",
835
+ headers: {
836
+ Authorization: yield this._getAuthorizationHeader(),
837
+ "X-Fern-Language": "JavaScript",
838
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
839
+ "X-Fern-SDK-Version": "0.0.1-prerelease2692-dev",
840
+ "X-Fern-Runtime": core.RUNTIME.type,
841
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
842
+ },
843
+ contentType: "application/json",
844
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
845
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
846
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
847
+ });
848
+ if (_response.ok) {
849
+ return yield serializers.api.thera.bridge.bridgeApi.listExternalAccounts.Response.parseOrThrow(_response.body, {
850
+ unrecognizedObjectKeys: "passthrough",
851
+ allowUnrecognizedUnionMembers: true,
852
+ allowUnrecognizedEnumValues: true,
853
+ skipValidation: true,
854
+ breadcrumbsPrefix: ["response"],
855
+ });
856
+ }
857
+ if (_response.error.reason === "status-code") {
858
+ throw new errors.TheraApiError({
859
+ statusCode: _response.error.statusCode,
860
+ body: _response.error.body,
861
+ });
862
+ }
863
+ switch (_response.error.reason) {
864
+ case "non-json":
865
+ throw new errors.TheraApiError({
866
+ statusCode: _response.error.statusCode,
867
+ body: _response.error.rawBody,
868
+ });
869
+ case "timeout":
870
+ throw new errors.TheraApiTimeoutError();
871
+ case "unknown":
872
+ throw new errors.TheraApiError({
873
+ message: _response.error.errorMessage,
874
+ });
875
+ }
876
+ });
877
+ }
878
+ /**
879
+ * Update details of a linked external account.
880
+ *
881
+ * @param {string} accountId
882
+ * @param {TheraApi.api.thera.bridge.UpdateExternalAccountRequest} request
883
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
884
+ *
885
+ * @example
886
+ * await client.api.thera.bridge.bridgeApi.updateExternalAccount("string", {
887
+ * nickname: "string",
888
+ * accountStatus: "string"
889
+ * })
890
+ */
891
+ updateExternalAccount(accountId, request, requestOptions) {
892
+ return __awaiter(this, void 0, void 0, function* () {
893
+ const _response = yield core.fetcher({
894
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `external-accounts/${encodeURIComponent(accountId)}`),
895
+ method: "PUT",
896
+ headers: {
897
+ Authorization: yield this._getAuthorizationHeader(),
898
+ "X-Fern-Language": "JavaScript",
899
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
900
+ "X-Fern-SDK-Version": "0.0.1-prerelease2692-dev",
901
+ "X-Fern-Runtime": core.RUNTIME.type,
902
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
903
+ },
904
+ contentType: "application/json",
905
+ body: yield serializers.api.thera.bridge.UpdateExternalAccountRequest.jsonOrThrow(request, {
906
+ unrecognizedObjectKeys: "strip",
907
+ }),
908
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
909
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
910
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
911
+ });
912
+ if (_response.ok) {
913
+ return yield serializers.api.thera.bridge.UpdateExternalAccountResponse.parseOrThrow(_response.body, {
914
+ unrecognizedObjectKeys: "passthrough",
915
+ allowUnrecognizedUnionMembers: true,
916
+ allowUnrecognizedEnumValues: true,
917
+ skipValidation: true,
918
+ breadcrumbsPrefix: ["response"],
919
+ });
920
+ }
921
+ if (_response.error.reason === "status-code") {
922
+ throw new errors.TheraApiError({
923
+ statusCode: _response.error.statusCode,
924
+ body: _response.error.body,
925
+ });
926
+ }
927
+ switch (_response.error.reason) {
928
+ case "non-json":
929
+ throw new errors.TheraApiError({
930
+ statusCode: _response.error.statusCode,
931
+ body: _response.error.rawBody,
932
+ });
933
+ case "timeout":
934
+ throw new errors.TheraApiTimeoutError();
935
+ case "unknown":
936
+ throw new errors.TheraApiError({
937
+ message: _response.error.errorMessage,
938
+ });
939
+ }
940
+ });
941
+ }
942
+ /**
943
+ * Unlinks an external crypto account from a customer.
944
+ *
945
+ * @param {string} accountId
946
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
947
+ *
948
+ * @example
949
+ * await client.api.thera.bridge.bridgeApi.unlinkExternalAccount("string")
950
+ */
951
+ unlinkExternalAccount(accountId, requestOptions) {
952
+ return __awaiter(this, void 0, void 0, function* () {
953
+ const _response = yield core.fetcher({
954
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `external-accounts/${encodeURIComponent(accountId)}`),
955
+ method: "DELETE",
956
+ headers: {
957
+ Authorization: yield this._getAuthorizationHeader(),
958
+ "X-Fern-Language": "JavaScript",
959
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
960
+ "X-Fern-SDK-Version": "0.0.1-prerelease2692-dev",
961
+ "X-Fern-Runtime": core.RUNTIME.type,
962
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
963
+ },
964
+ contentType: "application/json",
965
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
966
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
967
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
968
+ });
969
+ if (_response.ok) {
970
+ return;
971
+ }
972
+ if (_response.error.reason === "status-code") {
973
+ throw new errors.TheraApiError({
974
+ statusCode: _response.error.statusCode,
975
+ body: _response.error.body,
976
+ });
977
+ }
978
+ switch (_response.error.reason) {
979
+ case "non-json":
980
+ throw new errors.TheraApiError({
981
+ statusCode: _response.error.statusCode,
982
+ body: _response.error.rawBody,
983
+ });
984
+ case "timeout":
985
+ throw new errors.TheraApiTimeoutError();
986
+ case "unknown":
987
+ throw new errors.TheraApiError({
988
+ message: _response.error.errorMessage,
989
+ });
990
+ }
991
+ });
992
+ }
993
+ /**
994
+ * Reactivates a previously unlinked external account.
995
+ *
996
+ * @param {string} accountId
997
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
998
+ *
999
+ * @example
1000
+ * await client.api.thera.bridge.bridgeApi.reactivateExternalAccount("string")
1001
+ */
1002
+ reactivateExternalAccount(accountId, requestOptions) {
1003
+ return __awaiter(this, void 0, void 0, function* () {
1004
+ const _response = yield core.fetcher({
1005
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `external-accounts/${encodeURIComponent(accountId)}/reactivate`),
1006
+ method: "POST",
1007
+ headers: {
1008
+ Authorization: yield this._getAuthorizationHeader(),
1009
+ "X-Fern-Language": "JavaScript",
1010
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
1011
+ "X-Fern-SDK-Version": "0.0.1-prerelease2692-dev",
1012
+ "X-Fern-Runtime": core.RUNTIME.type,
1013
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1014
+ },
1015
+ contentType: "application/json",
1016
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1017
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1018
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1019
+ });
1020
+ if (_response.ok) {
1021
+ return;
1022
+ }
1023
+ if (_response.error.reason === "status-code") {
1024
+ throw new errors.TheraApiError({
1025
+ statusCode: _response.error.statusCode,
1026
+ body: _response.error.body,
1027
+ });
1028
+ }
1029
+ switch (_response.error.reason) {
1030
+ case "non-json":
1031
+ throw new errors.TheraApiError({
1032
+ statusCode: _response.error.statusCode,
1033
+ body: _response.error.rawBody,
1034
+ });
1035
+ case "timeout":
1036
+ throw new errors.TheraApiTimeoutError();
1037
+ case "unknown":
1038
+ throw new errors.TheraApiError({
1039
+ message: _response.error.errorMessage,
1040
+ });
1041
+ }
1042
+ });
1043
+ }
1044
+ /**
1045
+ * Initiates a transfer transaction between accounts.
1046
+ *
1047
+ * @param {TheraApi.api.thera.bridge.Transfer} request
1048
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
1049
+ *
1050
+ * @example
1051
+ * await client.api.thera.bridge.bridgeApi.createTransfer({
1052
+ * clientReferenceId: "string",
1053
+ * amount: "string",
1054
+ * onBehalfOf: "string",
1055
+ * developerFee: "string",
1056
+ * source: {
1057
+ * currency: "string",
1058
+ * paymentRail: "string",
1059
+ * externalAccountId: "string",
1060
+ * bridgeWalletId: "string",
1061
+ * fromAddress: "string"
1062
+ * },
1063
+ * destination: {
1064
+ * currency: "string",
1065
+ * paymentRail: "string",
1066
+ * externalAccountId: "string",
1067
+ * bridgeWalletId: "string",
1068
+ * toAddress: "string",
1069
+ * wireMessage: "string",
1070
+ * sepaReference: "string",
1071
+ * swiftReference: "string",
1072
+ * swiftCharges: "string",
1073
+ * achReference: "string"
1074
+ * }
1075
+ * })
1076
+ */
1077
+ createTransfer(request, requestOptions) {
1078
+ return __awaiter(this, void 0, void 0, function* () {
1079
+ const _response = yield core.fetcher({
1080
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "transfers"),
1081
+ method: "POST",
1082
+ headers: {
1083
+ Authorization: yield this._getAuthorizationHeader(),
1084
+ "X-Fern-Language": "JavaScript",
1085
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
1086
+ "X-Fern-SDK-Version": "0.0.1-prerelease2692-dev",
1087
+ "X-Fern-Runtime": core.RUNTIME.type,
1088
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1089
+ },
1090
+ contentType: "application/json",
1091
+ body: yield serializers.api.thera.bridge.Transfer.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1092
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1093
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1094
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1095
+ });
1096
+ if (_response.ok) {
1097
+ return yield serializers.api.thera.bridge.TransferFundsResponse.parseOrThrow(_response.body, {
1098
+ unrecognizedObjectKeys: "passthrough",
1099
+ allowUnrecognizedUnionMembers: true,
1100
+ allowUnrecognizedEnumValues: true,
1101
+ skipValidation: true,
1102
+ breadcrumbsPrefix: ["response"],
1103
+ });
1104
+ }
1105
+ if (_response.error.reason === "status-code") {
1106
+ throw new errors.TheraApiError({
1107
+ statusCode: _response.error.statusCode,
1108
+ body: _response.error.body,
1109
+ });
1110
+ }
1111
+ switch (_response.error.reason) {
1112
+ case "non-json":
1113
+ throw new errors.TheraApiError({
1114
+ statusCode: _response.error.statusCode,
1115
+ body: _response.error.rawBody,
1116
+ });
1117
+ case "timeout":
1118
+ throw new errors.TheraApiTimeoutError();
1119
+ case "unknown":
1120
+ throw new errors.TheraApiError({
1121
+ message: _response.error.errorMessage,
1122
+ });
1123
+ }
1124
+ });
1125
+ }
1126
+ /**
1127
+ * Retrieve details of a specific transfer.
1128
+ *
1129
+ * @param {string} transactionId
1130
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
1131
+ *
1132
+ * @example
1133
+ * await client.api.thera.bridge.bridgeApi.getTransferDetails("string")
1134
+ */
1135
+ getTransferDetails(transactionId, requestOptions) {
1136
+ return __awaiter(this, void 0, void 0, function* () {
1137
+ const _response = yield core.fetcher({
1138
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `transfers/${encodeURIComponent(transactionId)}`),
1139
+ method: "GET",
1140
+ headers: {
1141
+ Authorization: yield this._getAuthorizationHeader(),
1142
+ "X-Fern-Language": "JavaScript",
1143
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
1144
+ "X-Fern-SDK-Version": "0.0.1-prerelease2692-dev",
1145
+ "X-Fern-Runtime": core.RUNTIME.type,
1146
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1147
+ },
1148
+ contentType: "application/json",
1149
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1150
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1151
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1152
+ });
1153
+ if (_response.ok) {
1154
+ return yield serializers.api.thera.bridge.TransferDetails.parseOrThrow(_response.body, {
1155
+ unrecognizedObjectKeys: "passthrough",
1156
+ allowUnrecognizedUnionMembers: true,
1157
+ allowUnrecognizedEnumValues: true,
1158
+ skipValidation: true,
1159
+ breadcrumbsPrefix: ["response"],
1160
+ });
1161
+ }
1162
+ if (_response.error.reason === "status-code") {
1163
+ throw new errors.TheraApiError({
1164
+ statusCode: _response.error.statusCode,
1165
+ body: _response.error.body,
1166
+ });
1167
+ }
1168
+ switch (_response.error.reason) {
1169
+ case "non-json":
1170
+ throw new errors.TheraApiError({
1171
+ statusCode: _response.error.statusCode,
1172
+ body: _response.error.rawBody,
1173
+ });
1174
+ case "timeout":
1175
+ throw new errors.TheraApiTimeoutError();
1176
+ case "unknown":
1177
+ throw new errors.TheraApiError({
1178
+ message: _response.error.errorMessage,
1179
+ });
1180
+ }
1181
+ });
1182
+ }
1183
+ /**
1184
+ * Retrieves all transfers.
1185
+ *
1186
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
1187
+ *
1188
+ * @example
1189
+ * await client.api.thera.bridge.bridgeApi.listTransfers()
1190
+ */
1191
+ listTransfers(requestOptions) {
1192
+ return __awaiter(this, void 0, void 0, function* () {
1193
+ const _response = yield core.fetcher({
1194
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "transfers"),
1195
+ method: "GET",
1196
+ headers: {
1197
+ Authorization: yield this._getAuthorizationHeader(),
1198
+ "X-Fern-Language": "JavaScript",
1199
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
1200
+ "X-Fern-SDK-Version": "0.0.1-prerelease2692-dev",
1201
+ "X-Fern-Runtime": core.RUNTIME.type,
1202
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1203
+ },
1204
+ contentType: "application/json",
1205
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1206
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1207
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1208
+ });
1209
+ if (_response.ok) {
1210
+ return yield serializers.api.thera.bridge.bridgeApi.listTransfers.Response.parseOrThrow(_response.body, {
1211
+ unrecognizedObjectKeys: "passthrough",
1212
+ allowUnrecognizedUnionMembers: true,
1213
+ allowUnrecognizedEnumValues: true,
1214
+ skipValidation: true,
1215
+ breadcrumbsPrefix: ["response"],
1216
+ });
1217
+ }
1218
+ if (_response.error.reason === "status-code") {
1219
+ throw new errors.TheraApiError({
1220
+ statusCode: _response.error.statusCode,
1221
+ body: _response.error.body,
1222
+ });
1223
+ }
1224
+ switch (_response.error.reason) {
1225
+ case "non-json":
1226
+ throw new errors.TheraApiError({
1227
+ statusCode: _response.error.statusCode,
1228
+ body: _response.error.rawBody,
1229
+ });
1230
+ case "timeout":
1231
+ throw new errors.TheraApiTimeoutError();
1232
+ case "unknown":
1233
+ throw new errors.TheraApiError({
1234
+ message: _response.error.errorMessage,
1235
+ });
1236
+ }
1237
+ });
1238
+ }
1239
+ _getAuthorizationHeader() {
1240
+ return __awaiter(this, void 0, void 0, function* () {
1241
+ const bearer = yield core.Supplier.get(this._options.token);
1242
+ if (bearer != null) {
1243
+ return `Bearer ${bearer}`;
1244
+ }
1245
+ return undefined;
1246
+ });
1247
+ }
1248
+ }
1249
+ exports.BridgeApi = BridgeApi;