@temboplus/afloat 0.1.60 → 0.1.62

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 (554) 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/npm/src/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/npm/src/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/npm/src/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/{script/npm/src/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/npm/src/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/npm/src/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/npm/src/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/npm/src/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/npm/src/src/models/contact/derivatives/contact.d.ts → dist/models/contact.model.d.ts} +23 -16
  51. package/dist/models/index.d.ts +11 -0
  52. package/{esm/src/models/user/managed-user.d.ts → dist/models/managed-user.model.d.ts} +3 -3
  53. package/dist/models/narration.model.d.ts +184 -0
  54. package/{script/npm/src/src/models/payout/derivatives/payout.d.ts → dist/models/payout.model.d.ts} +13 -17
  55. package/{esm/src → dist}/models/permission.d.ts +1 -2
  56. package/{script/npm/src/src/models/user/profile.d.ts → dist/models/profile.model.d.ts} +37 -43
  57. package/{script/npm/src/src/models/role.d.ts → dist/models/role.model.d.ts} +2 -10
  58. package/dist/models/statement-entry.model.d.ts +248 -0
  59. package/dist/models/user.model.d.ts +65 -0
  60. package/{script/npm/src/src/models/wallet/wallet.d.ts → dist/models/wallet.model.d.ts} +3 -46
  61. package/package.json +47 -25
  62. package/LICENSE +0 -7
  63. package/esm/_dnt.test_shims.d.ts.map +0 -1
  64. package/esm/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
  65. package/esm/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
  66. package/esm/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
  67. package/esm/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
  68. package/esm/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
  69. package/esm/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
  70. package/esm/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
  71. package/esm/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
  72. package/esm/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
  73. package/esm/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
  74. package/esm/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
  75. package/esm/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
  76. package/esm/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
  77. package/esm/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
  78. package/esm/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
  79. package/esm/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
  80. package/esm/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
  81. package/esm/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
  82. package/esm/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
  83. package/esm/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
  84. package/esm/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
  85. package/esm/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
  86. package/esm/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
  87. package/esm/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
  88. package/esm/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
  89. package/esm/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
  90. package/esm/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
  91. package/esm/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
  92. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  93. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  94. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  95. package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  96. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  97. package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  98. package/esm/mod.d.ts +0 -8
  99. package/esm/mod.d.ts.map +0 -1
  100. package/esm/mod.js +0 -7
  101. package/esm/package.json +0 -3
  102. package/esm/src/errors/api_error.d.ts.map +0 -1
  103. package/esm/src/errors/api_error.js +0 -90
  104. package/esm/src/errors/index.d.ts +0 -3
  105. package/esm/src/errors/index.d.ts.map +0 -1
  106. package/esm/src/errors/index.js +0 -2
  107. package/esm/src/errors/permission_error.d.ts +0 -48
  108. package/esm/src/errors/permission_error.d.ts.map +0 -1
  109. package/esm/src/errors/permission_error.js +0 -70
  110. package/esm/src/features/admin/contract.d.ts.map +0 -1
  111. package/esm/src/features/admin/contract.js +0 -210
  112. package/esm/src/features/admin/index.d.ts +0 -4
  113. package/esm/src/features/admin/index.d.ts.map +0 -1
  114. package/esm/src/features/admin/index.js +0 -3
  115. package/esm/src/features/admin/repository.d.ts +0 -114
  116. package/esm/src/features/admin/repository.d.ts.map +0 -1
  117. package/esm/src/features/admin/repository.js +0 -248
  118. package/esm/src/features/admin/schemas.d.ts +0 -146
  119. package/esm/src/features/admin/schemas.d.ts.map +0 -1
  120. package/esm/src/features/admin/schemas.js +0 -206
  121. package/esm/src/features/auth/access/contract.d.ts.map +0 -1
  122. package/esm/src/features/auth/access/contract.js +0 -14
  123. package/esm/src/features/auth/access/repository.d.ts +0 -11
  124. package/esm/src/features/auth/access/repository.d.ts.map +0 -1
  125. package/esm/src/features/auth/access/repository.js +0 -25
  126. package/esm/src/features/auth/contract.d.ts.map +0 -1
  127. package/esm/src/features/auth/contract.js +0 -43
  128. package/esm/src/features/auth/identity/contract.d.ts +0 -23
  129. package/esm/src/features/auth/identity/contract.d.ts.map +0 -1
  130. package/esm/src/features/auth/identity/contract.js +0 -17
  131. package/esm/src/features/auth/identity/repository.d.ts +0 -22
  132. package/esm/src/features/auth/identity/repository.d.ts.map +0 -1
  133. package/esm/src/features/auth/identity/repository.js +0 -30
  134. package/esm/src/features/auth/index.d.ts +0 -6
  135. package/esm/src/features/auth/index.d.ts.map +0 -1
  136. package/esm/src/features/auth/index.js +0 -5
  137. package/esm/src/features/auth/manager.d.ts +0 -105
  138. package/esm/src/features/auth/manager.d.ts.map +0 -1
  139. package/esm/src/features/auth/manager.js +0 -181
  140. package/esm/src/features/auth/profile/contract.d.ts +0 -37
  141. package/esm/src/features/auth/profile/contract.d.ts.map +0 -1
  142. package/esm/src/features/auth/profile/contract.js +0 -14
  143. package/esm/src/features/auth/profile/repository.d.ts +0 -11
  144. package/esm/src/features/auth/profile/repository.d.ts.map +0 -1
  145. package/esm/src/features/auth/profile/repository.js +0 -25
  146. package/esm/src/features/auth/repository.d.ts +0 -30
  147. package/esm/src/features/auth/repository.d.ts.map +0 -1
  148. package/esm/src/features/auth/repository.js +0 -69
  149. package/esm/src/features/auth/storage/client_store.d.ts +0 -30
  150. package/esm/src/features/auth/storage/client_store.d.ts.map +0 -1
  151. package/esm/src/features/auth/storage/client_store.js +0 -46
  152. package/esm/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
  153. package/esm/src/features/auth/storage/client_token_handler.js +0 -36
  154. package/esm/src/features/auth/storage/server_store.d.ts +0 -24
  155. package/esm/src/features/auth/storage/server_store.d.ts.map +0 -1
  156. package/esm/src/features/auth/storage/server_store.js +0 -34
  157. package/esm/src/features/auth/storage/server_token_handler.d.ts +0 -36
  158. package/esm/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
  159. package/esm/src/features/auth/storage/server_token_handler.js +0 -115
  160. package/esm/src/features/auth/storage/types.d.ts +0 -42
  161. package/esm/src/features/auth/storage/types.d.ts.map +0 -1
  162. package/esm/src/features/auth/storage/types.js +0 -1
  163. package/esm/src/features/contact/contract.d.ts.map +0 -1
  164. package/esm/src/features/contact/contract.js +0 -49
  165. package/esm/src/features/contact/index.d.ts +0 -2
  166. package/esm/src/features/contact/index.d.ts.map +0 -1
  167. package/esm/src/features/contact/index.js +0 -1
  168. package/esm/src/features/contact/repository.d.ts +0 -58
  169. package/esm/src/features/contact/repository.d.ts.map +0 -1
  170. package/esm/src/features/contact/repository.js +0 -108
  171. package/esm/src/features/payout/contract.d.ts.map +0 -1
  172. package/esm/src/features/payout/contract.js +0 -75
  173. package/esm/src/features/payout/index.d.ts +0 -2
  174. package/esm/src/features/payout/index.d.ts.map +0 -1
  175. package/esm/src/features/payout/index.js +0 -1
  176. package/esm/src/features/payout/repository.d.ts +0 -67
  177. package/esm/src/features/payout/repository.d.ts.map +0 -1
  178. package/esm/src/features/payout/repository.js +0 -163
  179. package/esm/src/features/wallet/contract.d.ts +0 -137
  180. package/esm/src/features/wallet/contract.d.ts.map +0 -1
  181. package/esm/src/features/wallet/contract.js +0 -38
  182. package/esm/src/features/wallet/index.d.ts +0 -2
  183. package/esm/src/features/wallet/index.d.ts.map +0 -1
  184. package/esm/src/features/wallet/index.js +0 -1
  185. package/esm/src/features/wallet/repository.d.ts +0 -57
  186. package/esm/src/features/wallet/repository.d.ts.map +0 -1
  187. package/esm/src/features/wallet/repository.js +0 -93
  188. package/esm/src/models/contact/derivatives/contact.d.ts +0 -172
  189. package/esm/src/models/contact/derivatives/contact.d.ts.map +0 -1
  190. package/esm/src/models/contact/derivatives/contact.js +0 -266
  191. package/esm/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
  192. package/esm/src/models/contact/derivatives/contact_info.d.ts +0 -188
  193. package/esm/src/models/contact/derivatives/contact_info.d.ts.map +0 -1
  194. package/esm/src/models/contact/derivatives/contact_info.js +0 -255
  195. package/esm/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
  196. package/esm/src/models/contact/index.d.ts +0 -5
  197. package/esm/src/models/contact/index.d.ts.map +0 -1
  198. package/esm/src/models/contact/index.js +0 -4
  199. package/esm/src/models/contact/schemas.d.ts +0 -66
  200. package/esm/src/models/contact/schemas.d.ts.map +0 -1
  201. package/esm/src/models/contact/schemas.js +0 -64
  202. package/esm/src/models/contact/validation.d.ts +0 -37
  203. package/esm/src/models/contact/validation.d.ts.map +0 -1
  204. package/esm/src/models/contact/validation.js +0 -146
  205. package/esm/src/models/contact/validation.test.d.ts.map +0 -1
  206. package/esm/src/models/index.d.ts +0 -7
  207. package/esm/src/models/index.d.ts.map +0 -1
  208. package/esm/src/models/index.js +0 -6
  209. package/esm/src/models/payout/api.d.ts +0 -29
  210. package/esm/src/models/payout/api.d.ts.map +0 -1
  211. package/esm/src/models/payout/api.js +0 -1
  212. package/esm/src/models/payout/channel.d.ts +0 -58
  213. package/esm/src/models/payout/channel.d.ts.map +0 -1
  214. package/esm/src/models/payout/channel.js +0 -53
  215. package/esm/src/models/payout/derivatives/payout.d.ts +0 -158
  216. package/esm/src/models/payout/derivatives/payout.d.ts.map +0 -1
  217. package/esm/src/models/payout/derivatives/payout.js +0 -265
  218. package/esm/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
  219. package/esm/src/models/payout/index.d.ts +0 -7
  220. package/esm/src/models/payout/index.d.ts.map +0 -1
  221. package/esm/src/models/payout/index.js +0 -6
  222. package/esm/src/models/payout/narration.d.ts +0 -164
  223. package/esm/src/models/payout/narration.d.ts.map +0 -1
  224. package/esm/src/models/payout/narration.js +0 -308
  225. package/esm/src/models/payout/schemas.d.ts +0 -156
  226. package/esm/src/models/payout/schemas.d.ts.map +0 -1
  227. package/esm/src/models/payout/schemas.js +0 -105
  228. package/esm/src/models/payout/status.d.ts +0 -33
  229. package/esm/src/models/payout/status.d.ts.map +0 -1
  230. package/esm/src/models/payout/status.js +0 -34
  231. package/esm/src/models/permission.d.ts.map +0 -1
  232. package/esm/src/models/permission.js +0 -50
  233. package/esm/src/models/role.d.ts +0 -21
  234. package/esm/src/models/role.d.ts.map +0 -1
  235. package/esm/src/models/role.js +0 -73
  236. package/esm/src/models/user/authenticated-user.d.ts +0 -77
  237. package/esm/src/models/user/authenticated-user.d.ts.map +0 -1
  238. package/esm/src/models/user/authenticated-user.js +0 -226
  239. package/esm/src/models/user/index.d.ts +0 -4
  240. package/esm/src/models/user/index.d.ts.map +0 -1
  241. package/esm/src/models/user/index.js +0 -3
  242. package/esm/src/models/user/managed-user.d.ts.map +0 -1
  243. package/esm/src/models/user/managed-user.js +0 -255
  244. package/esm/src/models/user/profile.d.ts +0 -161
  245. package/esm/src/models/user/profile.d.ts.map +0 -1
  246. package/esm/src/models/user/profile.js +0 -334
  247. package/esm/src/models/wallet/index.d.ts +0 -4
  248. package/esm/src/models/wallet/index.d.ts.map +0 -1
  249. package/esm/src/models/wallet/index.js +0 -3
  250. package/esm/src/models/wallet/schemas.d.ts +0 -95
  251. package/esm/src/models/wallet/schemas.d.ts.map +0 -1
  252. package/esm/src/models/wallet/schemas.js +0 -35
  253. package/esm/src/models/wallet/statement_entry.d.ts +0 -160
  254. package/esm/src/models/wallet/statement_entry.d.ts.map +0 -1
  255. package/esm/src/models/wallet/statement_entry.js +0 -255
  256. package/esm/src/models/wallet/wallet.d.ts +0 -147
  257. package/esm/src/models/wallet/wallet.d.ts.map +0 -1
  258. package/esm/src/models/wallet/wallet.js +0 -279
  259. package/esm/src/shared/base_repository.d.ts.map +0 -1
  260. package/esm/src/shared/base_repository.js +0 -153
  261. package/esm/src/shared/common_responses.d.ts +0 -13
  262. package/esm/src/shared/common_responses.d.ts.map +0 -1
  263. package/esm/src/shared/common_responses.js +0 -10
  264. package/esm/src/shared/index.d.ts +0 -3
  265. package/esm/src/shared/index.d.ts.map +0 -1
  266. package/esm/src/shared/index.js +0 -2
  267. package/esm/src/shared/token_required_repository.d.ts +0 -78
  268. package/esm/src/shared/token_required_repository.d.ts.map +0 -1
  269. package/esm/src/shared/token_required_repository.js +0 -128
  270. package/script/mod.d.ts +0 -8
  271. package/script/mod.d.ts.map +0 -1
  272. package/script/mod.js +0 -23
  273. package/script/npm/src/_dnt.test_shims.d.ts +0 -6
  274. package/script/npm/src/_dnt.test_shims.d.ts.map +0 -1
  275. package/script/npm/src/_dnt.test_shims.js +0 -65
  276. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts +0 -29
  277. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
  278. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.js +0 -49
  279. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts +0 -24
  280. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
  281. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.js +0 -49
  282. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.d.ts +0 -16
  283. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
  284. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.js +0 -25
  285. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts +0 -26
  286. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
  287. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.js +0 -34
  288. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.d.ts +0 -17
  289. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
  290. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.js +0 -209
  291. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.d.ts +0 -35
  292. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
  293. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.js +0 -61
  294. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.d.ts +0 -18
  295. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
  296. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.js +0 -30
  297. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.d.ts +0 -15
  298. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
  299. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.js +0 -23
  300. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.d.ts +0 -18
  301. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
  302. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.js +0 -25
  303. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.d.ts +0 -20
  304. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
  305. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.js +0 -32
  306. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts +0 -20
  307. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
  308. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.js +0 -32
  309. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts +0 -23
  310. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
  311. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.js +0 -55
  312. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts +0 -25
  313. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
  314. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.js +0 -56
  315. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.d.ts +0 -19
  316. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
  317. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.js +0 -31
  318. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts +0 -20
  319. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
  320. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.js +0 -32
  321. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.d.ts +0 -18
  322. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
  323. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.js +0 -29
  324. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.d.ts +0 -44
  325. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
  326. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.js +0 -61
  327. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts +0 -21
  328. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
  329. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.js +0 -36
  330. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts +0 -20
  331. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
  332. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.js +0 -32
  333. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts +0 -18
  334. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
  335. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.js +0 -29
  336. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts +0 -23
  337. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
  338. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.js +0 -35
  339. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts +0 -29
  340. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
  341. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.js +0 -163
  342. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts +0 -42
  343. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
  344. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.js +0 -56
  345. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts +0 -24
  346. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
  347. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.js +0 -60
  348. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts +0 -18
  349. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
  350. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.js +0 -29
  351. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.d.ts +0 -45
  352. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
  353. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.js +0 -47
  354. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts +0 -15
  355. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
  356. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.js +0 -23
  357. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts +0 -15
  358. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
  359. package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.js +0 -23
  360. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
  361. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  362. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -115
  363. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +0 -140
  364. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  365. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -283
  366. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +0 -99
  367. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  368. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -185
  369. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
  370. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  371. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.js +0 -63
  372. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +0 -159
  373. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  374. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -242
  375. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
  376. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  377. package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
  378. package/script/npm/src/mod.d.ts +0 -8
  379. package/script/npm/src/mod.d.ts.map +0 -1
  380. package/script/npm/src/mod.js +0 -23
  381. package/script/npm/src/src/errors/api_error.d.ts +0 -63
  382. package/script/npm/src/src/errors/api_error.d.ts.map +0 -1
  383. package/script/npm/src/src/errors/api_error.js +0 -94
  384. package/script/npm/src/src/errors/index.d.ts +0 -3
  385. package/script/npm/src/src/errors/index.d.ts.map +0 -1
  386. package/script/npm/src/src/errors/index.js +0 -18
  387. package/script/npm/src/src/errors/permission_error.d.ts.map +0 -1
  388. package/script/npm/src/src/errors/permission_error.js +0 -74
  389. package/script/npm/src/src/features/admin/contract.d.ts +0 -842
  390. package/script/npm/src/src/features/admin/contract.d.ts.map +0 -1
  391. package/script/npm/src/src/features/admin/contract.js +0 -213
  392. package/script/npm/src/src/features/admin/index.d.ts +0 -4
  393. package/script/npm/src/src/features/admin/index.d.ts.map +0 -1
  394. package/script/npm/src/src/features/admin/index.js +0 -19
  395. package/script/npm/src/src/features/admin/repository.d.ts +0 -114
  396. package/script/npm/src/src/features/admin/repository.d.ts.map +0 -1
  397. package/script/npm/src/src/features/admin/repository.js +0 -252
  398. package/script/npm/src/src/features/admin/schemas.d.ts.map +0 -1
  399. package/script/npm/src/src/features/admin/schemas.js +0 -209
  400. package/script/npm/src/src/features/auth/access/contract.d.ts +0 -14
  401. package/script/npm/src/src/features/auth/access/contract.d.ts.map +0 -1
  402. package/script/npm/src/src/features/auth/access/contract.js +0 -17
  403. package/script/npm/src/src/features/auth/access/repository.d.ts +0 -11
  404. package/script/npm/src/src/features/auth/access/repository.d.ts.map +0 -1
  405. package/script/npm/src/src/features/auth/access/repository.js +0 -29
  406. package/script/npm/src/src/features/auth/contract.d.ts +0 -112
  407. package/script/npm/src/src/features/auth/contract.d.ts.map +0 -1
  408. package/script/npm/src/src/features/auth/contract.js +0 -46
  409. package/script/npm/src/src/features/auth/identity/contract.d.ts.map +0 -1
  410. package/script/npm/src/src/features/auth/identity/contract.js +0 -20
  411. package/script/npm/src/src/features/auth/identity/repository.d.ts +0 -22
  412. package/script/npm/src/src/features/auth/identity/repository.d.ts.map +0 -1
  413. package/script/npm/src/src/features/auth/identity/repository.js +0 -34
  414. package/script/npm/src/src/features/auth/index.d.ts +0 -6
  415. package/script/npm/src/src/features/auth/index.d.ts.map +0 -1
  416. package/script/npm/src/src/features/auth/index.js +0 -21
  417. package/script/npm/src/src/features/auth/manager.d.ts +0 -105
  418. package/script/npm/src/src/features/auth/manager.d.ts.map +0 -1
  419. package/script/npm/src/src/features/auth/manager.js +0 -185
  420. package/script/npm/src/src/features/auth/profile/contract.d.ts.map +0 -1
  421. package/script/npm/src/src/features/auth/profile/contract.js +0 -17
  422. package/script/npm/src/src/features/auth/profile/repository.d.ts +0 -11
  423. package/script/npm/src/src/features/auth/profile/repository.d.ts.map +0 -1
  424. package/script/npm/src/src/features/auth/profile/repository.js +0 -29
  425. package/script/npm/src/src/features/auth/repository.d.ts +0 -30
  426. package/script/npm/src/src/features/auth/repository.d.ts.map +0 -1
  427. package/script/npm/src/src/features/auth/repository.js +0 -73
  428. package/script/npm/src/src/features/auth/storage/client_store.d.ts.map +0 -1
  429. package/script/npm/src/src/features/auth/storage/client_store.js +0 -51
  430. package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts +0 -32
  431. package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
  432. package/script/npm/src/src/features/auth/storage/client_token_handler.js +0 -40
  433. package/script/npm/src/src/features/auth/storage/server_store.d.ts +0 -24
  434. package/script/npm/src/src/features/auth/storage/server_store.d.ts.map +0 -1
  435. package/script/npm/src/src/features/auth/storage/server_store.js +0 -38
  436. package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts +0 -36
  437. package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
  438. package/script/npm/src/src/features/auth/storage/server_token_handler.js +0 -119
  439. package/script/npm/src/src/features/auth/storage/types.d.ts.map +0 -1
  440. package/script/npm/src/src/features/auth/storage/types.js +0 -2
  441. package/script/npm/src/src/features/contact/contract.d.ts +0 -170
  442. package/script/npm/src/src/features/contact/contract.d.ts.map +0 -1
  443. package/script/npm/src/src/features/contact/contract.js +0 -52
  444. package/script/npm/src/src/features/contact/index.d.ts +0 -2
  445. package/script/npm/src/src/features/contact/index.d.ts.map +0 -1
  446. package/script/npm/src/src/features/contact/index.js +0 -17
  447. package/script/npm/src/src/features/contact/repository.d.ts +0 -58
  448. package/script/npm/src/src/features/contact/repository.d.ts.map +0 -1
  449. package/script/npm/src/src/features/contact/repository.js +0 -112
  450. package/script/npm/src/src/features/payout/contract.d.ts +0 -623
  451. package/script/npm/src/src/features/payout/contract.d.ts.map +0 -1
  452. package/script/npm/src/src/features/payout/contract.js +0 -78
  453. package/script/npm/src/src/features/payout/index.d.ts +0 -2
  454. package/script/npm/src/src/features/payout/index.d.ts.map +0 -1
  455. package/script/npm/src/src/features/payout/index.js +0 -17
  456. package/script/npm/src/src/features/payout/repository.d.ts +0 -67
  457. package/script/npm/src/src/features/payout/repository.d.ts.map +0 -1
  458. package/script/npm/src/src/features/payout/repository.js +0 -167
  459. package/script/npm/src/src/features/wallet/contract.d.ts.map +0 -1
  460. package/script/npm/src/src/features/wallet/contract.js +0 -41
  461. package/script/npm/src/src/features/wallet/index.d.ts +0 -2
  462. package/script/npm/src/src/features/wallet/index.d.ts.map +0 -1
  463. package/script/npm/src/src/features/wallet/index.js +0 -17
  464. package/script/npm/src/src/features/wallet/repository.d.ts +0 -57
  465. package/script/npm/src/src/features/wallet/repository.d.ts.map +0 -1
  466. package/script/npm/src/src/features/wallet/repository.js +0 -97
  467. package/script/npm/src/src/models/contact/derivatives/contact.d.ts.map +0 -1
  468. package/script/npm/src/src/models/contact/derivatives/contact.js +0 -270
  469. package/script/npm/src/src/models/contact/derivatives/contact.test.d.ts +0 -1
  470. package/script/npm/src/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
  471. package/script/npm/src/src/models/contact/derivatives/contact.test.js +0 -64
  472. package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts +0 -188
  473. package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts.map +0 -1
  474. package/script/npm/src/src/models/contact/derivatives/contact_info.js +0 -260
  475. package/script/npm/src/src/models/contact/derivatives/contact_info.test.d.ts +0 -1
  476. package/script/npm/src/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
  477. package/script/npm/src/src/models/contact/derivatives/contact_info.test.js +0 -331
  478. package/script/npm/src/src/models/contact/index.d.ts +0 -5
  479. package/script/npm/src/src/models/contact/index.d.ts.map +0 -1
  480. package/script/npm/src/src/models/contact/index.js +0 -20
  481. package/script/npm/src/src/models/contact/schemas.d.ts +0 -66
  482. package/script/npm/src/src/models/contact/schemas.d.ts.map +0 -1
  483. package/script/npm/src/src/models/contact/schemas.js +0 -67
  484. package/script/npm/src/src/models/contact/validation.d.ts +0 -37
  485. package/script/npm/src/src/models/contact/validation.d.ts.map +0 -1
  486. package/script/npm/src/src/models/contact/validation.js +0 -153
  487. package/script/npm/src/src/models/contact/validation.test.d.ts +0 -2
  488. package/script/npm/src/src/models/contact/validation.test.d.ts.map +0 -1
  489. package/script/npm/src/src/models/contact/validation.test.js +0 -186
  490. package/script/npm/src/src/models/index.d.ts +0 -7
  491. package/script/npm/src/src/models/index.d.ts.map +0 -1
  492. package/script/npm/src/src/models/index.js +0 -22
  493. package/script/npm/src/src/models/payout/api.d.ts +0 -29
  494. package/script/npm/src/src/models/payout/api.d.ts.map +0 -1
  495. package/script/npm/src/src/models/payout/api.js +0 -2
  496. package/script/npm/src/src/models/payout/channel.d.ts +0 -58
  497. package/script/npm/src/src/models/payout/channel.d.ts.map +0 -1
  498. package/script/npm/src/src/models/payout/channel.js +0 -56
  499. package/script/npm/src/src/models/payout/derivatives/payout.d.ts.map +0 -1
  500. package/script/npm/src/src/models/payout/derivatives/payout.js +0 -269
  501. package/script/npm/src/src/models/payout/derivatives/payout.test.d.ts +0 -1
  502. package/script/npm/src/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
  503. package/script/npm/src/src/models/payout/derivatives/payout.test.js +0 -76
  504. package/script/npm/src/src/models/payout/index.d.ts +0 -7
  505. package/script/npm/src/src/models/payout/index.d.ts.map +0 -1
  506. package/script/npm/src/src/models/payout/index.js +0 -22
  507. package/script/npm/src/src/models/payout/narration.d.ts +0 -164
  508. package/script/npm/src/src/models/payout/narration.d.ts.map +0 -1
  509. package/script/npm/src/src/models/payout/narration.js +0 -312
  510. package/script/npm/src/src/models/payout/schemas.d.ts +0 -156
  511. package/script/npm/src/src/models/payout/schemas.d.ts.map +0 -1
  512. package/script/npm/src/src/models/payout/schemas.js +0 -108
  513. package/script/npm/src/src/models/payout/status.d.ts +0 -33
  514. package/script/npm/src/src/models/payout/status.d.ts.map +0 -1
  515. package/script/npm/src/src/models/payout/status.js +0 -37
  516. package/script/npm/src/src/models/permission.d.ts +0 -55
  517. package/script/npm/src/src/models/permission.d.ts.map +0 -1
  518. package/script/npm/src/src/models/permission.js +0 -53
  519. package/script/npm/src/src/models/role.d.ts.map +0 -1
  520. package/script/npm/src/src/models/role.js +0 -77
  521. package/script/npm/src/src/models/user/authenticated-user.d.ts +0 -77
  522. package/script/npm/src/src/models/user/authenticated-user.d.ts.map +0 -1
  523. package/script/npm/src/src/models/user/authenticated-user.js +0 -230
  524. package/script/npm/src/src/models/user/index.d.ts +0 -4
  525. package/script/npm/src/src/models/user/index.d.ts.map +0 -1
  526. package/script/npm/src/src/models/user/index.js +0 -19
  527. package/script/npm/src/src/models/user/managed-user.d.ts +0 -108
  528. package/script/npm/src/src/models/user/managed-user.d.ts.map +0 -1
  529. package/script/npm/src/src/models/user/managed-user.js +0 -260
  530. package/script/npm/src/src/models/user/profile.d.ts.map +0 -1
  531. package/script/npm/src/src/models/user/profile.js +0 -338
  532. package/script/npm/src/src/models/wallet/index.d.ts +0 -4
  533. package/script/npm/src/src/models/wallet/index.d.ts.map +0 -1
  534. package/script/npm/src/src/models/wallet/index.js +0 -19
  535. package/script/npm/src/src/models/wallet/schemas.d.ts +0 -95
  536. package/script/npm/src/src/models/wallet/schemas.d.ts.map +0 -1
  537. package/script/npm/src/src/models/wallet/schemas.js +0 -38
  538. package/script/npm/src/src/models/wallet/statement_entry.d.ts +0 -160
  539. package/script/npm/src/src/models/wallet/statement_entry.d.ts.map +0 -1
  540. package/script/npm/src/src/models/wallet/statement_entry.js +0 -259
  541. package/script/npm/src/src/models/wallet/wallet.d.ts.map +0 -1
  542. package/script/npm/src/src/models/wallet/wallet.js +0 -283
  543. package/script/npm/src/src/shared/base_repository.d.ts +0 -80
  544. package/script/npm/src/src/shared/base_repository.d.ts.map +0 -1
  545. package/script/npm/src/src/shared/base_repository.js +0 -157
  546. package/script/npm/src/src/shared/common_responses.d.ts.map +0 -1
  547. package/script/npm/src/src/shared/common_responses.js +0 -13
  548. package/script/npm/src/src/shared/index.d.ts +0 -3
  549. package/script/npm/src/src/shared/index.d.ts.map +0 -1
  550. package/script/npm/src/src/shared/index.js +0 -18
  551. package/script/npm/src/src/shared/token_required_repository.d.ts +0 -78
  552. package/script/npm/src/src/shared/token_required_repository.d.ts.map +0 -1
  553. package/script/npm/src/src/shared/token_required_repository.js +0 -132
  554. package/script/package.json +0 -3
