@temboplus/afloat 0.1.81 → 0.2.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. package/README.md +246 -42
  2. package/dist/index.cjs.js +2 -0
  3. package/dist/index.cjs.js.map +1 -0
  4. package/dist/index.d.ts +10 -0
  5. package/dist/index.esm.js +2 -0
  6. package/dist/index.esm.js.map +1 -0
  7. package/dist/lib/api/base-repository.d.ts +177 -0
  8. package/dist/lib/api/index.d.ts +1 -0
  9. package/{esm/src/errors/api_error.d.ts → dist/lib/error/error.api.d.ts} +0 -1
  10. package/{script/npm/src/src/errors/permission_error.d.ts → dist/lib/error/error.permission.d.ts} +1 -2
  11. package/dist/lib/error/error.utils.d.ts +22 -0
  12. package/dist/lib/error/index.d.ts +3 -0
  13. package/dist/lib/query/index.d.ts +4 -0
  14. package/dist/lib/query/pagination/pagination.d.ts +73 -0
  15. package/dist/lib/query/pagination/pagination.schemas.d.ts +83 -0
  16. package/dist/lib/query/query.builder.d.ts +75 -0
  17. package/dist/lib/query/query.types.d.ts +36 -0
  18. package/{esm/src/features/auth/contract.d.ts → dist/modules/auth/auth.contract.d.ts} +16 -19
  19. package/dist/modules/auth/auth.repository.d.ts +83 -0
  20. package/dist/modules/auth/company-membership.model.d.ts +171 -0
  21. package/dist/modules/auth/index.d.ts +3 -0
  22. package/dist/modules/auth/user.model.d.ts +363 -0
  23. package/dist/modules/beneficiary/beneficiary-info.model.d.ts +178 -0
  24. package/dist/modules/beneficiary/beneficiary-input-handler.d.ts +16 -0
  25. package/dist/modules/beneficiary/beneficiary.api-contract.d.ts +203 -0
  26. package/dist/modules/beneficiary/beneficiary.dtos.d.ts +84 -0
  27. package/dist/modules/beneficiary/beneficiary.model.d.ts +441 -0
  28. package/dist/modules/beneficiary/beneficiary.repository.d.ts +116 -0
  29. package/dist/modules/beneficiary/index.d.ts +6 -0
  30. package/dist/modules/login/index.d.ts +4 -0
  31. package/dist/modules/login/login.api-contract.d.ts +51 -0
  32. package/dist/modules/login/login.dtos.d.ts +85 -0
  33. package/dist/modules/login/login.model.d.ts +168 -0
  34. package/dist/modules/login/login.repository.d.ts +58 -0
  35. package/{esm/src/models/permission.d.ts → dist/modules/login/permission.type.d.ts} +9 -10
  36. package/dist/modules/payout/index.d.ts +5 -0
  37. package/dist/modules/payout/payout-channel-handler.d.ts +82 -0
  38. package/{esm/src/features/payout/contract.d.ts → dist/modules/payout/payout.api-contract.d.ts} +350 -207
  39. package/dist/modules/payout/payout.dtos.d.ts +607 -0
  40. package/dist/modules/payout/payout.model.d.ts +383 -0
  41. package/dist/modules/payout/payout.query.d.ts +134 -0
  42. package/dist/modules/payout/payout.repository.d.ts +204 -0
  43. package/dist/modules/profile/index.d.ts +3 -0
  44. package/{script/npm/src/src/features/auth/profile/contract.d.ts → dist/modules/profile/profile.api-contract.d.ts} +8 -6
  45. package/dist/modules/profile/profile.dtos.d.ts +80 -0
  46. package/{script/npm/src/src/models/user/profile.d.ts → dist/modules/profile/profile.model.d.ts} +81 -52
  47. package/dist/modules/profile/profile.repository.d.ts +56 -0
  48. package/dist/modules/team-member/index.d.ts +4 -0
  49. package/dist/modules/team-member/role.model.d.ts +61 -0
  50. package/{esm/src/features/admin/contract.d.ts → dist/modules/team-member/team-member.contract.d.ts} +229 -154
  51. package/dist/modules/team-member/team-member.dtos.d.ts +261 -0
  52. package/dist/modules/team-member/team-member.model.d.ts +237 -0
  53. package/dist/modules/team-member/team-member.repository.d.ts +179 -0
  54. package/dist/modules/wallet/index.d.ts +6 -0
  55. package/dist/modules/wallet/narration.model.d.ts +225 -0
  56. package/dist/modules/wallet/statement-entry.model.d.ts +299 -0
  57. package/{script/npm/src/src/features/wallet/contract.d.ts → dist/modules/wallet/wallet.contract.d.ts} +17 -15
  58. package/dist/modules/wallet/wallet.dtos.d.ts +204 -0
  59. package/{esm/src/models/wallet/wallet.d.ts → dist/modules/wallet/wallet.model.d.ts} +34 -40
  60. package/dist/modules/wallet/wallet.query.d.ts +95 -0
  61. package/dist/modules/wallet/wallet.repository.d.ts +205 -0
  62. package/dist/modules/wallet/wallet.utils.d.ts +17 -0
  63. package/package.json +49 -23
  64. package/LICENSE +0 -7
  65. package/esm/mod.d.ts +0 -8
  66. package/esm/mod.d.ts.map +0 -1
  67. package/esm/mod.js +0 -7
  68. package/esm/package.json +0 -3
  69. package/esm/src/errors/api_error.d.ts.map +0 -1
  70. package/esm/src/errors/api_error.js +0 -90
  71. package/esm/src/errors/index.d.ts +0 -3
  72. package/esm/src/errors/index.d.ts.map +0 -1
  73. package/esm/src/errors/index.js +0 -2
  74. package/esm/src/errors/permission_error.d.ts +0 -48
  75. package/esm/src/errors/permission_error.d.ts.map +0 -1
  76. package/esm/src/errors/permission_error.js +0 -70
  77. package/esm/src/features/admin/contract.d.ts.map +0 -1
  78. package/esm/src/features/admin/contract.js +0 -210
  79. package/esm/src/features/admin/index.d.ts +0 -4
  80. package/esm/src/features/admin/index.d.ts.map +0 -1
  81. package/esm/src/features/admin/index.js +0 -3
  82. package/esm/src/features/admin/repository.d.ts +0 -114
  83. package/esm/src/features/admin/repository.d.ts.map +0 -1
  84. package/esm/src/features/admin/repository.js +0 -248
  85. package/esm/src/features/admin/schemas.d.ts +0 -146
  86. package/esm/src/features/admin/schemas.d.ts.map +0 -1
  87. package/esm/src/features/admin/schemas.js +0 -206
  88. package/esm/src/features/auth/access/contract.d.ts +0 -14
  89. package/esm/src/features/auth/access/contract.d.ts.map +0 -1
  90. package/esm/src/features/auth/access/contract.js +0 -14
  91. package/esm/src/features/auth/access/repository.d.ts +0 -11
  92. package/esm/src/features/auth/access/repository.d.ts.map +0 -1
  93. package/esm/src/features/auth/access/repository.js +0 -25
  94. package/esm/src/features/auth/contract.d.ts.map +0 -1
  95. package/esm/src/features/auth/contract.js +0 -43
  96. package/esm/src/features/auth/identity/contract.d.ts +0 -23
  97. package/esm/src/features/auth/identity/contract.d.ts.map +0 -1
  98. package/esm/src/features/auth/identity/contract.js +0 -17
  99. package/esm/src/features/auth/identity/repository.d.ts +0 -22
  100. package/esm/src/features/auth/identity/repository.d.ts.map +0 -1
  101. package/esm/src/features/auth/identity/repository.js +0 -30
  102. package/esm/src/features/auth/index.d.ts +0 -6
  103. package/esm/src/features/auth/index.d.ts.map +0 -1
  104. package/esm/src/features/auth/index.js +0 -5
  105. package/esm/src/features/auth/manager.d.ts +0 -105
  106. package/esm/src/features/auth/manager.d.ts.map +0 -1
  107. package/esm/src/features/auth/manager.js +0 -181
  108. package/esm/src/features/auth/profile/contract.d.ts +0 -37
  109. package/esm/src/features/auth/profile/contract.d.ts.map +0 -1
  110. package/esm/src/features/auth/profile/contract.js +0 -14
  111. package/esm/src/features/auth/profile/repository.d.ts +0 -11
  112. package/esm/src/features/auth/profile/repository.d.ts.map +0 -1
  113. package/esm/src/features/auth/profile/repository.js +0 -25
  114. package/esm/src/features/auth/repository.d.ts +0 -30
  115. package/esm/src/features/auth/repository.d.ts.map +0 -1
  116. package/esm/src/features/auth/repository.js +0 -69
  117. package/esm/src/features/auth/storage/client_store.d.ts +0 -30
  118. package/esm/src/features/auth/storage/client_store.d.ts.map +0 -1
  119. package/esm/src/features/auth/storage/client_store.js +0 -46
  120. package/esm/src/features/auth/storage/client_token_handler.d.ts +0 -32
  121. package/esm/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
  122. package/esm/src/features/auth/storage/client_token_handler.js +0 -36
  123. package/esm/src/features/auth/storage/server_store.d.ts +0 -24
  124. package/esm/src/features/auth/storage/server_store.d.ts.map +0 -1
  125. package/esm/src/features/auth/storage/server_store.js +0 -34
  126. package/esm/src/features/auth/storage/server_token_handler.d.ts +0 -36
  127. package/esm/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
  128. package/esm/src/features/auth/storage/server_token_handler.js +0 -115
  129. package/esm/src/features/auth/storage/types.d.ts +0 -42
  130. package/esm/src/features/auth/storage/types.d.ts.map +0 -1
  131. package/esm/src/features/auth/storage/types.js +0 -1
  132. package/esm/src/features/contact/contract.d.ts +0 -170
  133. package/esm/src/features/contact/contract.d.ts.map +0 -1
  134. package/esm/src/features/contact/contract.js +0 -49
  135. package/esm/src/features/contact/index.d.ts +0 -2
  136. package/esm/src/features/contact/index.d.ts.map +0 -1
  137. package/esm/src/features/contact/index.js +0 -1
  138. package/esm/src/features/contact/repository.d.ts +0 -58
  139. package/esm/src/features/contact/repository.d.ts.map +0 -1
  140. package/esm/src/features/contact/repository.js +0 -108
  141. package/esm/src/features/payout/contract.d.ts.map +0 -1
  142. package/esm/src/features/payout/contract.js +0 -75
  143. package/esm/src/features/payout/index.d.ts +0 -2
  144. package/esm/src/features/payout/index.d.ts.map +0 -1
  145. package/esm/src/features/payout/index.js +0 -1
  146. package/esm/src/features/payout/repository.d.ts +0 -67
  147. package/esm/src/features/payout/repository.d.ts.map +0 -1
  148. package/esm/src/features/payout/repository.js +0 -179
  149. package/esm/src/features/wallet/contract.d.ts +0 -137
  150. package/esm/src/features/wallet/contract.d.ts.map +0 -1
  151. package/esm/src/features/wallet/contract.js +0 -38
  152. package/esm/src/features/wallet/index.d.ts +0 -2
  153. package/esm/src/features/wallet/index.d.ts.map +0 -1
  154. package/esm/src/features/wallet/index.js +0 -1
  155. package/esm/src/features/wallet/repository.d.ts +0 -57
  156. package/esm/src/features/wallet/repository.d.ts.map +0 -1
  157. package/esm/src/features/wallet/repository.js +0 -93
  158. package/esm/src/models/contact/derivatives/contact.d.ts +0 -172
  159. package/esm/src/models/contact/derivatives/contact.d.ts.map +0 -1
  160. package/esm/src/models/contact/derivatives/contact.js +0 -266
  161. package/esm/src/models/contact/derivatives/contact_info.d.ts +0 -188
  162. package/esm/src/models/contact/derivatives/contact_info.d.ts.map +0 -1
  163. package/esm/src/models/contact/derivatives/contact_info.js +0 -255
  164. package/esm/src/models/contact/index.d.ts +0 -5
  165. package/esm/src/models/contact/index.d.ts.map +0 -1
  166. package/esm/src/models/contact/index.js +0 -4
  167. package/esm/src/models/contact/schemas.d.ts +0 -66
  168. package/esm/src/models/contact/schemas.d.ts.map +0 -1
  169. package/esm/src/models/contact/schemas.js +0 -64
  170. package/esm/src/models/contact/validation.d.ts +0 -37
  171. package/esm/src/models/contact/validation.d.ts.map +0 -1
  172. package/esm/src/models/contact/validation.js +0 -146
  173. package/esm/src/models/index.d.ts +0 -7
  174. package/esm/src/models/index.d.ts.map +0 -1
  175. package/esm/src/models/index.js +0 -6
  176. package/esm/src/models/payout/api.d.ts +0 -29
  177. package/esm/src/models/payout/api.d.ts.map +0 -1
  178. package/esm/src/models/payout/api.js +0 -1
  179. package/esm/src/models/payout/channel.d.ts +0 -58
  180. package/esm/src/models/payout/channel.d.ts.map +0 -1
  181. package/esm/src/models/payout/channel.js +0 -53
  182. package/esm/src/models/payout/derivatives/payout.d.ts +0 -158
  183. package/esm/src/models/payout/derivatives/payout.d.ts.map +0 -1
  184. package/esm/src/models/payout/derivatives/payout.js +0 -271
  185. package/esm/src/models/payout/index.d.ts +0 -7
  186. package/esm/src/models/payout/index.d.ts.map +0 -1
  187. package/esm/src/models/payout/index.js +0 -6
  188. package/esm/src/models/payout/narration.d.ts +0 -164
  189. package/esm/src/models/payout/narration.d.ts.map +0 -1
  190. package/esm/src/models/payout/narration.js +0 -308
  191. package/esm/src/models/payout/schemas.d.ts +0 -156
  192. package/esm/src/models/payout/schemas.d.ts.map +0 -1
  193. package/esm/src/models/payout/schemas.js +0 -105
  194. package/esm/src/models/payout/status.d.ts +0 -33
  195. package/esm/src/models/payout/status.d.ts.map +0 -1
  196. package/esm/src/models/payout/status.js +0 -34
  197. package/esm/src/models/permission.d.ts.map +0 -1
  198. package/esm/src/models/permission.js +0 -50
  199. package/esm/src/models/role.d.ts +0 -21
  200. package/esm/src/models/role.d.ts.map +0 -1
  201. package/esm/src/models/role.js +0 -73
  202. package/esm/src/models/user/authenticated-user.d.ts +0 -77
  203. package/esm/src/models/user/authenticated-user.d.ts.map +0 -1
  204. package/esm/src/models/user/authenticated-user.js +0 -226
  205. package/esm/src/models/user/index.d.ts +0 -4
  206. package/esm/src/models/user/index.d.ts.map +0 -1
  207. package/esm/src/models/user/index.js +0 -3
  208. package/esm/src/models/user/managed-user.d.ts +0 -108
  209. package/esm/src/models/user/managed-user.d.ts.map +0 -1
  210. package/esm/src/models/user/managed-user.js +0 -255
  211. package/esm/src/models/user/profile.d.ts +0 -161
  212. package/esm/src/models/user/profile.d.ts.map +0 -1
  213. package/esm/src/models/user/profile.js +0 -334
  214. package/esm/src/models/wallet/index.d.ts +0 -4
  215. package/esm/src/models/wallet/index.d.ts.map +0 -1
  216. package/esm/src/models/wallet/index.js +0 -3
  217. package/esm/src/models/wallet/schemas.d.ts +0 -95
  218. package/esm/src/models/wallet/schemas.d.ts.map +0 -1
  219. package/esm/src/models/wallet/schemas.js +0 -35
  220. package/esm/src/models/wallet/statement_entry.d.ts +0 -160
  221. package/esm/src/models/wallet/statement_entry.d.ts.map +0 -1
  222. package/esm/src/models/wallet/statement_entry.js +0 -255
  223. package/esm/src/models/wallet/wallet.d.ts.map +0 -1
  224. package/esm/src/models/wallet/wallet.js +0 -279
  225. package/esm/src/shared/base_repository.d.ts +0 -80
  226. package/esm/src/shared/base_repository.d.ts.map +0 -1
  227. package/esm/src/shared/base_repository.js +0 -153
  228. package/esm/src/shared/common_responses.d.ts +0 -13
  229. package/esm/src/shared/common_responses.d.ts.map +0 -1
  230. package/esm/src/shared/common_responses.js +0 -10
  231. package/esm/src/shared/index.d.ts +0 -3
  232. package/esm/src/shared/index.d.ts.map +0 -1
  233. package/esm/src/shared/index.js +0 -2
  234. package/esm/src/shared/token_required_repository.d.ts +0 -78
  235. package/esm/src/shared/token_required_repository.d.ts.map +0 -1
  236. package/esm/src/shared/token_required_repository.js +0 -128
  237. package/script/mod.d.ts +0 -8
  238. package/script/mod.d.ts.map +0 -1
  239. package/script/mod.js +0 -23
  240. package/script/npm/src/mod.d.ts +0 -8
  241. package/script/npm/src/mod.d.ts.map +0 -1
  242. package/script/npm/src/mod.js +0 -23
  243. package/script/npm/src/src/errors/api_error.d.ts +0 -63
  244. package/script/npm/src/src/errors/api_error.d.ts.map +0 -1
  245. package/script/npm/src/src/errors/api_error.js +0 -94
  246. package/script/npm/src/src/errors/index.d.ts +0 -3
  247. package/script/npm/src/src/errors/index.d.ts.map +0 -1
  248. package/script/npm/src/src/errors/index.js +0 -18
  249. package/script/npm/src/src/errors/permission_error.d.ts.map +0 -1
  250. package/script/npm/src/src/errors/permission_error.js +0 -74
  251. package/script/npm/src/src/features/admin/contract.d.ts +0 -842
  252. package/script/npm/src/src/features/admin/contract.d.ts.map +0 -1
  253. package/script/npm/src/src/features/admin/contract.js +0 -213
  254. package/script/npm/src/src/features/admin/index.d.ts +0 -4
  255. package/script/npm/src/src/features/admin/index.d.ts.map +0 -1
  256. package/script/npm/src/src/features/admin/index.js +0 -19
  257. package/script/npm/src/src/features/admin/repository.d.ts +0 -114
  258. package/script/npm/src/src/features/admin/repository.d.ts.map +0 -1
  259. package/script/npm/src/src/features/admin/repository.js +0 -252
  260. package/script/npm/src/src/features/admin/schemas.d.ts +0 -146
  261. package/script/npm/src/src/features/admin/schemas.d.ts.map +0 -1
  262. package/script/npm/src/src/features/admin/schemas.js +0 -209
  263. package/script/npm/src/src/features/auth/access/contract.d.ts +0 -14
  264. package/script/npm/src/src/features/auth/access/contract.d.ts.map +0 -1
  265. package/script/npm/src/src/features/auth/access/contract.js +0 -17
  266. package/script/npm/src/src/features/auth/access/repository.d.ts +0 -11
  267. package/script/npm/src/src/features/auth/access/repository.d.ts.map +0 -1
  268. package/script/npm/src/src/features/auth/access/repository.js +0 -29
  269. package/script/npm/src/src/features/auth/contract.d.ts +0 -112
  270. package/script/npm/src/src/features/auth/contract.d.ts.map +0 -1
  271. package/script/npm/src/src/features/auth/contract.js +0 -46
  272. package/script/npm/src/src/features/auth/identity/contract.d.ts +0 -23
  273. package/script/npm/src/src/features/auth/identity/contract.d.ts.map +0 -1
  274. package/script/npm/src/src/features/auth/identity/contract.js +0 -20
  275. package/script/npm/src/src/features/auth/identity/repository.d.ts +0 -22
  276. package/script/npm/src/src/features/auth/identity/repository.d.ts.map +0 -1
  277. package/script/npm/src/src/features/auth/identity/repository.js +0 -34
  278. package/script/npm/src/src/features/auth/index.d.ts +0 -6
  279. package/script/npm/src/src/features/auth/index.d.ts.map +0 -1
  280. package/script/npm/src/src/features/auth/index.js +0 -21
  281. package/script/npm/src/src/features/auth/manager.d.ts +0 -105
  282. package/script/npm/src/src/features/auth/manager.d.ts.map +0 -1
  283. package/script/npm/src/src/features/auth/manager.js +0 -185
  284. package/script/npm/src/src/features/auth/profile/contract.d.ts.map +0 -1
  285. package/script/npm/src/src/features/auth/profile/contract.js +0 -17
  286. package/script/npm/src/src/features/auth/profile/repository.d.ts +0 -11
  287. package/script/npm/src/src/features/auth/profile/repository.d.ts.map +0 -1
  288. package/script/npm/src/src/features/auth/profile/repository.js +0 -29
  289. package/script/npm/src/src/features/auth/repository.d.ts +0 -30
  290. package/script/npm/src/src/features/auth/repository.d.ts.map +0 -1
  291. package/script/npm/src/src/features/auth/repository.js +0 -73
  292. package/script/npm/src/src/features/auth/storage/client_store.d.ts +0 -30
  293. package/script/npm/src/src/features/auth/storage/client_store.d.ts.map +0 -1
  294. package/script/npm/src/src/features/auth/storage/client_store.js +0 -51
  295. package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts +0 -32
  296. package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
  297. package/script/npm/src/src/features/auth/storage/client_token_handler.js +0 -40
  298. package/script/npm/src/src/features/auth/storage/server_store.d.ts +0 -24
  299. package/script/npm/src/src/features/auth/storage/server_store.d.ts.map +0 -1
  300. package/script/npm/src/src/features/auth/storage/server_store.js +0 -38
  301. package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts +0 -36
  302. package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
  303. package/script/npm/src/src/features/auth/storage/server_token_handler.js +0 -119
  304. package/script/npm/src/src/features/auth/storage/types.d.ts +0 -42
  305. package/script/npm/src/src/features/auth/storage/types.d.ts.map +0 -1
  306. package/script/npm/src/src/features/auth/storage/types.js +0 -2
  307. package/script/npm/src/src/features/contact/contract.d.ts +0 -170
  308. package/script/npm/src/src/features/contact/contract.d.ts.map +0 -1
  309. package/script/npm/src/src/features/contact/contract.js +0 -52
  310. package/script/npm/src/src/features/contact/index.d.ts +0 -2
  311. package/script/npm/src/src/features/contact/index.d.ts.map +0 -1
  312. package/script/npm/src/src/features/contact/index.js +0 -17
  313. package/script/npm/src/src/features/contact/repository.d.ts +0 -58
  314. package/script/npm/src/src/features/contact/repository.d.ts.map +0 -1
  315. package/script/npm/src/src/features/contact/repository.js +0 -112
  316. package/script/npm/src/src/features/payout/contract.d.ts +0 -623
  317. package/script/npm/src/src/features/payout/contract.d.ts.map +0 -1
  318. package/script/npm/src/src/features/payout/contract.js +0 -78
  319. package/script/npm/src/src/features/payout/index.d.ts +0 -2
  320. package/script/npm/src/src/features/payout/index.d.ts.map +0 -1
  321. package/script/npm/src/src/features/payout/index.js +0 -17
  322. package/script/npm/src/src/features/payout/repository.d.ts +0 -67
  323. package/script/npm/src/src/features/payout/repository.d.ts.map +0 -1
  324. package/script/npm/src/src/features/payout/repository.js +0 -183
  325. package/script/npm/src/src/features/wallet/contract.d.ts.map +0 -1
  326. package/script/npm/src/src/features/wallet/contract.js +0 -41
  327. package/script/npm/src/src/features/wallet/index.d.ts +0 -2
  328. package/script/npm/src/src/features/wallet/index.d.ts.map +0 -1
  329. package/script/npm/src/src/features/wallet/index.js +0 -17
  330. package/script/npm/src/src/features/wallet/repository.d.ts +0 -57
  331. package/script/npm/src/src/features/wallet/repository.d.ts.map +0 -1
  332. package/script/npm/src/src/features/wallet/repository.js +0 -97
  333. package/script/npm/src/src/models/contact/derivatives/contact.d.ts +0 -172
  334. package/script/npm/src/src/models/contact/derivatives/contact.d.ts.map +0 -1
  335. package/script/npm/src/src/models/contact/derivatives/contact.js +0 -270
  336. package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts +0 -188
  337. package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts.map +0 -1
  338. package/script/npm/src/src/models/contact/derivatives/contact_info.js +0 -260
  339. package/script/npm/src/src/models/contact/index.d.ts +0 -5
  340. package/script/npm/src/src/models/contact/index.d.ts.map +0 -1
  341. package/script/npm/src/src/models/contact/index.js +0 -20
  342. package/script/npm/src/src/models/contact/schemas.d.ts +0 -66
  343. package/script/npm/src/src/models/contact/schemas.d.ts.map +0 -1
  344. package/script/npm/src/src/models/contact/schemas.js +0 -67
  345. package/script/npm/src/src/models/contact/validation.d.ts +0 -37
  346. package/script/npm/src/src/models/contact/validation.d.ts.map +0 -1
  347. package/script/npm/src/src/models/contact/validation.js +0 -153
  348. package/script/npm/src/src/models/index.d.ts +0 -7
  349. package/script/npm/src/src/models/index.d.ts.map +0 -1
  350. package/script/npm/src/src/models/index.js +0 -22
  351. package/script/npm/src/src/models/payout/api.d.ts +0 -29
  352. package/script/npm/src/src/models/payout/api.d.ts.map +0 -1
  353. package/script/npm/src/src/models/payout/api.js +0 -2
  354. package/script/npm/src/src/models/payout/channel.d.ts +0 -58
  355. package/script/npm/src/src/models/payout/channel.d.ts.map +0 -1
  356. package/script/npm/src/src/models/payout/channel.js +0 -56
  357. package/script/npm/src/src/models/payout/derivatives/payout.d.ts +0 -158
  358. package/script/npm/src/src/models/payout/derivatives/payout.d.ts.map +0 -1
  359. package/script/npm/src/src/models/payout/derivatives/payout.js +0 -275
  360. package/script/npm/src/src/models/payout/index.d.ts +0 -7
  361. package/script/npm/src/src/models/payout/index.d.ts.map +0 -1
  362. package/script/npm/src/src/models/payout/index.js +0 -22
  363. package/script/npm/src/src/models/payout/narration.d.ts +0 -164
  364. package/script/npm/src/src/models/payout/narration.d.ts.map +0 -1
  365. package/script/npm/src/src/models/payout/narration.js +0 -312
  366. package/script/npm/src/src/models/payout/schemas.d.ts +0 -156
  367. package/script/npm/src/src/models/payout/schemas.d.ts.map +0 -1
  368. package/script/npm/src/src/models/payout/schemas.js +0 -108
  369. package/script/npm/src/src/models/payout/status.d.ts +0 -33
  370. package/script/npm/src/src/models/payout/status.d.ts.map +0 -1
  371. package/script/npm/src/src/models/payout/status.js +0 -37
  372. package/script/npm/src/src/models/permission.d.ts +0 -55
  373. package/script/npm/src/src/models/permission.d.ts.map +0 -1
  374. package/script/npm/src/src/models/permission.js +0 -53
  375. package/script/npm/src/src/models/role.d.ts +0 -21
  376. package/script/npm/src/src/models/role.d.ts.map +0 -1
  377. package/script/npm/src/src/models/role.js +0 -77
  378. package/script/npm/src/src/models/user/authenticated-user.d.ts +0 -77
  379. package/script/npm/src/src/models/user/authenticated-user.d.ts.map +0 -1
  380. package/script/npm/src/src/models/user/authenticated-user.js +0 -230
  381. package/script/npm/src/src/models/user/index.d.ts +0 -4
  382. package/script/npm/src/src/models/user/index.d.ts.map +0 -1
  383. package/script/npm/src/src/models/user/index.js +0 -19
  384. package/script/npm/src/src/models/user/managed-user.d.ts +0 -108
  385. package/script/npm/src/src/models/user/managed-user.d.ts.map +0 -1
  386. package/script/npm/src/src/models/user/managed-user.js +0 -260
  387. package/script/npm/src/src/models/user/profile.d.ts.map +0 -1
  388. package/script/npm/src/src/models/user/profile.js +0 -338
  389. package/script/npm/src/src/models/wallet/index.d.ts +0 -4
  390. package/script/npm/src/src/models/wallet/index.d.ts.map +0 -1
  391. package/script/npm/src/src/models/wallet/index.js +0 -19
  392. package/script/npm/src/src/models/wallet/schemas.d.ts +0 -95
  393. package/script/npm/src/src/models/wallet/schemas.d.ts.map +0 -1
  394. package/script/npm/src/src/models/wallet/schemas.js +0 -38
  395. package/script/npm/src/src/models/wallet/statement_entry.d.ts +0 -160
  396. package/script/npm/src/src/models/wallet/statement_entry.d.ts.map +0 -1
  397. package/script/npm/src/src/models/wallet/statement_entry.js +0 -259
  398. package/script/npm/src/src/models/wallet/wallet.d.ts +0 -147
  399. package/script/npm/src/src/models/wallet/wallet.d.ts.map +0 -1
  400. package/script/npm/src/src/models/wallet/wallet.js +0 -283
  401. package/script/npm/src/src/shared/base_repository.d.ts +0 -80
  402. package/script/npm/src/src/shared/base_repository.d.ts.map +0 -1
  403. package/script/npm/src/src/shared/base_repository.js +0 -157
  404. package/script/npm/src/src/shared/common_responses.d.ts +0 -13
  405. package/script/npm/src/src/shared/common_responses.d.ts.map +0 -1
  406. package/script/npm/src/src/shared/common_responses.js +0 -13
  407. package/script/npm/src/src/shared/index.d.ts +0 -3
  408. package/script/npm/src/src/shared/index.d.ts.map +0 -1
  409. package/script/npm/src/src/shared/index.js +0 -18
  410. package/script/npm/src/src/shared/token_required_repository.d.ts +0 -78
  411. package/script/npm/src/src/shared/token_required_repository.d.ts.map +0 -1
  412. package/script/npm/src/src/shared/token_required_repository.js +0 -132
  413. package/script/package.json +0 -3
