@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,485 +0,0 @@
1
- import { ContactType, ContactDTO } from "@/modules/contact/contact.dtos.js";
2
- import { PayoutDTO } from "@/modules/payout/payout.dtos.js";
3
- import { Bank, ISO2CountryCode, PhoneNumber } from "@temboplus/frontend-core";
4
- import type { BankSwiftCode, MNOId } from "@temboplus/frontend-core";
5
- import { z } from "zod";
6
- export declare const MobileContactInfoJSONSchema: z.ZodObject<{
7
- type: z.ZodLiteral<"Mobile">;
8
- name: z.ZodString;
9
- phoneNumber: z.ZodString;
10
- mnoId: z.ZodString;
11
- version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
12
- }, "strip", z.ZodTypeAny, {
13
- type: "Mobile";
14
- name: string;
15
- version: string;
16
- phoneNumber: string;
17
- mnoId: string;
18
- }, {
19
- type: "Mobile";
20
- name: string;
21
- phoneNumber: string;
22
- mnoId: string;
23
- version?: string | undefined;
24
- }>;
25
- export declare const BankContactInfoJSONSchema: z.ZodObject<{
26
- type: z.ZodLiteral<"Bank">;
27
- accName: z.ZodString;
28
- swiftCode: z.ZodString;
29
- countryCode: z.ZodString;
30
- accNo: z.ZodString;
31
- version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
32
- }, "strip", z.ZodTypeAny, {
33
- type: "Bank";
34
- version: string;
35
- countryCode: string;
36
- accName: string;
37
- swiftCode: string;
38
- accNo: string;
39
- }, {
40
- type: "Bank";
41
- countryCode: string;
42
- accName: string;
43
- swiftCode: string;
44
- accNo: string;
45
- version?: string | undefined;
46
- }>;
47
- export declare const ContactInfoJSONSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
48
- type: z.ZodLiteral<"Mobile">;
49
- name: z.ZodString;
50
- phoneNumber: z.ZodString;
51
- mnoId: z.ZodString;
52
- version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
53
- }, "strip", z.ZodTypeAny, {
54
- type: "Mobile";
55
- name: string;
56
- version: string;
57
- phoneNumber: string;
58
- mnoId: string;
59
- }, {
60
- type: "Mobile";
61
- name: string;
62
- phoneNumber: string;
63
- mnoId: string;
64
- version?: string | undefined;
65
- }>, z.ZodObject<{
66
- type: z.ZodLiteral<"Bank">;
67
- accName: z.ZodString;
68
- swiftCode: z.ZodString;
69
- countryCode: z.ZodString;
70
- accNo: z.ZodString;
71
- version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
72
- }, "strip", z.ZodTypeAny, {
73
- type: "Bank";
74
- version: string;
75
- countryCode: string;
76
- accName: string;
77
- swiftCode: string;
78
- accNo: string;
79
- }, {
80
- type: "Bank";
81
- countryCode: string;
82
- accName: string;
83
- swiftCode: string;
84
- accNo: string;
85
- version?: string | undefined;
86
- }>]>;
87
- export type MobileContactInfoJSON = z.infer<typeof MobileContactInfoJSONSchema>;
88
- export type BankContactInfoJSON = z.infer<typeof BankContactInfoJSONSchema>;
89
- export type ContactInfoJSON = z.infer<typeof ContactInfoJSONSchema>;
90
- /**
91
- * Abstract base class that provides a common interface for different types of contact information.
92
- * This class defines the structure and validation requirements for both mobile and bank contacts.
93
- *
94
- * Serves as the foundation for type-safe contact handling throughout the application,
95
- * ensuring consistent behavior between mobile money and bank transfer contacts.
96
- *
97
- * **Country Code Handling:**
98
- * The country code is always derived from the underlying domain objects (PhoneNumber or Bank)
99
- * rather than being passed as a separate parameter, ensuring consistency and single source of truth.
100
- *
101
- * @abstract
102
- * @class BaseContactInfo
103
- *
104
- * @property {ContactType} type - The type of contact (either "Mobile" or "Bank")
105
- * @property {ISO2CountryCode} countryCode - The ISO2 country code derived from PhoneNumber or Bank
106
- *
107
- * @example
108
- * ```typescript
109
- * // Cannot instantiate directly - use concrete implementations
110
- * const mobileContact = MobileContactInfo.from({ name: "John Doe", phoneNumber });
111
- * const bankContact = BankContactInfo.from({ accName: "Jane Smith", bank, accNo: "123456789" });
112
- *
113
- * // Polymorphic usage
114
- * function processContact(contact: BaseContactInfo) {
115
- * console.log(`Processing ${contact.type} contact: ${contact.displayName}`);
116
- * console.log(`Channel: ${contact.channelDisplayName}`);
117
- * console.log(`Country: ${contact.countryCode}`); // Always available
118
- * }
119
- * ```
120
- */
121
- declare abstract class BaseContactInfo {
122
- readonly type: ContactType;
123
- readonly countryCode: ISO2CountryCode;
124
- /**
125
- * Creates a new instance of BaseContactInfo.
126
- * Protected constructor ensures only subclasses can instantiate.
127
- *
128
- * @protected
129
- * @param {ContactType} type - The type of contact to create ("Mobile" or "Bank")
130
- * @param {ISO2CountryCode} countryCode - The ISO2 country code derived from domain objects
131
- */
132
- constructor(type: ContactType, countryCode: ISO2CountryCode);
133
- /**
134
- * Gets the typed channel identifier for the contact.
135
- * Returns MNO ID for mobile contacts, SWIFT code for bank contacts.
136
- *
137
- * @abstract
138
- * @returns {MNOId | BankSwiftCode} The typed channel identifier
139
- *
140
- * @example
141
- * ```typescript
142
- * const mobileChannel: MNOId = mobileContact.channelId; // "VODACOM", "SAFARICOM", etc.
143
- * const bankChannel: BankSwiftCode = bankContact.channelId; // "CORUTZTZ", "KCBLKENX", etc.
144
- * ```
145
- */
146
- abstract get channelId(): MNOId | BankSwiftCode;
147
- /**
148
- * Gets the human-readable channel name for display purposes.
149
- * Returns mobile money service name for mobile contacts, bank short name for bank contacts.
150
- *
151
- * @abstract
152
- * @returns {string} The display-friendly channel name
153
- *
154
- * @example
155
- * ```typescript
156
- * console.log(mobileContact.channelName); // "M-Pesa", "Airtel Money", etc.
157
- * console.log(bankContact.channelName); // "CRDB", "KCB", etc.
158
- * ```
159
- */
160
- abstract get channelName(): string;
161
- /**
162
- * Gets the primary display name for the contact.
163
- *
164
- * @abstract
165
- * @returns {string} The contact's display name (personal name for mobile, account name for bank)
166
- */
167
- abstract get accountName(): string;
168
- /**
169
- * Gets the primary account/identification number for the contact.
170
- *
171
- * @abstract
172
- * @returns {string} The contact's number (phone number for mobile, account number for bank)
173
- */
174
- abstract get accountNumber(): string;
175
- /**
176
- * Gets the localized label for the display name field.
177
- *
178
- * @abstract
179
- * @returns {string} The appropriate label for the display name based on contact type
180
- */
181
- abstract get accountNameLabel(): string;
182
- /**
183
- * Gets the localized label for the account number field.
184
- *
185
- * @abstract
186
- * @returns {string} The appropriate label for the account number based on contact type
187
- */
188
- abstract get accountNumberLabel(): string;
189
- /**
190
- * Gets the localized label for the channel field.
191
- *
192
- * @abstract
193
- * @returns {string} The appropriate label for the channel based on contact type
194
- */
195
- abstract get channelLabel(): string;
196
- /**
197
- * Validates that all contact information is consistent and correct.
198
- *
199
- * @abstract
200
- * @returns {boolean} True if the contact information is valid
201
- */
202
- abstract validate(): boolean;
203
- /**
204
- * Serializes the ContactInfo instance to a JSON-compatible object
205
- */
206
- abstract toJSON(): ContactInfoJSON;
207
- /**
208
- * Converts the ContactInfo instance to a JSON string.
209
- */
210
- toJSONString(): string;
211
- }
212
- /**
213
- * Implementation of BaseContactInfo for mobile phone contacts.
214
- * Handles storage, validation, and display of contact details specific to mobile money services.
215
- *
216
- * This class properly delegates MNO-related logic to country-specific implementations,
217
- * supporting both countries with Mobile Number Portability (MNP) and those without.
218
- * The country code is always derived from the PhoneNumber object, ensuring consistency.
219
- *
220
- * **Key Features:**
221
- * - Automatic MNO detection for countries without MNP (e.g., Tanzania)
222
- * - Explicit MNO requirement for countries with MNP (e.g., Kenya)
223
- * - Country-specific validation through MNOUtils delegation
224
- * - Comprehensive error handling with structured context
225
- * - Country code derived from PhoneNumber (single source of truth)
226
- *
227
- * **MNP Handling:**
228
- * - **Tanzania (no MNP)**: MNO is always auto-detected from phone number prefix, ignoring any provided MNO
229
- * - **Kenya (has MNP)**: MNO must be explicitly provided as numbers can be ported
230
- *
231
- * @extends BaseContactInfo
232
- * @class MobileContactInfo
233
- *
234
- * @property {string} name - The contact's personal name
235
- * @property {PhoneNumber} phoneNumber - The validated phone number object
236
- * @property {MNOId} mnoId - The mobile network operator identifier (always available after construction)
237
- *
238
- * @example
239
- * ```typescript
240
- * // Preferred: Use static factory method
241
- * const tzContact = MobileContactInfo.from({
242
- * name: "John Doe",
243
- * phoneNumber: tzPhoneNumber
244
- * });
245
- * console.log(tzContact?.channelName); // "M-Pesa" (Vodacom's service)
246
- *
247
- * // From JSON
248
- * const jsonContact = MobileContactInfo.fromJSON(jsonString);
249
- * ```
250
- */
251
- export declare class MobileContactInfo extends BaseContactInfo {
252
- readonly name: string;
253
- readonly phoneNumber: PhoneNumber;
254
- readonly mnoId: MNOId;
255
- /**
256
- * Creates a new mobile contact with comprehensive validation.
257
- *
258
- * **Validation Process:**
259
- * 1. Validates name is non-empty
260
- * 2. Validates phone number structure
261
- * 3. Extracts country code from PhoneNumber object
262
- * 4. Handles MNO validation based on country MNP status
263
- *
264
- * @deprecated Use {@link MobileContactInfo.from} static factory method instead
265
- * @param {string} name - The contact's personal name (required, non-empty)
266
- * @param {PhoneNumber} phoneNumber - The validated phone number object (contains country code)
267
- * @param {MNOId} [mnoId] - MNO ID. Required for MNP countries (KE), ignored for non-MNP countries (TZ)
268
- *
269
- * @throws {ContactInfoError} When any validation fails
270
- */
271
- constructor(name: string, phoneNumber: PhoneNumber, mnoId?: MNOId);
272
- /**
273
- * Creates a MobileContactInfo instance from data object.
274
- * This is the preferred method for creating instances.
275
- *
276
- * @static
277
- * @param {Object} data - The mobile contact data
278
- * @param {string} data.name - The contact's personal name
279
- * @param {PhoneNumber} data.phoneNumber - The validated phone number object
280
- * @param {MNOId} [data.mnoId] - MNO ID (required for MNP countries)
281
- *
282
- * @returns {MobileContactInfo | undefined} New instance if successful, undefined if validation fails
283
- *
284
- * @example
285
- * ```typescript
286
- * const contact = MobileContactInfo.from({
287
- * name: "John Doe",
288
- * phoneNumber: tzPhone,
289
- * mnoId: TZMNOId.VODACOM // Optional for TZ, required for KE
290
- * });
291
- * ```
292
- */
293
- static from(data: {
294
- name: string;
295
- phoneNumber: PhoneNumber;
296
- mnoId?: MNOId;
297
- }): MobileContactInfo | undefined;
298
- /**
299
- * Creates a MobileContactInfo instance from a ContactDTO object.
300
- * Handles validation and MNO extraction from the DTO's channel field.
301
- *
302
- * @static
303
- * @param {ContactDTO} info - The contact data transfer object
304
- * @returns {MobileContactInfo | undefined} New instance if successful, undefined if validation fails
305
- *
306
- * @example
307
- * ```typescript
308
- * const contactDTO = {
309
- * type: "Mobile",
310
- * accountNo: "+255712345678",
311
- * displayName: "John Doe",
312
- * channel: "VODACOM"
313
- * };
314
- *
315
- * const contact = MobileContactInfo.fromContactDTO(contactDTO);
316
- * ```
317
- */
318
- static fromContactDTO(info: ContactDTO): MobileContactInfo | undefined;
319
- /**
320
- * Creates a MobileContactInfo instance from a PayoutDTO object.
321
- * Extracts mobile contact information from payout data structure.
322
- *
323
- * @static
324
- * @param {PayoutDTO} info - The payout data transfer object
325
- * @returns {MobileContactInfo | undefined} New instance if successful, undefined if parsing fails
326
- *
327
- * @example
328
- * ```typescript
329
- * const payoutDTO = {
330
- * msisdn: "+255712345678",
331
- * countryCode: "TZ",
332
- * payeeName: "John Doe",
333
- * channel: "VODACOM"
334
- * };
335
- *
336
- * const contact = MobileContactInfo.fromPayoutDTO(payoutDTO);
337
- * ```
338
- */
339
- static fromPayoutDTO(info: PayoutDTO): MobileContactInfo | undefined;
340
- /**
341
- * Type guard to validate if an unknown object is a valid MobileContactInfo instance.
342
- *
343
- * @static
344
- * @param {unknown} obj - The object to validate
345
- * @returns {obj is MobileContactInfo} Type predicate indicating validity
346
- *
347
- * @example
348
- * ```typescript
349
- * if (MobileContactInfo.is(unknownData)) {
350
- * console.log(unknownData.name); // Type-safe access
351
- * }
352
- * ```
353
- */
354
- static is(obj: unknown): obj is MobileContactInfo;
355
- /**
356
- * Validates that all contact information is consistent and correct.
357
- *
358
- * @returns {boolean} True if all validations pass, false otherwise
359
- */
360
- validate(): boolean;
361
- /**
362
- * Provides detailed validation results with specific error and warning information.
363
- *
364
- * @returns {Object} Detailed validation results
365
- */
366
- getValidationDetails(): {
367
- isValid: boolean;
368
- errors: string[];
369
- warnings: string[];
370
- };
371
- get accountName(): string;
372
- get accountNumber(): string;
373
- get accountNameLabel(): string;
374
- get accountNumberLabel(): string;
375
- get channelLabel(): string;
376
- get channelId(): MNOId;
377
- get channelName(): string;
378
- toJSON(): MobileContactInfoJSON;
379
- static fromJSON(json: MobileContactInfoJSON | string): MobileContactInfo | undefined;
380
- static fromJSONString(jsonString: string): MobileContactInfo | undefined;
381
- static isMobileContactInfoJSON(obj: unknown): obj is MobileContactInfoJSON;
382
- }
383
- /**
384
- * Implementation of BaseContactInfo for bank account contacts.
385
- * Handles storage, validation, and display of contact details specific to bank transfers.
386
- *
387
- * @extends BaseContactInfo
388
- * @class BankContactInfo
389
- *
390
- * @example
391
- * ```typescript
392
- * const bank = Bank.from("CORUTZTZ", "TZ");
393
- * const contact = BankContactInfo.from({
394
- * accName: "John Doe",
395
- * bank,
396
- * accNo: "0150123456789"
397
- * });
398
- * ```
399
- */
400
- export declare class BankContactInfo extends BaseContactInfo {
401
- readonly accName: string;
402
- readonly bank: Bank;
403
- readonly accNo: string;
404
- /**
405
- * Creates a new bank contact with comprehensive validation.
406
- *
407
- * @deprecated Use {@link BankContactInfo.from} static factory method instead
408
- * @param {string} accName - The bank account holder's name
409
- * @param {Bank} bank - The bank institution object
410
- * @param {string} accNo - The bank account number
411
- *
412
- * @throws {ContactInfoError} When validation fails
413
- */
414
- constructor(accName: string, bank: Bank, accNo: string);
415
- /**
416
- * Creates a BankContactInfo instance from data object.
417
- * This is the preferred method for creating instances.
418
- *
419
- * @static
420
- * @param {Object} data - The bank contact data
421
- * @param {string} data.accName - The account holder's name
422
- * @param {Bank} data.bank - The bank institution object
423
- * @param {string} data.accNo - The bank account number
424
- *
425
- * @returns {BankContactInfo | undefined} New instance if successful, undefined if validation fails
426
- *
427
- * @example
428
- * ```typescript
429
- * const bank = Bank.from("CORUTZTZ", "TZ");
430
- * const contact = BankContactInfo.from({
431
- * accName: "John Doe",
432
- * bank,
433
- * accNo: "0150123456789"
434
- * });
435
- * ```
436
- */
437
- static from(data: {
438
- accName: string;
439
- bank: Bank;
440
- accNo: string;
441
- }): BankContactInfo | undefined;
442
- /**
443
- * Creates a BankContactInfo instance from a ContactDTO object.
444
- *
445
- * @static
446
- * @param {ContactDTO} info - The contact data transfer object
447
- * @returns {BankContactInfo | undefined} New instance if successful, undefined if validation fails
448
- */
449
- static fromContactDTO(info: ContactDTO): BankContactInfo | undefined;
450
- /**
451
- * Creates a BankContactInfo instance from a PayoutDTO object.
452
- *
453
- * @static
454
- * @param {PayoutDTO} info - The payout data transfer object
455
- * @returns {BankContactInfo | undefined} New instance if successful, undefined if parsing fails
456
- */
457
- static fromPayoutDTO(info: PayoutDTO): BankContactInfo | undefined;
458
- /**
459
- * Type guard to validate if an unknown object is a valid BankContactInfo instance.
460
- *
461
- * @static
462
- * @param {unknown} obj - The object to validate
463
- * @returns {obj is BankContactInfo} Type predicate indicating validity
464
- */
465
- static is(obj: unknown): obj is BankContactInfo;
466
- validate(): boolean;
467
- get accountName(): string;
468
- get accountNumber(): string;
469
- get accountNameLabel(): string;
470
- get accountNumberLabel(): string;
471
- get channelLabel(): string;
472
- get channelId(): BankSwiftCode;
473
- get channelName(): string;
474
- toJSON(): BankContactInfoJSON;
475
- static fromJSON(json: BankContactInfoJSON | string): BankContactInfo | undefined;
476
- static fromJSONString(jsonString: string): BankContactInfo | undefined;
477
- static isBankContactInfoJSON(obj: unknown): obj is BankContactInfoJSON;
478
- }
479
- /**
480
- * Union type representing either a mobile or bank contact.
481
- *
482
- * @typedef {MobileContactInfo | BankContactInfo} ContactInfo
483
- */
484
- export type ContactInfo = MobileContactInfo | BankContactInfo;
485
- export {};
@@ -1,16 +0,0 @@
1
- import { ContactInfo } from "@/modules/contact/contact-info.model.js";
2
- import { ContactInputDTO } from "./contact.dtos.js";
3
- /**
4
- * Factory for resolving and validating a raw `ContactInput` into a typed and valid version.
5
- */
6
- export declare class ValidatedContactInputFactory {
7
- private handlers;
8
- /**
9
- * Resolves a raw contact input into a valid and strongly-typed `ContactInput`.
10
- *
11
- * @param {ContactInputDTO} data - The unvalidated input object
12
- * @returns {ContactInputDTO} - A valid and converted input ready for use
13
- * @throws {Error} - If the input cannot be handled by any handler
14
- */
15
- resolve(data: ContactInfo): ContactInputDTO;
16
- }
@@ -1,84 +0,0 @@
1
- import { z } from "zod";
2
- /**
3
- * Schema for contact channel types.
4
- *
5
- * @remarks
6
- * Currently supports two channel types:
7
- * - "Bank": For traditional banking channels
8
- * - "Mobile": For mobile money channels
9
- *
10
- * @see {@link ContactType} for the inferred type
11
- */
12
- export declare enum ContactType {
13
- Bank = "Bank",
14
- Mobile = "Mobile"
15
- }
16
- /**
17
- * Type representing user-provided contact information.
18
- * Used for creating or updating contacts.
19
- *
20
- * @see {@link contactInputSchema} for validation rules
21
- * @see {@link ContactDTOSchemas} for all available schemas
22
- */
23
- export type ContactInputDTO = z.infer<typeof ContactDTOSchemas.contactInputDTO>;
24
- /**
25
- * Type representing a complete contact record.
26
- * Includes both user-provided and system-generated fields.
27
- *
28
- * @see {@link contactSchema} for validation rules
29
- */
30
- export type ContactDTO = z.infer<typeof ContactDTOSchemas.contactDTO>;
31
- /**
32
- * Collection of all contact-related schemas.
33
- */
34
- export declare const ContactDTOSchemas: {
35
- /** Schema for complete contact records */
36
- contactDTO: z.ZodObject<{
37
- id: z.ZodString;
38
- profileId: z.ZodString;
39
- createdAt: z.ZodString;
40
- updatedAt: z.ZodString;
41
- } & {
42
- displayName: z.ZodString;
43
- accountNo: z.ZodString;
44
- channel: z.ZodString;
45
- type: z.ZodNativeEnum<typeof ContactType>;
46
- }, "strip", z.ZodTypeAny, {
47
- type: ContactType;
48
- id: string;
49
- displayName: string;
50
- accountNo: string;
51
- profileId: string;
52
- createdAt: string;
53
- updatedAt: string;
54
- channel: string;
55
- }, {
56
- type: ContactType;
57
- id: string;
58
- displayName: string;
59
- accountNo: string;
60
- profileId: string;
61
- createdAt: string;
62
- updatedAt: string;
63
- channel: string;
64
- }>;
65
- /** Schema for contact input validation */
66
- contactInputDTO: z.ZodObject<{
67
- displayName: z.ZodString;
68
- accountNo: z.ZodString;
69
- channel: z.ZodString;
70
- type: z.ZodNativeEnum<typeof ContactType>;
71
- }, "strip", z.ZodTypeAny, {
72
- type: ContactType;
73
- displayName: string;
74
- accountNo: string;
75
- channel: string;
76
- }, {
77
- type: ContactType;
78
- displayName: string;
79
- accountNo: string;
80
- channel: string;
81
- }>;
82
- /** Schema for contact channel types */
83
- contactType: z.ZodNativeEnum<typeof ContactType>;
84
- };