@@ -0,0 +1,55 @@
1
+ import { BaseRepository } from "@/lib/api/base-repository";
2
+ import { accessContract } from "./access.api-contract";
3
+ /**
4
+ * Repository class for managing access-related operations.
5
+ * Handles retrieving user access lists and permissions from the API.
6
+ *
7
+ * This repository handles pure API communication without permission checking.
8
+ * Permission validation should be handled at the service layer or route handlers.
9
+ *
10
+ * @extends {BaseRepository<typeof accessContract>}
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * const repo = new AccessRepository({ token: userToken });
15
+ * const accessList = await repo.getAccessList();
16
+ * ```
17
+ */
18
+ export declare class AccessRepository extends BaseRepository<typeof accessContract> {
19
+ /**
20
+ * Creates an instance of AccessRepository.
21
+ *
22
+ * @param options - Optional configuration
23
+ * @param options.token - Authentication token for API calls
24
+ * @param options.root - Custom API root URL
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * const repo = new AccessRepository({
29
+ * token: "user-auth-token",
30
+ * root: "base-api-url"
31
+ * });
32
+ * ```
33
+ */
34
+ constructor(options?: {
35
+ token?: string;
36
+ root?: string;
37
+ });
38
+ /**
39
+ * Retrieves the current user's access list.
40
+ *
41
+ * @returns Promise that resolves to an array of access permissions/roles
42
+ * @throws {APIError} If the request fails or returns an unexpected status
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * try {
47
+ * const accessList = await repo.getAccessList();
48
+ * console.log("User has access to:", accessList);
49
+ * } catch (error) {
50
+ * console.error("Failed to get access list:", error.message);
51
+ * }
52
+ * ```
53
+ */
54
+ getAccessList(): Promise<string[]>;
55
+ }
@@ -23,13 +23,14 @@ export declare const authContract: {
23
23
  201: z.ZodObject<{
24
24
  profile: z.ZodObject<{
25
25
  id: z.ZodString;
26
- firstName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
27
- lastName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
26
+ firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
28
  displayName: z.ZodString;
29
- phone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
29
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
30
  accountNo: z.ZodString;
31
- email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
32
- }, z.UnknownKeysParam, z.ZodTypeAny, {
31
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
+ autoApprove: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
33
+ }, "strip", z.ZodTypeAny, {
33
34
  id: string;
34
35
  displayName: string;
35
36
  accountNo: string;
@@ -37,6 +38,7 @@ export declare const authContract: {
37
38
  lastName?: string | null | undefined;
38
39
  phone?: string | null | undefined;
39
40
  email?: string | null | undefined;
41
+ autoApprove?: boolean | null | undefined;
40
42
  }, {
41
43
  id: string;
42
44
  displayName: string;
@@ -45,6 +47,7 @@ export declare const authContract: {
45
47
  lastName?: string | null | undefined;
46
48
  phone?: string | null | undefined;
47
49
  email?: string | null | undefined;
50
+ autoApprove?: boolean | null | undefined;
48
51
  }>;
49
52
  token: z.ZodString;
50
53
  access: z.ZodArray<z.ZodString, "many">;
@@ -59,6 +62,7 @@ export declare const authContract: {
59
62
  lastName?: string | null | undefined;
60
63
  phone?: string | null | undefined;
61
64
  email?: string | null | undefined;
65
+ autoApprove?: boolean | null | undefined;
62
66
  };
63
67
  token: string;
64
68
  access: string[];
@@ -72,6 +76,7 @@ export declare const authContract: {
72
76
  lastName?: string | null | undefined;
73
77
  phone?: string | null | undefined;
74
78
  email?: string | null | undefined;
79
+ autoApprove?: boolean | null | undefined;
75
80
  };
76
81
  token: string;
77
82
  access: string[];
@@ -99,14 +104,13 @@ export declare const authContract: {
99
104
  currentPassword: z.ZodString;
100
105
  newPassword: z.ZodString;
101
106
  }, "strip", z.ZodTypeAny, {
102
- currentPassword: string;
103
107
  newPassword: string;
104
- }, {
105
108
  currentPassword: string;
109
+ }, {
106
110
  newPassword: string;
111
+ currentPassword: string;
107
112
  }>;
108
113
  path: "/password";
109
114
  responses: {};
110
115
  };
111
116
  };
112
- //# sourceMappingURL=contract.d.ts.map
@@ -0,0 +1,249 @@
1
+ import { User } from "@/models/user.model";
2
+ import { Permission } from "@/models/permission";
3
+ /**
4
+ * Clean authentication manager for client-side usage only.
5
+ *
6
+ * This class provides a centralized way to manage user authentication state,
7
+ * including login, logout, and permission checking. It uses a singleton pattern
8
+ * for client-side usage and directly interfaces with the unified auth store.
9
+ *
10
+ * **Architecture:**
11
+ * - **Client-side**: Use the singleton instance via `AfloatAuth.instance`
12
+ * - **Server-side**: Pass tokens directly to repositories (no auth manager needed)
13
+ *
14
+ * **Features:**
15
+ * - Direct integration with unified auth store
16
+ * - React hooks for reactive UI updates
17
+ * - Permission checking utilities
18
+ * - Automatic wallet session management
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * // Client-side usage
23
+ * const auth = AfloatAuth.instance;
24
+ * const user = await auth.logIn(email, password);
25
+ *
26
+ * // Server-side usage (no auth manager needed)
27
+ * const walletRepo = new WalletRepository({ token: extractedToken });
28
+ * const balance = await walletRepo.getBalance({ wallet });
29
+ * ```
30
+ */
31
+ export declare class AfloatAuth {
32
+ /** Client-side singleton instance */
33
+ private static _instance;
34
+ /**
35
+ * Private constructor to control instantiation.
36
+ * Use the static instance getter instead.
37
+ *
38
+ * @private
39
+ */
40
+ private constructor();
41
+ /**
42
+ * Gets or creates the client-side singleton instance.
43
+ *
44
+ * @returns The client-side singleton instance
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * const auth = AfloatAuth.instance;
49
+ * if (auth.currentUser) {
50
+ * console.log("User is logged in");
51
+ * }
52
+ * ```
53
+ */
54
+ static get instance(): AfloatAuth;
55
+ /**
56
+ * Gets the authentication repository for API operations.
57
+ *
58
+ * @private
59
+ * @returns The auth repository instance with current token
60
+ */
61
+ private get repo();
62
+ /**
63
+ * Gets the current authentication token.
64
+ *
65
+ * @returns The current authentication token, or undefined if not authenticated
66
+ *
67
+ * @example
68
+ * ```typescript
69
+ * const token = auth.getUserToken();
70
+ * if (token) {
71
+ * const apiClient = new SomeRepository({ token });
72
+ * }
73
+ * ```
74
+ */
75
+ getUserToken(): string | undefined;
76
+ /**
77
+ * Gets the currently authenticated user.
78
+ *
79
+ * @returns The current user instance, or undefined if not authenticated
80
+ *
81
+ * @example
82
+ * ```typescript
83
+ * const user = auth.currentUser;
84
+ * if (user) {
85
+ * console.log(`Welcome, ${user.name}!`);
86
+ * }
87
+ * ```
88
+ */
89
+ get currentUser(): User | undefined;
90
+ /**
91
+ * Checks if a user is currently authenticated.
92
+ *
93
+ * @returns True if user is authenticated, false otherwise
94
+ *
95
+ * @example
96
+ * ```typescript
97
+ * if (auth.isAuthenticated) {
98
+ * // User is logged in
99
+ * showDashboard();
100
+ * } else {
101
+ * // User needs to log in
102
+ * showLoginForm();
103
+ * }
104
+ * ```
105
+ */
106
+ get isAuthenticated(): boolean;
107
+ /**
108
+ * React hook for accessing the current user in client-side components.
109
+ *
110
+ * This hook provides reactive updates when the user state changes,
111
+ * making it perfect for React components that need to respond to
112
+ * authentication state changes.
113
+ *
114
+ * @returns The current user with reactive updates, or undefined if not authenticated
115
+ * @throws {Error} If called in a server environment
116
+ *
117
+ * @example
118
+ * ```typescript
119
+ * function UserProfile() {
120
+ * const user = AfloatAuth.instance.useCurrentUser();
121
+ *
122
+ * if (!user) {
123
+ * return <LoginForm />;
124
+ * }
125
+ *
126
+ * return <div>Hello, {user.name}!</div>;
127
+ * }
128
+ * ```
129
+ */
130
+ useCurrentUser(): User | undefined;
131
+ /**
132
+ * Checks if the current user has a specific permission.
133
+ *
134
+ * @param perm - The permission to check
135
+ * @returns True if the user has the permission, false otherwise
136
+ *
137
+ * @example
138
+ * ```typescript
139
+ * if (auth.checkPermission(Permission.ViewBalance)) {
140
+ * // User can view wallet balance
141
+ * const walletRepo = new WalletRepository({ token: auth.getUserToken() });
142
+ * const balance = await walletRepo.getBalance(wallet);
143
+ * } else {
144
+ * console.log("User doesn't have permission to view balance");
145
+ * }
146
+ * ```
147
+ */
148
+ checkPermission(perm: Permission): boolean;
149
+ /**
150
+ * Authenticates a user with email and password.
151
+ *
152
+ * On successful authentication:
153
+ * - Clears any existing auth data
154
+ * - Stores the new user and token atomically
155
+ * - Initializes related services (wallet manager)
156
+ *
157
+ * @param email - The user's email address
158
+ * @param password - The user's password
159
+ * @returns Promise resolving to the authenticated user
160
+ * @throws {Error} If authentication fails
161
+ *
162
+ * @example
163
+ * ```typescript
164
+ * try {
165
+ * const user = await auth.logIn("user@example.com", "password123");
166
+ * console.log("Login successful!");
167
+ * router.push("/dashboard");
168
+ * } catch (error) {
169
+ * console.error("Login failed:", error.message);
170
+ * setError("Invalid credentials");
171
+ * }
172
+ * ```
173
+ */
174
+ logIn(email: string, password: string): Promise<User>;
175
+ /**
176
+ * Updates the current user's password.
177
+ *
178
+ * @param currentPassword - The user's current password
179
+ * @param newPassword - The new password to set
180
+ * @returns Promise resolving to true if successful
181
+ * @throws {Error} If the password update fails or user is not authenticated
182
+ *
183
+ * @example
184
+ * ```typescript
185
+ * try {
186
+ * await auth.resetPassword("oldPassword", "newPassword123");
187
+ * console.log("Password updated successfully");
188
+ * showSuccessMessage("Password updated!");
189
+ * } catch (error) {
190
+ * console.error("Password update failed:", error.message);
191
+ * showErrorMessage("Failed to update password");
192
+ * }
193
+ * ```
194
+ */
195
+ resetPassword(currentPassword: string, newPassword: string): Promise<boolean>;
196
+ /**
197
+ * Logs out the current user and clears all authentication data.
198
+ *
199
+ * This method:
200
+ * - Clears user state from memory and storage
201
+ * - Removes authentication tokens
202
+ * - Resets related services
203
+ *
204
+ * @example
205
+ * ```typescript
206
+ * auth.logOut();
207
+ * router.push("/login");
208
+ * console.log("User logged out successfully");
209
+ * ```
210
+ */
211
+ logOut(): void;
212
+ /**
213
+ * Refreshes the current authentication state.
214
+ * Useful for clearing potentially stale data.
215
+ *
216
+ * @example
217
+ * ```typescript
218
+ * // Clear current state and force fresh authentication
219
+ * auth.refresh();
220
+ * ```
221
+ */
222
+ refresh(): void;
223
+ /**
224
+ * Gets debug information about the current authentication state.
225
+ * Useful for troubleshooting authentication issues.
226
+ *
227
+ * @returns Object containing authentication state information
228
+ *
229
+ * @example
230
+ * ```typescript
231
+ * const debugInfo = auth.getDebugInfo();
232
+ * console.log("Auth Debug Info:", debugInfo);
233
+ * ```
234
+ */
235
+ getDebugInfo(): {
236
+ hasUser: boolean;
237
+ hasToken: boolean;
238
+ isAuthenticated: boolean;
239
+ userName: string;
240
+ tokenLength: number;
241
+ managerInstance: string;
242
+ };
243
+ /**
244
+ * Clears all stored authentication data from the unified store.
245
+ *
246
+ * @private
247
+ */
248
+ private clearSavedData;
249
+ }
@@ -0,0 +1,66 @@
1
+ import { BaseRepository } from "../../lib/api/base-repository";
2
+ import { authContract } from "./auth.contract";
3
+ import { User } from "@/models/user.model";
4
+ /**
5
+ * Repository class for handling authentication-related operations.
6
+ * Provides methods for user login and password management.
7
+ *
8
+ * @extends {BaseRepository<typeof authContract>}
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const authRepo = new AuthRepository();
13
+ * const user = await authRepo.logIn("user@example.com", "password");
14
+ * ```
15
+ */
16
+ export declare class AuthRepository extends BaseRepository<typeof authContract> {
17
+ /**
18
+ * Creates an instance of AuthRepository.
19
+ *
20
+ * @param options - Optional configuration
21
+ * @param options.root - Custom API root URL
22
+ * @param options.token - Authentication token for password operations
23
+ */
24
+ constructor(options?: {
25
+ root?: string;
26
+ token?: string;
27
+ });
28
+ /**
29
+ * Authenticates a user with the provided email and password.
30
+ *
31
+ * @param email - The email of the user attempting to log in
32
+ * @param password - The password of the user
33
+ * @returns Promise that resolves to a User object on successful login
34
+ * @throws {APIError} If the email or password is invalid, or if another error occurs during login
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * try {
39
+ * const user = await authRepo.logIn("user@example.com", "securePassword");
40
+ * console.log(`Welcome ${user.name}!`);
41
+ * } catch (error) {
42
+ * console.error("Login failed:", error.message);
43
+ * }
44
+ * ```
45
+ */
46
+ logIn(email: string, password: string): Promise<User>;
47
+ /**
48
+ * Updates the current user's password.
49
+ *
50
+ * @param currentPassword - The user's current password
51
+ * @param newPassword - The new password the user wants to set
52
+ * @returns Promise that resolves to true if the password update is successful
53
+ * @throws {APIError} If the current password is invalid or another error occurs during the update
54
+ *
55
+ * @example
56
+ * ```typescript
57
+ * try {
58
+ * await authRepo.updatePassword("oldPassword", "newSecurePassword");
59
+ * console.log("Password updated successfully");
60
+ * } catch (error) {
61
+ * console.error("Password update failed:", error.message);
62
+ * }
63
+ * ```
64
+ */
65
+ updatePassword(currentPassword: string, newPassword: string): Promise<boolean>;
66
+ }
@@ -0,0 +1,139 @@
1
+ import { type StoreApi, type UseBoundStore } from "zustand";
2
+ import { User } from "@/models/user.model";
3
+ /** Type definition for the store's internal state */
4
+ type AuthState = {
5
+ user: string | undefined;
6
+ token: string | undefined;
7
+ };
8
+ /** Type definition for the store's actions */
9
+ interface AuthActions {
10
+ setUser: (user: User) => void;
11
+ getUser: () => User | undefined;
12
+ setToken: (token: string) => void;
13
+ getToken: () => string | undefined;
14
+ setUserAndToken: (user: User, token: string) => void;
15
+ clearAuth: () => void;
16
+ }
17
+ /**
18
+ * Unified Zustand store for managing both user and token state with persistence.
19
+ *
20
+ * Features:
21
+ * - Persists both user data and token to sessionStorage
22
+ * - Serializes/deserializes User objects to/from JSON
23
+ * - Provides reactive state updates for React components
24
+ * - Automatically syncs user and token state
25
+ * - Server-side rendering safe
26
+ */
27
+ export declare const authStore: UseBoundStore<StoreApi<AuthState & AuthActions>>;
28
+ /**
29
+ * Gets the current authenticated user from the auth store.
30
+ * This function can be called from anywhere in the application.
31
+ *
32
+ * @returns The current user or undefined if not authenticated
33
+ *
34
+ * @example
35
+ * ```typescript
36
+ * // In BaseRepository or any other file
37
+ * const user = getCurrentUser();
38
+ * if (user) {
39
+ * console.log(`Current user: ${user.name}`);
40
+ * }
41
+ * ```
42
+ */
43
+ export declare const getCurrentUser: () => User | undefined;
44
+ /**
45
+ * Gets the current authentication token from the auth store.
46
+ * This function can be called from anywhere in the application,
47
+ * including BaseRepository for automatic token injection.
48
+ *
49
+ * @returns The current token or undefined if not authenticated
50
+ *
51
+ * @example
52
+ * ```typescript
53
+ * // In BaseRepository
54
+ * const token = getCurrentToken();
55
+ * if (token) {
56
+ * // Use token for API calls
57
+ * return initClient(contract, { baseHeaders: { token } });
58
+ * }
59
+ * ```
60
+ */
61
+ export declare const getCurrentToken: () => string | undefined;
62
+ /**
63
+ * React hook to access the current user with reactive updates.
64
+ *
65
+ * @returns The current user or undefined if not authenticated
66
+ * @throws {Error} If called in a server environment
67
+ *
68
+ * @example
69
+ * ```typescript
70
+ * function UserProfile() {
71
+ * const user = useCurrentUser();
72
+ *
73
+ * if (!user) {
74
+ * return <div>Please log in</div>;
75
+ * }
76
+ *
77
+ * return <div>Welcome, {user.name}!</div>;
78
+ * }
79
+ * ```
80
+ */
81
+ export declare const useCurrentUser: () => User | undefined;
82
+ /**
83
+ * React hook to access the current token with reactive updates.
84
+ *
85
+ * @returns The current token or undefined if not authenticated
86
+ * @throws {Error} If called in a server environment
87
+ *
88
+ * @example
89
+ * ```typescript
90
+ * function SomeComponent() {
91
+ * const token = useCurrentToken();
92
+ *
93
+ * if (!token) {
94
+ * return <div>Please log in</div>;
95
+ * }
96
+ *
97
+ * // Use token...
98
+ * }
99
+ * ```
100
+ */
101
+ export declare const useCurrentToken: () => string | undefined;
102
+ /**
103
+ * Checks if a user is currently authenticated.
104
+ *
105
+ * @returns True if user is authenticated, false otherwise
106
+ *
107
+ * @example
108
+ * ```typescript
109
+ * if (isAuthenticated()) {
110
+ * // User is logged in
111
+ * showDashboard();
112
+ * } else {
113
+ * // User needs to log in
114
+ * showLoginForm();
115
+ * }
116
+ * ```
117
+ */
118
+ export declare const isAuthenticated: () => boolean;
119
+ /**
120
+ * Gets debug information about the current authentication state.
121
+ * Useful for troubleshooting authentication issues.
122
+ *
123
+ * @returns Object containing authentication state information
124
+ *
125
+ * @example
126
+ * ```typescript
127
+ * const debugInfo = getAuthDebugInfo();
128
+ * console.log("Auth Debug Info:", debugInfo);
129
+ * ```
130
+ */
131
+ export declare const getAuthDebugInfo: () => {
132
+ hasUser: boolean;
133
+ hasToken: boolean;
134
+ isAuthenticated: boolean;
135
+ userName: string;
136
+ tokenLength: number;
137
+ storeState: string | (AuthState & AuthActions);
138
+ };
139
+ export {};
@@ -20,4 +20,3 @@ export declare const identityContract: {
20
20
  };
21
21
  };
22
22
  };
