@temboplus/afloat 0.1.80 → 0.2.0-beta.1

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 (413) hide show
  1. package/README.md +246 -42
  2. package/dist/index.cjs.js +2 -0
  3. package/dist/index.cjs.js.map +1 -0
  4. package/dist/index.d.ts +10 -0
  5. package/dist/index.esm.js +2 -0
  6. package/dist/index.esm.js.map +1 -0
  7. package/dist/lib/api/base-repository.d.ts +177 -0
  8. package/dist/lib/api/index.d.ts +1 -0
  9. package/{esm/src/errors/api_error.d.ts → dist/lib/error/error.api.d.ts} +0 -1
  10. package/{script/npm/src/src/errors/permission_error.d.ts → dist/lib/error/error.permission.d.ts} +1 -2
  11. package/dist/lib/error/error.utils.d.ts +22 -0
  12. package/dist/lib/error/index.d.ts +3 -0
  13. package/dist/lib/query/index.d.ts +4 -0
  14. package/dist/lib/query/pagination/pagination.d.ts +73 -0
  15. package/dist/lib/query/pagination/pagination.schemas.d.ts +83 -0
  16. package/dist/lib/query/query.builder.d.ts +75 -0
  17. package/dist/lib/query/query.types.d.ts +36 -0
  18. package/{esm/src/features/auth/contract.d.ts → dist/modules/auth/auth.contract.d.ts} +16 -19
  19. package/dist/modules/auth/auth.repository.d.ts +83 -0
  20. package/dist/modules/auth/company-membership.model.d.ts +171 -0
  21. package/dist/modules/auth/index.d.ts +3 -0
  22. package/dist/modules/auth/user.model.d.ts +363 -0
  23. package/dist/modules/beneficiary/beneficiary-info.model.d.ts +178 -0
  24. package/dist/modules/beneficiary/beneficiary-input-handler.d.ts +16 -0
  25. package/dist/modules/beneficiary/beneficiary.api-contract.d.ts +203 -0
  26. package/dist/modules/beneficiary/beneficiary.dtos.d.ts +84 -0
  27. package/dist/modules/beneficiary/beneficiary.model.d.ts +441 -0
  28. package/dist/modules/beneficiary/beneficiary.repository.d.ts +116 -0
  29. package/dist/modules/beneficiary/index.d.ts +6 -0
  30. package/dist/modules/login/index.d.ts +4 -0
  31. package/dist/modules/login/login.api-contract.d.ts +51 -0
  32. package/dist/modules/login/login.dtos.d.ts +85 -0
  33. package/dist/modules/login/login.model.d.ts +168 -0
  34. package/dist/modules/login/login.repository.d.ts +58 -0
  35. package/{script/npm/src/src/models/permission.d.ts → dist/modules/login/permission.type.d.ts} +8 -9
  36. package/dist/modules/payout/index.d.ts +5 -0
  37. package/dist/modules/payout/payout-channel-handler.d.ts +82 -0
  38. package/{esm/src/features/payout/contract.d.ts → dist/modules/payout/payout.api-contract.d.ts} +350 -207
  39. package/dist/modules/payout/payout.dtos.d.ts +607 -0
  40. package/dist/modules/payout/payout.model.d.ts +383 -0
  41. package/dist/modules/payout/payout.query.d.ts +134 -0
  42. package/dist/modules/payout/payout.repository.d.ts +204 -0
  43. package/dist/modules/profile/index.d.ts +3 -0
  44. package/{script/npm/src/src/features/auth/profile/contract.d.ts → dist/modules/profile/profile.api-contract.d.ts} +8 -6
  45. package/dist/modules/profile/profile.dtos.d.ts +80 -0
  46. package/{script/npm/src/src/models/user/profile.d.ts → dist/modules/profile/profile.model.d.ts} +81 -52
  47. package/dist/modules/profile/profile.repository.d.ts +56 -0
  48. package/dist/modules/team-member/index.d.ts +4 -0
  49. package/dist/modules/team-member/role.model.d.ts +61 -0
  50. package/{esm/src/features/admin/contract.d.ts → dist/modules/team-member/team-member.contract.d.ts} +229 -154
  51. package/dist/modules/team-member/team-member.dtos.d.ts +261 -0
  52. package/dist/modules/team-member/team-member.model.d.ts +237 -0
  53. package/dist/modules/team-member/team-member.repository.d.ts +179 -0
  54. package/dist/modules/wallet/index.d.ts +6 -0
  55. package/dist/modules/wallet/narration.model.d.ts +225 -0
  56. package/dist/modules/wallet/statement-entry.model.d.ts +299 -0
  57. package/{script/npm/src/src/features/wallet/contract.d.ts → dist/modules/wallet/wallet.contract.d.ts} +17 -15
  58. package/dist/modules/wallet/wallet.dtos.d.ts +204 -0
  59. package/{esm/src/models/wallet/wallet.d.ts → dist/modules/wallet/wallet.model.d.ts} +34 -40
  60. package/dist/modules/wallet/wallet.query.d.ts +95 -0
  61. package/dist/modules/wallet/wallet.repository.d.ts +205 -0
  62. package/dist/modules/wallet/wallet.utils.d.ts +17 -0
  63. package/package.json +49 -23
  64. package/LICENSE +0 -7
  65. package/esm/mod.d.ts +0 -8
  66. package/esm/mod.d.ts.map +0 -1
  67. package/esm/mod.js +0 -7
  68. package/esm/package.json +0 -3
  69. package/esm/src/errors/api_error.d.ts.map +0 -1
  70. package/esm/src/errors/api_error.js +0 -90
  71. package/esm/src/errors/index.d.ts +0 -3
  72. package/esm/src/errors/index.d.ts.map +0 -1
  73. package/esm/src/errors/index.js +0 -2
  74. package/esm/src/errors/permission_error.d.ts +0 -48
  75. package/esm/src/errors/permission_error.d.ts.map +0 -1
  76. package/esm/src/errors/permission_error.js +0 -70
  77. package/esm/src/features/admin/contract.d.ts.map +0 -1
  78. package/esm/src/features/admin/contract.js +0 -210
  79. package/esm/src/features/admin/index.d.ts +0 -4
  80. package/esm/src/features/admin/index.d.ts.map +0 -1
  81. package/esm/src/features/admin/index.js +0 -3
  82. package/esm/src/features/admin/repository.d.ts +0 -114
  83. package/esm/src/features/admin/repository.d.ts.map +0 -1
  84. package/esm/src/features/admin/repository.js +0 -248
  85. package/esm/src/features/admin/schemas.d.ts +0 -146
  86. package/esm/src/features/admin/schemas.d.ts.map +0 -1
  87. package/esm/src/features/admin/schemas.js +0 -206
  88. package/esm/src/features/auth/access/contract.d.ts +0 -14
  89. package/esm/src/features/auth/access/contract.d.ts.map +0 -1
  90. package/esm/src/features/auth/access/contract.js +0 -14
  91. package/esm/src/features/auth/access/repository.d.ts +0 -11
  92. package/esm/src/features/auth/access/repository.d.ts.map +0 -1
  93. package/esm/src/features/auth/access/repository.js +0 -25
  94. package/esm/src/features/auth/contract.d.ts.map +0 -1
  95. package/esm/src/features/auth/contract.js +0 -43
  96. package/esm/src/features/auth/identity/contract.d.ts +0 -23
  97. package/esm/src/features/auth/identity/contract.d.ts.map +0 -1
  98. package/esm/src/features/auth/identity/contract.js +0 -17
  99. package/esm/src/features/auth/identity/repository.d.ts +0 -22
  100. package/esm/src/features/auth/identity/repository.d.ts.map +0 -1
  101. package/esm/src/features/auth/identity/repository.js +0 -30
  102. package/esm/src/features/auth/index.d.ts +0 -6
  103. package/esm/src/features/auth/index.d.ts.map +0 -1
  104. package/esm/src/features/auth/index.js +0 -5
  105. package/esm/src/features/auth/manager.d.ts +0 -105
  106. package/esm/src/features/auth/manager.d.ts.map +0 -1
  107. package/esm/src/features/auth/manager.js +0 -181
  108. package/esm/src/features/auth/profile/contract.d.ts +0 -37
  109. package/esm/src/features/auth/profile/contract.d.ts.map +0 -1
  110. package/esm/src/features/auth/profile/contract.js +0 -14
  111. package/esm/src/features/auth/profile/repository.d.ts +0 -11
  112. package/esm/src/features/auth/profile/repository.d.ts.map +0 -1
  113. package/esm/src/features/auth/profile/repository.js +0 -25
  114. package/esm/src/features/auth/repository.d.ts +0 -30
  115. package/esm/src/features/auth/repository.d.ts.map +0 -1
  116. package/esm/src/features/auth/repository.js +0 -69
  117. package/esm/src/features/auth/storage/client_store.d.ts +0 -30
  118. package/esm/src/features/auth/storage/client_store.d.ts.map +0 -1
  119. package/esm/src/features/auth/storage/client_store.js +0 -46
  120. package/esm/src/features/auth/storage/client_token_handler.d.ts +0 -32
  121. package/esm/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
  122. package/esm/src/features/auth/storage/client_token_handler.js +0 -36
  123. package/esm/src/features/auth/storage/server_store.d.ts +0 -24
  124. package/esm/src/features/auth/storage/server_store.d.ts.map +0 -1
  125. package/esm/src/features/auth/storage/server_store.js +0 -34
  126. package/esm/src/features/auth/storage/server_token_handler.d.ts +0 -36
  127. package/esm/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
  128. package/esm/src/features/auth/storage/server_token_handler.js +0 -115
  129. package/esm/src/features/auth/storage/types.d.ts +0 -42
  130. package/esm/src/features/auth/storage/types.d.ts.map +0 -1
  131. package/esm/src/features/auth/storage/types.js +0 -1
  132. package/esm/src/features/contact/contract.d.ts +0 -170
  133. package/esm/src/features/contact/contract.d.ts.map +0 -1
  134. package/esm/src/features/contact/contract.js +0 -49
  135. package/esm/src/features/contact/index.d.ts +0 -2
  136. package/esm/src/features/contact/index.d.ts.map +0 -1
  137. package/esm/src/features/contact/index.js +0 -1
  138. package/esm/src/features/contact/repository.d.ts +0 -58
  139. package/esm/src/features/contact/repository.d.ts.map +0 -1
  140. package/esm/src/features/contact/repository.js +0 -108
  141. package/esm/src/features/payout/contract.d.ts.map +0 -1
  142. package/esm/src/features/payout/contract.js +0 -75
  143. package/esm/src/features/payout/index.d.ts +0 -2
  144. package/esm/src/features/payout/index.d.ts.map +0 -1
  145. package/esm/src/features/payout/index.js +0 -1
  146. package/esm/src/features/payout/repository.d.ts +0 -67
  147. package/esm/src/features/payout/repository.d.ts.map +0 -1
  148. package/esm/src/features/payout/repository.js +0 -179
  149. package/esm/src/features/wallet/contract.d.ts +0 -137
  150. package/esm/src/features/wallet/contract.d.ts.map +0 -1
  151. package/esm/src/features/wallet/contract.js +0 -38
  152. package/esm/src/features/wallet/index.d.ts +0 -2
  153. package/esm/src/features/wallet/index.d.ts.map +0 -1
  154. package/esm/src/features/wallet/index.js +0 -1
  155. package/esm/src/features/wallet/repository.d.ts +0 -57
  156. package/esm/src/features/wallet/repository.d.ts.map +0 -1
  157. package/esm/src/features/wallet/repository.js +0 -93
  158. package/esm/src/models/contact/derivatives/contact.d.ts +0 -172
  159. package/esm/src/models/contact/derivatives/contact.d.ts.map +0 -1
  160. package/esm/src/models/contact/derivatives/contact.js +0 -266
  161. package/esm/src/models/contact/derivatives/contact_info.d.ts +0 -188
  162. package/esm/src/models/contact/derivatives/contact_info.d.ts.map +0 -1
  163. package/esm/src/models/contact/derivatives/contact_info.js +0 -255
  164. package/esm/src/models/contact/index.d.ts +0 -5
  165. package/esm/src/models/contact/index.d.ts.map +0 -1
  166. package/esm/src/models/contact/index.js +0 -4
  167. package/esm/src/models/contact/schemas.d.ts +0 -66
  168. package/esm/src/models/contact/schemas.d.ts.map +0 -1
  169. package/esm/src/models/contact/schemas.js +0 -64
  170. package/esm/src/models/contact/validation.d.ts +0 -37
  171. package/esm/src/models/contact/validation.d.ts.map +0 -1
  172. package/esm/src/models/contact/validation.js +0 -146
  173. package/esm/src/models/index.d.ts +0 -7
  174. package/esm/src/models/index.d.ts.map +0 -1
  175. package/esm/src/models/index.js +0 -6
  176. package/esm/src/models/payout/api.d.ts +0 -29
  177. package/esm/src/models/payout/api.d.ts.map +0 -1
  178. package/esm/src/models/payout/api.js +0 -1
  179. package/esm/src/models/payout/channel.d.ts +0 -58
  180. package/esm/src/models/payout/channel.d.ts.map +0 -1
  181. package/esm/src/models/payout/channel.js +0 -53
  182. package/esm/src/models/payout/derivatives/payout.d.ts +0 -158
  183. package/esm/src/models/payout/derivatives/payout.d.ts.map +0 -1
  184. package/esm/src/models/payout/derivatives/payout.js +0 -271
  185. package/esm/src/models/payout/index.d.ts +0 -7
  186. package/esm/src/models/payout/index.d.ts.map +0 -1
  187. package/esm/src/models/payout/index.js +0 -6
  188. package/esm/src/models/payout/narration.d.ts +0 -164
  189. package/esm/src/models/payout/narration.d.ts.map +0 -1
  190. package/esm/src/models/payout/narration.js +0 -308
  191. package/esm/src/models/payout/schemas.d.ts +0 -156
  192. package/esm/src/models/payout/schemas.d.ts.map +0 -1
  193. package/esm/src/models/payout/schemas.js +0 -105
  194. package/esm/src/models/payout/status.d.ts +0 -33
  195. package/esm/src/models/payout/status.d.ts.map +0 -1
  196. package/esm/src/models/payout/status.js +0 -34
  197. package/esm/src/models/permission.d.ts +0 -55
  198. package/esm/src/models/permission.d.ts.map +0 -1
  199. package/esm/src/models/permission.js +0 -50
  200. package/esm/src/models/role.d.ts +0 -21
  201. package/esm/src/models/role.d.ts.map +0 -1
  202. package/esm/src/models/role.js +0 -73
  203. package/esm/src/models/user/authenticated-user.d.ts +0 -77
  204. package/esm/src/models/user/authenticated-user.d.ts.map +0 -1
  205. package/esm/src/models/user/authenticated-user.js +0 -226
  206. package/esm/src/models/user/index.d.ts +0 -4
  207. package/esm/src/models/user/index.d.ts.map +0 -1
  208. package/esm/src/models/user/index.js +0 -3
  209. package/esm/src/models/user/managed-user.d.ts +0 -108
  210. package/esm/src/models/user/managed-user.d.ts.map +0 -1
  211. package/esm/src/models/user/managed-user.js +0 -255
  212. package/esm/src/models/user/profile.d.ts +0 -161
  213. package/esm/src/models/user/profile.d.ts.map +0 -1
  214. package/esm/src/models/user/profile.js +0 -334
  215. package/esm/src/models/wallet/index.d.ts +0 -4
  216. package/esm/src/models/wallet/index.d.ts.map +0 -1
  217. package/esm/src/models/wallet/index.js +0 -3
  218. package/esm/src/models/wallet/schemas.d.ts +0 -95
  219. package/esm/src/models/wallet/schemas.d.ts.map +0 -1
  220. package/esm/src/models/wallet/schemas.js +0 -35
  221. package/esm/src/models/wallet/statement_entry.d.ts +0 -160
  222. package/esm/src/models/wallet/statement_entry.d.ts.map +0 -1
  223. package/esm/src/models/wallet/statement_entry.js +0 -255
  224. package/esm/src/models/wallet/wallet.d.ts.map +0 -1
  225. package/esm/src/models/wallet/wallet.js +0 -279
  226. package/esm/src/shared/base_repository.d.ts +0 -80
  227. package/esm/src/shared/base_repository.d.ts.map +0 -1
  228. package/esm/src/shared/base_repository.js +0 -153
  229. package/esm/src/shared/common_responses.d.ts +0 -13
  230. package/esm/src/shared/common_responses.d.ts.map +0 -1
  231. package/esm/src/shared/common_responses.js +0 -10
  232. package/esm/src/shared/index.d.ts +0 -3
  233. package/esm/src/shared/index.d.ts.map +0 -1
  234. package/esm/src/shared/index.js +0 -2
  235. package/esm/src/shared/token_required_repository.d.ts +0 -78
  236. package/esm/src/shared/token_required_repository.d.ts.map +0 -1
  237. package/esm/src/shared/token_required_repository.js +0 -128
  238. package/script/mod.d.ts +0 -8
  239. package/script/mod.d.ts.map +0 -1
  240. package/script/mod.js +0 -23
  241. package/script/npm/src/mod.d.ts +0 -8
  242. package/script/npm/src/mod.d.ts.map +0 -1
  243. package/script/npm/src/mod.js +0 -23
  244. package/script/npm/src/src/errors/api_error.d.ts +0 -63
  245. package/script/npm/src/src/errors/api_error.d.ts.map +0 -1
  246. package/script/npm/src/src/errors/api_error.js +0 -94
  247. package/script/npm/src/src/errors/index.d.ts +0 -3
  248. package/script/npm/src/src/errors/index.d.ts.map +0 -1
  249. package/script/npm/src/src/errors/index.js +0 -18
  250. package/script/npm/src/src/errors/permission_error.d.ts.map +0 -1
  251. package/script/npm/src/src/errors/permission_error.js +0 -74
  252. package/script/npm/src/src/features/admin/contract.d.ts +0 -842
  253. package/script/npm/src/src/features/admin/contract.d.ts.map +0 -1
  254. package/script/npm/src/src/features/admin/contract.js +0 -213
  255. package/script/npm/src/src/features/admin/index.d.ts +0 -4
  256. package/script/npm/src/src/features/admin/index.d.ts.map +0 -1
  257. package/script/npm/src/src/features/admin/index.js +0 -19
  258. package/script/npm/src/src/features/admin/repository.d.ts +0 -114
  259. package/script/npm/src/src/features/admin/repository.d.ts.map +0 -1
  260. package/script/npm/src/src/features/admin/repository.js +0 -252
  261. package/script/npm/src/src/features/admin/schemas.d.ts +0 -146
  262. package/script/npm/src/src/features/admin/schemas.d.ts.map +0 -1
  263. package/script/npm/src/src/features/admin/schemas.js +0 -209
  264. package/script/npm/src/src/features/auth/access/contract.d.ts +0 -14
  265. package/script/npm/src/src/features/auth/access/contract.d.ts.map +0 -1
  266. package/script/npm/src/src/features/auth/access/contract.js +0 -17
  267. package/script/npm/src/src/features/auth/access/repository.d.ts +0 -11
  268. package/script/npm/src/src/features/auth/access/repository.d.ts.map +0 -1
  269. package/script/npm/src/src/features/auth/access/repository.js +0 -29
  270. package/script/npm/src/src/features/auth/contract.d.ts +0 -112
  271. package/script/npm/src/src/features/auth/contract.d.ts.map +0 -1
  272. package/script/npm/src/src/features/auth/contract.js +0 -46
  273. package/script/npm/src/src/features/auth/identity/contract.d.ts +0 -23
  274. package/script/npm/src/src/features/auth/identity/contract.d.ts.map +0 -1
  275. package/script/npm/src/src/features/auth/identity/contract.js +0 -20
  276. package/script/npm/src/src/features/auth/identity/repository.d.ts +0 -22
  277. package/script/npm/src/src/features/auth/identity/repository.d.ts.map +0 -1
  278. package/script/npm/src/src/features/auth/identity/repository.js +0 -34
  279. package/script/npm/src/src/features/auth/index.d.ts +0 -6
  280. package/script/npm/src/src/features/auth/index.d.ts.map +0 -1
  281. package/script/npm/src/src/features/auth/index.js +0 -21
  282. package/script/npm/src/src/features/auth/manager.d.ts +0 -105
  283. package/script/npm/src/src/features/auth/manager.d.ts.map +0 -1
  284. package/script/npm/src/src/features/auth/manager.js +0 -185
  285. package/script/npm/src/src/features/auth/profile/contract.d.ts.map +0 -1
  286. package/script/npm/src/src/features/auth/profile/contract.js +0 -17
  287. package/script/npm/src/src/features/auth/profile/repository.d.ts +0 -11
  288. package/script/npm/src/src/features/auth/profile/repository.d.ts.map +0 -1
  289. package/script/npm/src/src/features/auth/profile/repository.js +0 -29
  290. package/script/npm/src/src/features/auth/repository.d.ts +0 -30
  291. package/script/npm/src/src/features/auth/repository.d.ts.map +0 -1
  292. package/script/npm/src/src/features/auth/repository.js +0 -73
  293. package/script/npm/src/src/features/auth/storage/client_store.d.ts +0 -30
  294. package/script/npm/src/src/features/auth/storage/client_store.d.ts.map +0 -1
  295. package/script/npm/src/src/features/auth/storage/client_store.js +0 -51
  296. package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts +0 -32
  297. package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
  298. package/script/npm/src/src/features/auth/storage/client_token_handler.js +0 -40
  299. package/script/npm/src/src/features/auth/storage/server_store.d.ts +0 -24
  300. package/script/npm/src/src/features/auth/storage/server_store.d.ts.map +0 -1
  301. package/script/npm/src/src/features/auth/storage/server_store.js +0 -38
  302. package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts +0 -36
  303. package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
  304. package/script/npm/src/src/features/auth/storage/server_token_handler.js +0 -119
  305. package/script/npm/src/src/features/auth/storage/types.d.ts +0 -42
  306. package/script/npm/src/src/features/auth/storage/types.d.ts.map +0 -1
  307. package/script/npm/src/src/features/auth/storage/types.js +0 -2
  308. package/script/npm/src/src/features/contact/contract.d.ts +0 -170
  309. package/script/npm/src/src/features/contact/contract.d.ts.map +0 -1
  310. package/script/npm/src/src/features/contact/contract.js +0 -52
  311. package/script/npm/src/src/features/contact/index.d.ts +0 -2
  312. package/script/npm/src/src/features/contact/index.d.ts.map +0 -1
  313. package/script/npm/src/src/features/contact/index.js +0 -17
  314. package/script/npm/src/src/features/contact/repository.d.ts +0 -58
  315. package/script/npm/src/src/features/contact/repository.d.ts.map +0 -1
  316. package/script/npm/src/src/features/contact/repository.js +0 -112
  317. package/script/npm/src/src/features/payout/contract.d.ts +0 -623
  318. package/script/npm/src/src/features/payout/contract.d.ts.map +0 -1
  319. package/script/npm/src/src/features/payout/contract.js +0 -78
  320. package/script/npm/src/src/features/payout/index.d.ts +0 -2
  321. package/script/npm/src/src/features/payout/index.d.ts.map +0 -1
  322. package/script/npm/src/src/features/payout/index.js +0 -17
  323. package/script/npm/src/src/features/payout/repository.d.ts +0 -67
  324. package/script/npm/src/src/features/payout/repository.d.ts.map +0 -1
  325. package/script/npm/src/src/features/payout/repository.js +0 -183
  326. package/script/npm/src/src/features/wallet/contract.d.ts.map +0 -1
  327. package/script/npm/src/src/features/wallet/contract.js +0 -41
  328. package/script/npm/src/src/features/wallet/index.d.ts +0 -2
  329. package/script/npm/src/src/features/wallet/index.d.ts.map +0 -1
  330. package/script/npm/src/src/features/wallet/index.js +0 -17
  331. package/script/npm/src/src/features/wallet/repository.d.ts +0 -57
  332. package/script/npm/src/src/features/wallet/repository.d.ts.map +0 -1
  333. package/script/npm/src/src/features/wallet/repository.js +0 -97
  334. package/script/npm/src/src/models/contact/derivatives/contact.d.ts +0 -172
  335. package/script/npm/src/src/models/contact/derivatives/contact.d.ts.map +0 -1
  336. package/script/npm/src/src/models/contact/derivatives/contact.js +0 -270
  337. package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts +0 -188
  338. package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts.map +0 -1
  339. package/script/npm/src/src/models/contact/derivatives/contact_info.js +0 -260
  340. package/script/npm/src/src/models/contact/index.d.ts +0 -5
  341. package/script/npm/src/src/models/contact/index.d.ts.map +0 -1
  342. package/script/npm/src/src/models/contact/index.js +0 -20
  343. package/script/npm/src/src/models/contact/schemas.d.ts +0 -66
  344. package/script/npm/src/src/models/contact/schemas.d.ts.map +0 -1
  345. package/script/npm/src/src/models/contact/schemas.js +0 -67
  346. package/script/npm/src/src/models/contact/validation.d.ts +0 -37
  347. package/script/npm/src/src/models/contact/validation.d.ts.map +0 -1
  348. package/script/npm/src/src/models/contact/validation.js +0 -153
  349. package/script/npm/src/src/models/index.d.ts +0 -7
  350. package/script/npm/src/src/models/index.d.ts.map +0 -1
  351. package/script/npm/src/src/models/index.js +0 -22
  352. package/script/npm/src/src/models/payout/api.d.ts +0 -29
  353. package/script/npm/src/src/models/payout/api.d.ts.map +0 -1
  354. package/script/npm/src/src/models/payout/api.js +0 -2
  355. package/script/npm/src/src/models/payout/channel.d.ts +0 -58
  356. package/script/npm/src/src/models/payout/channel.d.ts.map +0 -1
  357. package/script/npm/src/src/models/payout/channel.js +0 -56
  358. package/script/npm/src/src/models/payout/derivatives/payout.d.ts +0 -158
  359. package/script/npm/src/src/models/payout/derivatives/payout.d.ts.map +0 -1
  360. package/script/npm/src/src/models/payout/derivatives/payout.js +0 -275
  361. package/script/npm/src/src/models/payout/index.d.ts +0 -7
  362. package/script/npm/src/src/models/payout/index.d.ts.map +0 -1
  363. package/script/npm/src/src/models/payout/index.js +0 -22
  364. package/script/npm/src/src/models/payout/narration.d.ts +0 -164
  365. package/script/npm/src/src/models/payout/narration.d.ts.map +0 -1
  366. package/script/npm/src/src/models/payout/narration.js +0 -312
  367. package/script/npm/src/src/models/payout/schemas.d.ts +0 -156
  368. package/script/npm/src/src/models/payout/schemas.d.ts.map +0 -1
  369. package/script/npm/src/src/models/payout/schemas.js +0 -108
  370. package/script/npm/src/src/models/payout/status.d.ts +0 -33
  371. package/script/npm/src/src/models/payout/status.d.ts.map +0 -1
  372. package/script/npm/src/src/models/payout/status.js +0 -37
  373. package/script/npm/src/src/models/permission.d.ts.map +0 -1
  374. package/script/npm/src/src/models/permission.js +0 -53
  375. package/script/npm/src/src/models/role.d.ts +0 -21
  376. package/script/npm/src/src/models/role.d.ts.map +0 -1
  377. package/script/npm/src/src/models/role.js +0 -77
  378. package/script/npm/src/src/models/user/authenticated-user.d.ts +0 -77
  379. package/script/npm/src/src/models/user/authenticated-user.d.ts.map +0 -1
  380. package/script/npm/src/src/models/user/authenticated-user.js +0 -230
  381. package/script/npm/src/src/models/user/index.d.ts +0 -4
  382. package/script/npm/src/src/models/user/index.d.ts.map +0 -1
  383. package/script/npm/src/src/models/user/index.js +0 -19
  384. package/script/npm/src/src/models/user/managed-user.d.ts +0 -108
  385. package/script/npm/src/src/models/user/managed-user.d.ts.map +0 -1
  386. package/script/npm/src/src/models/user/managed-user.js +0 -260
  387. package/script/npm/src/src/models/user/profile.d.ts.map +0 -1
  388. package/script/npm/src/src/models/user/profile.js +0 -338
  389. package/script/npm/src/src/models/wallet/index.d.ts +0 -4
  390. package/script/npm/src/src/models/wallet/index.d.ts.map +0 -1
  391. package/script/npm/src/src/models/wallet/index.js +0 -19
  392. package/script/npm/src/src/models/wallet/schemas.d.ts +0 -95
  393. package/script/npm/src/src/models/wallet/schemas.d.ts.map +0 -1
  394. package/script/npm/src/src/models/wallet/schemas.js +0 -38
  395. package/script/npm/src/src/models/wallet/statement_entry.d.ts +0 -160
  396. package/script/npm/src/src/models/wallet/statement_entry.d.ts.map +0 -1
  397. package/script/npm/src/src/models/wallet/statement_entry.js +0 -259
  398. package/script/npm/src/src/models/wallet/wallet.d.ts +0 -147
  399. package/script/npm/src/src/models/wallet/wallet.d.ts.map +0 -1
  400. package/script/npm/src/src/models/wallet/wallet.js +0 -283
  401. package/script/npm/src/src/shared/base_repository.d.ts +0 -80
  402. package/script/npm/src/src/shared/base_repository.d.ts.map +0 -1
  403. package/script/npm/src/src/shared/base_repository.js +0 -157
  404. package/script/npm/src/src/shared/common_responses.d.ts +0 -13
  405. package/script/npm/src/src/shared/common_responses.d.ts.map +0 -1
  406. package/script/npm/src/src/shared/common_responses.js +0 -13
  407. package/script/npm/src/src/shared/index.d.ts +0 -3
  408. package/script/npm/src/src/shared/index.d.ts.map +0 -1
  409. package/script/npm/src/src/shared/index.js +0 -18
  410. package/script/npm/src/src/shared/token_required_repository.d.ts +0 -78
  411. package/script/npm/src/src/shared/token_required_repository.d.ts.map +0 -1
  412. package/script/npm/src/src/shared/token_required_repository.js +0 -132
  413. package/script/package.json +0 -3