@@ -0,0 +1,73 @@
1
+ /** Serialized pagination metadata for API responses */
2
+ export type PaginationJson = {
3
+ page: number;
4
+ limit: number;
5
+ total: number;
6
+ totalPages: number;
7
+ hasNext: boolean;
8
+ hasPrev: boolean;
9
+ };
10
+ /**
11
+ * Represents pagination metadata for paginated API responses.
12
+ * Provides computed properties for navigation and page calculations.
13
+ */
14
+ export declare class Pagination {
15
+ readonly page: number;
16
+ readonly limit: number;
17
+ readonly total: number;
18
+ /**
19
+ * @param page - Current page number (1-based)
20
+ * @param limit - Number of items per page
21
+ * @param total - Total number of items across all pages
22
+ */
23
+ constructor(page: number, limit: number, total: number);
24
+ /** Total number of pages */
25
+ get totalPages(): number;
26
+ /** Whether there is a next page available */
27
+ get hasNext(): boolean;
28
+ /** Whether there is a previous page available */
29
+ get hasPrev(): boolean;
30
+ /** Offset for database queries (0-based) */
31
+ get offset(): number;
32
+ /** Whether this is the first page */
33
+ get isFirstPage(): boolean;
34
+ /** Whether this is the last page */
35
+ get isLastPage(): boolean;
36
+ /**
37
+ * Creates a Pagination instance for the next page.
38
+ * @returns New Pagination instance or null if no next page exists
39
+ */
40
+ nextPage(): Pagination | null;
41
+ /**
42
+ * Creates a Pagination instance for the previous page.
43
+ * @returns New Pagination instance or null if no previous page exists
44
+ */
45
+ prevPage(): Pagination | null;
46
+ /** Converts to a plain object for JSON serialization */
47
+ toJSON(): {
48
+ page: number;
49
+ limit: number;
50
+ total: number;
51
+ totalPages: number;
52
+ hasNext: boolean;
53
+ hasPrev: boolean;
54
+ };
55
+ }
56
+ /** Generic paginated response structure */
57
+ export interface Paged<T> {
58
+ results: T[];
59
+ pagination: Pagination;
60
+ }
61
+ /** Type for paginated responses after JSON serialization */
62
+ export type PaginatedApiResponse<T> = {
63
+ results: T[];
64
+ pagination: PaginationJson;
65
+ };
66
+ /**
67
+ * Creates a paginated response from query results.
68
+ */
69
+ export declare function createPaginatedResponse<T>(results: T[], page: number, limit: number, total: number): Paged<T>;
70
+ /**
71
+ * Creates an empty paginated response.
72
+ */
73
+ export declare function emptyPaginatedResponse<T>(page?: number, limit?: number): Paged<T>;
@@ -0,0 +1,83 @@
1
+ import { z } from "zod";
2
+ /** Zod schema for validating pagination query parameters */
3
+ export declare const PaginationParamsSchema: z.ZodObject<{
4
+ page: z.ZodDefault<z.ZodNumber>;
5
+ limit: z.ZodDefault<z.ZodNumber>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ page: number;
8
+ limit: number;
9
+ }, {
10
+ page?: number | undefined;
11
+ limit?: number | undefined;
12
+ }>;
13
+ /** Zod schema for validating pagination metadata */
14
+ export declare const PaginationSchema: z.ZodObject<{
15
+ page: z.ZodNumber;
16
+ limit: z.ZodNumber;
17
+ total: z.ZodNumber;
18
+ totalPages: z.ZodNumber;
19
+ hasNext: z.ZodBoolean;
20
+ hasPrev: z.ZodBoolean;
21
+ }, "strip", z.ZodTypeAny, {
22
+ page: number;
23
+ limit: number;
24
+ total: number;
25
+ totalPages: number;
26
+ hasNext: boolean;
27
+ hasPrev: boolean;
28
+ }, {
29
+ page: number;
30
+ limit: number;
31
+ total: number;
32
+ totalPages: number;
33
+ hasNext: boolean;
34
+ hasPrev: boolean;
35
+ }>;
36
+ /**
37
+ * Creates a Zod schema for a paginated response with typed results.
38
+ */
39
+ export declare function createPaginatedResponseSchema<T extends z.ZodTypeAny>(itemSchema: T): z.ZodObject<{
40
+ results: z.ZodArray<T, "many">;
41
+ pagination: z.ZodObject<{
42
+ page: z.ZodNumber;
43
+ limit: z.ZodNumber;
44
+ total: z.ZodNumber;
45
+ totalPages: z.ZodNumber;
46
+ hasNext: z.ZodBoolean;
47
+ hasPrev: z.ZodBoolean;
48
+ }, "strip", z.ZodTypeAny, {
49
+ page: number;
50
+ limit: number;
51
+ total: number;
52
+ totalPages: number;
53
+ hasNext: boolean;
54
+ hasPrev: boolean;
55
+ }, {
56
+ page: number;
57
+ limit: number;
58
+ total: number;
59
+ totalPages: number;
60
+ hasNext: boolean;
61
+ hasPrev: boolean;
62
+ }>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ results: T["_output"][];
65
+ pagination: {
66
+ page: number;
67
+ limit: number;
68
+ total: number;
69
+ totalPages: number;
70
+ hasNext: boolean;
71
+ hasPrev: boolean;
72
+ };
73
+ }, {
74
+ results: T["_input"][];
75
+ pagination: {
76
+ page: number;
77
+ limit: number;
78
+ total: number;
79
+ totalPages: number;
80
+ hasNext: boolean;
81
+ hasPrev: boolean;
82
+ };
83
+ }>;
@@ -0,0 +1,75 @@
1
+ import { FilterCriteria, QueryOptions, SortCriteria, SortDirection } from "./query.types.js";
2
+ export declare const QUERY_BUILDER_TYPE: unique symbol;
3
+ export declare class QueryBuilder {
4
+ readonly options: QueryOptions;
5
+ constructor(options?: QueryOptions);
6
+ /**
7
+ * Type tag to identify QueryBuilder instances
8
+ */
9
+ [QUERY_BUILDER_TYPE]: string;
10
+ /**
11
+ * Safely check if an object is a QueryBuilder instance
12
+ */
13
+ static is(obj: any): obj is QueryBuilder;
14
+ addFilter(criteria: FilterCriteria): this;
15
+ where(field: string, value: any): this;
16
+ whereNot(field: string, value: any): this;
17
+ whereLike(field: string, value: string): this;
18
+ whereLikeLower(field: string, value: string): this;
19
+ whereContains(field: string, value: string): this;
20
+ whereStartsWith(field: string, value: string): this;
21
+ whereEndsWith(field: string, value: string): this;
22
+ whereIn(field: string, values: any[]): this;
23
+ whereNull(field: string): this;
24
+ whereNotNull(field: string): this;
25
+ whereGreaterThan(field: string, value: any): this;
26
+ whereGreaterThanOrEqual(field: string, value: any): this;
27
+ whereLessThan(field: string, value: any): this;
28
+ whereLessThanOrEqual(field: string, value: any): this;
29
+ whereBetween(field: string, min: any, max: any): this;
30
+ /**
31
+ * Filter by date range with support for Date objects, strings, and null
32
+ * Internally converts to createdAt:gte and createdAt:lte filters
33
+ */
34
+ whereDateBetween(startDate?: string | Date | null, endDate?: string | Date | null): this;
35
+ addSort(criteria: SortCriteria): this;
36
+ orderBy(field: string, direction?: SortDirection): this;
37
+ orderByAsc(field: string): this;
38
+ orderByDesc(field: string): this;
39
+ paginate(page: number, limit: number): this;
40
+ /**
41
+ * Add eager loading for related models
42
+ * @param relations Relation name or array of relation names
43
+ */
44
+ with(relations: string | string[]): this;
45
+ /**
46
+ * Add a JOIN to the query to fetch related models
47
+ * @param relations Relation name or array of relation names to join
48
+ */
49
+ join(relations: string | string[]): this;
50
+ /**
51
+ * Add GROUP BY clause to the query
52
+ * @param fields Field or fields to group by
53
+ */
54
+ groupBy(fields: string | string[]): this;
55
+ /**
56
+ * Enable count mode for the query
57
+ * @param expression Optional count expression (defaults to '*')
58
+ */
59
+ count(expression?: string): this;
60
+ /**
61
+ * Count specific expression with alias
62
+ * @param expression Expression to count
63
+ * @param alias Alias for the count result
64
+ */
65
+ countAs(expression: string, alias: string): this;
66
+ /**
67
+ * @returns an objection-find query
68
+ */
69
+ build(): Record<string, any>;
70
+ /**
71
+ * Create a clone of this query builder
72
+ */
73
+ clone(): this;
74
+ static create<T extends QueryOptions>(options?: T): QueryBuilder;
75
+ }
@@ -0,0 +1,36 @@
1
+ export declare enum FilterOperator {
2
+ EQUALS = "eq",
3
+ NOT_EQUALS = "neq",
4
+ LESS_THAN = "lt",
5
+ LESS_THAN_OR_EQUAL = "lte",
6
+ GREATER_THAN = "gt",
7
+ GREATER_THAN_OR_EQUAL = "gte",
8
+ LIKE = "like",
9
+ LIKE_LOWER = "likeLower",
10
+ IS_NULL = "isNull",
11
+ IS_NOT_NULL = "isNotNull",
12
+ IN = "in"
13
+ }
14
+ export declare enum SortDirection {
15
+ ASC = "asc",
16
+ DESC = "desc"
17
+ }
18
+ export interface FilterCriteria {
19
+ field: string;
20
+ operator: FilterOperator;
21
+ value?: any;
22
+ }
23
+ export interface SortCriteria {
24
+ field: string;
25
+ direction: SortDirection;
26
+ }
27
+ export interface QueryOptions {
28
+ page?: number;
29
+ limit?: number;
30
+ filters?: FilterCriteria[];
31
+ sort?: SortCriteria[];
32
+ includes?: string[];
33
+ join?: string[];
34
+ groupBy?: string[];
35
+ count?: string;
36
+ }
@@ -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,12 +47,15 @@ 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">;
51
54
  resetPassword: z.ZodBoolean;
