@temboplus/afloat 0.1.53 → 0.1.55

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 (453) hide show
  1. package/README.md +246 -42
  2. package/{esm/src/features/admin/contract.d.ts → dist/features/admin/admin.contract.d.ts} +41 -77
  3. package/{script/src/features/admin/schemas.d.ts → dist/features/admin/admin.dtos.d.ts} +8 -9
  4. package/dist/features/admin/admin.repository.d.ts +179 -0
  5. package/dist/features/admin/index.d.ts +2 -0
  6. package/{esm/src/features/auth/access/contract.d.ts → dist/features/auth/access/access.api-contract.d.ts} +0 -1
  7. package/dist/features/auth/access/access.repository.d.ts +55 -0
  8. package/{esm/src/features/auth/contract.d.ts → dist/features/auth/auth.contract.d.ts} +12 -8
  9. package/dist/features/auth/auth.manager.d.ts +249 -0
  10. package/dist/features/auth/auth.repository.d.ts +66 -0
  11. package/dist/features/auth/auth.store.d.ts +139 -0
  12. package/{script/src/features/auth/identity/contract.d.ts → dist/features/auth/identity/identity.api-contract.d.ts} +0 -1
  13. package/dist/features/auth/identity/identity.repository.d.ts +58 -0
  14. package/dist/features/auth/index.d.ts +5 -0
  15. package/{script/src/features/auth/profile/contract.d.ts → dist/features/auth/profile/profile.api-contract.d.ts} +8 -6
  16. package/dist/features/auth/profile/profile.dtos.d.ts +80 -0
  17. package/dist/features/auth/profile/profile.repository.d.ts +56 -0
  18. package/{esm/src/features/auth/storage/client_store.d.ts → dist/features/auth/storage/client-store.d.ts} +2 -3
  19. package/{esm/src/features/auth/storage/client_token_handler.d.ts → dist/features/auth/storage/client-token-handler.d.ts} +1 -2
  20. package/{script/src → dist}/features/auth/storage/types.d.ts +1 -2
  21. package/dist/features/contact/contact-input-handler.d.ts +16 -0
  22. package/{esm/src/features/contact/contract.d.ts → dist/features/contact/contact.api-contract.d.ts} +101 -45
  23. package/dist/features/contact/contact.dtos.d.ts +90 -0
  24. package/dist/features/contact/contact.repository.d.ts +116 -0
  25. package/dist/features/contact/index.d.ts +2 -0
  26. package/dist/features/payout/index.d.ts +3 -0
  27. package/dist/features/payout/payout-channel-handler.d.ts +108 -0
  28. package/{esm/src/features/payout/contract.d.ts → dist/features/payout/payout.api-contract.d.ts} +351 -187
  29. package/dist/features/payout/payout.dtos.d.ts +365 -0
  30. package/dist/features/payout/payout.repository.d.ts +193 -0
  31. package/dist/features/wallet/index.d.ts +4 -0
  32. package/dist/features/wallet/wallet-manager.session.d.ts +143 -0
  33. package/{script/src/features/wallet/contract.d.ts → dist/features/wallet/wallet.contract.d.ts} +9 -7
  34. package/dist/features/wallet/wallet.dtos.d.ts +204 -0
  35. package/dist/features/wallet/wallet.repository.d.ts +120 -0
  36. package/dist/features/wallet/wallet.utils.d.ts +17 -0
  37. package/dist/index.cjs.js +2 -0
  38. package/dist/index.cjs.js.map +1 -0
  39. package/dist/index.d.ts +7 -0
  40. package/dist/index.esm.js +2 -0
  41. package/dist/index.esm.js.map +1 -0
  42. package/{esm/src/shared/base_repository.d.ts → dist/lib/api/base-repository.d.ts} +137 -42
  43. package/{script/src/shared/common_responses.d.ts → dist/lib/api/common-responses.d.ts} +0 -1
  44. package/dist/lib/api/index.d.ts +2 -0
  45. package/{esm/src/errors/api_error.d.ts → dist/lib/error/error.api.d.ts} +0 -1
  46. package/{script/src/errors/permission_error.d.ts → dist/lib/error/error.permission.d.ts} +1 -2
  47. package/dist/lib/error/error.utils.d.ts +22 -0
  48. package/dist/lib/error/index.d.ts +3 -0
  49. package/dist/models/contact-info.model.d.ts +817 -0
  50. package/{script/src/models/contact/derivatives/contact.d.ts → dist/models/contact.model.d.ts} +23 -16
  51. package/dist/models/index.d.ts +10 -0
  52. package/{esm/src/models/user/managed-user.d.ts → dist/models/managed-user.model.d.ts} +3 -3
  53. package/{script/src/models/payout/derivatives/payout.d.ts → dist/models/payout.model.d.ts} +13 -15
  54. package/{esm/src → dist}/models/permission.d.ts +1 -2
  55. package/{script/src/models/user/profile.d.ts → dist/models/profile.model.d.ts} +37 -43
  56. package/{script/src/models/role.d.ts → dist/models/role.model.d.ts} +2 -10
  57. package/dist/models/statement-entry.model.d.ts +195 -0
  58. package/{esm/src/models/user/authenticated-user.d.ts → dist/models/user.model.d.ts} +1 -2
  59. package/{script/src/models/wallet/wallet.d.ts → dist/models/wallet.model.d.ts} +3 -46
  60. package/package.json +47 -26
  61. package/LICENSE +0 -7
  62. package/esm/_dnt.test_shims.d.ts.map +0 -1
  63. package/esm/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
  64. package/esm/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
  65. package/esm/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
  66. package/esm/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
  67. package/esm/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
  68. package/esm/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
  69. package/esm/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
  70. package/esm/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
  71. package/esm/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
  72. package/esm/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
  73. package/esm/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
  74. package/esm/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
  75. package/esm/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
  76. package/esm/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
  77. package/esm/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
  78. package/esm/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
  79. package/esm/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
  80. package/esm/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
  81. package/esm/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
  82. package/esm/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
  83. package/esm/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
  84. package/esm/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
  85. package/esm/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
  86. package/esm/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
  87. package/esm/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
  88. package/esm/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
  89. package/esm/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
  90. package/esm/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
  91. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  92. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  93. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  94. package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  95. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  96. package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  97. package/esm/mod.d.ts +0 -8
  98. package/esm/mod.d.ts.map +0 -1
  99. package/esm/mod.js +0 -7
  100. package/esm/package.json +0 -3
  101. package/esm/src/errors/api_error.d.ts.map +0 -1
  102. package/esm/src/errors/api_error.js +0 -90
  103. package/esm/src/errors/index.d.ts +0 -3
  104. package/esm/src/errors/index.d.ts.map +0 -1
  105. package/esm/src/errors/index.js +0 -2
  106. package/esm/src/errors/permission_error.d.ts +0 -48
  107. package/esm/src/errors/permission_error.d.ts.map +0 -1
  108. package/esm/src/errors/permission_error.js +0 -70
  109. package/esm/src/features/admin/contract.d.ts.map +0 -1
  110. package/esm/src/features/admin/contract.js +0 -210
  111. package/esm/src/features/admin/index.d.ts +0 -4
  112. package/esm/src/features/admin/index.d.ts.map +0 -1
  113. package/esm/src/features/admin/index.js +0 -3
  114. package/esm/src/features/admin/repository.d.ts +0 -114
  115. package/esm/src/features/admin/repository.d.ts.map +0 -1
  116. package/esm/src/features/admin/repository.js +0 -248
  117. package/esm/src/features/admin/schemas.d.ts +0 -146
  118. package/esm/src/features/admin/schemas.d.ts.map +0 -1
  119. package/esm/src/features/admin/schemas.js +0 -206
  120. package/esm/src/features/auth/access/contract.d.ts.map +0 -1
  121. package/esm/src/features/auth/access/contract.js +0 -14
  122. package/esm/src/features/auth/contract.d.ts.map +0 -1
  123. package/esm/src/features/auth/contract.js +0 -43
  124. package/esm/src/features/auth/identity/contract.d.ts +0 -23
  125. package/esm/src/features/auth/identity/contract.d.ts.map +0 -1
  126. package/esm/src/features/auth/identity/contract.js +0 -17
  127. package/esm/src/features/auth/identity/repository.d.ts +0 -22
  128. package/esm/src/features/auth/identity/repository.d.ts.map +0 -1
  129. package/esm/src/features/auth/identity/repository.js +0 -30
  130. package/esm/src/features/auth/index.d.ts +0 -2
  131. package/esm/src/features/auth/index.d.ts.map +0 -1
  132. package/esm/src/features/auth/index.js +0 -1
  133. package/esm/src/features/auth/manager.d.ts +0 -105
  134. package/esm/src/features/auth/manager.d.ts.map +0 -1
  135. package/esm/src/features/auth/manager.js +0 -181
  136. package/esm/src/features/auth/profile/contract.d.ts +0 -37
  137. package/esm/src/features/auth/profile/contract.d.ts.map +0 -1
  138. package/esm/src/features/auth/profile/contract.js +0 -14
  139. package/esm/src/features/auth/repository.d.ts +0 -30
  140. package/esm/src/features/auth/repository.d.ts.map +0 -1
  141. package/esm/src/features/auth/repository.js +0 -69
  142. package/esm/src/features/auth/storage/client_store.d.ts.map +0 -1
  143. package/esm/src/features/auth/storage/client_store.js +0 -46
  144. package/esm/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
  145. package/esm/src/features/auth/storage/client_token_handler.js +0 -36
  146. package/esm/src/features/auth/storage/server_store.d.ts +0 -24
  147. package/esm/src/features/auth/storage/server_store.d.ts.map +0 -1
  148. package/esm/src/features/auth/storage/server_store.js +0 -34
  149. package/esm/src/features/auth/storage/server_token_handler.d.ts +0 -36
  150. package/esm/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
  151. package/esm/src/features/auth/storage/server_token_handler.js +0 -115
  152. package/esm/src/features/auth/storage/types.d.ts +0 -42
  153. package/esm/src/features/auth/storage/types.d.ts.map +0 -1
  154. package/esm/src/features/auth/storage/types.js +0 -1
  155. package/esm/src/features/contact/contract.d.ts.map +0 -1
  156. package/esm/src/features/contact/contract.js +0 -49
  157. package/esm/src/features/contact/index.d.ts +0 -2
  158. package/esm/src/features/contact/index.d.ts.map +0 -1
  159. package/esm/src/features/contact/index.js +0 -1
  160. package/esm/src/features/contact/repository.d.ts +0 -58
  161. package/esm/src/features/contact/repository.d.ts.map +0 -1
  162. package/esm/src/features/contact/repository.js +0 -108
  163. package/esm/src/features/payout/contract.d.ts.map +0 -1
  164. package/esm/src/features/payout/contract.js +0 -75
  165. package/esm/src/features/payout/index.d.ts +0 -2
  166. package/esm/src/features/payout/index.d.ts.map +0 -1
  167. package/esm/src/features/payout/index.js +0 -1
  168. package/esm/src/features/payout/repository.d.ts +0 -67
  169. package/esm/src/features/payout/repository.d.ts.map +0 -1
  170. package/esm/src/features/payout/repository.js +0 -163
  171. package/esm/src/features/wallet/contract.d.ts +0 -137
  172. package/esm/src/features/wallet/contract.d.ts.map +0 -1
  173. package/esm/src/features/wallet/contract.js +0 -38
  174. package/esm/src/features/wallet/index.d.ts +0 -2
  175. package/esm/src/features/wallet/index.d.ts.map +0 -1
  176. package/esm/src/features/wallet/index.js +0 -1
  177. package/esm/src/features/wallet/repository.d.ts +0 -57
  178. package/esm/src/features/wallet/repository.d.ts.map +0 -1
  179. package/esm/src/features/wallet/repository.js +0 -93
  180. package/esm/src/models/contact/derivatives/contact.d.ts +0 -172
  181. package/esm/src/models/contact/derivatives/contact.d.ts.map +0 -1
  182. package/esm/src/models/contact/derivatives/contact.js +0 -266
  183. package/esm/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
  184. package/esm/src/models/contact/derivatives/contact_info.d.ts +0 -188
  185. package/esm/src/models/contact/derivatives/contact_info.d.ts.map +0 -1
  186. package/esm/src/models/contact/derivatives/contact_info.js +0 -255
  187. package/esm/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
  188. package/esm/src/models/contact/index.d.ts +0 -5
  189. package/esm/src/models/contact/index.d.ts.map +0 -1
  190. package/esm/src/models/contact/index.js +0 -4
  191. package/esm/src/models/contact/schemas.d.ts +0 -66
  192. package/esm/src/models/contact/schemas.d.ts.map +0 -1
  193. package/esm/src/models/contact/schemas.js +0 -64
  194. package/esm/src/models/contact/validation.d.ts +0 -37
  195. package/esm/src/models/contact/validation.d.ts.map +0 -1
  196. package/esm/src/models/contact/validation.js +0 -139
  197. package/esm/src/models/contact/validation.test.d.ts.map +0 -1
  198. package/esm/src/models/index.d.ts +0 -7
  199. package/esm/src/models/index.d.ts.map +0 -1
  200. package/esm/src/models/index.js +0 -6
  201. package/esm/src/models/payout/api.d.ts +0 -29
  202. package/esm/src/models/payout/api.d.ts.map +0 -1
  203. package/esm/src/models/payout/api.js +0 -1
  204. package/esm/src/models/payout/channel.d.ts +0 -58
  205. package/esm/src/models/payout/channel.d.ts.map +0 -1
  206. package/esm/src/models/payout/channel.js +0 -53
  207. package/esm/src/models/payout/derivatives/payout.d.ts +0 -156
  208. package/esm/src/models/payout/derivatives/payout.d.ts.map +0 -1
  209. package/esm/src/models/payout/derivatives/payout.js +0 -261
  210. package/esm/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
  211. package/esm/src/models/payout/index.d.ts +0 -6
  212. package/esm/src/models/payout/index.d.ts.map +0 -1
  213. package/esm/src/models/payout/index.js +0 -5
  214. package/esm/src/models/payout/schemas.d.ts +0 -156
  215. package/esm/src/models/payout/schemas.d.ts.map +0 -1
  216. package/esm/src/models/payout/schemas.js +0 -105
  217. package/esm/src/models/payout/status.d.ts +0 -33
  218. package/esm/src/models/payout/status.d.ts.map +0 -1
  219. package/esm/src/models/payout/status.js +0 -34
  220. package/esm/src/models/permission.d.ts.map +0 -1
  221. package/esm/src/models/permission.js +0 -50
  222. package/esm/src/models/role.d.ts +0 -21
  223. package/esm/src/models/role.d.ts.map +0 -1
  224. package/esm/src/models/role.js +0 -73
  225. package/esm/src/models/user/authenticated-user.d.ts.map +0 -1
  226. package/esm/src/models/user/authenticated-user.js +0 -226
  227. package/esm/src/models/user/index.d.ts +0 -4
  228. package/esm/src/models/user/index.d.ts.map +0 -1
  229. package/esm/src/models/user/index.js +0 -3
  230. package/esm/src/models/user/managed-user.d.ts.map +0 -1
  231. package/esm/src/models/user/managed-user.js +0 -255
  232. package/esm/src/models/user/profile.d.ts +0 -161
  233. package/esm/src/models/user/profile.d.ts.map +0 -1
  234. package/esm/src/models/user/profile.js +0 -334
  235. package/esm/src/models/wallet/index.d.ts +0 -4
  236. package/esm/src/models/wallet/index.d.ts.map +0 -1
  237. package/esm/src/models/wallet/index.js +0 -3
  238. package/esm/src/models/wallet/schemas.d.ts +0 -95
  239. package/esm/src/models/wallet/schemas.d.ts.map +0 -1
  240. package/esm/src/models/wallet/schemas.js +0 -35
  241. package/esm/src/models/wallet/statement_entry.d.ts +0 -160
  242. package/esm/src/models/wallet/statement_entry.d.ts.map +0 -1
  243. package/esm/src/models/wallet/statement_entry.js +0 -255
  244. package/esm/src/models/wallet/wallet.d.ts +0 -147
  245. package/esm/src/models/wallet/wallet.d.ts.map +0 -1
  246. package/esm/src/models/wallet/wallet.js +0 -279
  247. package/esm/src/shared/base_repository.d.ts.map +0 -1
  248. package/esm/src/shared/base_repository.js +0 -153
  249. package/esm/src/shared/common_responses.d.ts +0 -13
  250. package/esm/src/shared/common_responses.d.ts.map +0 -1
  251. package/esm/src/shared/common_responses.js +0 -10
  252. package/esm/src/shared/index.d.ts +0 -3
  253. package/esm/src/shared/index.d.ts.map +0 -1
  254. package/esm/src/shared/index.js +0 -2
  255. package/esm/src/shared/token_required_repository.d.ts +0 -78
  256. package/esm/src/shared/token_required_repository.d.ts.map +0 -1
  257. package/esm/src/shared/token_required_repository.js +0 -128
  258. package/script/_dnt.test_shims.d.ts.map +0 -1
  259. package/script/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
  260. package/script/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
  261. package/script/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
  262. package/script/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
  263. package/script/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
  264. package/script/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
  265. package/script/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
  266. package/script/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
  267. package/script/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
  268. package/script/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
  269. package/script/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
  270. package/script/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
  271. package/script/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
  272. package/script/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
  273. package/script/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
  274. package/script/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
  275. package/script/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
  276. package/script/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
  277. package/script/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
  278. package/script/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
  279. package/script/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
  280. package/script/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
  281. package/script/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
  282. package/script/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
  283. package/script/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
  284. package/script/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
  285. package/script/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
  286. package/script/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
  287. package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  288. package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  289. package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  290. package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  291. package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  292. package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  293. package/script/mod.d.ts +0 -8
  294. package/script/mod.d.ts.map +0 -1
  295. package/script/mod.js +0 -23
  296. package/script/package.json +0 -3
  297. package/script/src/errors/api_error.d.ts +0 -63
  298. package/script/src/errors/api_error.d.ts.map +0 -1
  299. package/script/src/errors/api_error.js +0 -94
  300. package/script/src/errors/index.d.ts +0 -3
  301. package/script/src/errors/index.d.ts.map +0 -1
  302. package/script/src/errors/index.js +0 -18
  303. package/script/src/errors/permission_error.d.ts.map +0 -1
  304. package/script/src/errors/permission_error.js +0 -74
  305. package/script/src/features/admin/contract.d.ts +0 -842
  306. package/script/src/features/admin/contract.d.ts.map +0 -1
  307. package/script/src/features/admin/contract.js +0 -213
  308. package/script/src/features/admin/index.d.ts +0 -4
  309. package/script/src/features/admin/index.d.ts.map +0 -1
  310. package/script/src/features/admin/index.js +0 -19
  311. package/script/src/features/admin/repository.d.ts +0 -114
  312. package/script/src/features/admin/repository.d.ts.map +0 -1
  313. package/script/src/features/admin/repository.js +0 -252
  314. package/script/src/features/admin/schemas.d.ts.map +0 -1
  315. package/script/src/features/admin/schemas.js +0 -209
  316. package/script/src/features/auth/access/contract.d.ts +0 -14
  317. package/script/src/features/auth/access/contract.d.ts.map +0 -1
  318. package/script/src/features/auth/access/contract.js +0 -17
  319. package/script/src/features/auth/contract.d.ts +0 -112
  320. package/script/src/features/auth/contract.d.ts.map +0 -1
  321. package/script/src/features/auth/contract.js +0 -46
  322. package/script/src/features/auth/identity/contract.d.ts.map +0 -1
  323. package/script/src/features/auth/identity/contract.js +0 -20
  324. package/script/src/features/auth/identity/repository.d.ts +0 -22
  325. package/script/src/features/auth/identity/repository.d.ts.map +0 -1
  326. package/script/src/features/auth/identity/repository.js +0 -34
  327. package/script/src/features/auth/index.d.ts +0 -2
  328. package/script/src/features/auth/index.d.ts.map +0 -1
  329. package/script/src/features/auth/index.js +0 -17
  330. package/script/src/features/auth/manager.d.ts +0 -105
  331. package/script/src/features/auth/manager.d.ts.map +0 -1
  332. package/script/src/features/auth/manager.js +0 -185
  333. package/script/src/features/auth/profile/contract.d.ts.map +0 -1
  334. package/script/src/features/auth/profile/contract.js +0 -17
  335. package/script/src/features/auth/repository.d.ts +0 -30
  336. package/script/src/features/auth/repository.d.ts.map +0 -1
  337. package/script/src/features/auth/repository.js +0 -73
  338. package/script/src/features/auth/storage/client_store.d.ts +0 -30
  339. package/script/src/features/auth/storage/client_store.d.ts.map +0 -1
  340. package/script/src/features/auth/storage/client_store.js +0 -51
  341. package/script/src/features/auth/storage/client_token_handler.d.ts +0 -32
  342. package/script/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
  343. package/script/src/features/auth/storage/client_token_handler.js +0 -40
  344. package/script/src/features/auth/storage/server_store.d.ts +0 -24
  345. package/script/src/features/auth/storage/server_store.d.ts.map +0 -1
  346. package/script/src/features/auth/storage/server_store.js +0 -38
  347. package/script/src/features/auth/storage/server_token_handler.d.ts +0 -36
  348. package/script/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
  349. package/script/src/features/auth/storage/server_token_handler.js +0 -119
  350. package/script/src/features/auth/storage/types.d.ts.map +0 -1
  351. package/script/src/features/auth/storage/types.js +0 -2
  352. package/script/src/features/contact/contract.d.ts +0 -170
  353. package/script/src/features/contact/contract.d.ts.map +0 -1
  354. package/script/src/features/contact/contract.js +0 -52
  355. package/script/src/features/contact/index.d.ts +0 -2
  356. package/script/src/features/contact/index.d.ts.map +0 -1
  357. package/script/src/features/contact/index.js +0 -17
  358. package/script/src/features/contact/repository.d.ts +0 -58
  359. package/script/src/features/contact/repository.d.ts.map +0 -1
  360. package/script/src/features/contact/repository.js +0 -112
  361. package/script/src/features/payout/contract.d.ts +0 -623
  362. package/script/src/features/payout/contract.d.ts.map +0 -1
  363. package/script/src/features/payout/contract.js +0 -78
  364. package/script/src/features/payout/index.d.ts +0 -2
  365. package/script/src/features/payout/index.d.ts.map +0 -1
  366. package/script/src/features/payout/index.js +0 -17
  367. package/script/src/features/payout/repository.d.ts +0 -67
  368. package/script/src/features/payout/repository.d.ts.map +0 -1
  369. package/script/src/features/payout/repository.js +0 -167
  370. package/script/src/features/wallet/contract.d.ts.map +0 -1
  371. package/script/src/features/wallet/contract.js +0 -41
  372. package/script/src/features/wallet/index.d.ts +0 -2
  373. package/script/src/features/wallet/index.d.ts.map +0 -1
  374. package/script/src/features/wallet/index.js +0 -17
  375. package/script/src/features/wallet/repository.d.ts +0 -57
  376. package/script/src/features/wallet/repository.d.ts.map +0 -1
  377. package/script/src/features/wallet/repository.js +0 -97
  378. package/script/src/models/contact/derivatives/contact.d.ts.map +0 -1
  379. package/script/src/models/contact/derivatives/contact.js +0 -270
  380. package/script/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
  381. package/script/src/models/contact/derivatives/contact_info.d.ts +0 -188
  382. package/script/src/models/contact/derivatives/contact_info.d.ts.map +0 -1
  383. package/script/src/models/contact/derivatives/contact_info.js +0 -260
  384. package/script/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
  385. package/script/src/models/contact/index.d.ts +0 -5
  386. package/script/src/models/contact/index.d.ts.map +0 -1
  387. package/script/src/models/contact/index.js +0 -20
  388. package/script/src/models/contact/schemas.d.ts +0 -66
  389. package/script/src/models/contact/schemas.d.ts.map +0 -1
  390. package/script/src/models/contact/schemas.js +0 -67
  391. package/script/src/models/contact/validation.d.ts +0 -37
  392. package/script/src/models/contact/validation.d.ts.map +0 -1
  393. package/script/src/models/contact/validation.js +0 -146
  394. package/script/src/models/contact/validation.test.d.ts.map +0 -1
  395. package/script/src/models/index.d.ts +0 -7
  396. package/script/src/models/index.d.ts.map +0 -1
  397. package/script/src/models/index.js +0 -22
  398. package/script/src/models/payout/api.d.ts +0 -29
  399. package/script/src/models/payout/api.d.ts.map +0 -1
  400. package/script/src/models/payout/api.js +0 -2
  401. package/script/src/models/payout/channel.d.ts +0 -58
  402. package/script/src/models/payout/channel.d.ts.map +0 -1
  403. package/script/src/models/payout/channel.js +0 -56
  404. package/script/src/models/payout/derivatives/payout.d.ts.map +0 -1
  405. package/script/src/models/payout/derivatives/payout.js +0 -265
  406. package/script/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
  407. package/script/src/models/payout/index.d.ts +0 -6
  408. package/script/src/models/payout/index.d.ts.map +0 -1
  409. package/script/src/models/payout/index.js +0 -21
  410. package/script/src/models/payout/schemas.d.ts +0 -156
  411. package/script/src/models/payout/schemas.d.ts.map +0 -1
  412. package/script/src/models/payout/schemas.js +0 -108
  413. package/script/src/models/payout/status.d.ts +0 -33
  414. package/script/src/models/payout/status.d.ts.map +0 -1
  415. package/script/src/models/payout/status.js +0 -37
  416. package/script/src/models/permission.d.ts +0 -55
  417. package/script/src/models/permission.d.ts.map +0 -1
  418. package/script/src/models/permission.js +0 -53
  419. package/script/src/models/role.d.ts.map +0 -1
  420. package/script/src/models/role.js +0 -77
  421. package/script/src/models/user/authenticated-user.d.ts +0 -77
  422. package/script/src/models/user/authenticated-user.d.ts.map +0 -1
  423. package/script/src/models/user/authenticated-user.js +0 -230
  424. package/script/src/models/user/index.d.ts +0 -4
  425. package/script/src/models/user/index.d.ts.map +0 -1
  426. package/script/src/models/user/index.js +0 -19
  427. package/script/src/models/user/managed-user.d.ts +0 -108
  428. package/script/src/models/user/managed-user.d.ts.map +0 -1
  429. package/script/src/models/user/managed-user.js +0 -260
  430. package/script/src/models/user/profile.d.ts.map +0 -1
  431. package/script/src/models/user/profile.js +0 -338
  432. package/script/src/models/wallet/index.d.ts +0 -4
  433. package/script/src/models/wallet/index.d.ts.map +0 -1
  434. package/script/src/models/wallet/index.js +0 -19
  435. package/script/src/models/wallet/schemas.d.ts +0 -95
  436. package/script/src/models/wallet/schemas.d.ts.map +0 -1
  437. package/script/src/models/wallet/schemas.js +0 -38
  438. package/script/src/models/wallet/statement_entry.d.ts +0 -160
  439. package/script/src/models/wallet/statement_entry.d.ts.map +0 -1
  440. package/script/src/models/wallet/statement_entry.js +0 -259
  441. package/script/src/models/wallet/wallet.d.ts.map +0 -1
  442. package/script/src/models/wallet/wallet.js +0 -283
  443. package/script/src/shared/base_repository.d.ts +0 -80
  444. package/script/src/shared/base_repository.d.ts.map +0 -1
  445. package/script/src/shared/base_repository.js +0 -157
  446. package/script/src/shared/common_responses.d.ts.map +0 -1
  447. package/script/src/shared/common_responses.js +0 -13
  448. package/script/src/shared/index.d.ts +0 -3
  449. package/script/src/shared/index.d.ts.map +0 -1
  450. package/script/src/shared/index.js +0 -18
  451. package/script/src/shared/token_required_repository.d.ts +0 -78
  452. package/script/src/shared/token_required_repository.d.ts.map +0 -1
  453. package/script/src/shared/token_required_repository.js +0 -132
