@temboplus/afloat 0.1.77-beta.9 → 0.1.79

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 (415) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +42 -246
  3. package/esm/mod.d.ts +8 -0
  4. package/esm/mod.d.ts.map +1 -0
  5. package/esm/mod.js +7 -0
  6. package/esm/package.json +3 -0
  7. package/{dist/lib/error/error.api.d.ts → esm/src/errors/api_error.d.ts} +1 -0
  8. package/esm/src/errors/api_error.d.ts.map +1 -0
  9. package/esm/src/errors/api_error.js +90 -0
  10. package/esm/src/errors/index.d.ts +3 -0
  11. package/esm/src/errors/index.d.ts.map +1 -0
  12. package/esm/src/errors/index.js +2 -0
  13. package/{dist/lib/error/error.permission.d.ts → esm/src/errors/permission_error.d.ts} +2 -1
  14. package/esm/src/errors/permission_error.d.ts.map +1 -0
  15. package/esm/src/errors/permission_error.js +70 -0
  16. package/{dist/modules/team-member/team-member.contract.d.ts → esm/src/features/admin/contract.d.ts} +158 -233
  17. package/esm/src/features/admin/contract.d.ts.map +1 -0
  18. package/esm/src/features/admin/contract.js +210 -0
  19. package/esm/src/features/admin/index.d.ts +4 -0
  20. package/esm/src/features/admin/index.d.ts.map +1 -0
  21. package/esm/src/features/admin/index.js +3 -0
  22. package/esm/src/features/admin/repository.d.ts +114 -0
  23. package/esm/src/features/admin/repository.d.ts.map +1 -0
  24. package/esm/src/features/admin/repository.js +248 -0
  25. package/esm/src/features/admin/schemas.d.ts +146 -0
  26. package/esm/src/features/admin/schemas.d.ts.map +1 -0
  27. package/esm/src/features/admin/schemas.js +206 -0
  28. package/esm/src/features/auth/access/contract.d.ts +14 -0
  29. package/esm/src/features/auth/access/contract.d.ts.map +1 -0
  30. package/esm/src/features/auth/access/contract.js +14 -0
  31. package/esm/src/features/auth/access/repository.d.ts +11 -0
  32. package/esm/src/features/auth/access/repository.d.ts.map +1 -0
  33. package/esm/src/features/auth/access/repository.js +25 -0
  34. package/{dist/modules/auth/auth.contract.d.ts → esm/src/features/auth/contract.d.ts} +19 -16
  35. package/esm/src/features/auth/contract.d.ts.map +1 -0
  36. package/esm/src/features/auth/contract.js +43 -0
  37. package/esm/src/features/auth/identity/contract.d.ts +23 -0
  38. package/esm/src/features/auth/identity/contract.d.ts.map +1 -0
  39. package/esm/src/features/auth/identity/contract.js +17 -0
  40. package/esm/src/features/auth/identity/repository.d.ts +22 -0
  41. package/esm/src/features/auth/identity/repository.d.ts.map +1 -0
  42. package/esm/src/features/auth/identity/repository.js +30 -0
  43. package/esm/src/features/auth/index.d.ts +6 -0
  44. package/esm/src/features/auth/index.d.ts.map +1 -0
  45. package/esm/src/features/auth/index.js +5 -0
  46. package/esm/src/features/auth/manager.d.ts +105 -0
  47. package/esm/src/features/auth/manager.d.ts.map +1 -0
  48. package/esm/src/features/auth/manager.js +181 -0
  49. package/{dist/modules/profile/profile.api-contract.d.ts → esm/src/features/auth/profile/contract.d.ts} +6 -8
  50. package/esm/src/features/auth/profile/contract.d.ts.map +1 -0
  51. package/esm/src/features/auth/profile/contract.js +14 -0
  52. package/esm/src/features/auth/profile/repository.d.ts +11 -0
  53. package/esm/src/features/auth/profile/repository.d.ts.map +1 -0
  54. package/esm/src/features/auth/profile/repository.js +25 -0
  55. package/esm/src/features/auth/repository.d.ts +30 -0
  56. package/esm/src/features/auth/repository.d.ts.map +1 -0
  57. package/esm/src/features/auth/repository.js +69 -0
  58. package/{dist/modules/auth/storage/client-store.d.ts → esm/src/features/auth/storage/client_store.d.ts} +2 -1
  59. package/esm/src/features/auth/storage/client_store.d.ts.map +1 -0
  60. package/esm/src/features/auth/storage/client_store.js +46 -0
  61. package/{dist/modules/auth/storage/client-token-handler.d.ts → esm/src/features/auth/storage/client_token_handler.d.ts} +1 -0
  62. package/esm/src/features/auth/storage/client_token_handler.d.ts.map +1 -0
  63. package/esm/src/features/auth/storage/client_token_handler.js +36 -0
  64. package/esm/src/features/auth/storage/server_store.d.ts +24 -0
  65. package/esm/src/features/auth/storage/server_store.d.ts.map +1 -0
  66. package/esm/src/features/auth/storage/server_store.js +34 -0
  67. package/esm/src/features/auth/storage/server_token_handler.d.ts +36 -0
  68. package/esm/src/features/auth/storage/server_token_handler.d.ts.map +1 -0
  69. package/esm/src/features/auth/storage/server_token_handler.js +115 -0
  70. package/{dist/modules → esm/src/features}/auth/storage/types.d.ts +2 -1
  71. package/esm/src/features/auth/storage/types.d.ts.map +1 -0
  72. package/esm/src/features/auth/storage/types.js +1 -0
  73. package/{dist/modules/contact/contact.api-contract.d.ts → esm/src/features/contact/contract.d.ts} +55 -88
  74. package/esm/src/features/contact/contract.d.ts.map +1 -0
  75. package/esm/src/features/contact/contract.js +49 -0
  76. package/esm/src/features/contact/index.d.ts +2 -0
  77. package/esm/src/features/contact/index.d.ts.map +1 -0
  78. package/esm/src/features/contact/index.js +1 -0
  79. package/esm/src/features/contact/repository.d.ts +58 -0
  80. package/esm/src/features/contact/repository.d.ts.map +1 -0
  81. package/esm/src/features/contact/repository.js +108 -0
  82. package/{dist/modules/payout/payout.api-contract.d.ts → esm/src/features/payout/contract.d.ts} +197 -340
  83. package/esm/src/features/payout/contract.d.ts.map +1 -0
  84. package/esm/src/features/payout/contract.js +75 -0
  85. package/esm/src/features/payout/index.d.ts +2 -0
  86. package/esm/src/features/payout/index.d.ts.map +1 -0
  87. package/esm/src/features/payout/index.js +1 -0
  88. package/esm/src/features/payout/repository.d.ts +67 -0
  89. package/esm/src/features/payout/repository.d.ts.map +1 -0
  90. package/esm/src/features/payout/repository.js +163 -0
  91. package/{dist/modules/wallet/wallet.contract.d.ts → esm/src/features/wallet/contract.d.ts} +11 -13
  92. package/esm/src/features/wallet/contract.d.ts.map +1 -0
  93. package/esm/src/features/wallet/contract.js +38 -0
  94. package/esm/src/features/wallet/index.d.ts +2 -0
  95. package/esm/src/features/wallet/index.d.ts.map +1 -0
  96. package/esm/src/features/wallet/index.js +1 -0
  97. package/esm/src/features/wallet/repository.d.ts +57 -0
  98. package/esm/src/features/wallet/repository.d.ts.map +1 -0
  99. package/esm/src/features/wallet/repository.js +93 -0
  100. package/esm/src/models/contact/derivatives/contact.d.ts +172 -0
  101. package/esm/src/models/contact/derivatives/contact.d.ts.map +1 -0
  102. package/esm/src/models/contact/derivatives/contact.js +266 -0
  103. package/esm/src/models/contact/derivatives/contact_info.d.ts +188 -0
  104. package/esm/src/models/contact/derivatives/contact_info.d.ts.map +1 -0
  105. package/esm/src/models/contact/derivatives/contact_info.js +255 -0
  106. package/esm/src/models/contact/index.d.ts +5 -0
  107. package/esm/src/models/contact/index.d.ts.map +1 -0
  108. package/esm/src/models/contact/index.js +4 -0
  109. package/esm/src/models/contact/schemas.d.ts +66 -0
  110. package/esm/src/models/contact/schemas.d.ts.map +1 -0
  111. package/esm/src/models/contact/schemas.js +64 -0
  112. package/esm/src/models/contact/validation.d.ts +37 -0
  113. package/esm/src/models/contact/validation.d.ts.map +1 -0
  114. package/esm/src/models/contact/validation.js +146 -0
  115. package/esm/src/models/index.d.ts +7 -0
  116. package/esm/src/models/index.d.ts.map +1 -0
  117. package/esm/src/models/index.js +6 -0
  118. package/esm/src/models/payout/api.d.ts +29 -0
  119. package/esm/src/models/payout/api.d.ts.map +1 -0
  120. package/esm/src/models/payout/api.js +1 -0
  121. package/esm/src/models/payout/channel.d.ts +58 -0
  122. package/esm/src/models/payout/channel.d.ts.map +1 -0
  123. package/esm/src/models/payout/channel.js +53 -0
  124. package/esm/src/models/payout/derivatives/payout.d.ts +158 -0
  125. package/esm/src/models/payout/derivatives/payout.d.ts.map +1 -0
  126. package/esm/src/models/payout/derivatives/payout.js +271 -0
  127. package/esm/src/models/payout/index.d.ts +7 -0
  128. package/esm/src/models/payout/index.d.ts.map +1 -0
  129. package/esm/src/models/payout/index.js +6 -0
  130. package/esm/src/models/payout/narration.d.ts +164 -0
  131. package/esm/src/models/payout/narration.d.ts.map +1 -0
  132. package/esm/src/models/payout/narration.js +308 -0
  133. package/esm/src/models/payout/schemas.d.ts +156 -0
  134. package/esm/src/models/payout/schemas.d.ts.map +1 -0
  135. package/esm/src/models/payout/schemas.js +105 -0
  136. package/esm/src/models/payout/status.d.ts +33 -0
  137. package/esm/src/models/payout/status.d.ts.map +1 -0
  138. package/esm/src/models/payout/status.js +34 -0
  139. package/{dist/modules/login/permission.type.d.ts → esm/src/models/permission.d.ts} +9 -8
  140. package/esm/src/models/permission.d.ts.map +1 -0
  141. package/esm/src/models/permission.js +50 -0
  142. package/esm/src/models/role.d.ts +21 -0
  143. package/esm/src/models/role.d.ts.map +1 -0
  144. package/esm/src/models/role.js +73 -0
  145. package/esm/src/models/user/authenticated-user.d.ts +77 -0
  146. package/esm/src/models/user/authenticated-user.d.ts.map +1 -0
  147. package/esm/src/models/user/authenticated-user.js +226 -0
  148. package/esm/src/models/user/index.d.ts +4 -0
  149. package/esm/src/models/user/index.d.ts.map +1 -0
  150. package/esm/src/models/user/index.js +3 -0
  151. package/esm/src/models/user/managed-user.d.ts +108 -0
  152. package/esm/src/models/user/managed-user.d.ts.map +1 -0
  153. package/esm/src/models/user/managed-user.js +255 -0
  154. package/{dist/modules/profile/profile.model.d.ts → esm/src/models/user/profile.d.ts} +52 -81
  155. package/esm/src/models/user/profile.d.ts.map +1 -0
  156. package/esm/src/models/user/profile.js +334 -0
  157. package/esm/src/models/wallet/index.d.ts +4 -0
  158. package/esm/src/models/wallet/index.d.ts.map +1 -0
  159. package/esm/src/models/wallet/index.js +3 -0
  160. package/esm/src/models/wallet/schemas.d.ts +95 -0
  161. package/esm/src/models/wallet/schemas.d.ts.map +1 -0
  162. package/esm/src/models/wallet/schemas.js +35 -0
  163. package/esm/src/models/wallet/statement_entry.d.ts +160 -0
  164. package/esm/src/models/wallet/statement_entry.d.ts.map +1 -0
  165. package/esm/src/models/wallet/statement_entry.js +255 -0
  166. package/{dist/modules/wallet/wallet.model.d.ts → esm/src/models/wallet/wallet.d.ts} +37 -31
  167. package/esm/src/models/wallet/wallet.d.ts.map +1 -0
  168. package/esm/src/models/wallet/wallet.js +279 -0
  169. package/esm/src/shared/base_repository.d.ts +80 -0
  170. package/esm/src/shared/base_repository.d.ts.map +1 -0
  171. package/esm/src/shared/base_repository.js +153 -0
  172. package/esm/src/shared/common_responses.d.ts +13 -0
  173. package/esm/src/shared/common_responses.d.ts.map +1 -0
  174. package/esm/src/shared/common_responses.js +10 -0
  175. package/esm/src/shared/index.d.ts +3 -0
  176. package/esm/src/shared/index.d.ts.map +1 -0
  177. package/esm/src/shared/index.js +2 -0
  178. package/esm/src/shared/token_required_repository.d.ts +78 -0
  179. package/esm/src/shared/token_required_repository.d.ts.map +1 -0
  180. package/esm/src/shared/token_required_repository.js +128 -0
  181. package/package.json +23 -49
  182. package/script/mod.d.ts +8 -0
  183. package/script/mod.d.ts.map +1 -0
  184. package/script/mod.js +23 -0
  185. package/script/npm/src/mod.d.ts +8 -0
  186. package/script/npm/src/mod.d.ts.map +1 -0
  187. package/script/npm/src/mod.js +23 -0
  188. package/script/npm/src/src/errors/api_error.d.ts +63 -0
  189. package/script/npm/src/src/errors/api_error.d.ts.map +1 -0
  190. package/script/npm/src/src/errors/api_error.js +94 -0
  191. package/script/npm/src/src/errors/index.d.ts +3 -0
  192. package/script/npm/src/src/errors/index.d.ts.map +1 -0
  193. package/script/npm/src/src/errors/index.js +18 -0
  194. package/script/npm/src/src/errors/permission_error.d.ts +48 -0
  195. package/script/npm/src/src/errors/permission_error.d.ts.map +1 -0
  196. package/script/npm/src/src/errors/permission_error.js +74 -0
  197. package/script/npm/src/src/features/admin/contract.d.ts +842 -0
  198. package/script/npm/src/src/features/admin/contract.d.ts.map +1 -0
  199. package/script/npm/src/src/features/admin/contract.js +213 -0
  200. package/script/npm/src/src/features/admin/index.d.ts +4 -0
  201. package/script/npm/src/src/features/admin/index.d.ts.map +1 -0
  202. package/script/npm/src/src/features/admin/index.js +19 -0
  203. package/script/npm/src/src/features/admin/repository.d.ts +114 -0
  204. package/script/npm/src/src/features/admin/repository.d.ts.map +1 -0
  205. package/script/npm/src/src/features/admin/repository.js +252 -0
  206. package/script/npm/src/src/features/admin/schemas.d.ts +146 -0
  207. package/script/npm/src/src/features/admin/schemas.d.ts.map +1 -0
  208. package/script/npm/src/src/features/admin/schemas.js +209 -0
  209. package/script/npm/src/src/features/auth/access/contract.d.ts +14 -0
  210. package/script/npm/src/src/features/auth/access/contract.d.ts.map +1 -0
  211. package/script/npm/src/src/features/auth/access/contract.js +17 -0
  212. package/script/npm/src/src/features/auth/access/repository.d.ts +11 -0
  213. package/script/npm/src/src/features/auth/access/repository.d.ts.map +1 -0
  214. package/script/npm/src/src/features/auth/access/repository.js +29 -0
  215. package/script/npm/src/src/features/auth/contract.d.ts +112 -0
  216. package/script/npm/src/src/features/auth/contract.d.ts.map +1 -0
  217. package/script/npm/src/src/features/auth/contract.js +46 -0
  218. package/script/npm/src/src/features/auth/identity/contract.d.ts +23 -0
  219. package/script/npm/src/src/features/auth/identity/contract.d.ts.map +1 -0
  220. package/script/npm/src/src/features/auth/identity/contract.js +20 -0
  221. package/script/npm/src/src/features/auth/identity/repository.d.ts +22 -0
  222. package/script/npm/src/src/features/auth/identity/repository.d.ts.map +1 -0
  223. package/script/npm/src/src/features/auth/identity/repository.js +34 -0
  224. package/script/npm/src/src/features/auth/index.d.ts +6 -0
  225. package/script/npm/src/src/features/auth/index.d.ts.map +1 -0
  226. package/script/npm/src/src/features/auth/index.js +21 -0
  227. package/script/npm/src/src/features/auth/manager.d.ts +105 -0
  228. package/script/npm/src/src/features/auth/manager.d.ts.map +1 -0
  229. package/script/npm/src/src/features/auth/manager.js +185 -0
  230. package/script/npm/src/src/features/auth/profile/contract.d.ts +37 -0
  231. package/script/npm/src/src/features/auth/profile/contract.d.ts.map +1 -0
  232. package/script/npm/src/src/features/auth/profile/contract.js +17 -0
  233. package/script/npm/src/src/features/auth/profile/repository.d.ts +11 -0
  234. package/script/npm/src/src/features/auth/profile/repository.d.ts.map +1 -0
  235. package/script/npm/src/src/features/auth/profile/repository.js +29 -0
  236. package/script/npm/src/src/features/auth/repository.d.ts +30 -0
  237. package/script/npm/src/src/features/auth/repository.d.ts.map +1 -0
  238. package/script/npm/src/src/features/auth/repository.js +73 -0
  239. package/script/npm/src/src/features/auth/storage/client_store.d.ts +30 -0
  240. package/script/npm/src/src/features/auth/storage/client_store.d.ts.map +1 -0
  241. package/script/npm/src/src/features/auth/storage/client_store.js +51 -0
  242. package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts +32 -0
  243. package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts.map +1 -0
  244. package/script/npm/src/src/features/auth/storage/client_token_handler.js +40 -0
  245. package/script/npm/src/src/features/auth/storage/server_store.d.ts +24 -0
  246. package/script/npm/src/src/features/auth/storage/server_store.d.ts.map +1 -0
  247. package/script/npm/src/src/features/auth/storage/server_store.js +38 -0
  248. package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts +36 -0
  249. package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts.map +1 -0
  250. package/script/npm/src/src/features/auth/storage/server_token_handler.js +119 -0
  251. package/script/npm/src/src/features/auth/storage/types.d.ts +42 -0
  252. package/script/npm/src/src/features/auth/storage/types.d.ts.map +1 -0
  253. package/script/npm/src/src/features/auth/storage/types.js +2 -0
  254. package/script/npm/src/src/features/contact/contract.d.ts +170 -0
  255. package/script/npm/src/src/features/contact/contract.d.ts.map +1 -0
  256. package/script/npm/src/src/features/contact/contract.js +52 -0
  257. package/script/npm/src/src/features/contact/index.d.ts +2 -0
  258. package/script/npm/src/src/features/contact/index.d.ts.map +1 -0
  259. package/script/npm/src/src/features/contact/index.js +17 -0
  260. package/script/npm/src/src/features/contact/repository.d.ts +58 -0
  261. package/script/npm/src/src/features/contact/repository.d.ts.map +1 -0
  262. package/script/npm/src/src/features/contact/repository.js +112 -0
  263. package/script/npm/src/src/features/payout/contract.d.ts +623 -0
  264. package/script/npm/src/src/features/payout/contract.d.ts.map +1 -0
  265. package/script/npm/src/src/features/payout/contract.js +78 -0
  266. package/script/npm/src/src/features/payout/index.d.ts +2 -0
  267. package/script/npm/src/src/features/payout/index.d.ts.map +1 -0
  268. package/script/npm/src/src/features/payout/index.js +17 -0
  269. package/script/npm/src/src/features/payout/repository.d.ts +67 -0
  270. package/script/npm/src/src/features/payout/repository.d.ts.map +1 -0
  271. package/script/npm/src/src/features/payout/repository.js +167 -0
  272. package/script/npm/src/src/features/wallet/contract.d.ts +137 -0
  273. package/script/npm/src/src/features/wallet/contract.d.ts.map +1 -0
  274. package/script/npm/src/src/features/wallet/contract.js +41 -0
  275. package/script/npm/src/src/features/wallet/index.d.ts +2 -0
  276. package/script/npm/src/src/features/wallet/index.d.ts.map +1 -0
  277. package/script/npm/src/src/features/wallet/index.js +17 -0
  278. package/script/npm/src/src/features/wallet/repository.d.ts +57 -0
  279. package/script/npm/src/src/features/wallet/repository.d.ts.map +1 -0
  280. package/script/npm/src/src/features/wallet/repository.js +97 -0
  281. package/script/npm/src/src/models/contact/derivatives/contact.d.ts +172 -0
  282. package/script/npm/src/src/models/contact/derivatives/contact.d.ts.map +1 -0
  283. package/script/npm/src/src/models/contact/derivatives/contact.js +270 -0
  284. package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts +188 -0
  285. package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts.map +1 -0
  286. package/script/npm/src/src/models/contact/derivatives/contact_info.js +260 -0
  287. package/script/npm/src/src/models/contact/index.d.ts +5 -0
  288. package/script/npm/src/src/models/contact/index.d.ts.map +1 -0
  289. package/script/npm/src/src/models/contact/index.js +20 -0
  290. package/script/npm/src/src/models/contact/schemas.d.ts +66 -0
  291. package/script/npm/src/src/models/contact/schemas.d.ts.map +1 -0
  292. package/script/npm/src/src/models/contact/schemas.js +67 -0
  293. package/script/npm/src/src/models/contact/validation.d.ts +37 -0
  294. package/script/npm/src/src/models/contact/validation.d.ts.map +1 -0
  295. package/script/npm/src/src/models/contact/validation.js +153 -0
  296. package/script/npm/src/src/models/index.d.ts +7 -0
  297. package/script/npm/src/src/models/index.d.ts.map +1 -0
  298. package/script/npm/src/src/models/index.js +22 -0
  299. package/script/npm/src/src/models/payout/api.d.ts +29 -0
  300. package/script/npm/src/src/models/payout/api.d.ts.map +1 -0
  301. package/script/npm/src/src/models/payout/api.js +2 -0
  302. package/script/npm/src/src/models/payout/channel.d.ts +58 -0
  303. package/script/npm/src/src/models/payout/channel.d.ts.map +1 -0
  304. package/script/npm/src/src/models/payout/channel.js +56 -0
  305. package/script/npm/src/src/models/payout/derivatives/payout.d.ts +158 -0
  306. package/script/npm/src/src/models/payout/derivatives/payout.d.ts.map +1 -0
  307. package/script/npm/src/src/models/payout/derivatives/payout.js +275 -0
  308. package/script/npm/src/src/models/payout/index.d.ts +7 -0
  309. package/script/npm/src/src/models/payout/index.d.ts.map +1 -0
  310. package/script/npm/src/src/models/payout/index.js +22 -0
  311. package/script/npm/src/src/models/payout/narration.d.ts +164 -0
  312. package/script/npm/src/src/models/payout/narration.d.ts.map +1 -0
  313. package/script/npm/src/src/models/payout/narration.js +312 -0
  314. package/script/npm/src/src/models/payout/schemas.d.ts +156 -0
  315. package/script/npm/src/src/models/payout/schemas.d.ts.map +1 -0
  316. package/script/npm/src/src/models/payout/schemas.js +108 -0
  317. package/script/npm/src/src/models/payout/status.d.ts +33 -0
  318. package/script/npm/src/src/models/payout/status.d.ts.map +1 -0
  319. package/script/npm/src/src/models/payout/status.js +37 -0
  320. package/script/npm/src/src/models/permission.d.ts +55 -0
  321. package/script/npm/src/src/models/permission.d.ts.map +1 -0
  322. package/script/npm/src/src/models/permission.js +53 -0
  323. package/script/npm/src/src/models/role.d.ts +21 -0
  324. package/script/npm/src/src/models/role.d.ts.map +1 -0
  325. package/script/npm/src/src/models/role.js +77 -0
  326. package/script/npm/src/src/models/user/authenticated-user.d.ts +77 -0
  327. package/script/npm/src/src/models/user/authenticated-user.d.ts.map +1 -0
  328. package/script/npm/src/src/models/user/authenticated-user.js +230 -0
  329. package/script/npm/src/src/models/user/index.d.ts +4 -0
  330. package/script/npm/src/src/models/user/index.d.ts.map +1 -0
  331. package/script/npm/src/src/models/user/index.js +19 -0
  332. package/script/npm/src/src/models/user/managed-user.d.ts +108 -0
  333. package/script/npm/src/src/models/user/managed-user.d.ts.map +1 -0
  334. package/script/npm/src/src/models/user/managed-user.js +260 -0
  335. package/script/npm/src/src/models/user/profile.d.ts +161 -0
  336. package/script/npm/src/src/models/user/profile.d.ts.map +1 -0
  337. package/script/npm/src/src/models/user/profile.js +338 -0
  338. package/script/npm/src/src/models/wallet/index.d.ts +4 -0
  339. package/script/npm/src/src/models/wallet/index.d.ts.map +1 -0
  340. package/script/npm/src/src/models/wallet/index.js +19 -0
  341. package/script/npm/src/src/models/wallet/schemas.d.ts +95 -0
  342. package/script/npm/src/src/models/wallet/schemas.d.ts.map +1 -0
  343. package/script/npm/src/src/models/wallet/schemas.js +38 -0
  344. package/script/npm/src/src/models/wallet/statement_entry.d.ts +160 -0
  345. package/script/npm/src/src/models/wallet/statement_entry.d.ts.map +1 -0
  346. package/script/npm/src/src/models/wallet/statement_entry.js +259 -0
  347. package/script/npm/src/src/models/wallet/wallet.d.ts +147 -0
  348. package/script/npm/src/src/models/wallet/wallet.d.ts.map +1 -0
  349. package/script/npm/src/src/models/wallet/wallet.js +283 -0
  350. package/script/npm/src/src/shared/base_repository.d.ts +80 -0
  351. package/script/npm/src/src/shared/base_repository.d.ts.map +1 -0
  352. package/script/npm/src/src/shared/base_repository.js +157 -0
  353. package/script/npm/src/src/shared/common_responses.d.ts +13 -0
  354. package/script/npm/src/src/shared/common_responses.d.ts.map +1 -0
  355. package/script/npm/src/src/shared/common_responses.js +13 -0
  356. package/script/npm/src/src/shared/index.d.ts +3 -0
  357. package/script/npm/src/src/shared/index.d.ts.map +1 -0
  358. package/script/npm/src/src/shared/index.js +18 -0
  359. package/script/npm/src/src/shared/token_required_repository.d.ts +78 -0
  360. package/script/npm/src/src/shared/token_required_repository.d.ts.map +1 -0
  361. package/script/npm/src/src/shared/token_required_repository.js +132 -0
  362. package/script/package.json +3 -0
  363. package/dist/index.cjs.js +0 -2
  364. package/dist/index.cjs.js.map +0 -1
  365. package/dist/index.d.ts +0 -10
  366. package/dist/index.esm.js +0 -2
  367. package/dist/index.esm.js.map +0 -1
  368. package/dist/lib/api/base-repository.d.ts +0 -175
  369. package/dist/lib/api/index.d.ts +0 -1
  370. package/dist/lib/error/error.utils.d.ts +0 -22
  371. package/dist/lib/error/index.d.ts +0 -3
  372. package/dist/lib/query/index.d.ts +0 -4
  373. package/dist/lib/query/pagination/pagination.d.ts +0 -73
  374. package/dist/lib/query/pagination/pagination.schemas.d.ts +0 -83
  375. package/dist/lib/query/query.builder.d.ts +0 -71
  376. package/dist/lib/query/query.types.d.ts +0 -36
  377. package/dist/modules/auth/auth.manager.d.ts +0 -249
  378. package/dist/modules/auth/auth.repository.d.ts +0 -83
  379. package/dist/modules/auth/auth.store.d.ts +0 -139
  380. package/dist/modules/auth/company-membership.model.d.ts +0 -171
  381. package/dist/modules/auth/index.d.ts +0 -4
  382. package/dist/modules/auth/user.model.d.ts +0 -363
  383. package/dist/modules/contact/contact-info.model.d.ts +0 -485
  384. package/dist/modules/contact/contact-input-handler.d.ts +0 -16
  385. package/dist/modules/contact/contact.dtos.d.ts +0 -84
  386. package/dist/modules/contact/contact.model.d.ts +0 -441
  387. package/dist/modules/contact/contact.repository.d.ts +0 -116
  388. package/dist/modules/contact/index.d.ts +0 -4
  389. package/dist/modules/login/index.d.ts +0 -4
  390. package/dist/modules/login/login.api-contract.d.ts +0 -51
  391. package/dist/modules/login/login.dtos.d.ts +0 -85
  392. package/dist/modules/login/login.model.d.ts +0 -168
  393. package/dist/modules/login/login.repository.d.ts +0 -58
  394. package/dist/modules/payout/index.d.ts +0 -5
  395. package/dist/modules/payout/payout-channel-handler.d.ts +0 -82
  396. package/dist/modules/payout/payout.dtos.d.ts +0 -605
  397. package/dist/modules/payout/payout.model.d.ts +0 -379
  398. package/dist/modules/payout/payout.query.d.ts +0 -133
  399. package/dist/modules/payout/payout.repository.d.ts +0 -181
  400. package/dist/modules/profile/index.d.ts +0 -3
  401. package/dist/modules/profile/profile.dtos.d.ts +0 -80
  402. package/dist/modules/profile/profile.repository.d.ts +0 -56
  403. package/dist/modules/team-member/index.d.ts +0 -4
  404. package/dist/modules/team-member/role.model.d.ts +0 -61
  405. package/dist/modules/team-member/team-member.dtos.d.ts +0 -261
  406. package/dist/modules/team-member/team-member.model.d.ts +0 -237
  407. package/dist/modules/team-member/team-member.repository.d.ts +0 -179
  408. package/dist/modules/wallet/index.d.ts +0 -7
  409. package/dist/modules/wallet/narration.model.d.ts +0 -225
  410. package/dist/modules/wallet/statement-entry.model.d.ts +0 -299
  411. package/dist/modules/wallet/wallet-manager.session.d.ts +0 -143
  412. package/dist/modules/wallet/wallet.dtos.d.ts +0 -204
  413. package/dist/modules/wallet/wallet.query.d.ts +0 -95
  414. package/dist/modules/wallet/wallet.repository.d.ts +0 -205
  415. package/dist/modules/wallet/wallet.utils.d.ts +0 -17