52
55
  }, "strip", z.ZodTypeAny, {
56
+ token: string;
53
57
  resetPassword: boolean;
58
+ access: string[];
54
59
  profile: {
55
60
  id: string;
56
61
  displayName: string;
@@ -59,11 +64,12 @@ export declare const authContract: {
59
64
  lastName?: string | null | undefined;
60
65
  phone?: string | null | undefined;
61
66
  email?: string | null | undefined;
67
+ autoApprove?: boolean | null | undefined;
62
68
  };
63
- token: string;
64
- access: string[];
65
69
  }, {
70
+ token: string;
66
71
  resetPassword: boolean;
72
+ access: string[];
67
73
  profile: {
68
74
  id: string;
69
75
  displayName: string;
@@ -72,9 +78,8 @@ export declare const authContract: {
72
78
  lastName?: string | null | undefined;
73
79
  phone?: string | null | undefined;
74
80
  email?: string | null | undefined;
81
+ autoApprove?: boolean | null | undefined;
75
82
  };
76
- token: string;
77
- access: string[];
78
83
  }>;
79
84
  400: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
80
85
  };
@@ -82,13 +87,6 @@ export declare const authContract: {
82
87
  access: {
83
88
  method: "GET";
84
89
  path: "/access";
85
- headers: z.ZodObject<{
86
- token: z.ZodString;
87
- }, "strip", z.ZodTypeAny, {
88
- token: string;
89
- }, {
90
- token: string;
91
- }>;
92
90
  responses: {
93
91
  200: z.ZodArray<z.ZodString, "many">;
94
92
  };
@@ -99,14 +97,13 @@ export declare const authContract: {
99
97
  currentPassword: z.ZodString;
100
98
  newPassword: z.ZodString;
101
99
  }, "strip", z.ZodTypeAny, {
102
- currentPassword: string;
103
100
  newPassword: string;
104
- }, {
105
101
  currentPassword: string;
102
+ }, {
106
103
  newPassword: string;
104
+ currentPassword: string;
107
105
  }>;
108
106
  path: "/password";
109
107
  responses: {};
110
108
  };
111
109
  };
112
- //# sourceMappingURL=contract.d.ts.map
@@ -0,0 +1,83 @@
1
+ import { BaseRepository } from "@/lib/api/base-repository.js";
2
+ import { User } from "@/modules/auth/user.model.js";
3
+ import { authContract } from "./auth.contract.js";
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
+ /**
67
+ * Retrieves the current user's access list.
68
+ *
69
+ * @returns Promise that resolves to an array of access permissions/roles
70
+ * @throws {APIError} If the request fails or returns an unexpected status
71
+ *
72
+ * @example
73
+ * ```typescript
74
+ * try {
75
+ * const accessList = await repo.getAccessList();
76
+ * console.log("User has access to:", accessList);
77
+ * } catch (error) {
78
+ * console.error("Failed to get access list:", error.message);
79
+ * }
80
+ * ```
81
+ */
82
+ getAccessList(): Promise<string[]>;
83
+ }
@@ -0,0 +1,171 @@
1
+ import z from "zod";
2
+ import { Profile } from "../profile/profile.model.js";
3
+ import { Role } from "../team-member/role.model.js";
4
+ /**
5
+ * Zod schema for CompanyMembership JSON serialization
6
+ */
7
+ export declare const CompanyMembershipJSONSchema: z.ZodObject<{
8
+ companyProfile: z.ZodObject<{
9
+ id: z.ZodString;
10
+ firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ displayName: z.ZodString;
13
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ accountNo: z.ZodString;
15
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ autoApprove: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
17
+ version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ id: string;
20
+ displayName: string;
21
+ accountNo: string;
22
+ version: string;
23
+ firstName?: string | null | undefined;
24
+ lastName?: string | null | undefined;
25
+ phone?: string | null | undefined;
26
+ email?: string | null | undefined;
27
+ autoApprove?: boolean | null | undefined;
28
+ }, {
29
+ id: string;
30
+ displayName: string;
31
+ accountNo: string;
32
+ firstName?: string | null | undefined;
33
+ lastName?: string | null | undefined;
34
+ phone?: string | null | undefined;
35
+ email?: string | null | undefined;
36
+ autoApprove?: boolean | null | undefined;
37
+ version?: string | undefined;
38
+ }>;
39
+ role: z.ZodOptional<z.ZodObject<{
40
+ id: z.ZodString;
41
+ name: z.ZodString;
42
+ description: z.ZodOptional<z.ZodString>;
43
+ access: z.ZodArray<z.ZodString, "many">;
44
+ createdAt: z.ZodString;
45
+ updatedAt: z.ZodString;
46
+ version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ name: string;
49
+ createdAt: string;
50
+ id: string;
51
+ version: string;
52
+ updatedAt: string;
53
+ access: string[];
54
+ description?: string | undefined;
55
+ }, {
56
+ name: string;
57
+ createdAt: string;
58
+ id: string;
59
+ updatedAt: string;
60
+ access: string[];
61
+ version?: string | undefined;
62
+ description?: string | undefined;
63
+ }>>;
64
+ version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ version: string;
67
+ companyProfile: {
68
+ id: string;
69
+ displayName: string;
70
+ accountNo: string;
71
+ version: string;
72
+ firstName?: string | null | undefined;
73
+ lastName?: string | null | undefined;
74
+ phone?: string | null | undefined;
75
+ email?: string | null | undefined;
76
+ autoApprove?: boolean | null | undefined;
77
+ };
78
+ role?: {
79
+ name: string;
80
+ createdAt: string;
81
+ id: string;
82
+ version: string;
83
+ updatedAt: string;
84
+ access: string[];
85
+ description?: string | undefined;
86
+ } | undefined;
87
+ }, {
88
+ companyProfile: {
89
+ id: string;
90
+ displayName: string;
91
+ accountNo: string;
92
+ firstName?: string | null | undefined;
93
+ lastName?: string | null | undefined;
94
+ phone?: string | null | undefined;
95
+ email?: string | null | undefined;
96
+ autoApprove?: boolean | null | undefined;
97
+ version?: string | undefined;
98
+ };
99
+ version?: string | undefined;
100
+ role?: {
101
+ name: string;
102
+ createdAt: string;
103
+ id: string;
104
+ updatedAt: string;
105
+ access: string[];
106
+ version?: string | undefined;
107
+ description?: string | undefined;
108
+ } | undefined;
109
+ }>;
110
+ export type CompanyMembershipJSON = z.infer<typeof CompanyMembershipJSONSchema>;
111
+ export type CompanyMembershipData = {
112
+ companyProfile: Profile;
113
+ role?: Role;
114
+ };
115
+ /**
116
+ * Represents a user's membership within a company.
117
+ *
118
+ * This class encapsulates the relationship between a user and their company:
119
+ * - The company profile the user belongs to
120
+ * - The user's role within that company (optional - depends on permissions)
121
+ *
122
+ * Note: Permissions are stored in LogIn.access, not here.
123
+ * This model focuses purely on the company-user relationship.
124
+ *
125
+ * The role may be undefined if the user doesn't have permission to view
126
+ * role details (Permissions.Role.ViewRole).
127
+ */
128
+ export declare class CompanyMembership {
129
+ private readonly _companyProfile;
130
+ private readonly _role?;
131
+ private constructor();
132
+ /**
133
+ * Creates a CompanyMembership instance from the required data.
134
+ *
135
+ * @param data - The membership data
136
+ * @returns A new CompanyMembership instance, or undefined if invalid
137
+ *
138
+ * @example
139
+ * ```typescript
140
+ * const membership = CompanyMembership.from({
141
+ * companyProfile: profile,
142
+ * role: role // optional
143
+ * });
144
+ * ```
145
+ */
146
+ static from(data: CompanyMembershipData): CompanyMembership | undefined;
147
+ /**
148
+ * Gets the company profile.
149
+ */
150
+ get companyProfile(): Profile;
151
+ /**
152
+ * Gets the user's role (may be undefined if user lacks permission to view it).
153
+ */
154
+ get role(): Role | undefined;
155
+ /**
156
+ * Serializes the CompanyMembership instance to a JSON-compatible object
157
+ */
158
+ toJSON(): CompanyMembershipJSON;
159
+ /**
160
+ * Serializes the CompanyMembership instance to a JSON string
161
+ */
162
+ toJSONString(): string;
163
+ /**
164
+ * Creates a CompanyMembership instance from a JSON-compatible object or string
165
+ */
166
+ static fromJSON(json: CompanyMembershipJSON | string): CompanyMembership | undefined;
167
+ /**
168
+ * Type guard using Zod schema validation
169
+ */
170
+ static isCompanyMembershipJSON(obj: unknown): obj is CompanyMembershipJSON;
171
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./auth.repository.js";
2
+ export * from "./user.model.js";
3
+ export * from "./company-membership.model.js";