@@ -1,255 +0,0 @@
1
- import { Bank, PhoneNumberFormat, TZPhoneNumber, } from "@temboplus/frontend-core";
2
- import { validateAccName, validateBankAccNo, } from "../validation.js";
3
- /**
4
- * Abstract base class that provides a common interface for different types of contact information.
5
- * This class defines the structure and validation requirements for both mobile and bank contacts.
6
- *
7
- * @abstract
8
- * @class BaseContactInfo
9
- * @property {ContactType} type - The type of contact (either "Mobile" or "Bank")
10
- */
11
- class BaseContactInfo {
12
- /**
13
- * Creates a new instance of BaseContactInfo
14
- * @param {ContactType} type - The type of contact to create
15
- */
16
- constructor(type) {
17
- Object.defineProperty(this, "type", {
18
- enumerable: true,
19
- configurable: true,
20
- writable: true,
21
- value: void 0
22
- });
23
- this.type = type;
24
- }
25
- }
26
- /**
27
- * Implementation of BaseContactInfo for mobile phone contacts.
28
- * Handles storage and validation of contact details specific to mobile numbers.
29
- *
30
- * @extends BaseContactInfo
31
- * @class MobileContactInfo
32
- * @property {string} name - The contact's personal name
33
- * @property {TZPhoneNumber} phoneNumber - The contact's phone number object
34
- */
35
- export class MobileContactInfo extends BaseContactInfo {
36
- /**
37
- * Creates a new mobile contact
38
- * @param {string} name - The contact's personal name
39
- * @param {TZPhoneNumber} phoneNumber - The contact's phone number
40
- */
41
- constructor(name, phoneNumber) {
42
- super("Mobile");
43
- Object.defineProperty(this, "name", {
44
- enumerable: true,
45
- configurable: true,
46
- writable: true,
47
- value: name
48
- });
49
- Object.defineProperty(this, "phoneNumber", {
50
- enumerable: true,
51
- configurable: true,
52
- writable: true,
53
- value: phoneNumber
54
- });
55
- }
56
- /**
57
- * Validates the mobile contact information
58
- * Checks that:
59
- * - Phone number is defined and valid
60
- * - Contact name is not empty
61
- * @returns {boolean} True if all validation checks pass
62
- */
63
- validate() {
64
- return this.phoneNumber !== undefined &&
65
- TZPhoneNumber.canConstruct(this.phoneNumber.compactNumber) &&
66
- this.name.length > 0;
67
- }
68
- /**
69
- * Validates if an unknown value is a valid MobileContactInfo object.
70
- * Checks both the structural integrity and data validity of name and phone number properties.
71
- *
72
- * @param {unknown} obj - The value to validate
73
- * @returns {obj is MobileContactInfo} Type predicate indicating if the value is a valid MobileContactInfo
74
- *
75
- * @example
76
- * const maybeContact = JSON.parse(someData);
77
- * if (MobileContactInfo.is(maybeContact)) {
78
- * // maybeContact is typed as MobileContactInfo
79
- * console.log(maybeContact.name);
80
- * console.log(maybeContact.TZPhoneNumber.label);
81
- * }
82
- *
83
- * @remarks
84
- * - Name must be a non-empty string
85
- * - Phone number can be either:
86
- * - A string that can be parsed into a valid TZPhoneNumber
87
- * - A TZPhoneNumber object with valid properties
88
- * - Returns false if either property is invalid or missing
89
- */
90
- static is(obj) {
91
- if (!obj || typeof obj !== "object")
92
- return false;
93
- const mobileContactInfo = obj;
94
- // checks if name exists and is a string
95
- if (typeof mobileContactInfo.name !== "string")
96
- return false;
97
- const name = mobileContactInfo.name;
98
- // checks if TZPhoneNumber exists and is valid
99
- let phone_number = undefined;
100
- if (typeof mobileContactInfo.phoneNumber === "string") {
101
- phone_number = TZPhoneNumber.from(mobileContactInfo.phoneNumber);
102
- }
103
- if (typeof mobileContactInfo.phoneNumber === "object") {
104
- const obj = mobileContactInfo.phoneNumber;
105
- const isValidPhone = TZPhoneNumber.is(obj);
106
- if (isValidPhone) {
107
- phone_number = obj;
108
- }
109
- }
110
- const validName = name.trim().length > 0;
111
- const validPhone = phone_number !== undefined;
112
- return validName && validPhone;
113
- }
114
- get displayName() {
115
- return this.name;
116
- }
117
- /**
118
- * Gets the phone number formatted according to the 255 standard
119
- * @returns {string} Formatted phone number
120
- */
121
- get accNumber() {
122
- return this.phoneNumber.getWithFormat(PhoneNumberFormat.INTERNATIONAL);
123
- }
124
- get channel() {
125
- return this.phoneNumber.networkOperator.mobileMoneyService;
126
- }
127
- get displayNameLabel() {
128
- return "Name";
129
- }
130
- get accNumberLabel() {
131
- return "Phone Number";
132
- }
133
- get channelLabel() {
134
- return "Channel";
135
- }
136
- }
137
- /**
138
- * Implementation of BaseContactInfo for bank account contacts.
139
- * Handles storage and validation of contact details specific to bank accounts.
140
- *
141
- * @extends BaseContactInfo
142
- * @class BankContactInfo
143
- * @property {string} accName - The bank account holder's name
144
- * @property {Bank} bank - The bank object containing institution details
145
- * @property {string} accNo - The bank account number
146
- */
147
- export class BankContactInfo extends BaseContactInfo {
148
- /**
149
- * Creates a new bank contact
150
- * @param {string} accName - The account holder's name
151
- * @param {Bank} bank - The bank object
152
- * @param {string} accNo - The account number
153
- */
154
- constructor(accName, bank, accNo) {
155
- super("Bank");
156
- Object.defineProperty(this, "accName", {
157
- enumerable: true,
158
- configurable: true,
159
- writable: true,
160
- value: accName
161
- });
162
- Object.defineProperty(this, "bank", {
163
- enumerable: true,
164
- configurable: true,
165
- writable: true,
166
- value: bank
167
- });
168
- Object.defineProperty(this, "accNo", {
169
- enumerable: true,
170
- configurable: true,
171
- writable: true,
172
- value: accNo
173
- });
174
- }
175
- /**
176
- * Validates the bank contact information
177
- * Checks that:
178
- * - Bank object is valid
179
- * - Account name meets requirements
180
- * - Account number meets bank-specific format requirements
181
- * @returns {boolean} True if all validation checks pass
182
- */
183
- validate() {
184
- return this.bank.validate() &&
185
- validateAccName(this.accName) &&
186
- validateBankAccNo(this.accNumber);
187
- }
188
- /**
189
- * Validates if an unknown value is a valid BankContactInfo object.
190
- * Checks both the structural integrity and data validity of account name, account number, and bank details.
191
- *
192
- * @param {unknown} obj - The value to validate
193
- * @returns {obj is BankContactInfo} Type predicate indicating if the value is a valid BankContactInfo
194
- *
195
- * @example
196
- * const maybeBank = JSON.parse(someData);
197
- * if (BankContactInfo.is(maybeBank)) {
198
- * // maybeBank is typed as BankContactInfo
199
- * console.log(maybeBank.accName);
200
- * console.log(maybeBank.accNumber);
201
- * console.log(maybeBank.bank.name);
202
- * }
203
- *
204
- * @remarks
205
- * - Account name must be a valid string (validated by {@link validateAccName})
206
- * - Account number must be a valid string (validated by {@link validateBankAccNo})
207
- * - Bank must be a valid Bank object (validated by {@link Bank.is})
208
- * - Returns false if any property is invalid or missing
209
- * - All properties are required and must pass their respective validations
210
- */
211
- static is(obj) {
212
- if (!obj || typeof obj !== "object")
213
- return false;
214
- const bankContactInfo = obj;
215
- // checks if acc. name exists and is a string
216
- if (typeof bankContactInfo.accName !== "string")
217
- return false;
218
- const accName = bankContactInfo.accName;
219
- // checks if acc. no. exists and is a string
220
- if (typeof bankContactInfo.accNumber !== "string")
221
- return false;
222
- const accNumber = bankContactInfo.accNumber;
223
- // checks if TZPhoneNumber exists and is valid
224
- let bank = undefined;
225
- if (typeof bankContactInfo.bank === "object") {
226
- const obj = bankContactInfo.bank;
227
- const isValidBank = Bank.is(obj);
228
- if (isValidBank) {
229
- bank = obj;
230
- }
231
- }
232
- const validAccName = validateAccName(accName);
233
- const validAccNumber = validateBankAccNo(accNumber);
234
- const validBank = bank !== undefined;
235
- return validAccName && validAccNumber && validBank;
236
- }
237
- get displayName() {
238
- return this.accName;
239
- }
240
- get accNumber() {
241
- return this.accNo;
242
- }
243
- get channel() {
244
- return this.bank.shortName;
245
- }
246
- get displayNameLabel() {
247
- return "Acc. Name";
248
- }
249
- get accNumberLabel() {
250
- return "Bank Acc. No.";
251
- }
252
- get channelLabel() {
253
- return "Bank";
254
- }
255
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"contact_info.test.d.ts","sourceRoot":"","sources":["../../../../../src/src/models/contact/derivatives/contact_info.test.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- export * from "./schemas.js";
2
- export * from "./validation.js";
3
- export * from "./derivatives/contact_info.js";
4
- export * from "./derivatives/contact.js";
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/models/contact/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC"}
@@ -1,4 +0,0 @@
1
- export * from "./schemas.js";
2
- export * from "./validation.js";
3
- export * from "./derivatives/contact_info.js";
4
- export * from "./derivatives/contact.js";
@@ -1,66 +0,0 @@
1
- import { z } from "zod";
2
- /**
3
- * Valid contact channel types.
4
- * Inferred from the contactTypeSchema.
5
- *
6
- * @see {@link contactTypeSchema} for validation rules
7
- */
8
- export type ContactType = z.infer<typeof ContactSchemas.contactType>;
9
- /**
10
- * Schema type definition for contact input validation.
11
- *
12
- * @internal
13
- * This is an internal type used to enforce type consistency
14
- * in the contactInputSchema.
15
- */
16
- type _ContactInput = z.ZodObject<{
17
- displayName: z.ZodString;
18
- accountNo: z.ZodString;
19
- channel: z.ZodString;
20
- type: z.ZodEnum<["Bank", "Mobile"]>;
21
- }>;
22
- /**
23
- * Type representing user-provided contact information.
24
- * Used for creating or updating contacts.
25
- *
26
- * @see {@link contactInputSchema} for validation rules
27
- * @see {@link ContactSchemas} for all available schemas
28
- */
29
- export type ContactInput = z.infer<typeof ContactSchemas.contactInput>;
30
- /**
31
- * Schema type definition for complete contact records.
32
- *
33
- * @internal
34
- * Extends ContactInput with system-generated fields like
35
- * IDs and timestamps.
36
- */
37
- type _Contact = z.ZodObject<{
38
- displayName: z.ZodString;
39
- accountNo: z.ZodString;
40
- channel: z.ZodString;
41
- type: z.ZodEnum<["Bank", "Mobile"]>;
42
- id: z.ZodString;
43
- profileId: z.ZodString;
44
- createdAt: z.ZodDate;
45
- updatedAt: z.ZodDate;
46
- }>;
47
- /**
48
- * Type representing a complete contact record.
49
- * Includes both user-provided and system-generated fields.
50
- *
51
- * @see {@link contactSchema} for validation rules
52
- */
53
- export type ContactData = z.infer<typeof ContactSchemas.contactData>;
54
- /**
55
- * Collection of all contact-related schemas.
56
- */
57
- export declare const ContactSchemas: {
58
- /** Schema for complete contact records */
59
- contactData: _Contact;
60
- /** Schema for contact input validation */
61
- contactInput: _ContactInput;
62
- /** Schema for contact channel types */
63
- contactType: z.ZodEnum<["Bank", "Mobile"]>;
64
- };
65
- export {};
66
- //# sourceMappingURL=schemas.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/src/models/contact/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC;AAErE;;;;;;GAMG;AACH,KAAK,aAAa,GAAG,CAAC,CAAC,SAAS,CAAC;IAC/B,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC;IACrB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;CACrC,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC;AAyBvE;;;;;;GAMG;AACH,KAAK,QAAQ,GAAG,CAAC,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC;IACrB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC;IAChB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC;IACrB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC;CACtB,CAAC,CAAC;AAmBH;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,cAAc;IACzB,0CAA0C;;IAE1C,0CAA0C;;IAE1C,uCAAuC;;CAExC,CAAC"}
@@ -1,64 +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
- const contactTypeSchema = z.enum([
13
- "Bank",
14
- "Mobile",
15
- ]);
16
- /**
17
- * Schema for validating contact input data.
18
- *
19
- * @remarks
20
- * Validates the following fields:
21
- * - displayName: Non-empty string
22
- * - accountNo: Non-empty string
23
- * - channel: Non-empty string
24
- * - type: Must be either "Bank" or "Mobile"
25
- */
26
- const contactInputSchema = z.object({
27
- displayName: z
28
- .string()
29
- .min(1, "Display name is required"),
30
- accountNo: z
31
- .string()
32
- .min(1, "Account number is required"),
33
- channel: z
34
- .string()
35
- .min(1, "Channel is required"),
36
- type: contactTypeSchema,
37
- });
38
- /**
39
- * Schema for complete contact records.
40
- *
41
- * @remarks
42
- * Extends contactInputSchema with additional system fields:
43
- * - id: Unique identifier
44
- * - profileId: Associated profile ID
45
- * - createdAt: Creation timestamp
46
- * - updatedAt: Last update timestamp
47
- */
48
- const contactSchema = z.object({
49
- id: z.string().min(1, "Contact id is required"),
50
- profileId: z.string(),
51
- createdAt: z.coerce.date(),
52
- updatedAt: z.coerce.date(),
53
- }).merge(contactInputSchema);
54
- /**
55
- * Collection of all contact-related schemas.
56
- */
57
- export const ContactSchemas = {
58
- /** Schema for complete contact records */
59
- contactData: contactSchema,
60
- /** Schema for contact input validation */
61
- contactInput: contactInputSchema,
62
- /** Schema for contact channel types */
63
- contactType: contactTypeSchema,
64
- };
@@ -1,37 +0,0 @@
1
- import type { RuleObject } from "antd/es/form";
2
- /**
3
- * Regex pattern to validate account numbers.
4
- * The account number must only contain letters and digits, between 6 and 20 characters long.
5
- * @constant {RegExp}
6
- */
7
- export declare const ACCOUNT_NUMBER_REGEX: RegExp;
8
- /**
9
- * Validator for account number field.
10
- * Ensures the account number is between 8-12 digits and numeric.
11
- * @param {RuleObject} _ The rule object for validation (used by validation framework).
12
- * @param {string} value The value to validate.
13
- * @throws Will throw an error if validation fails.
14
- */
15
- export declare const ACC_NUMBER_VALIDATOR: (rule: RuleObject, value: string | null | undefined) => Promise<string | undefined>;
16
- /**
17
- * Validator for account name field.
18
- * Ensures the account name is at least 3 characters long and contains only letters and spaces.
19
- * @param {RuleObject} _ The rule object for validation (used by validation framework).
20
- * @param {string} value The value to validate.
21
- * @throws Will throw an error if validation fails.
22
- */
23
- export declare const ACC_NAME_VALIDATOR: (rule: RuleObject, value: string) => Promise<string | undefined>;
24
- /**
25
- * Validates if the provided account name is valid.
26
- * @param {string} [name] The account name to validate.
27
- * @returns {boolean} `true` if valid, otherwise `false`.
28
- */
29
- export declare const validateAccName: (name?: string) => boolean;
30
- /**
31
- * Validates if the provided account number is valid.
32
- * The account number must be numeric and between 8-12 digits.
33
- * @param {string} [accountNumber] The account number to validate.
34
- * @returns {boolean} `true` if valid, otherwise `false`.
35
- */
36
- export declare const validateBankAccNo: (accountNumber?: string) => boolean;
37
- //# sourceMappingURL=validation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../src/src/models/contact/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA+B/C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAAwB,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,SACzB,UAAU,SACT,MAAM,GAAG,IAAI,GAAG,SAAS,KAC/B,OAAO,CAAC,MAAM,GAAG,SAAS,CAkB5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,SACvB,UAAU,SACT,MAAM,KACZ,OAAO,CAAC,MAAM,GAAG,SAAS,CAoB5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,UAAW,MAAM,KAAG,OAI/C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,mBAAoB,MAAM,KAAG,OAU1D,CAAC"}
@@ -1,139 +0,0 @@
1
- /**
2
- * Regular expression to validate account names.
3
- *
4
- * Key Criteria:
5
- * 1. The name must consist of at least two words separated by one or more spaces.
6
- * 2. Each word can include alphabetic characters (a-z, A-Z) and special characters like
7
- * hyphens (-), apostrophes ('), periods (.), and other Unicode letters.
8
- * 3. Both words must have at least two characters.
9
- * 4. Allow additional whitespace between words but disallow trailing or leading spaces.
10
- * 5. Supports names with special characters (e.g., "O'Connor", "St. John", "María-José")
11
- *
12
- * Examples of valid names:
13
- * - "John Doe"
14
- * - "Anna-Marie Johnson"
15
- * - "Jean-Luc Picard"
16
- * - "Mary O'Connor"
17
- * - "St. John Smith"
18
- * - "María José"
19
- * - "François d'Arc"
20
- *
21
- * Examples of invalid names:
22
- * - "John" (only one name)
23
- * - "John D" (family name less than 2 characters)
24
- * - "John123 Doe" (contains numeric characters)
25
- * - " John Doe " (leading or trailing spaces)
26
- */
27
- const ACCOUNT_NAME_REGEX = /^[\p{L}]['\p{L}.-]{1,}(?: [\p{L}]['\p{L}.-]{1,})+$/u;
28
- /**
29
- * Regex pattern to validate account numbers.
30
- * The account number must only contain letters and digits, between 6 and 20 characters long.
31
- * @constant {RegExp}
32
- */
33
- export const ACCOUNT_NUMBER_REGEX = /^[a-zA-Z0-9]{6,20}$/; // Only letters and digits, 6-20 characters
34
- /**
35
- * Validator for account number field.
36
- * Ensures the account number is between 8-12 digits and numeric.
37
- * @param {RuleObject} _ The rule object for validation (used by validation framework).
38
- * @param {string} value The value to validate.
39
- * @throws Will throw an error if validation fails.
40
- */
41
- export const ACC_NUMBER_VALIDATOR = (rule, value) => {
42
- const accNoString = value?.toString().trim();
43
- // If field is empty/undefined/null
44
- if (!accNoString) {
45
- // Only throw if the field is required
46
- if (rule.required) {
47
- return Promise.reject(new Error("Account number is required."));
48
- }
49
- // If field is not required and empty, validation passes
50
- return Promise.resolve(undefined);
51
- }
52
- const accNo = removeSpaces(accNoString);
53
- const valid = validateBankAccNo(accNo);
54
- if (valid)
55
- return Promise.resolve(accNo);
56
- return Promise.reject(new Error("Invalid Account Number Format"));
57
- };
58
- /**
59
- * Validator for account name field.
60
- * Ensures the account name is at least 3 characters long and contains only letters and spaces.
61
- * @param {RuleObject} _ The rule object for validation (used by validation framework).
62
- * @param {string} value The value to validate.
63
- * @throws Will throw an error if validation fails.
64
- */
65
- export const ACC_NAME_VALIDATOR = (rule, value) => {
66
- const accNameString = value?.toString().trim();
67
- // If field is empty/undefined/null
68
- if (!accNameString) {
69
- // Only throw if the field is required
70
- if (rule.required) {
71
- return Promise.reject(new Error("Account name is required."));
72
- }
73
- // If field is not required and empty, validation passes
74
- return Promise.resolve(undefined);
75
- }
76
- const accName = normalizeSpaces(accNameString);
77
- const valid = validateAccName(accName);
78
- if (valid)
79
- return Promise.resolve(accName);
80
- return Promise.reject(new Error("Invalid account name. Examples: 'John Doe', 'Anna-Marie Smith'"));
81
- };
82
- /**
83
- * Validates if the provided account name is valid.
84
- * @param {string} [name] The account name to validate.
85
- * @returns {boolean} `true` if valid, otherwise `false`.
86
- */
87
- export const validateAccName = (name) => {
88
- if (!name)
89
- return false;
90
- const accName = normalizeSpaces(name);
91
- return Boolean(accName.length && ACCOUNT_NAME_REGEX.test(accName));
92
- };
93
- /**
94
- * Validates if the provided account number is valid.
95
- * The account number must be numeric and between 8-12 digits.
96
- * @param {string} [accountNumber] The account number to validate.
97
- * @returns {boolean} `true` if valid, otherwise `false`.
98
- */
99
- export const validateBankAccNo = (accountNumber) => {
100
- if (!accountNumber)
101
- return false;
102
- const normalizedNumber = removeSpaces(accountNumber);
103
- return (normalizedNumber.length >= 6 && // Ensures minimum length of 6
104
- normalizedNumber.length <= 20 && // Ensures maximum length of 20
105
- ACCOUNT_NUMBER_REGEX.test(normalizedNumber));
106
- };
107
- /**
108
- * Normalizes spaces in a string by replacing multiple consecutive spaces
109
- * with a single space, ensuring names are properly formatted.
110
- *
111
- * @param {string} input - The input string (e.g., a name) to process.
112
- * @returns {string} A new string with multiple spaces replaced by a single space.
113
- *
114
- * @example
115
- * normalizeSpaces("John Doe"); // Returns: "John Doe"
116
- * normalizeSpaces("John M Doe"); // Returns: "John M Doe"
117
- * normalizeSpaces(" John Doe "); // Returns: "John Doe" (trims leading and trailing spaces as well)
118
- */
119
- function normalizeSpaces(input) {
120
- return input.trim().replace(/\s+/g, " ");
121
- }
122
- /**
123
- * Removes all whitespace characters from the given string.
124
- *
125
- * This function replaces all occurrences of spaces, tabs, and other
126
- * whitespace characters (including multiple spaces) in the input string
127
- * with an empty string, effectively removing them.
128
- *
129
- * @param {string} input - The input string from which spaces should be removed.
130
- * @returns {string} A new string with all whitespace characters removed.
131
- *
132
- * @example
133
- * removeSpaces(" Hello World "); // Returns: "HelloWorld"
134
- * removeSpaces("NoSpacesHere"); // Returns: "NoSpacesHere"
135
- * removeSpaces(" "); // Returns: ""
136
- */
137
- function removeSpaces(input) {
138
- return input.replace(/\s+/g, "");
139
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation.test.d.ts","sourceRoot":"","sources":["../../../../src/src/models/contact/validation.test.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- export * from "./permission.js";
2
- export * from "./user/index.js";
3
- export * from "./contact/index.js";
4
- export * from "./payout/index.js";
5
- export * from "./wallet/index.js";
6
- export * from "./role.js";
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC"}
@@ -1,6 +0,0 @@
1
- export * from "./permission.js";
2
- export * from "./user/index.js";
3
- export * from "./contact/index.js";
4
- export * from "./payout/index.js";
5
- export * from "./wallet/index.js";
6
- export * from "./role.js";
@@ -1,29 +0,0 @@
1
- /**
2
- * Arguments for retrieving payouts from the API.
3
- *
4
- * @interface GetPayoutsAPIArgs
5
- *
6
- * @property {number} [rangeStart] - The starting index for pagination. If not provided, defaults to beginning.
7
- * @property {number} [rangeEnd] - The ending index for pagination. If not provided, defaults to 10.
8
- * @property {boolean} [pending] - Filter for pending payouts only. If true, returns only pending payouts.
9
- *
10
- * @example
11
- * ```ts
12
- * // Get first 10 payouts
13
- * const args: GetPayoutsAPIArgs = {
14
- * rangeStart: 0,
15
- * rangeEnd: 10
16
- * };
17
- *
18
- * // Get only pending payouts
19
- * const pendingArgs: GetPayoutsAPIArgs = {
20
- * pending: true
21
- * };
22
- * ```
23
- */
24
- export interface GetPayoutsAPIArgs {
25
- rangeStart?: number;
26
- rangeEnd?: number;
27
- pending?: boolean;
28
- }
29
- //# sourceMappingURL=api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/src/models/payout/api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
@@ -1 +0,0 @@
1
- export {};