23
- //# sourceMappingURL=contract.d.ts.map
@@ -0,0 +1,58 @@
1
+ import { identityContract } from "./identity.api-contract";
2
+ import type { ClientInferResponseBody } from "@ts-rest/core";
3
+ import { BaseRepository } from "@/lib/api";
4
+ type GetUserIdentityResponse = ClientInferResponseBody<typeof identityContract.getUserCredentials>;
5
+ /**
6
+ * Repository class for retrieving user identity-related information.
7
+ * Handles fetching user credentials and identity data from the API.
8
+ *
9
+ * This repository handles pure API communication without permission checking.
10
+ * Permission validation should be handled at the service layer or route handlers.
11
+ *
12
+ * @extends {BaseRepository<typeof identityContract>}
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * const repo = new IdentityRepository({ token: userToken });
17
+ * const identity = await repo.getIdentity();
18
+ * ```
19
+ */
20
+ export declare class IdentityRepository extends BaseRepository<typeof identityContract> {
21
+ /**
22
+ * Creates an instance of IdentityRepository.
23
+ *
24
+ * @param options - Optional configuration
25
+ * @param options.token - Authentication token for API calls
26
+ * @param options.root - Custom API root URL
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * const repo = new IdentityRepository({
31
+ * token: "user-auth-token",
32
+ * root: "base-api-url"
33
+ * });
34
+ * ```
35
+ */
36
+ constructor(options?: {
37
+ token?: string;
38
+ root?: string;
39
+ });
40
+ /**
41
+ * Retrieves the current user's login credentials and identity information.
42
+ *
43
+ * @returns Promise that resolves to the user's login credentials
44
+ * @throws {APIError} If the request fails or returns an unexpected status
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * try {
49
+ * const identity = await repo.getIdentity();
50
+ * console.log("User identity:", identity);
51
+ * } catch (error) {
52
+ * console.error("Failed to get user identity:", error.message);
53
+ * }
54
+ * ```
55
+ */
56
+ getIdentity(): Promise<GetUserIdentityResponse>;
57
+ }
58
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from "./auth.manager";
2
+ export * from "./auth.repository";
3
+ export * from "./access/access.repository";
4
+ export * from "./identity/identity.repository";
5
+ export * from "./profile/profile.repository";
@@ -8,13 +8,14 @@ export declare const profileContract: {
8
8
  responses: {
9
9
  200: import("zod").ZodObject<{
10
10
  id: import("zod").ZodString;
11
- firstName: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
12
- lastName: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
11
+ firstName: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
12
+ lastName: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
13
13
  displayName: import("zod").ZodString;
14
- phone: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
14
+ phone: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
15
15
  accountNo: import("zod").ZodString;
16
- email: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
17
- }, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
16
+ email: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
17
+ autoApprove: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
18
+ }, "strip", import("zod").ZodTypeAny, {
18
19
  id: string;
19
20
  displayName: string;
20
21
  accountNo: string;
@@ -22,6 +23,7 @@ export declare const profileContract: {
22
23
  lastName?: string | null | undefined;
23
24
  phone?: string | null | undefined;
24
25
  email?: string | null | undefined;
26
+ autoApprove?: boolean | null | undefined;
25
27
  }, {
26
28
  id: string;
27
29
  displayName: string;
@@ -30,8 +32,8 @@ export declare const profileContract: {
30
32
  lastName?: string | null | undefined;
31
33
  phone?: string | null | undefined;
32
34
  email?: string | null | undefined;
35
+ autoApprove?: boolean | null | undefined;
33
36
  }>;
34
37
  };
35
38
  };
36
39
  };
37
- //# sourceMappingURL=contract.d.ts.map