@thera-hr/api-sdk 0.0.1-prerelease2682-dev → 0.0.1-prerelease2682-dev-2

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 (261) 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.d.ts +12 -0
  19. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +66 -5
  20. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/AutoWithdrawalCronRequest.d.ts +12 -0
  21. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/index.d.ts +1 -0
  22. package/api/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.d.ts +1 -2
  23. package/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  24. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  25. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  26. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  27. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  28. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  29. package/api/resources/db/resources/user/types/index.d.ts +0 -1
  30. package/api/resources/db/resources/user/types/index.js +0 -1
  31. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  32. package/dist/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  33. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  34. package/dist/api/resources/api/resources/thera/client/Client.d.ts +0 -3
  35. package/dist/api/resources/api/resources/thera/client/Client.js +24 -29
  36. package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  37. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +32 -32
  38. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  39. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  40. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  41. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  42. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  43. package/dist/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  44. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  45. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  46. package/dist/api/resources/api/resources/thera/resources/index.d.ts +0 -1
  47. package/dist/api/resources/api/resources/thera/resources/index.js +1 -2
  48. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.d.ts +12 -0
  49. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +66 -5
  50. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/AutoWithdrawalCronRequest.d.ts +12 -0
  51. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/index.d.ts +1 -0
  52. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.d.ts +1 -2
  53. package/dist/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  54. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  55. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  56. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  57. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  58. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  59. package/dist/api/resources/db/resources/user/types/index.d.ts +0 -1
  60. package/dist/api/resources/db/resources/user/types/index.js +0 -1
  61. package/dist/serialization/resources/api/resources/thera/resources/index.d.ts +0 -1
  62. package/dist/serialization/resources/api/resources/thera/resources/index.js +1 -2
  63. package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.d.ts +1 -2
  64. package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.js +1 -2
  65. package/dist/serialization/resources/db/resources/user/types/index.d.ts +0 -1
  66. package/dist/serialization/resources/db/resources/user/types/index.js +0 -1
  67. package/package.json +1 -1
  68. package/serialization/resources/api/resources/thera/resources/index.d.ts +0 -1
  69. package/serialization/resources/api/resources/thera/resources/index.js +1 -2
  70. package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.d.ts +1 -2
  71. package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.js +1 -2
  72. package/serialization/resources/db/resources/user/types/index.d.ts +0 -1
  73. package/serialization/resources/db/resources/user/types/index.js +0 -1
  74. package/api/resources/api/resources/thera/resources/bridge/client/Client.d.ts +0 -22
  75. package/api/resources/api/resources/thera/resources/bridge/client/Client.js +0 -17
  76. package/api/resources/api/resources/thera/resources/bridge/client/index.d.ts +0 -1
  77. package/api/resources/api/resources/thera/resources/bridge/client/index.js +0 -2
  78. package/api/resources/api/resources/thera/resources/bridge/index.d.ts +0 -2
  79. package/api/resources/api/resources/thera/resources/bridge/index.js +0 -18
  80. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +0 -164
  81. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +0 -735
  82. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +0 -1
  83. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +0 -17
  84. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +0 -14
  85. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +0 -18
  86. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +0 -2
  87. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +0 -2
  88. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +0 -2
  89. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +0 -18
  90. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +0 -11
  91. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +0 -5
  92. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +0 -15
  93. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +0 -5
  94. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +0 -7
  95. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +0 -5
  96. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +0 -10
  97. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +0 -5
  98. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +0 -12
  99. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +0 -5
  100. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +0 -7
  101. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +0 -5
  102. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +0 -6
  103. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +0 -5
  104. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +0 -7
  105. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +0 -5
  106. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +0 -8
  107. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +0 -5
  108. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +0 -6
  109. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +0 -5
  110. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +0 -8
  111. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +0 -5
  112. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +0 -10
  113. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +0 -5
  114. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +0 -12
  115. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +0 -28
  116. package/api/resources/api/resources/thera/resources/bridge/resources/index.d.ts +0 -3
  117. package/api/resources/api/resources/thera/resources/bridge/resources/index.js +0 -32
  118. package/api/resources/db/resources/user/types/BridgeUserDetails.d.ts +0 -7
  119. package/api/resources/db/resources/user/types/BridgeUserDetails.js +0 -5
  120. package/dist/api/resources/api/resources/thera/resources/bridge/client/Client.d.ts +0 -22
  121. package/dist/api/resources/api/resources/thera/resources/bridge/client/Client.js +0 -17
  122. package/dist/api/resources/api/resources/thera/resources/bridge/client/index.d.ts +0 -1
  123. package/dist/api/resources/api/resources/thera/resources/bridge/client/index.js +0 -2
  124. package/dist/api/resources/api/resources/thera/resources/bridge/index.d.ts +0 -2
  125. package/dist/api/resources/api/resources/thera/resources/bridge/index.js +0 -18
  126. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +0 -164
  127. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +0 -735
  128. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +0 -1
  129. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +0 -17
  130. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +0 -14
  131. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +0 -5
  132. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +0 -18
  133. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +0 -5
  134. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +0 -2
  135. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +0 -2
  136. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +0 -2
  137. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +0 -18
  138. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +0 -11
  139. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +0 -5
  140. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +0 -15
  141. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +0 -5
  142. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +0 -7
  143. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +0 -5
  144. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +0 -10
  145. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +0 -5
  146. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +0 -12
  147. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +0 -5
  148. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +0 -7
  149. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +0 -5
  150. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +0 -6
  151. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +0 -5
  152. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +0 -7
  153. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +0 -5
  154. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +0 -8
  155. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +0 -5
  156. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +0 -6
  157. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +0 -5
  158. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +0 -8
  159. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +0 -5
  160. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +0 -10
  161. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +0 -5
  162. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +0 -12
  163. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +0 -28
  164. package/dist/api/resources/api/resources/thera/resources/bridge/resources/index.d.ts +0 -3
  165. package/dist/api/resources/api/resources/thera/resources/bridge/resources/index.js +0 -32
  166. package/dist/api/resources/db/resources/user/types/BridgeUserDetails.d.ts +0 -7
  167. package/dist/api/resources/db/resources/user/types/BridgeUserDetails.js +0 -5
  168. package/dist/serialization/resources/api/resources/thera/resources/bridge/index.d.ts +0 -1
  169. package/dist/serialization/resources/api/resources/thera/resources/bridge/index.js +0 -17
  170. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.d.ts +0 -11
  171. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.js +0 -32
  172. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +0 -3
  173. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +0 -32
  174. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.d.ts +0 -11
  175. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.js +0 -32
  176. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +0 -13
  177. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +0 -34
  178. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +0 -15
  179. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +0 -36
  180. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +0 -2
  181. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +0 -7
  182. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +0 -2
  183. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +0 -18
  184. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +0 -17
  185. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +0 -38
  186. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +0 -21
  187. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +0 -42
  188. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +0 -13
  189. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +0 -34
  190. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +0 -16
  191. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +0 -37
  192. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +0 -18
  193. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +0 -39
  194. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +0 -13
  195. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +0 -34
  196. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +0 -12
  197. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +0 -33
  198. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +0 -13
  199. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +0 -34
  200. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +0 -14
  201. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +0 -35
  202. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +0 -12
  203. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +0 -33
  204. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +0 -14
  205. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +0 -35
  206. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +0 -16
  207. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +0 -37
  208. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +0 -12
  209. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +0 -28
  210. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/index.d.ts +0 -3
  211. package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/index.js +0 -32
  212. package/dist/serialization/resources/db/resources/user/types/BridgeUserDetails.d.ts +0 -13
  213. package/dist/serialization/resources/db/resources/user/types/BridgeUserDetails.js +0 -34
  214. package/serialization/resources/api/resources/thera/resources/bridge/index.d.ts +0 -1
  215. package/serialization/resources/api/resources/thera/resources/bridge/index.js +0 -17
  216. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.d.ts +0 -11
  217. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/getAllCustomers.js +0 -32
  218. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.d.ts +0 -3
  219. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/index.js +0 -32
  220. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.d.ts +0 -11
  221. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/listWallets.js +0 -32
  222. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.d.ts +0 -13
  223. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js +0 -34
  224. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.d.ts +0 -15
  225. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js +0 -36
  226. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.d.ts +0 -2
  227. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/index.js +0 -7
  228. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.d.ts +0 -2
  229. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/index.js +0 -18
  230. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.d.ts +0 -17
  231. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/Address.js +0 -38
  232. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.d.ts +0 -21
  233. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomer.js +0 -42
  234. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.d.ts +0 -13
  235. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CreateCustomerResponse.js +0 -34
  236. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.d.ts +0 -16
  237. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CryptoPayout.js +0 -37
  238. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.d.ts +0 -18
  239. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/CustomerDetails.js +0 -39
  240. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +0 -13
  241. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +0 -34
  242. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.d.ts +0 -12
  243. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/LinkExternalAccountResponse.js +0 -33
  244. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.d.ts +0 -13
  245. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutResponse.js +0 -34
  246. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.d.ts +0 -14
  247. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/PayoutStatus.js +0 -35
  248. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.d.ts +0 -12
  249. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TosLinkResponse.js +0 -33
  250. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.d.ts +0 -14
  251. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/TransferFundsResponse.js +0 -35
  252. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.d.ts +0 -16
  253. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/WalletDetails.js +0 -37
  254. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.d.ts +0 -12
  255. package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/index.js +0 -28
  256. package/serialization/resources/api/resources/thera/resources/bridge/resources/index.d.ts +0 -3
  257. package/serialization/resources/api/resources/thera/resources/bridge/resources/index.js +0 -32
  258. package/serialization/resources/db/resources/user/types/BridgeUserDetails.d.ts +0 -13
  259. package/serialization/resources/db/resources/user/types/BridgeUserDetails.js +0 -34
  260. /package/api/resources/api/resources/thera/resources/{bridge/resources/bridgeApi/client/requests/CreateWalletRequest.js → misc/resources/misc/client/requests/AutoWithdrawalCronRequest.js} +0 -0
  261. /package/{api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/requests/TransferFundsRequest.js → dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/AutoWithdrawalCronRequest.js} +0 -0
@@ -1,735 +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-prerelease2682-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-prerelease2682-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-prerelease2682-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-prerelease2682-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-prerelease2682-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-prerelease2682-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-prerelease2682-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-prerelease2682-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-prerelease2682-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-prerelease2682-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-prerelease2682-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
- _getAuthorizationHeader() {
726
- return __awaiter(this, void 0, void 0, function* () {
727
- const bearer = yield core.Supplier.get(this._options.token);
728
- if (bearer != null) {
729
- return `Bearer ${bearer}`;
730
- }
731
- return undefined;
732
- });
733
- }
734
- }
735
- exports.BridgeApi = BridgeApi;