@@ -1,80 +0,0 @@
1
- import { z } from "zod";
2
- /**
3
- * Zod schema for validating user profile data.
4
- * Defines validation rules and constraints for each profile field.
5
- *
6
- * @const {ProfileType}
7
- *
8
- * @property {string} id - Unique identifier for the profile
9
- * @property {string | null | undefined} firstName - User's first name, can be null or undefined
10
- * @property {string | null | undefined} lastName - User's last name, can be null or undefined
11
- * @property {string} displayName - User's display name
12
- * @property {string | null | undefined} phone - User's contact phone number, can be null or undefined
13
- * @property {string} accountNo - User's account number
14
- * @property {string | null | undefined} email - User's email address, can be null or undefined
15
- * @property {boolean | null | undefined} autoApprove - Auto-approval setting, can be null or undefined
16
- */
17
- declare const profileDTOSchema: z.ZodObject<{
18
- id: z.ZodString;
19
- firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
- lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
- displayName: z.ZodString;
22
- phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
- accountNo: z.ZodString;
24
- email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
- autoApprove: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
26
- }, "strip", z.ZodTypeAny, {
27
- id: string;
28
- displayName: string;
29
- accountNo: string;
30
- firstName?: string | null | undefined;
31
- lastName?: string | null | undefined;
32
- phone?: string | null | undefined;
33
- email?: string | null | undefined;
34
- autoApprove?: boolean | null | undefined;
35
- }, {
36
- id: string;
37
- displayName: string;
38
- accountNo: string;
39
- firstName?: string | null | undefined;
40
- lastName?: string | null | undefined;
41
- phone?: string | null | undefined;
42
- email?: string | null | undefined;
43
- autoApprove?: boolean | null | undefined;
44
- }>;
45
- /**
46
- * TypeScript type representing a validated user profile.
47
- * Use this type for profile instances that have been validated against the schema.
48
- */
49
- export type ProfileDTO = z.infer<typeof profileDTOSchema>;
50
- export declare const ProfileDTOSchemas: {
51
- profileDTOSchema: z.ZodObject<{
52
- id: z.ZodString;
53
- firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
- lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
- displayName: z.ZodString;
56
- phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
- accountNo: z.ZodString;
58
- email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
- autoApprove: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
60
- }, "strip", z.ZodTypeAny, {
61
- id: string;
62
- displayName: string;
63
- accountNo: string;
64
- firstName?: string | null | undefined;
65
- lastName?: string | null | undefined;
66
- phone?: string | null | undefined;
67
- email?: string | null | undefined;
68
- autoApprove?: boolean | null | undefined;
69
- }, {
70
- id: string;
71
- displayName: string;
72
- accountNo: string;
73
- firstName?: string | null | undefined;
74
- lastName?: string | null | undefined;
75
- phone?: string | null | undefined;
76
- email?: string | null | undefined;
77
- autoApprove?: boolean | null | undefined;
78
- }>;
79
- };
80
- export {};
@@ -1,56 +0,0 @@
1
- import { BaseRepository } from "@/lib/api/base-repository.js";
2
- import { profileContract } from "./profile.api-contract.js";
3
- import { Profile } from "./profile.model.js";
4
- /**
5
- * Repository class for managing user profile operations.
6
- * Handles retrieving and updating user profile information from the API.
7
- *
8
- * This repository handles pure API communication without permission checking.
9
- * Permission validation should be handled at the service layer or route handlers.
10
- *
11
- * @extends {BaseRepository<typeof profileContract>}
12
- *
13
- * @example
14
- * ```typescript
15
- * const repo = new ProfileRepository({ token: userToken });
16
- * const profile = await repo.getCurrentProfile();
17
- * ```
18
- */
19
- export declare class ProfileRepository extends BaseRepository<typeof profileContract> {
20
- /**
21
- * Creates an instance of ProfileRepository.
22
- *
23
- * @param options - Optional configuration
24
- * @param options.token - Authentication token for API calls
25
- * @param options.root - Custom API root URL
26
- *
27
- * @example
28
- * ```typescript
29
- * const repo = new ProfileRepository({
30
- * token: "user-auth-token",
31
- * root: "base-api-url"
32
- * });
33
- * ```
34
- */
35
- constructor(options?: {
36
- token?: string;
37
- root?: string;
38
- });
39
- /**
40
- * Retrieves the current user's profile information.
41
- *
42
- * @returns Promise that resolves to the user's profile
43
- * @throws {APIError} If the request fails, profile data is invalid, or returns an unexpected status
44
- *
45
- * @example
46
- * ```typescript
47
- * try {
48
- * const profile = await repo.getCurrentProfile();
49
- * console.log(`User: ${profile.name}, Email: ${profile.email}`);
50
- * } catch (error) {
51
- * console.error("Failed to get profile:", error.message);
52
- * }
53
- * ```
54
- */
55
- getCurrentProfile(): Promise<Profile>;
56
- }
@@ -1,4 +0,0 @@
1
- export * from "./team-member.repository.js";
2
- export * from "./team-member.dtos.js";
3
- export * from "./team-member.model.js";
4
- export * from "./role.model.js";
@@ -1,61 +0,0 @@
1
- import z from "zod";
2
- import { RoleDTO } from "./team-member.dtos.js";
3
- /**
4
- * Zod schema for Role JSON serialization
5
- */
6
- export declare const RoleJSONSchema: z.ZodObject<{
7
- id: z.ZodString;
8
- name: z.ZodString;
9
- description: z.ZodOptional<z.ZodString>;
10
- access: z.ZodArray<z.ZodString, "many">;
11
- createdAt: z.ZodString;
12
- updatedAt: z.ZodString;
13
- version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
14
- }, "strip", z.ZodTypeAny, {
15
- name: string;
16
- id: string;
17
- version: string;
18
- createdAt: string;
19
- updatedAt: string;
20
- access: string[];
21
- description?: string | undefined;
22
- }, {
23
- name: string;
24
- id: string;
25
- createdAt: string;
26
- updatedAt: string;
27
- access: string[];
28
- version?: string | undefined;
29
- description?: string | undefined;
30
- }>;
31
- /**
32
- * Infer the RoleJSON type from the schema
33
- */
34
- export type RoleJSON = z.infer<typeof RoleJSONSchema>;
35
- export declare class Role {
36
- readonly id: string;
37
- readonly name: string;
38
- readonly description?: string;
39
- readonly permissions: ReadonlySet<string>;
40
- readonly createdAt: Date;
41
- readonly updatedAt: Date;
42
- constructor(data: RoleDTO);
43
- hasPermission(permission: string): boolean;
44
- static from(data: RoleDTO): Role | undefined;
45
- /**
46
- * Serializes the Role instance to a JSON-compatible object
47
- */
48
- toJSON(): RoleJSON;
49
- /**
50
- * Serializes the Role instance to a JSON string
51
- */
52
- toJSONString(): string;
53
- /**
54
- * Creates a Role instance from a JSON-compatible object or string
55
- */
56
- static fromJSON(json: RoleJSON | string): Role | undefined;
57
- /**
58
- * Type guard using Zod schema validation
59
- */
60
- static isRoleJSON(obj: unknown): obj is RoleJSON;
61
- }
@@ -1,261 +0,0 @@
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
- id: string;
17
- createdAt: string;
18
- updatedAt: string;
19
- access: string[];
20
- description?: string | undefined;
21
- }, {
22
- name: string;
23
- id: string;
24
- createdAt: 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
- id: string;
49
- createdAt: string;
50
- updatedAt: string;
51
- access: string[];
52
- description?: string | undefined;
53
- }, {
54
- name: string;
55
- id: string;
56
- createdAt: 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
- id: string;
67
- profileId: string;
68
- identity: string;
69
- roleId: string;
70
- isActive: boolean;
71
- isArchived: boolean;
72
- resetPassword: boolean;
73
- createdAt: string;
74
- updatedAt: string;
75
- role?: {
76
- name: string;
77
- id: string;
78
- createdAt: string;
79
- updatedAt: string;
80
- access: string[];
81
- description?: string | undefined;
82
- } | undefined;
83
- }, {
84
- type: string;
85
- name: string;
86
- id: string;
87
- profileId: string;
88
- identity: string;
89
- roleId: string;
90
- isActive: boolean;
91
- isArchived: boolean;
92
- resetPassword: boolean;
93
- createdAt: string;
94
- updatedAt: string;
95
- role?: {
96
- name: string;
97
- id: string;
98
- createdAt: 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
- id?: string | undefined;
121
- profileId?: string | undefined;
122
- identity?: string | undefined;
123
- roleId?: string | undefined;
124
- isActive?: number | undefined;
125
- isArchived?: number | undefined;
126
- resetPassword?: number | undefined;
127
- createdAt?: string | undefined;
128
- updatedAt?: string | undefined;
129
- eager?: string | undefined;
130
- }, {
131
- type?: string | undefined;
132
- name?: string | undefined;
133
- id?: string | undefined;
134
- profileId?: string | undefined;
135
- identity?: string | undefined;
136
- roleId?: string | undefined;
137
- isActive?: number | undefined;
138
- isArchived?: number | undefined;
139
- resetPassword?: number | undefined;
140
- createdAt?: string | undefined;
141
- updatedAt?: string | undefined;
142
- eager?: 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
- id: string;
208
- profileId: string;
209
- identity: string;
210
- roleId: string;
211
- isActive: boolean;
212
- isArchived: boolean;
213
- resetPassword: boolean;
214
- createdAt: string;
215
- updatedAt: string;
216
- }, {
217
- type: string;
218
- name: string;
219
- id: string;
220
- profileId: string;
221
- identity: string;
222
- roleId: string;
223
- isActive: boolean;
224
- isArchived: boolean;
225
- resetPassword: boolean;
226
- createdAt: string;
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>;
@@ -1,237 +0,0 @@
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
- id: string;
42
- version: string;
43
- createdAt: string;
44
- updatedAt: string;
45
- access: string[];
46
- description?: string | undefined;
47
- }, {
48
- name: string;
49
- id: string;
50
- createdAt: 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
- id: string;
63
- version: string;
64
- profileId: string;
65
- identity: string;
66
- roleId: string;
67
- isActive: boolean;
68
- isArchived: boolean;
69
- resetPassword: boolean;
70
- createdAt: string;
71
- updatedAt: string;
72
- role?: {
73
- name: string;
74
- id: string;
75
- version: string;
76
- createdAt: string;
77
- updatedAt: string;
78
- access: string[];
79
- description?: string | undefined;
80
- } | undefined;
81
- }, {
82
- type: string;
83
- name: string;
84
- id: string;
85
- profileId: string;
86
- identity: string;
87
- roleId: string;
88
- isActive: boolean;
89
- isArchived: boolean;
90
- resetPassword: boolean;
91
- createdAt: string;
92
- updatedAt: string;
93
- version?: string | undefined;
94
- role?: {
95
- name: string;
96
- id: string;
97
- createdAt: 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
- }