@@ -0,0 +1,261 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Collection of team management schemas for export.
4
+ * Provides access to all team member and role validation schemas.
5
+ */
6
+ export declare const TeamManagementDTOSchemas: {
7
+ role: z.ZodObject<{
8
+ id: z.ZodString;
9
+ name: z.ZodString;
10
+ description: z.ZodOptional<z.ZodString>;
11
+ access: z.ZodArray<z.ZodString, "many">;
12
+ createdAt: z.ZodString;
13
+ updatedAt: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ name: string;
16
+ createdAt: string;
17
+ id: string;
18
+ updatedAt: string;
19
+ access: string[];
20
+ description?: string | undefined;
21
+ }, {
22
+ name: string;
23
+ createdAt: string;
24
+ id: string;
25
+ updatedAt: string;
26
+ access: string[];
27
+ description?: string | undefined;
28
+ }>;
29
+ teamMember: z.ZodObject<{
30
+ id: z.ZodString;
31
+ name: z.ZodString;
32
+ identity: z.ZodString;
33
+ type: z.ZodString;
34
+ profileId: z.ZodString;
35
+ roleId: z.ZodString;
36
+ resetPassword: z.ZodBoolean;
37
+ isActive: z.ZodBoolean;
38
+ isArchived: z.ZodBoolean;
39
+ role: z.ZodOptional<z.ZodObject<{
40
+ id: z.ZodString;
41
+ name: z.ZodString;
42
+ description: z.ZodOptional<z.ZodString>;
43
+ access: z.ZodArray<z.ZodString, "many">;
44
+ createdAt: z.ZodString;
45
+ updatedAt: z.ZodString;
46
+ }, "strip", z.ZodTypeAny, {
47
+ name: string;
48
+ createdAt: string;
49
+ id: string;
50
+ updatedAt: string;
51
+ access: string[];
52
+ description?: string | undefined;
53
+ }, {
54
+ name: string;
55
+ createdAt: string;
56
+ id: string;
57
+ updatedAt: string;
58
+ access: string[];
59
+ description?: string | undefined;
60
+ }>>;
61
+ createdAt: z.ZodString;
62
+ updatedAt: z.ZodString;
63
+ }, "strip", z.ZodTypeAny, {
64
+ type: string;
65
+ name: string;
66
+ createdAt: string;
67
+ id: string;
68
+ profileId: string;
69
+ identity: string;
70
+ roleId: string;
71
+ isActive: boolean;
72
+ isArchived: boolean;
73
+ resetPassword: boolean;
74
+ updatedAt: string;
75
+ role?: {
76
+ name: string;
77
+ createdAt: string;
78
+ id: string;
79
+ updatedAt: string;
80
+ access: string[];
81
+ description?: string | undefined;
82
+ } | undefined;
83
+ }, {
84
+ type: string;
85
+ name: string;
86
+ createdAt: string;
87
+ id: string;
88
+ profileId: string;
89
+ identity: string;
90
+ roleId: string;
91
+ isActive: boolean;
92
+ isArchived: boolean;
93
+ resetPassword: boolean;
94
+ updatedAt: string;
95
+ role?: {
96
+ name: string;
97
+ createdAt: string;
98
+ id: string;
99
+ updatedAt: string;
100
+ access: string[];
101
+ description?: string | undefined;
102
+ } | undefined;
103
+ }>;
104
+ teamMemberQueryParams: z.ZodObject<{
105
+ id: z.ZodOptional<z.ZodString>;
106
+ name: z.ZodOptional<z.ZodString>;
107
+ identity: z.ZodOptional<z.ZodString>;
108
+ type: z.ZodOptional<z.ZodString>;
109
+ profileId: z.ZodOptional<z.ZodString>;
110
+ roleId: z.ZodOptional<z.ZodString>;
111
+ resetPassword: z.ZodOptional<z.ZodNumber>;
112
+ isActive: z.ZodOptional<z.ZodNumber>;
113
+ isArchived: z.ZodOptional<z.ZodNumber>;
114
+ createdAt: z.ZodOptional<z.ZodString>;
115
+ updatedAt: z.ZodOptional<z.ZodString>;
116
+ eager: z.ZodOptional<z.ZodString>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ type?: string | undefined;
119
+ name?: string | undefined;
120
+ createdAt?: string | undefined;
121
+ eager?: string | undefined;
122
+ id?: string | undefined;
123
+ profileId?: string | undefined;
124
+ identity?: string | undefined;
125
+ roleId?: string | undefined;
126
+ isActive?: number | undefined;
127
+ isArchived?: number | undefined;
128
+ resetPassword?: number | undefined;
129
+ updatedAt?: string | undefined;
130
+ }, {
131
+ type?: string | undefined;
132
+ name?: string | undefined;
133
+ createdAt?: string | undefined;
134
+ eager?: string | undefined;
135
+ id?: string | undefined;
136
+ profileId?: string | undefined;
137
+ identity?: string | undefined;
138
+ roleId?: string | undefined;
139
+ isActive?: number | undefined;
140
+ isArchived?: number | undefined;
141
+ resetPassword?: number | undefined;
142
+ updatedAt?: string | undefined;
143
+ }>;
144
+ createTeamMemberRequest: z.ZodObject<{
145
+ name: z.ZodString;
146
+ identity: z.ZodString;
147
+ password: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
148
+ roleId: z.ZodOptional<z.ZodString>;
149
+ resetPassword: z.ZodOptional<z.ZodBoolean>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ name: string;
152
+ identity: string;
153
+ roleId?: string | undefined;
154
+ resetPassword?: boolean | undefined;
155
+ password?: string | undefined;
156
+ }, {
157
+ name: string;
158
+ identity: string;
159
+ roleId?: string | undefined;
160
+ resetPassword?: boolean | undefined;
161
+ password?: string | undefined;
162
+ }>;
163
+ updateTeamMemberRequest: z.ZodObject<{
164
+ name: z.ZodOptional<z.ZodString>;
165
+ roleId: z.ZodOptional<z.ZodString>;
166
+ password: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
167
+ resetPassword: z.ZodOptional<z.ZodBoolean>;
168
+ isActive: z.ZodOptional<z.ZodBoolean>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ name?: string | undefined;
171
+ roleId?: string | undefined;
172
+ isActive?: boolean | undefined;
173
+ resetPassword?: boolean | undefined;
174
+ password?: string | undefined;
175
+ }, {
176
+ name?: string | undefined;
177
+ roleId?: string | undefined;
178
+ isActive?: boolean | undefined;
179
+ resetPassword?: boolean | undefined;
180
+ password?: string | undefined;
181
+ }>;
182
+ resetPasswordRequest: z.ZodObject<{
183
+ newPassword: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
184
+ sendNotification: z.ZodOptional<z.ZodBoolean>;
185
+ }, "strip", z.ZodTypeAny, {
186
+ newPassword?: string | undefined;
187
+ sendNotification?: boolean | undefined;
188
+ }, {
189
+ newPassword?: string | undefined;
190
+ sendNotification?: boolean | undefined;
191
+ }>;
192
+ createTeamMemberResponse: z.ZodObject<{
193
+ id: z.ZodString;
194
+ name: z.ZodString;
195
+ identity: z.ZodString;
196
+ type: z.ZodString;
197
+ profileId: z.ZodString;
198
+ resetPassword: z.ZodBoolean;
199
+ roleId: z.ZodString;
200
+ isActive: z.ZodBoolean;
201
+ isArchived: z.ZodBoolean;
202
+ createdAt: z.ZodString;
203
+ updatedAt: z.ZodString;
204
+ }, "strip", z.ZodTypeAny, {
205
+ type: string;
206
+ name: string;
207
+ createdAt: string;
208
+ id: string;
209
+ profileId: string;
210
+ identity: string;
211
+ roleId: string;
212
+ isActive: boolean;
213
+ isArchived: boolean;
214
+ resetPassword: boolean;
215
+ updatedAt: string;
216
+ }, {
217
+ type: string;
218
+ name: string;
219
+ createdAt: string;
220
+ id: string;
221
+ profileId: string;
222
+ identity: string;
223
+ roleId: string;
224
+ isActive: boolean;
225
+ isArchived: boolean;
226
+ resetPassword: boolean;
227
+ updatedAt: string;
228
+ }>;
229
+ password: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
230
+ };
231
+ /**
232
+ * TypeScript type for a validated role object.
233
+ * Use this type for role instances that have been validated against the schema.
234
+ */
235
+ export type RoleDTO = z.infer<typeof TeamManagementDTOSchemas.role>;
236
+ /**
237
+ * TypeScript type for a create team member request object.
238
+ * Use this type for team member creation requests that have been validated against the schema.
239
+ */
240
+ export type CreateTeamMemberRequestDTO = z.infer<typeof TeamManagementDTOSchemas.createTeamMemberRequest>;
241
+ /**
242
+ * TypeScript type for an update team member request object.
243
+ * Use this type for team member update requests that have been validated against the schema.
244
+ */
245
+ export type UpdateTeamMemberRequestDTO = z.infer<typeof TeamManagementDTOSchemas.updateTeamMemberRequest>;
246
+ /**
247
+ * TypeScript type for a reset password request object.
248
+ * Use this type for password reset requests that have been validated against the schema.
249
+ */
250
+ export type ResetPasswordRequestDTO = z.infer<typeof TeamManagementDTOSchemas.resetPasswordRequest>;
251
+ /**
252
+ * TypeScript type for a create team member response object.
253
+ * Use this type for team member creation responses that have been validated against the schema.
254
+ */
255
+ export type CreateTeamMemberResponseDTO = z.infer<typeof TeamManagementDTOSchemas.createTeamMemberResponse>;
256
+ /**
257
+ * TypeScript type for team member query parameters.
258
+ * Use this type for query parameter objects that have been validated against the schema.
259
+ * All fields are optional to allow flexible filtering and searching.
260
+ */
261
+ export type TeamMemberQueryParamsDTO = z.infer<typeof TeamManagementDTOSchemas.teamMemberQueryParams>;
@@ -0,0 +1,237 @@
1
+ import z from "zod";
2
+ import { Role } from "./role.model.js";
3
+ import { RoleDTO } from "./team-member.dtos.js";
4
+ export interface TeamMemberData {
5
+ id: string;
6
+ name: string;
7
+ identity: string;
8
+ type: string;
9
+ profileId: string;
10
+ roleId: string;
11
+ resetPassword: boolean;
12
+ isActive: boolean;
13
+ isArchived: boolean;
14
+ role?: RoleDTO;
15
+ createdAt: string;
16
+ updatedAt: string;
17
+ }
18
+ /**
19
+ * Zod schema for TeamMember JSON serialization
20
+ */
21
+ export declare const TeamMemberJSONSchema: z.ZodObject<{
22
+ id: z.ZodString;
23
+ name: z.ZodString;
24
+ identity: z.ZodString;
25
+ type: z.ZodString;
26
+ profileId: z.ZodString;
27
+ roleId: z.ZodString;
28
+ resetPassword: z.ZodBoolean;
29
+ isActive: z.ZodBoolean;
30
+ isArchived: z.ZodBoolean;
31
+ role: z.ZodOptional<z.ZodObject<{
32
+ id: z.ZodString;
33
+ name: z.ZodString;
34
+ description: z.ZodOptional<z.ZodString>;
35
+ access: z.ZodArray<z.ZodString, "many">;
36
+ createdAt: z.ZodString;
37
+ updatedAt: z.ZodString;
38
+ version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ name: string;
41
+ createdAt: string;
42
+ id: string;
43
+ version: string;
44
+ updatedAt: string;
45
+ access: string[];
46
+ description?: string | undefined;
47
+ }, {
48
+ name: string;
49
+ createdAt: string;
50
+ id: string;
51
+ updatedAt: string;
52
+ access: string[];
53
+ version?: string | undefined;
54
+ description?: string | undefined;
55
+ }>>;
56
+ createdAt: z.ZodString;
57
+ updatedAt: z.ZodString;
58
+ version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
59
+ }, "strip", z.ZodTypeAny, {
60
+ type: string;
61
+ name: string;
62
+ createdAt: string;
63
+ id: string;
64
+ version: string;
65
+ profileId: string;
66
+ identity: string;
67
+ roleId: string;
68
+ isActive: boolean;
69
+ isArchived: boolean;
70
+ resetPassword: boolean;
71
+ updatedAt: string;
72
+ role?: {
73
+ name: string;
74
+ createdAt: string;
75
+ id: string;
76
+ version: string;
77
+ updatedAt: string;
78
+ access: string[];
79
+ description?: string | undefined;
80
+ } | undefined;
81
+ }, {
82
+ type: string;
83
+ name: string;
84
+ createdAt: string;
85
+ id: string;
86
+ profileId: string;
87
+ identity: string;
88
+ roleId: string;
89
+ isActive: boolean;
90
+ isArchived: boolean;
91
+ resetPassword: boolean;
92
+ updatedAt: string;
93
+ version?: string | undefined;
94
+ role?: {
95
+ name: string;
96
+ createdAt: string;
97
+ id: string;
98
+ updatedAt: string;
99
+ access: string[];
100
+ version?: string | undefined;
101
+ description?: string | undefined;
102
+ } | undefined;
103
+ }>;
104
+ export type TeamMemberJSON = z.infer<typeof TeamMemberJSONSchema>;
105
+ /**
106
+ * Represents a team member from the admin management perspective.
107
+ *
108
+ * This is how administrators view and manage people in the system.
109
+ * When a team member logs in, they become a User (authenticated session).
110
+ *
111
+ * TeamMember includes management metadata like:
112
+ * - isActive, isArchived (account status)
113
+ * - createdAt, updatedAt (audit trail)
114
+ * - role (their assigned role with permissions)
115
+ */
116
+ export declare class TeamMember {
117
+ readonly id: string;
118
+ readonly name: string;
119
+ readonly identity: string;
120
+ readonly type: string;
121
+ readonly profileId: string;
122
+ readonly roleId: string;
123
+ readonly resetPassword: boolean;
124
+ readonly isActive: boolean;
125
+ readonly isArchived: boolean;
126
+ readonly role?: Role;
127
+ readonly createdAt: Date;
128
+ readonly updatedAt: Date;
129
+ readonly permissions: ReadonlySet<string>;
130
+ private constructor();
131
+ /**
132
+ * Creates a TeamMember instance from a DTO.
133
+ *
134
+ * @param data - Team member data from the API
135
+ * @returns A new TeamMember instance, or undefined if data is invalid
136
+ *
137
+ * @example
138
+ * ```typescript
139
+ * const member = TeamMember.from({
140
+ * id: "member-123",
141
+ * name: "John Doe",
142
+ * identity: "john@example.com",
143
+ * roleId: "role-456",
144
+ * // ... other fields
145
+ * });
146
+ * ```
147
+ */
148
+ static from(data: TeamMemberData): TeamMember | undefined;
149
+ /**
150
+ * Creates a TeamMember instance from a JSON string.
151
+ *
152
+ * @param jsonString - JSON string containing team member data
153
+ * @returns A new TeamMember instance, or undefined if parsing failed
154
+ */
155
+ static fromJson(jsonString: string): TeamMember | undefined;
156
+ /**
157
+ * Creates multiple TeamMember instances from an array of data.
158
+ *
159
+ * @param dataArray - Array of team member data
160
+ * @returns Array of TeamMember instances (filters out invalid entries)
161
+ *
162
+ * @example
163
+ * ```typescript
164
+ * const members = TeamMember.createMany(apiResponse.data);
165
+ * ```
166
+ */
167
+ static createMany(dataArray: any[]): TeamMember[];
168
+ /**
169
+ * Check if team member has a specific permission
170
+ */
171
+ can(permission: string): boolean;
172
+ /**
173
+ * Check if team member has any of the specified permissions
174
+ */
175
+ canAny(permissions: string[]): boolean;
176
+ /**
177
+ * Check if team member has all of the specified permissions
178
+ */
179
+ canAll(permissions: string[]): boolean;
180
+ /**
181
+ * Check if team member account is active
182
+ */
183
+ isAccountActive(): boolean;
184
+ /**
185
+ * Check if team member account is archived
186
+ */
187
+ isAccountArchived(): boolean;
188
+ /**
189
+ * Check if team member needs to reset password
190
+ */
191
+ needsPasswordReset(): boolean;
192
+ /**
193
+ * Get comprehensive account status
194
+ */
195
+ getAccountStatus(): {
196
+ status: "active" | "inactive" | "archived" | "password_reset_required";
197
+ label: string;
198
+ color: "success" | "warning" | "error" | "default";
199
+ description: string;
200
+ };
201
+ /**
202
+ * Get role display name
203
+ */
204
+ getRoleName(): string;
205
+ /**
206
+ * Get formatted creation date
207
+ */
208
+ getCreatedDate(): string;
209
+ /**
210
+ * Get time since last update
211
+ */
212
+ getLastUpdateInfo(): string;
213
+ /**
214
+ * Serializes the TeamMember instance to a JSON-compatible object
215
+ */
216
+ toJSON(): TeamMemberJSON;
217
+ /**
218
+ * Serializes the TeamMember instance to a JSON string
219
+ */
220
+ toJSONString(): string;
221
+ /**
222
+ * Creates a TeamMember instance from a JSON-compatible object or string
223
+ */
224
+ static fromJSON(json: TeamMemberJSON | string): TeamMember | undefined;
225
+ /**
226
+ * Type guard using Zod schema validation
227
+ */
228
+ static isTeamMemberJSON(obj: unknown): obj is TeamMemberJSON;
229
+ /**
230
+ * Creates multiple TeamMember instances from a JSON array
231
+ */
232
+ static fromJSONArray(jsonArray: TeamMemberJSON[] | string): TeamMember[];
233
+ /**
234
+ * Serializes an array of TeamMember instances to JSON
235
+ */
236
+ static toJSONArray(members: TeamMember[]): TeamMemberJSON[];
237
+ }
@@ -0,0 +1,179 @@
1
+ import { BaseRepository } from "@/lib/api/base-repository.js";
2
+ import { teamManagementContract } from "./team-member.contract.js";
3
+ import { Role } from "./role.model.js";
4
+ import { CreateTeamMemberRequestDTO, CreateTeamMemberResponseDTO, UpdateTeamMemberRequestDTO, ResetPasswordRequestDTO, TeamMemberQueryParamsDTO } from "./team-member.dtos.js";
5
+ import { TeamMember } from "./team-member.model.js";
6
+ /**
7
+ * Repository class for managing team members through API interactions.
8
+ * Handles team member creation, updates, archiving, and role management.
9
+ *
10
+ * This repository handles pure API communication without permission checking.
11
+ * Permission validation should be handled at the service layer or route handlers.
12
+ *
13
+ * @extends {BaseRepository<typeof teamManagementContract>}
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * const repo = new TeamMemberRepository({ token: adminToken });
18
+ * const members = await repo.getAllTeamMembers();
19
+ * ```
20
+ */
21
+ export declare class TeamMemberRepository extends BaseRepository<typeof teamManagementContract> {
22
+ /**
23
+ * Creates an instance of TeamMemberRepository using the team management contract.
24
+ *
25
+ * @param options - Optional configuration
26
+ * @param options.token - Authentication token for API calls
27
+ * @param options.root - Custom API root URL
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const repo = new TeamMemberRepository({
32
+ * token: "admin-auth-token",
33
+ * root: "https://api-staging.afloat.money/v1"
34
+ * });
35
+ * ```
36
+ */
37
+ constructor(options?: {
38
+ token?: string;
39
+ root?: string;
40
+ });
41
+ /**
42
+ * Creates a new team member account.
43
+ *
44
+ * @param input - The data required to create a new team member
45
+ * @returns Promise that resolves to the newly created team member response
46
+ * @throws {APIError} If the creation operation fails
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * const newMember = await repo.createTeamMember({
51
+ * identity: "newmember@example.com",
52
+ * name: "New Member",
53
+ * roleId: "role-id"
54
+ * });
55
+ * ```
56
+ */
57
+ createTeamMember(input: CreateTeamMemberRequestDTO): Promise<CreateTeamMemberResponseDTO>;
58
+ /**
59
+ * Updates an existing team member by ID.
60
+ *
61
+ * @param id - The unique identifier of the team member to update
62
+ * @param input - The data to update the team member with
63
+ * @returns Promise that resolves to the updated team member
64
+ * @throws {APIError} If the update operation fails
65
+ *
66
+ * @example
67
+ * ```typescript
68
+ * const updatedMember = await repo.updateTeamMember("member-id", {
69
+ * name: "Updated Name",
70
+ * roleId: "new-role-id"
71
+ * });
72
+ * ```
73
+ */
74
+ updateTeamMember(id: string, input: UpdateTeamMemberRequestDTO): Promise<TeamMember>;
75
+ /**
76
+ * Archives (soft deletes) a team member by ID.
77
+ *
78
+ * @param id - The unique identifier of the team member to archive
79
+ * @returns Promise that resolves to the updated team member object
80
+ * @throws {APIError} If the archive operation fails
81
+ *
82
+ * @example
83
+ * ```typescript
84
+ * const archivedMember = await repo.archiveTeamMember("member-id");
85
+ * ```
86
+ */
87
+ archiveTeamMember(id: string): Promise<TeamMember>;
88
+ /**
89
+ * Unarchives a previously archived team member by ID.
90
+ *
91
+ * @param id - The unique identifier of the team member to unarchive
92
+ * @returns Promise that resolves to the updated team member object
93
+ * @throws {APIError} If the unarchive operation fails
94
+ *
95
+ * @example
96
+ * ```typescript
97
+ * const restoredMember = await repo.unArchiveTeamMember("member-id");
98
+ * ```
99
+ */
100
+ unArchiveTeamMember(id: string): Promise<TeamMember>;
101
+ /**
102
+ * Resets a team member's password.
103
+ *
104
+ * @param id - The unique identifier of the team member
105
+ * @param input - Optional password reset configuration
106
+ * @returns Promise that resolves to success status
107
+ * @throws {APIError} If the password reset operation fails
108
+ *
109
+ * @example
110
+ * ```typescript
111
+ * const result = await repo.resetTeamMemberPassword("member-id", {
112
+ * sendNotification: true
113
+ * });
114
+ * ```
115
+ */
116
+ resetTeamMemberPassword(id: string, input?: ResetPasswordRequestDTO): Promise<{
117
+ success: boolean;
118
+ }>;
119
+ /**
120
+ * Retrieves all team members.
121
+ * Results are ordered in descending order by creation date by default.
122
+ *
123
+ * @param query - Optional query parameters for filtering and eager loading
124
+ * @returns Promise that resolves to an array of team members
125
+ * @throws {APIError} If the fetch operation fails
126
+ *
127
+ * @example
128
+ * ```typescript
129
+ * // Get all team members with role information
130
+ * const members = await repo.getAllTeamMembers({ eager: "role" });
131
+ *
132
+ * // Get team members with custom query
133
+ * const activeMembers = await repo.getAllTeamMembers({ isActive: 1 });
134
+ * ```
135
+ */
136
+ getAllTeamMembers(query?: TeamMemberQueryParamsDTO): Promise<TeamMember[]>;
137
+ /**
138
+ * Retrieves a specific team member by ID.
139
+ *
140
+ * @param id - The unique identifier of the team member to retrieve
141
+ * @param query - Optional query parameters for eager loading
142
+ * @returns Promise that resolves to the team member
143
+ * @throws {APIError} If the team member is not found or fetch operation fails
144
+ *
145
+ * @example
146
+ * ```typescript
147
+ * const member = await repo.getTeamMember("member-id", { eager: "role" });
148
+ * console.log(`Member: ${member.name}, Role: ${member.role?.name}`);
149
+ * ```
150
+ */
151
+ getTeamMember(id: string, query?: TeamMemberQueryParamsDTO): Promise<TeamMember>;
152
+ /**
153
+ * Retrieves all available roles in the system.
154
+ *
155
+ * @returns Promise that resolves to an array of roles
156
+ * @throws {APIError} If the fetch operation fails
157
+ *
158
+ * @example
159
+ * ```typescript
160
+ * const roles = await repo.getAllRoles();
161
+ * roles.forEach(role => console.log(`Role: ${role.name}`));
162
+ * ```
163
+ */
164
+ getAllRoles(): Promise<Role[]>;
165
+ /**
166
+ * Retrieves a specific role by ID.
167
+ *
168
+ * @param id - The unique identifier of the role to retrieve
169
+ * @returns Promise that resolves to the role
170
+ * @throws {APIError} If the role is not found or fetch operation fails
171
+ *
172
+ * @example
173
+ * ```typescript
174
+ * const role = await repo.getRole("role-id");
175
+ * console.log(`Role: ${role.name}, Permissions: ${role.permissions.size}`);
176
+ * ```
177
+ */
178
+ getRole(id: string): Promise<Role>;
179
+ }
@@ -0,0 +1,6 @@
1
+ export * from "./wallet.dtos.js";
2
+ export * from "./wallet.model.js";
3
+ export * from "./statement-entry.model.js";
4
+ export * from "./narration.model.js";
5
+ export * from "./wallet.repository.js";
6
+ export * from "./wallet.utils.js";