@thera-hr/api-sdk 0.0.1-prerelease2759-dev-2 → 0.0.1-prerelease2760-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 (345) 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 +312 -0
  15. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +1251 -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 +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/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/eor/resources/eorTrackerApi/client/Client.js +2 -2
  83. package/api/resources/api/resources/thera/resources/index.d.ts +1 -0
  84. package/api/resources/api/resources/thera/resources/index.js +2 -1
  85. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +6 -6
  86. package/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  87. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  88. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  89. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  90. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  91. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  92. package/api/resources/db/resources/user/types/BridgeUserDetails.d.ts +9 -0
  93. package/api/resources/db/resources/user/types/BridgeUserDetails.js +5 -0
  94. package/api/resources/db/resources/user/types/User.d.ts +1 -0
  95. package/api/resources/db/resources/user/types/index.d.ts +1 -0
  96. package/api/resources/db/resources/user/types/index.js +1 -0
  97. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  98. package/dist/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  99. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  100. package/dist/api/resources/api/resources/thera/client/Client.d.ts +3 -0
  101. package/dist/api/resources/api/resources/thera/client/Client.js +31 -26
  102. package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  103. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +33 -33
  104. package/dist/api/resources/api/resources/thera/resources/bridge/client/Client.d.ts +22 -0
  105. package/dist/api/resources/api/resources/thera/resources/bridge/client/Client.js +17 -0
  106. package/dist/api/resources/api/resources/thera/resources/bridge/client/index.d.ts +1 -0
  107. package/dist/api/resources/api/resources/thera/resources/bridge/client/index.js +2 -0
  108. package/dist/api/resources/api/resources/thera/resources/bridge/index.d.ts +2 -0
  109. package/dist/api/resources/api/resources/thera/resources/bridge/index.js +18 -0
  110. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +312 -0
  111. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +1251 -0
  112. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +1 -0
  113. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +17 -0
  114. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +14 -0
  115. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +5 -0
  116. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +18 -0
  117. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +5 -0
  118. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  119. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +2 -0
  120. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  121. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  122. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +11 -0
  123. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +5 -0
  124. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.d.ts +8 -0
  125. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.js +5 -0
  126. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.d.ts +6 -0
  127. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.js +5 -0
  128. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.d.ts +8 -0
  129. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.js +5 -0
  130. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +15 -0
  131. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +5 -0
  132. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +12 -0
  133. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +5 -0
  134. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +10 -0
  135. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +5 -0
  136. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +12 -0
  137. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +5 -0
  138. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +23 -0
  139. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +5 -0
  140. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +23 -0
  141. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +5 -0
  142. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +8 -0
  143. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +5 -0
  144. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +7 -0
  145. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +5 -0
  146. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +8 -0
  147. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +5 -0
  148. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +6 -0
  149. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +5 -0
  150. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +12 -0
  151. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +5 -0
  152. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +15 -0
  153. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +5 -0
  154. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +12 -0
  155. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +5 -0
  156. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +8 -0
  157. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +5 -0
  158. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +10 -0
  159. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +5 -0
  160. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +7 -0
  161. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +5 -0
  162. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +7 -0
  163. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +5 -0
  164. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +10 -0
  165. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +5 -0
  166. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +22 -0
  167. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +38 -0
  168. package/dist/api/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  169. package/dist/api/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  170. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  171. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  172. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  173. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  174. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  175. package/dist/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  176. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  177. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  178. package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +2 -2
  179. package/dist/api/resources/api/resources/thera/resources/index.d.ts +1 -0
  180. package/dist/api/resources/api/resources/thera/resources/index.js +2 -1
  181. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +6 -6
  182. package/dist/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  183. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  184. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  185. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  186. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  187. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  188. package/dist/api/resources/db/resources/user/types/BridgeUserDetails.d.ts +9 -0
  189. package/dist/api/resources/db/resources/user/types/BridgeUserDetails.js +5 -0
  190. package/dist/api/resources/db/resources/user/types/User.d.ts +1 -0
  191. package/dist/api/resources/db/resources/user/types/index.d.ts +1 -0
  192. package/dist/api/resources/db/resources/user/types/index.js +1 -0
  193. package/dist/serialization/resources/api/resources/thera/resources/bridge/index.d.ts +1 -0
  194. package/dist/serialization/resources/api/resources/thera/resources/bridge/index.js +17 -0
  195. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.d.ts +11 -0
  196. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.js +32 -0
  197. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +5 -0
  198. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +34 -0
  199. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.d.ts +11 -0
  200. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.js +32 -0
  201. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.d.ts +11 -0
  202. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.js +32 -0
  203. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.d.ts +11 -0
  204. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.js +32 -0
  205. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +13 -0
  206. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +34 -0
  207. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +15 -0
  208. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +36 -0
  209. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  210. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +7 -0
  211. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  212. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  213. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +17 -0
  214. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +38 -0
  215. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.d.ts +14 -0
  216. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.js +35 -0
  217. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.d.ts +12 -0
  218. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.js +33 -0
  219. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.d.ts +14 -0
  220. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.js +35 -0
  221. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +21 -0
  222. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +42 -0
  223. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +18 -0
  224. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +39 -0
  225. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +16 -0
  226. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +37 -0
  227. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +18 -0
  228. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +39 -0
  229. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +32 -0
  230. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +53 -0
  231. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +32 -0
  232. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +53 -0
  233. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +14 -0
  234. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +35 -0
  235. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +13 -0
  236. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +34 -0
  237. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +14 -0
  238. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +35 -0
  239. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +12 -0
  240. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +33 -0
  241. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +19 -0
  242. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +40 -0
  243. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +21 -0
  244. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +42 -0
  245. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +18 -0
  246. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +39 -0
  247. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +14 -0
  248. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +35 -0
  249. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +16 -0
  250. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +37 -0
  251. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +13 -0
  252. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +34 -0
  253. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +13 -0
  254. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +34 -0
  255. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +16 -0
  256. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +37 -0
  257. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +22 -0
  258. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +38 -0
  259. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  260. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  261. package/dist/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
  262. package/dist/serialization/resources/api/resources/thera/resources/index.js +2 -1
  263. package/dist/serialization/resources/db/resources/user/types/BridgeUserDetails.d.ts +15 -0
  264. package/dist/serialization/resources/db/resources/user/types/BridgeUserDetails.js +36 -0
  265. package/dist/serialization/resources/db/resources/user/types/User.d.ts +2 -0
  266. package/dist/serialization/resources/db/resources/user/types/User.js +2 -0
  267. package/dist/serialization/resources/db/resources/user/types/index.d.ts +1 -0
  268. package/dist/serialization/resources/db/resources/user/types/index.js +1 -0
  269. package/package.json +1 -1
  270. package/serialization/resources/api/resources/thera/resources/bridge/index.d.ts +1 -0
  271. package/serialization/resources/api/resources/thera/resources/bridge/index.js +17 -0
  272. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.d.ts +11 -0
  273. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.js +32 -0
  274. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +5 -0
  275. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +34 -0
  276. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.d.ts +11 -0
  277. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.js +32 -0
  278. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.d.ts +11 -0
  279. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.js +32 -0
  280. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.d.ts +11 -0
  281. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.js +32 -0
  282. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +13 -0
  283. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +34 -0
  284. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +15 -0
  285. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +36 -0
  286. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +2 -0
  287. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +7 -0
  288. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +2 -0
  289. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +18 -0
  290. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +17 -0
  291. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +38 -0
  292. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.d.ts +14 -0
  293. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeAccountDetails.js +35 -0
  294. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.d.ts +12 -0
  295. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeIbanBankAccount.js +33 -0
  296. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.d.ts +14 -0
  297. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/BridgeSwiftBankAccount.js +35 -0
  298. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +21 -0
  299. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +42 -0
  300. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +18 -0
  301. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +39 -0
  302. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +16 -0
  303. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +37 -0
  304. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +18 -0
  305. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +39 -0
  306. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +32 -0
  307. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +53 -0
  308. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +32 -0
  309. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +53 -0
  310. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +14 -0
  311. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +35 -0
  312. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +13 -0
  313. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +34 -0
  314. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +14 -0
  315. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +35 -0
  316. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +12 -0
  317. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +33 -0
  318. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +19 -0
  319. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +40 -0
  320. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +21 -0
  321. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +42 -0
  322. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +18 -0
  323. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +39 -0
  324. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +14 -0
  325. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +35 -0
  326. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +16 -0
  327. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +37 -0
  328. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +13 -0
  329. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +34 -0
  330. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +13 -0
  331. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +34 -0
  332. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +16 -0
  333. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +37 -0
  334. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +22 -0
  335. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +38 -0
  336. package/serialization/resources/api/resources/thera/resources/bridge/resources/index.d.ts +3 -0
  337. package/serialization/resources/api/resources/thera/resources/bridge/resources/index.js +32 -0
  338. package/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
  339. package/serialization/resources/api/resources/thera/resources/index.js +2 -1
  340. package/serialization/resources/db/resources/user/types/BridgeUserDetails.d.ts +15 -0
  341. package/serialization/resources/db/resources/user/types/BridgeUserDetails.js +36 -0
  342. package/serialization/resources/db/resources/user/types/User.d.ts +2 -0
  343. package/serialization/resources/db/resources/user/types/User.js +2 -0
  344. package/serialization/resources/db/resources/user/types/index.d.ts +1 -0
  345. package/serialization/resources/db/resources/user/types/index.js +1 -0
