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