@thera-hr/api-sdk 0.0.1-prerelease2691-dev → 0.0.1-prerelease2691-staging

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 (331) 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 +0 -3
  5. package/api/resources/api/resources/thera/client/Client.js +24 -29
  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/company/resources/companyApi/client/Client.js +18 -18
  9. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  10. package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  11. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  12. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  13. package/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  14. package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  15. package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  16. package/api/resources/api/resources/thera/resources/index.d.ts +0 -1
  17. package/api/resources/api/resources/thera/resources/index.js +1 -2
  18. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +6 -6
  19. package/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  20. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  21. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  22. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  23. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  24. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  25. package/api/resources/db/resources/migrations/types/LedgerMigrationMetadata.d.ts +4 -1
  26. package/api/resources/db/resources/migrations/types/LedgerTrxStatus.d.ts +9 -0
  27. package/api/resources/{api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js → db/resources/migrations/types/LedgerTrxStatus.js} +6 -0
  28. package/api/resources/db/resources/migrations/types/index.d.ts +1 -0
  29. package/api/resources/db/resources/migrations/types/index.js +1 -0
  30. package/api/resources/db/resources/user/types/index.d.ts +0 -1
  31. package/api/resources/db/resources/user/types/index.js +0 -1
  32. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  33. package/dist/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  34. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  35. package/dist/api/resources/api/resources/thera/client/Client.d.ts +0 -3
  36. package/dist/api/resources/api/resources/thera/client/Client.js +24 -29
  37. package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  38. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +32 -32
  39. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  40. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  41. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  42. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  43. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  44. package/dist/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  45. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  46. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  47. package/dist/api/resources/api/resources/thera/resources/index.d.ts +0 -1
  48. package/dist/api/resources/api/resources/thera/resources/index.js +1 -2
  49. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +6 -6
  50. package/dist/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  51. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  52. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  53. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  54. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  55. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  56. package/dist/api/resources/db/resources/migrations/types/LedgerMigrationMetadata.d.ts +4 -1
  57. package/dist/api/resources/db/resources/migrations/types/LedgerTrxStatus.d.ts +9 -0
  58. package/{api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js → dist/api/resources/db/resources/migrations/types/LedgerTrxStatus.js} +6 -0
  59. package/dist/api/resources/db/resources/migrations/types/index.d.ts +1 -0
  60. package/dist/api/resources/db/resources/migrations/types/index.js +1 -0
  61. package/dist/api/resources/db/resources/user/types/index.d.ts +0 -1
  62. package/dist/api/resources/db/resources/user/types/index.js +0 -1
  63. package/dist/serialization/resources/api/resources/thera/resources/index.d.ts +0 -1
  64. package/dist/serialization/resources/api/resources/thera/resources/index.js +1 -2
  65. package/dist/serialization/resources/db/resources/migrations/types/LedgerMigrationMetadata.d.ts +3 -0
  66. package/dist/serialization/resources/db/resources/migrations/types/LedgerMigrationMetadata.js +4 -1
  67. package/dist/serialization/resources/db/resources/migrations/types/LedgerTrxStatus.d.ts +10 -0
  68. package/dist/serialization/resources/db/resources/{user/types/BridgeUserDetails.js → migrations/types/LedgerTrxStatus.js} +2 -5
  69. package/dist/serialization/resources/db/resources/migrations/types/index.d.ts +1 -0
  70. package/dist/serialization/resources/db/resources/migrations/types/index.js +1 -0
  71. package/dist/serialization/resources/db/resources/user/types/index.d.ts +0 -1
  72. package/dist/serialization/resources/db/resources/user/types/index.js +0 -1
  73. package/package.json +1 -1
  74. package/serialization/resources/api/resources/thera/resources/index.d.ts +0 -1
  75. package/serialization/resources/api/resources/thera/resources/index.js +1 -2
  76. package/serialization/resources/db/resources/migrations/types/LedgerMigrationMetadata.d.ts +3 -0
  77. package/serialization/resources/db/resources/migrations/types/LedgerMigrationMetadata.js +4 -1
  78. package/serialization/resources/db/resources/migrations/types/LedgerTrxStatus.d.ts +10 -0
  79. package/serialization/resources/db/resources/{user/types/BridgeUserDetails.js → migrations/types/LedgerTrxStatus.js} +2 -5
  80. package/serialization/resources/db/resources/migrations/types/index.d.ts +1 -0
  81. package/serialization/resources/db/resources/migrations/types/index.js +1 -0
  82. package/serialization/resources/db/resources/user/types/index.d.ts +0 -1
  83. package/serialization/resources/db/resources/user/types/index.js +0 -1
  84. package/api/resources/api/resources/thera/resources/bridge/client/Client.d.ts +0 -22
  85. package/api/resources/api/resources/thera/resources/bridge/client/Client.js +0 -17
  86. package/api/resources/api/resources/thera/resources/bridge/client/index.d.ts +0 -1
  87. package/api/resources/api/resources/thera/resources/bridge/client/index.js +0 -2
  88. package/api/resources/api/resources/thera/resources/bridge/index.d.ts +0 -2
  89. package/api/resources/api/resources/thera/resources/bridge/index.js +0 -18
  90. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +0 -270
  91. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +0 -1209
  92. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +0 -1
  93. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +0 -17
  94. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +0 -14
  95. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +0 -5
  96. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +0 -18
  97. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +0 -5
  98. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +0 -2
  99. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +0 -2
  100. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +0 -2
  101. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +0 -18
  102. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +0 -11
  103. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +0 -15
  104. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +0 -7
  105. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +0 -5
  106. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +0 -10
  107. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +0 -5
  108. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +0 -12
  109. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +0 -5
  110. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +0 -7
  111. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +0 -5
  112. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +0 -9
  113. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +0 -5
  114. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +0 -8
  115. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +0 -5
  116. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +0 -7
  117. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +0 -5
  118. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +0 -8
  119. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +0 -5
  120. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +0 -6
  121. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +0 -5
  122. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +0 -12
  123. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +0 -5
  124. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +0 -15
  125. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +0 -5
  126. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +0 -12
  127. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +0 -5
  128. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +0 -8
  129. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +0 -5
  130. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +0 -10
  131. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +0 -5
  132. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +0 -7
  133. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +0 -5
  134. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +0 -7
  135. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +0 -5
  136. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +0 -10
  137. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +0 -5
  138. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +0 -19
  139. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +0 -35
  140. package/api/resources/api/resources/thera/resources/bridge/resources/index.d.ts +0 -3
  141. package/api/resources/api/resources/thera/resources/bridge/resources/index.js +0 -32
  142. package/api/resources/db/resources/user/types/BridgeUserDetails.d.ts +0 -7
  143. package/api/resources/db/resources/user/types/BridgeUserDetails.js +0 -5
  144. package/dist/api/resources/api/resources/thera/resources/bridge/client/Client.d.ts +0 -22
  145. package/dist/api/resources/api/resources/thera/resources/bridge/client/Client.js +0 -17
  146. package/dist/api/resources/api/resources/thera/resources/bridge/client/index.d.ts +0 -1
  147. package/dist/api/resources/api/resources/thera/resources/bridge/client/index.js +0 -2
  148. package/dist/api/resources/api/resources/thera/resources/bridge/index.d.ts +0 -2
  149. package/dist/api/resources/api/resources/thera/resources/bridge/index.js +0 -18
  150. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +0 -270
  151. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +0 -1209
  152. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +0 -1
  153. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +0 -17
  154. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +0 -14
  155. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +0 -5
  156. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +0 -18
  157. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +0 -5
  158. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +0 -2
  159. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +0 -2
  160. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +0 -2
  161. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +0 -18
  162. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +0 -11
  163. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +0 -5
  164. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +0 -15
  165. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +0 -5
  166. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +0 -7
  167. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +0 -5
  168. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +0 -10
  169. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +0 -5
  170. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +0 -12
  171. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +0 -5
  172. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +0 -7
  173. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +0 -5
  174. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +0 -9
  175. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +0 -5
  176. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +0 -8
  177. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +0 -5
  178. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +0 -7
  179. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +0 -5
  180. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +0 -8
  181. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +0 -5
  182. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +0 -6
  183. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +0 -5
  184. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +0 -12
  185. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +0 -5
  186. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +0 -15
  187. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +0 -5
  188. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +0 -12
  189. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +0 -5
  190. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +0 -8
  191. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +0 -5
  192. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +0 -10
  193. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +0 -5
  194. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +0 -7
  195. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +0 -5
  196. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +0 -7
  197. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +0 -5
  198. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +0 -10
  199. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +0 -5
  200. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +0 -19
  201. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +0 -35
  202. package/dist/api/resources/api/resources/thera/resources/bridge/resources/index.d.ts +0 -3
  203. package/dist/api/resources/api/resources/thera/resources/bridge/resources/index.js +0 -32
  204. package/dist/api/resources/db/resources/user/types/BridgeUserDetails.d.ts +0 -7
  205. package/dist/api/resources/db/resources/user/types/BridgeUserDetails.js +0 -5
  206. package/dist/serialization/resources/api/resources/thera/resources/bridge/index.d.ts +0 -1
  207. package/dist/serialization/resources/api/resources/thera/resources/bridge/index.js +0 -17
  208. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.d.ts +0 -11
  209. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.js +0 -32
  210. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +0 -5
  211. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +0 -34
  212. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.d.ts +0 -11
  213. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.js +0 -32
  214. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.d.ts +0 -11
  215. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.js +0 -32
  216. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.d.ts +0 -11
  217. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.js +0 -32
  218. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +0 -13
  219. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +0 -34
  220. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +0 -15
  221. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +0 -36
  222. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +0 -2
  223. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +0 -7
  224. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +0 -2
  225. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +0 -18
  226. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +0 -17
  227. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +0 -38
  228. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +0 -21
  229. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +0 -42
  230. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +0 -13
  231. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +0 -34
  232. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +0 -16
  233. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +0 -37
  234. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +0 -18
  235. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +0 -39
  236. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +0 -13
  237. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +0 -34
  238. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +0 -15
  239. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +0 -36
  240. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +0 -14
  241. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +0 -35
  242. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +0 -13
  243. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +0 -34
  244. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +0 -14
  245. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +0 -35
  246. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +0 -12
  247. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +0 -33
  248. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +0 -19
  249. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +0 -40
  250. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +0 -21
  251. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +0 -42
  252. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +0 -18
  253. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +0 -39
  254. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +0 -14
  255. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +0 -35
  256. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +0 -16
  257. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +0 -37
  258. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +0 -13
  259. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +0 -34
  260. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +0 -13
  261. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +0 -34
  262. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +0 -16
  263. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +0 -37
  264. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +0 -19
  265. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +0 -35
  266. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/index.d.ts +0 -3
  267. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/index.js +0 -32
  268. package/dist/serialization/resources/db/resources/user/types/BridgeUserDetails.d.ts +0 -13
  269. package/serialization/resources/api/resources/thera/resources/bridge/index.d.ts +0 -1
  270. package/serialization/resources/api/resources/thera/resources/bridge/index.js +0 -17
  271. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.d.ts +0 -11
  272. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.js +0 -32
  273. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +0 -5
  274. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +0 -34
  275. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.d.ts +0 -11
  276. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listExternalAccounts.js +0 -32
  277. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.d.ts +0 -11
  278. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listTransfers.js +0 -32
  279. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.d.ts +0 -11
  280. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.js +0 -32
  281. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +0 -13
  282. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +0 -34
  283. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +0 -15
  284. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +0 -36
  285. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +0 -2
  286. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +0 -7
  287. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +0 -2
  288. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +0 -18
  289. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +0 -17
  290. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +0 -38
  291. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +0 -21
  292. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +0 -42
  293. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +0 -13
  294. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +0 -34
  295. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +0 -16
  296. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +0 -37
  297. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +0 -18
  298. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +0 -39
  299. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +0 -13
  300. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +0 -34
  301. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.d.ts +0 -15
  302. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccountDetails.js +0 -36
  303. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +0 -14
  304. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +0 -35
  305. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +0 -13
  306. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +0 -34
  307. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +0 -14
  308. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +0 -35
  309. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +0 -12
  310. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +0 -33
  311. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.d.ts +0 -19
  312. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Transfer.js +0 -40
  313. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.d.ts +0 -21
  314. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDestination.js +0 -42
  315. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.d.ts +0 -18
  316. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferDetails.js +0 -39
  317. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +0 -14
  318. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +0 -35
  319. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.d.ts +0 -16
  320. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferSource.js +0 -37
  321. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.d.ts +0 -13
  322. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountRequest.js +0 -34
  323. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.d.ts +0 -13
  324. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/UpdateExternalAccountResponse.js +0 -34
  325. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +0 -16
  326. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +0 -37
  327. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +0 -19
  328. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +0 -35
  329. package/serialization/resources/api/resources/thera/resources/bridge/resources/index.d.ts +0 -3
  330. package/serialization/resources/api/resources/thera/resources/bridge/resources/index.js +0 -32
  331. package/serialization/resources/db/resources/user/types/BridgeUserDetails.d.ts +0 -13
@@ -1,1209 +0,0 @@
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;