@@ -0,0 +1,1251 @@
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-prerelease2760-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-prerelease2760-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-prerelease2760-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-prerelease2760-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-prerelease2760-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-prerelease2760-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-prerelease2760-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
+ * customerId: "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-prerelease2760-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-prerelease2760-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-prerelease2760-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), "/bridge/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-prerelease2760-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), `/bridge/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-prerelease2760-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 {string} customerId
826
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
827
+ *
828
+ * @example
829
+ * await client.api.thera.bridge.bridgeApi.listExternalAccounts("string")
830
+ */
831
+ listExternalAccounts(customerId, requestOptions) {
832
+ return __awaiter(this, void 0, void 0, function* () {
833
+ const _response = yield core.fetcher({
834
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/${encodeURIComponent(customerId)}/external-accounts`),
835
+ method: "GET",
836
+ headers: {
837
+ Authorization: yield this._getAuthorizationHeader(),
838
+ "X-Fern-Language": "JavaScript",
839
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
840
+ "X-Fern-SDK-Version": "0.0.1-prerelease2760-dev",
841
+ "X-Fern-Runtime": core.RUNTIME.type,
842
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
843
+ },
844
+ contentType: "application/json",
845
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
846
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
847
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
848
+ });
849
+ if (_response.ok) {
850
+ return yield serializers.api.thera.bridge.bridgeApi.listExternalAccounts.Response.parseOrThrow(_response.body, {
851
+ unrecognizedObjectKeys: "passthrough",
852
+ allowUnrecognizedUnionMembers: true,
853
+ allowUnrecognizedEnumValues: true,
854
+ skipValidation: true,
855
+ breadcrumbsPrefix: ["response"],
856
+ });
857
+ }
858
+ if (_response.error.reason === "status-code") {
859
+ throw new errors.TheraApiError({
860
+ statusCode: _response.error.statusCode,
861
+ body: _response.error.body,
862
+ });
863
+ }
864
+ switch (_response.error.reason) {
865
+ case "non-json":
866
+ throw new errors.TheraApiError({
867
+ statusCode: _response.error.statusCode,
868
+ body: _response.error.rawBody,
869
+ });
870
+ case "timeout":
871
+ throw new errors.TheraApiTimeoutError();
872
+ case "unknown":
873
+ throw new errors.TheraApiError({
874
+ message: _response.error.errorMessage,
875
+ });
876
+ }
877
+ });
878
+ }
879
+ /**
880
+ * Update details of a linked external account.
881
+ *
882
+ * @param {string} accountId
883
+ * @param {TheraApi.api.thera.bridge.UpdateExternalAccountRequest} request
884
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
885
+ *
886
+ * @example
887
+ * await client.api.thera.bridge.bridgeApi.updateExternalAccount("string", {
888
+ * nickname: "string",
889
+ * accountStatus: "string"
890
+ * })
891
+ */
892
+ updateExternalAccount(accountId, request, requestOptions) {
893
+ return __awaiter(this, void 0, void 0, function* () {
894
+ const _response = yield core.fetcher({
895
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/external-accounts/${encodeURIComponent(accountId)}`),
896
+ method: "PUT",
897
+ headers: {
898
+ Authorization: yield this._getAuthorizationHeader(),
899
+ "X-Fern-Language": "JavaScript",
900
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
901
+ "X-Fern-SDK-Version": "0.0.1-prerelease2760-dev",
902
+ "X-Fern-Runtime": core.RUNTIME.type,
903
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
904
+ },
905
+ contentType: "application/json",
906
+ body: yield serializers.api.thera.bridge.UpdateExternalAccountRequest.jsonOrThrow(request, {
907
+ unrecognizedObjectKeys: "strip",
908
+ }),
909
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
910
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
911
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
912
+ });
913
+ if (_response.ok) {
914
+ return yield serializers.api.thera.bridge.UpdateExternalAccountResponse.parseOrThrow(_response.body, {
915
+ unrecognizedObjectKeys: "passthrough",
916
+ allowUnrecognizedUnionMembers: true,
917
+ allowUnrecognizedEnumValues: true,
918
+ skipValidation: true,
919
+ breadcrumbsPrefix: ["response"],
920
+ });
921
+ }
922
+ if (_response.error.reason === "status-code") {
923
+ throw new errors.TheraApiError({
924
+ statusCode: _response.error.statusCode,
925
+ body: _response.error.body,
926
+ });
927
+ }
928
+ switch (_response.error.reason) {
929
+ case "non-json":
930
+ throw new errors.TheraApiError({
931
+ statusCode: _response.error.statusCode,
932
+ body: _response.error.rawBody,
933
+ });
934
+ case "timeout":
935
+ throw new errors.TheraApiTimeoutError();
936
+ case "unknown":
937
+ throw new errors.TheraApiError({
938
+ message: _response.error.errorMessage,
939
+ });
940
+ }
941
+ });
942
+ }
943
+ /**
944
+ * Unlinks an external crypto account from a customer.
945
+ *
946
+ * @param {string} accountId
947
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
948
+ *
949
+ * @example
950
+ * await client.api.thera.bridge.bridgeApi.unlinkExternalAccount("string")
951
+ */
952
+ unlinkExternalAccount(accountId, requestOptions) {
953
+ return __awaiter(this, void 0, void 0, function* () {
954
+ const _response = yield core.fetcher({
955
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/external-accounts/${encodeURIComponent(accountId)}`),
956
+ method: "DELETE",
957
+ headers: {
958
+ Authorization: yield this._getAuthorizationHeader(),
959
+ "X-Fern-Language": "JavaScript",
960
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
961
+ "X-Fern-SDK-Version": "0.0.1-prerelease2760-dev",
962
+ "X-Fern-Runtime": core.RUNTIME.type,
963
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
964
+ },
965
+ contentType: "application/json",
966
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
967
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
968
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
969
+ });
970
+ if (_response.ok) {
971
+ return;
972
+ }
973
+ if (_response.error.reason === "status-code") {
974
+ throw new errors.TheraApiError({
975
+ statusCode: _response.error.statusCode,
976
+ body: _response.error.body,
977
+ });
978
+ }
979
+ switch (_response.error.reason) {
980
+ case "non-json":
981
+ throw new errors.TheraApiError({
982
+ statusCode: _response.error.statusCode,
983
+ body: _response.error.rawBody,
984
+ });
985
+ case "timeout":
986
+ throw new errors.TheraApiTimeoutError();
987
+ case "unknown":
988
+ throw new errors.TheraApiError({
989
+ message: _response.error.errorMessage,
990
+ });
991
+ }
992
+ });
993
+ }
994
+ /**
995
+ * Reactivates a previously unlinked external account.
996
+ *
997
+ * @param {string} accountId
998
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
999
+ *
1000
+ * @example
1001
+ * await client.api.thera.bridge.bridgeApi.reactivateExternalAccount("string")
1002
+ */
1003
+ reactivateExternalAccount(accountId, requestOptions) {
1004
+ return __awaiter(this, void 0, void 0, function* () {
1005
+ const _response = yield core.fetcher({
1006
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/external-accounts/${encodeURIComponent(accountId)}/reactivate`),
1007
+ method: "POST",
1008
+ headers: {
1009
+ Authorization: yield this._getAuthorizationHeader(),
1010
+ "X-Fern-Language": "JavaScript",
1011
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
1012
+ "X-Fern-SDK-Version": "0.0.1-prerelease2760-dev",
1013
+ "X-Fern-Runtime": core.RUNTIME.type,
1014
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1015
+ },
1016
+ contentType: "application/json",
1017
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1018
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1019
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1020
+ });
1021
+ if (_response.ok) {
1022
+ return;
1023
+ }
1024
+ if (_response.error.reason === "status-code") {
1025
+ throw new errors.TheraApiError({
1026
+ statusCode: _response.error.statusCode,
1027
+ body: _response.error.body,
1028
+ });
1029
+ }
1030
+ switch (_response.error.reason) {
1031
+ case "non-json":
1032
+ throw new errors.TheraApiError({
1033
+ statusCode: _response.error.statusCode,
1034
+ body: _response.error.rawBody,
1035
+ });
1036
+ case "timeout":
1037
+ throw new errors.TheraApiTimeoutError();
1038
+ case "unknown":
1039
+ throw new errors.TheraApiError({
1040
+ message: _response.error.errorMessage,
1041
+ });
1042
+ }
1043
+ });
1044
+ }
1045
+ /**
1046
+ * Initiates a transfer transaction between accounts.
1047
+ *
1048
+ * @param {TheraApi.api.thera.bridge.Transfer} request
1049
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
1050
+ *
1051
+ * @example
1052
+ * await client.api.thera.bridge.bridgeApi.createTransfer({
1053
+ * clientReferenceId: "string",
1054
+ * amount: "string",
1055
+ * onBehalfOf: "string",
1056
+ * developerFee: "string",
1057
+ * source: {
1058
+ * currency: "string",
1059
+ * paymentRail: "string",
1060
+ * externalAccountId: "string",
1061
+ * bridgeWalletId: "string",
1062
+ * fromAddress: "string"
1063
+ * },
1064
+ * destination: {
1065
+ * currency: "string",
1066
+ * paymentRail: "string",
1067
+ * externalAccountId: "string",
1068
+ * bridgeWalletId: "string",
1069
+ * toAddress: "string",
1070
+ * wireMessage: "string",
1071
+ * sepaReference: "string",
1072
+ * swiftReference: "string",
1073
+ * swiftCharges: "string",
1074
+ * achReference: "string"
1075
+ * }
1076
+ * })
1077
+ */
1078
+ createTransfer(request, requestOptions) {
1079
+ return __awaiter(this, void 0, void 0, function* () {
1080
+ const _response = yield core.fetcher({
1081
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/bridge/transfers"),
1082
+ method: "POST",
1083
+ headers: {
1084
+ Authorization: yield this._getAuthorizationHeader(),
1085
+ "X-Fern-Language": "JavaScript",
1086
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
1087
+ "X-Fern-SDK-Version": "0.0.1-prerelease2760-dev",
1088
+ "X-Fern-Runtime": core.RUNTIME.type,
1089
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1090
+ },
1091
+ contentType: "application/json",
1092
+ body: yield serializers.api.thera.bridge.Transfer.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1093
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1094
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1095
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1096
+ });
1097
+ if (_response.ok) {
1098
+ return yield serializers.api.thera.bridge.TransferFundsResponse.parseOrThrow(_response.body, {
1099
+ unrecognizedObjectKeys: "passthrough",
1100
+ allowUnrecognizedUnionMembers: true,
1101
+ allowUnrecognizedEnumValues: true,
1102
+ skipValidation: true,
1103
+ breadcrumbsPrefix: ["response"],
1104
+ });
1105
+ }
1106
+ if (_response.error.reason === "status-code") {
1107
+ throw new errors.TheraApiError({
1108
+ statusCode: _response.error.statusCode,
1109
+ body: _response.error.body,
1110
+ });
1111
+ }
1112
+ switch (_response.error.reason) {
1113
+ case "non-json":
1114
+ throw new errors.TheraApiError({
1115
+ statusCode: _response.error.statusCode,
1116
+ body: _response.error.rawBody,
1117
+ });
1118
+ case "timeout":
1119
+ throw new errors.TheraApiTimeoutError();
1120
+ case "unknown":
1121
+ throw new errors.TheraApiError({
1122
+ message: _response.error.errorMessage,
1123
+ });
1124
+ }
1125
+ });
1126
+ }
1127
+ /**
1128
+ * Retrieve details of a specific transfer.
1129
+ *
1130
+ * @param {string} transactionId
1131
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
1132
+ *
1133
+ * @example
1134
+ * await client.api.thera.bridge.bridgeApi.getTransferDetails("string")
1135
+ */
1136
+ getTransferDetails(transactionId, requestOptions) {
1137
+ return __awaiter(this, void 0, void 0, function* () {
1138
+ const _response = yield core.fetcher({
1139
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/transfers/${encodeURIComponent(transactionId)}`),
1140
+ method: "GET",
1141
+ headers: {
1142
+ Authorization: yield this._getAuthorizationHeader(),
1143
+ "X-Fern-Language": "JavaScript",
1144
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
1145
+ "X-Fern-SDK-Version": "0.0.1-prerelease2760-dev",
1146
+ "X-Fern-Runtime": core.RUNTIME.type,
1147
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1148
+ },
1149
+ contentType: "application/json",
1150
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1151
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1152
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1153
+ });
1154
+ if (_response.ok) {
1155
+ return yield serializers.api.thera.bridge.TransferDetails.parseOrThrow(_response.body, {
1156
+ unrecognizedObjectKeys: "passthrough",
1157
+ allowUnrecognizedUnionMembers: true,
1158
+ allowUnrecognizedEnumValues: true,
1159
+ skipValidation: true,
1160
+ breadcrumbsPrefix: ["response"],
1161
+ });
1162
+ }
1163
+ if (_response.error.reason === "status-code") {
1164
+ throw new errors.TheraApiError({
1165
+ statusCode: _response.error.statusCode,
1166
+ body: _response.error.body,
1167
+ });
1168
+ }
1169
+ switch (_response.error.reason) {
1170
+ case "non-json":
1171
+ throw new errors.TheraApiError({
1172
+ statusCode: _response.error.statusCode,
1173
+ body: _response.error.rawBody,
1174
+ });
1175
+ case "timeout":
1176
+ throw new errors.TheraApiTimeoutError();
1177
+ case "unknown":
1178
+ throw new errors.TheraApiError({
1179
+ message: _response.error.errorMessage,
1180
+ });
1181
+ }
1182
+ });
1183
+ }
1184
+ /**
1185
+ * Retrieves all transfers.
1186
+ *
1187
+ * @param {string} customerId
1188
+ * @param {BridgeApi.RequestOptions} requestOptions - Request-specific configuration.
1189
+ *
1190
+ * @example
1191
+ * await client.api.thera.bridge.bridgeApi.listTransfers("string")
1192
+ */
1193
+ listTransfers(customerId, requestOptions) {
1194
+ return __awaiter(this, void 0, void 0, function* () {
1195
+ const _response = yield core.fetcher({
1196
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/bridge/${encodeURIComponent(customerId)}/transfers`),
1197
+ method: "GET",
1198
+ headers: {
1199
+ Authorization: yield this._getAuthorizationHeader(),
1200
+ "X-Fern-Language": "JavaScript",
1201
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
1202
+ "X-Fern-SDK-Version": "0.0.1-prerelease2760-dev",
1203
+ "X-Fern-Runtime": core.RUNTIME.type,
1204
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1205
+ },
1206
+ contentType: "application/json",
1207
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1208
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1209
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1210
+ });
1211
+ if (_response.ok) {
1212
+ return yield serializers.api.thera.bridge.bridgeApi.listTransfers.Response.parseOrThrow(_response.body, {
1213
+ unrecognizedObjectKeys: "passthrough",
1214
+ allowUnrecognizedUnionMembers: true,
1215
+ allowUnrecognizedEnumValues: true,
1216
+ skipValidation: true,
1217
+ breadcrumbsPrefix: ["response"],
1218
+ });
1219
+ }
1220
+ if (_response.error.reason === "status-code") {
1221
+ throw new errors.TheraApiError({
1222
+ statusCode: _response.error.statusCode,
1223
+ body: _response.error.body,
1224
+ });
1225
+ }
1226
+ switch (_response.error.reason) {
1227
+ case "non-json":
1228
+ throw new errors.TheraApiError({
1229
+ statusCode: _response.error.statusCode,
1230
+ body: _response.error.rawBody,
1231
+ });
1232
+ case "timeout":
1233
+ throw new errors.TheraApiTimeoutError();
1234
+ case "unknown":
1235
+ throw new errors.TheraApiError({
1236
+ message: _response.error.errorMessage,
1237
+ });
1238
+ }
1239
+ });
1240
+ }
1241
+ _getAuthorizationHeader() {
1242
+ return __awaiter(this, void 0, void 0, function* () {
1243
+ const bearer = yield core.Supplier.get(this._options.token);
1244
+ if (bearer != null) {
1245
+ return `Bearer ${bearer}`;
1246
+ }
1247
+ return undefined;
1248
+ });
1249
+ }
1250
+ }
1251
+ exports.BridgeApi = BridgeApi;