gymmonk-schema 0.1.2 → 0.2.0

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 (558) hide show
  1. package/README.md +30 -80
  2. package/dist/common.d.ts +27 -0
  3. package/dist/common.d.ts.map +1 -0
  4. package/dist/common.js +35 -0
  5. package/dist/common.js.map +1 -0
  6. package/dist/index.d.ts +10 -13
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +11 -17
  9. package/dist/index.js.map +1 -1
  10. package/package.json +9 -11
  11. package/dist/audit/audit-log.schema.d.ts +0 -78
  12. package/dist/audit/audit-log.schema.d.ts.map +0 -1
  13. package/dist/audit/audit-log.schema.js +0 -78
  14. package/dist/audit/audit-log.schema.js.map +0 -1
  15. package/dist/audit/index.d.ts +0 -2
  16. package/dist/audit/index.d.ts.map +0 -1
  17. package/dist/audit/index.js +0 -2
  18. package/dist/audit/index.js.map +0 -1
  19. package/dist/auth/device/device.schema.d.ts +0 -10
  20. package/dist/auth/device/device.schema.d.ts.map +0 -1
  21. package/dist/auth/device/device.schema.js +0 -10
  22. package/dist/auth/device/device.schema.js.map +0 -1
  23. package/dist/auth/device/index.d.ts +0 -2
  24. package/dist/auth/device/index.d.ts.map +0 -1
  25. package/dist/auth/device/index.js +0 -2
  26. package/dist/auth/device/index.js.map +0 -1
  27. package/dist/auth/index.d.ts +0 -10
  28. package/dist/auth/index.d.ts.map +0 -1
  29. package/dist/auth/index.js +0 -10
  30. package/dist/auth/index.js.map +0 -1
  31. package/dist/auth/otp/index.d.ts +0 -2
  32. package/dist/auth/otp/index.d.ts.map +0 -1
  33. package/dist/auth/otp/index.js +0 -2
  34. package/dist/auth/otp/index.js.map +0 -1
  35. package/dist/auth/otp/otp.schema.d.ts +0 -8
  36. package/dist/auth/otp/otp.schema.d.ts.map +0 -1
  37. package/dist/auth/otp/otp.schema.js +0 -9
  38. package/dist/auth/otp/otp.schema.js.map +0 -1
  39. package/dist/auth/password-history/index.d.ts +0 -2
  40. package/dist/auth/password-history/index.d.ts.map +0 -1
  41. package/dist/auth/password-history/index.js +0 -2
  42. package/dist/auth/password-history/index.js.map +0 -1
  43. package/dist/auth/password-history/password-history.schema.d.ts +0 -8
  44. package/dist/auth/password-history/password-history.schema.d.ts.map +0 -1
  45. package/dist/auth/password-history/password-history.schema.js +0 -8
  46. package/dist/auth/password-history/password-history.schema.js.map +0 -1
  47. package/dist/auth/permission/index.d.ts +0 -3
  48. package/dist/auth/permission/index.d.ts.map +0 -1
  49. package/dist/auth/permission/index.js +0 -3
  50. package/dist/auth/permission/index.js.map +0 -1
  51. package/dist/auth/permission/permission.dto.d.ts +0 -7
  52. package/dist/auth/permission/permission.dto.d.ts.map +0 -1
  53. package/dist/auth/permission/permission.dto.js +0 -6
  54. package/dist/auth/permission/permission.dto.js.map +0 -1
  55. package/dist/auth/permission/permission.schema.d.ts +0 -7
  56. package/dist/auth/permission/permission.schema.d.ts.map +0 -1
  57. package/dist/auth/permission/permission.schema.js +0 -7
  58. package/dist/auth/permission/permission.schema.js.map +0 -1
  59. package/dist/auth/resource/index.d.ts +0 -2
  60. package/dist/auth/resource/index.d.ts.map +0 -1
  61. package/dist/auth/resource/index.js +0 -2
  62. package/dist/auth/resource/index.js.map +0 -1
  63. package/dist/auth/resource/resource.schema.d.ts +0 -7
  64. package/dist/auth/resource/resource.schema.d.ts.map +0 -1
  65. package/dist/auth/resource/resource.schema.js +0 -7
  66. package/dist/auth/resource/resource.schema.js.map +0 -1
  67. package/dist/auth/role/index.d.ts +0 -3
  68. package/dist/auth/role/index.d.ts.map +0 -1
  69. package/dist/auth/role/index.js +0 -3
  70. package/dist/auth/role/index.js.map +0 -1
  71. package/dist/auth/role/role.dto.d.ts +0 -8
  72. package/dist/auth/role/role.dto.d.ts.map +0 -1
  73. package/dist/auth/role/role.dto.js +0 -7
  74. package/dist/auth/role/role.dto.js.map +0 -1
  75. package/dist/auth/role/role.schema.d.ts +0 -8
  76. package/dist/auth/role/role.schema.d.ts.map +0 -1
  77. package/dist/auth/role/role.schema.js +0 -8
  78. package/dist/auth/role/role.schema.js.map +0 -1
  79. package/dist/auth/token/index.d.ts +0 -2
  80. package/dist/auth/token/index.d.ts.map +0 -1
  81. package/dist/auth/token/index.js +0 -2
  82. package/dist/auth/token/index.js.map +0 -1
  83. package/dist/auth/token/token.schema.d.ts +0 -7
  84. package/dist/auth/token/token.schema.d.ts.map +0 -1
  85. package/dist/auth/token/token.schema.js +0 -6
  86. package/dist/auth/token/token.schema.js.map +0 -1
  87. package/dist/auth/user/index.d.ts +0 -5
  88. package/dist/auth/user/index.d.ts.map +0 -1
  89. package/dist/auth/user/index.js +0 -5
  90. package/dist/auth/user/index.js.map +0 -1
  91. package/dist/auth/user/user.dto.d.ts +0 -21
  92. package/dist/auth/user/user.dto.d.ts.map +0 -1
  93. package/dist/auth/user/user.dto.js +0 -22
  94. package/dist/auth/user/user.dto.js.map +0 -1
  95. package/dist/auth/user/user.public.d.ts +0 -29
  96. package/dist/auth/user/user.public.d.ts.map +0 -1
  97. package/dist/auth/user/user.public.js +0 -19
  98. package/dist/auth/user/user.public.js.map +0 -1
  99. package/dist/auth/user/user.schema.d.ts +0 -34
  100. package/dist/auth/user/user.schema.d.ts.map +0 -1
  101. package/dist/auth/user/user.schema.js +0 -27
  102. package/dist/auth/user/user.schema.js.map +0 -1
  103. package/dist/auth/user/user.types.d.ts +0 -4
  104. package/dist/auth/user/user.types.d.ts.map +0 -1
  105. package/dist/auth/user/user.types.js +0 -2
  106. package/dist/auth/user/user.types.js.map +0 -1
  107. package/dist/auth/user-activity/index.d.ts +0 -2
  108. package/dist/auth/user-activity/index.d.ts.map +0 -1
  109. package/dist/auth/user-activity/index.js +0 -2
  110. package/dist/auth/user-activity/index.js.map +0 -1
  111. package/dist/auth/user-activity/user-activity.schema.d.ts +0 -10
  112. package/dist/auth/user-activity/user-activity.schema.d.ts.map +0 -1
  113. package/dist/auth/user-activity/user-activity.schema.js +0 -11
  114. package/dist/auth/user-activity/user-activity.schema.js.map +0 -1
  115. package/dist/common/enums/gender.enum.d.ts +0 -9
  116. package/dist/common/enums/gender.enum.d.ts.map +0 -1
  117. package/dist/common/enums/gender.enum.js +0 -4
  118. package/dist/common/enums/gender.enum.js.map +0 -1
  119. package/dist/common/enums/index.d.ts +0 -4
  120. package/dist/common/enums/index.d.ts.map +0 -1
  121. package/dist/common/enums/index.js +0 -4
  122. package/dist/common/enums/index.js.map +0 -1
  123. package/dist/common/enums/notification-type.enum.d.ts +0 -11
  124. package/dist/common/enums/notification-type.enum.d.ts.map +0 -1
  125. package/dist/common/enums/notification-type.enum.js +0 -10
  126. package/dist/common/enums/notification-type.enum.js.map +0 -1
  127. package/dist/common/enums/status.enum.d.ts +0 -10
  128. package/dist/common/enums/status.enum.d.ts.map +0 -1
  129. package/dist/common/enums/status.enum.js +0 -4
  130. package/dist/common/enums/status.enum.js.map +0 -1
  131. package/dist/common/index.d.ts +0 -5
  132. package/dist/common/index.d.ts.map +0 -1
  133. package/dist/common/index.js +0 -5
  134. package/dist/common/index.js.map +0 -1
  135. package/dist/common/pagination/index.d.ts +0 -2
  136. package/dist/common/pagination/index.d.ts.map +0 -1
  137. package/dist/common/pagination/index.js +0 -2
  138. package/dist/common/pagination/index.js.map +0 -1
  139. package/dist/common/pagination/pagination.schema.d.ts +0 -19
  140. package/dist/common/pagination/pagination.schema.d.ts.map +0 -1
  141. package/dist/common/pagination/pagination.schema.js +0 -22
  142. package/dist/common/pagination/pagination.schema.js.map +0 -1
  143. package/dist/common/primitives/date.schema.d.ts +0 -14
  144. package/dist/common/primitives/date.schema.d.ts.map +0 -1
  145. package/dist/common/primitives/date.schema.js +0 -17
  146. package/dist/common/primitives/date.schema.js.map +0 -1
  147. package/dist/common/primitives/index.d.ts +0 -4
  148. package/dist/common/primitives/index.d.ts.map +0 -1
  149. package/dist/common/primitives/index.js +0 -4
  150. package/dist/common/primitives/index.js.map +0 -1
  151. package/dist/common/primitives/object-id.schema.d.ts +0 -8
  152. package/dist/common/primitives/object-id.schema.d.ts.map +0 -1
  153. package/dist/common/primitives/object-id.schema.js +0 -9
  154. package/dist/common/primitives/object-id.schema.js.map +0 -1
  155. package/dist/common/primitives/string.schema.d.ts +0 -13
  156. package/dist/common/primitives/string.schema.d.ts.map +0 -1
  157. package/dist/common/primitives/string.schema.js +0 -16
  158. package/dist/common/primitives/string.schema.js.map +0 -1
  159. package/dist/common/value-objects/address.schema.d.ts +0 -11
  160. package/dist/common/value-objects/address.schema.d.ts.map +0 -1
  161. package/dist/common/value-objects/address.schema.js +0 -15
  162. package/dist/common/value-objects/address.schema.js.map +0 -1
  163. package/dist/common/value-objects/email.schema.d.ts +0 -4
  164. package/dist/common/value-objects/email.schema.d.ts.map +0 -1
  165. package/dist/common/value-objects/email.schema.js +0 -3
  166. package/dist/common/value-objects/email.schema.js.map +0 -1
  167. package/dist/common/value-objects/index.d.ts +0 -8
  168. package/dist/common/value-objects/index.d.ts.map +0 -1
  169. package/dist/common/value-objects/index.js +0 -8
  170. package/dist/common/value-objects/index.js.map +0 -1
  171. package/dist/common/value-objects/mfa.schema.d.ts +0 -19
  172. package/dist/common/value-objects/mfa.schema.d.ts.map +0 -1
  173. package/dist/common/value-objects/mfa.schema.js +0 -12
  174. package/dist/common/value-objects/mfa.schema.js.map +0 -1
  175. package/dist/common/value-objects/nutritional-values.schema.d.ts +0 -10
  176. package/dist/common/value-objects/nutritional-values.schema.d.ts.map +0 -1
  177. package/dist/common/value-objects/nutritional-values.schema.js +0 -9
  178. package/dist/common/value-objects/nutritional-values.schema.js.map +0 -1
  179. package/dist/common/value-objects/phone.schema.d.ts +0 -8
  180. package/dist/common/value-objects/phone.schema.d.ts.map +0 -1
  181. package/dist/common/value-objects/phone.schema.js +0 -11
  182. package/dist/common/value-objects/phone.schema.js.map +0 -1
  183. package/dist/common/value-objects/plan-variant.schema.d.ts +0 -24
  184. package/dist/common/value-objects/plan-variant.schema.d.ts.map +0 -1
  185. package/dist/common/value-objects/plan-variant.schema.js +0 -19
  186. package/dist/common/value-objects/plan-variant.schema.js.map +0 -1
  187. package/dist/common/value-objects/social-login.schema.d.ts +0 -20
  188. package/dist/common/value-objects/social-login.schema.d.ts.map +0 -1
  189. package/dist/common/value-objects/social-login.schema.js +0 -10
  190. package/dist/common/value-objects/social-login.schema.js.map +0 -1
  191. package/dist/community/conversation/conversation.schema.d.ts +0 -11
  192. package/dist/community/conversation/conversation.schema.d.ts.map +0 -1
  193. package/dist/community/conversation/conversation.schema.js +0 -29
  194. package/dist/community/conversation/conversation.schema.js.map +0 -1
  195. package/dist/community/conversation/index.d.ts +0 -2
  196. package/dist/community/conversation/index.d.ts.map +0 -1
  197. package/dist/community/conversation/index.js +0 -2
  198. package/dist/community/conversation/index.js.map +0 -1
  199. package/dist/community/index.d.ts +0 -4
  200. package/dist/community/index.d.ts.map +0 -1
  201. package/dist/community/index.js +0 -4
  202. package/dist/community/index.js.map +0 -1
  203. package/dist/community/message/index.d.ts +0 -2
  204. package/dist/community/message/index.d.ts.map +0 -1
  205. package/dist/community/message/index.js +0 -2
  206. package/dist/community/message/index.js.map +0 -1
  207. package/dist/community/message/message.schema.d.ts +0 -29
  208. package/dist/community/message/message.schema.d.ts.map +0 -1
  209. package/dist/community/message/message.schema.js +0 -28
  210. package/dist/community/message/message.schema.js.map +0 -1
  211. package/dist/community/post/index.d.ts +0 -2
  212. package/dist/community/post/index.d.ts.map +0 -1
  213. package/dist/community/post/index.js +0 -2
  214. package/dist/community/post/index.js.map +0 -1
  215. package/dist/community/post/post.schema.d.ts +0 -27
  216. package/dist/community/post/post.schema.d.ts.map +0 -1
  217. package/dist/community/post/post.schema.js +0 -32
  218. package/dist/community/post/post.schema.js.map +0 -1
  219. package/dist/feedback/feedback.schema.d.ts +0 -35
  220. package/dist/feedback/feedback.schema.d.ts.map +0 -1
  221. package/dist/feedback/feedback.schema.js +0 -41
  222. package/dist/feedback/feedback.schema.js.map +0 -1
  223. package/dist/feedback/index.d.ts +0 -2
  224. package/dist/feedback/index.d.ts.map +0 -1
  225. package/dist/feedback/index.js +0 -2
  226. package/dist/feedback/index.js.map +0 -1
  227. package/dist/gym/achievement-badge/achievement-badge.schema.d.ts +0 -11
  228. package/dist/gym/achievement-badge/achievement-badge.schema.d.ts.map +0 -1
  229. package/dist/gym/achievement-badge/achievement-badge.schema.js +0 -13
  230. package/dist/gym/achievement-badge/achievement-badge.schema.js.map +0 -1
  231. package/dist/gym/achievement-badge/index.d.ts +0 -2
  232. package/dist/gym/achievement-badge/index.d.ts.map +0 -1
  233. package/dist/gym/achievement-badge/index.js +0 -2
  234. package/dist/gym/achievement-badge/index.js.map +0 -1
  235. package/dist/gym/attendance/attendance.schema.d.ts +0 -25
  236. package/dist/gym/attendance/attendance.schema.d.ts.map +0 -1
  237. package/dist/gym/attendance/attendance.schema.js +0 -15
  238. package/dist/gym/attendance/attendance.schema.js.map +0 -1
  239. package/dist/gym/attendance/index.d.ts +0 -2
  240. package/dist/gym/attendance/index.d.ts.map +0 -1
  241. package/dist/gym/attendance/index.js +0 -2
  242. package/dist/gym/attendance/index.js.map +0 -1
  243. package/dist/gym/center/center.dto.d.ts +0 -2
  244. package/dist/gym/center/center.dto.d.ts.map +0 -1
  245. package/dist/gym/center/center.dto.js +0 -2
  246. package/dist/gym/center/center.dto.js.map +0 -1
  247. package/dist/gym/center/center.schema.d.ts +0 -28
  248. package/dist/gym/center/center.schema.d.ts.map +0 -1
  249. package/dist/gym/center/center.schema.js +0 -22
  250. package/dist/gym/center/center.schema.js.map +0 -1
  251. package/dist/gym/center/index.d.ts +0 -2
  252. package/dist/gym/center/index.d.ts.map +0 -1
  253. package/dist/gym/center/index.js +0 -2
  254. package/dist/gym/center/index.js.map +0 -1
  255. package/dist/gym/center-facility/center-facility.schema.d.ts +0 -15
  256. package/dist/gym/center-facility/center-facility.schema.d.ts.map +0 -1
  257. package/dist/gym/center-facility/center-facility.schema.js +0 -12
  258. package/dist/gym/center-facility/center-facility.schema.js.map +0 -1
  259. package/dist/gym/center-facility/index.d.ts +0 -2
  260. package/dist/gym/center-facility/index.d.ts.map +0 -1
  261. package/dist/gym/center-facility/index.js +0 -2
  262. package/dist/gym/center-facility/index.js.map +0 -1
  263. package/dist/gym/center-service/center-service.schema.d.ts +0 -27
  264. package/dist/gym/center-service/center-service.schema.d.ts.map +0 -1
  265. package/dist/gym/center-service/center-service.schema.js +0 -16
  266. package/dist/gym/center-service/center-service.schema.js.map +0 -1
  267. package/dist/gym/center-service/index.d.ts +0 -2
  268. package/dist/gym/center-service/index.d.ts.map +0 -1
  269. package/dist/gym/center-service/index.js +0 -2
  270. package/dist/gym/center-service/index.js.map +0 -1
  271. package/dist/gym/class-schedule/class-schedule.schema.d.ts +0 -15
  272. package/dist/gym/class-schedule/class-schedule.schema.d.ts.map +0 -1
  273. package/dist/gym/class-schedule/class-schedule.schema.js +0 -24
  274. package/dist/gym/class-schedule/class-schedule.schema.js.map +0 -1
  275. package/dist/gym/class-schedule/index.d.ts +0 -2
  276. package/dist/gym/class-schedule/index.d.ts.map +0 -1
  277. package/dist/gym/class-schedule/index.js +0 -2
  278. package/dist/gym/class-schedule/index.js.map +0 -1
  279. package/dist/gym/equipment-catalog/equipment-catalog.schema.d.ts +0 -11
  280. package/dist/gym/equipment-catalog/equipment-catalog.schema.d.ts.map +0 -1
  281. package/dist/gym/equipment-catalog/equipment-catalog.schema.js +0 -12
  282. package/dist/gym/equipment-catalog/equipment-catalog.schema.js.map +0 -1
  283. package/dist/gym/equipment-catalog/index.d.ts +0 -2
  284. package/dist/gym/equipment-catalog/index.d.ts.map +0 -1
  285. package/dist/gym/equipment-catalog/index.js +0 -2
  286. package/dist/gym/equipment-catalog/index.js.map +0 -1
  287. package/dist/gym/equipment-inventory/equipment-inventory.schema.d.ts +0 -24
  288. package/dist/gym/equipment-inventory/equipment-inventory.schema.d.ts.map +0 -1
  289. package/dist/gym/equipment-inventory/equipment-inventory.schema.js +0 -19
  290. package/dist/gym/equipment-inventory/equipment-inventory.schema.js.map +0 -1
  291. package/dist/gym/equipment-inventory/index.d.ts +0 -2
  292. package/dist/gym/equipment-inventory/index.d.ts.map +0 -1
  293. package/dist/gym/equipment-inventory/index.js +0 -2
  294. package/dist/gym/equipment-inventory/index.js.map +0 -1
  295. package/dist/gym/facility-catalog/facility-catalog.schema.d.ts +0 -8
  296. package/dist/gym/facility-catalog/facility-catalog.schema.d.ts.map +0 -1
  297. package/dist/gym/facility-catalog/facility-catalog.schema.js +0 -9
  298. package/dist/gym/facility-catalog/facility-catalog.schema.js.map +0 -1
  299. package/dist/gym/facility-catalog/index.d.ts +0 -2
  300. package/dist/gym/facility-catalog/index.d.ts.map +0 -1
  301. package/dist/gym/facility-catalog/index.js +0 -2
  302. package/dist/gym/facility-catalog/index.js.map +0 -1
  303. package/dist/gym/goal/goal.schema.d.ts +0 -26
  304. package/dist/gym/goal/goal.schema.d.ts.map +0 -1
  305. package/dist/gym/goal/goal.schema.js +0 -17
  306. package/dist/gym/goal/goal.schema.js.map +0 -1
  307. package/dist/gym/goal/index.d.ts +0 -2
  308. package/dist/gym/goal/index.d.ts.map +0 -1
  309. package/dist/gym/goal/index.js +0 -2
  310. package/dist/gym/goal/index.js.map +0 -1
  311. package/dist/gym/gym-layout/gym-layout.schema.d.ts +0 -22
  312. package/dist/gym/gym-layout/gym-layout.schema.d.ts.map +0 -1
  313. package/dist/gym/gym-layout/gym-layout.schema.js +0 -20
  314. package/dist/gym/gym-layout/gym-layout.schema.js.map +0 -1
  315. package/dist/gym/gym-layout/index.d.ts +0 -2
  316. package/dist/gym/gym-layout/index.d.ts.map +0 -1
  317. package/dist/gym/gym-layout/index.js +0 -2
  318. package/dist/gym/gym-layout/index.js.map +0 -1
  319. package/dist/gym/index.d.ts +0 -15
  320. package/dist/gym/index.d.ts.map +0 -1
  321. package/dist/gym/index.js +0 -15
  322. package/dist/gym/index.js.map +0 -1
  323. package/dist/gym/organisation/index.d.ts +0 -2
  324. package/dist/gym/organisation/index.d.ts.map +0 -1
  325. package/dist/gym/organisation/index.js +0 -2
  326. package/dist/gym/organisation/index.js.map +0 -1
  327. package/dist/gym/organisation/organisation.dto.d.ts +0 -2
  328. package/dist/gym/organisation/organisation.dto.d.ts.map +0 -1
  329. package/dist/gym/organisation/organisation.dto.js +0 -2
  330. package/dist/gym/organisation/organisation.dto.js.map +0 -1
  331. package/dist/gym/organisation/organisation.schema.d.ts +0 -28
  332. package/dist/gym/organisation/organisation.schema.d.ts.map +0 -1
  333. package/dist/gym/organisation/organisation.schema.js +0 -28
  334. package/dist/gym/organisation/organisation.schema.js.map +0 -1
  335. package/dist/gym/service-catalog/index.d.ts +0 -2
  336. package/dist/gym/service-catalog/index.d.ts.map +0 -1
  337. package/dist/gym/service-catalog/index.js +0 -2
  338. package/dist/gym/service-catalog/index.js.map +0 -1
  339. package/dist/gym/service-catalog/service-catalog.schema.d.ts +0 -11
  340. package/dist/gym/service-catalog/service-catalog.schema.d.ts.map +0 -1
  341. package/dist/gym/service-catalog/service-catalog.schema.js +0 -15
  342. package/dist/gym/service-catalog/service-catalog.schema.js.map +0 -1
  343. package/dist/gym/session-booking/index.d.ts +0 -2
  344. package/dist/gym/session-booking/index.d.ts.map +0 -1
  345. package/dist/gym/session-booking/index.js +0 -2
  346. package/dist/gym/session-booking/index.js.map +0 -1
  347. package/dist/gym/session-booking/session-booking.schema.d.ts +0 -29
  348. package/dist/gym/session-booking/session-booking.schema.d.ts.map +0 -1
  349. package/dist/gym/session-booking/session-booking.schema.js +0 -20
  350. package/dist/gym/session-booking/session-booking.schema.js.map +0 -1
  351. package/dist/internal/scaffolding.d.ts +0 -2
  352. package/dist/internal/scaffolding.d.ts.map +0 -1
  353. package/dist/internal/scaffolding.js +0 -2
  354. package/dist/internal/scaffolding.js.map +0 -1
  355. package/dist/landing/contact-request/contact-request.schema.d.ts +0 -13
  356. package/dist/landing/contact-request/contact-request.schema.d.ts.map +0 -1
  357. package/dist/landing/contact-request/contact-request.schema.js +0 -22
  358. package/dist/landing/contact-request/contact-request.schema.js.map +0 -1
  359. package/dist/landing/contact-request/index.d.ts +0 -2
  360. package/dist/landing/contact-request/index.d.ts.map +0 -1
  361. package/dist/landing/contact-request/index.js +0 -2
  362. package/dist/landing/contact-request/index.js.map +0 -1
  363. package/dist/landing/index.d.ts +0 -2
  364. package/dist/landing/index.d.ts.map +0 -1
  365. package/dist/landing/index.js +0 -2
  366. package/dist/landing/index.js.map +0 -1
  367. package/dist/marketing/advertisement/advertisement.schema.d.ts +0 -33
  368. package/dist/marketing/advertisement/advertisement.schema.d.ts.map +0 -1
  369. package/dist/marketing/advertisement/advertisement.schema.js +0 -37
  370. package/dist/marketing/advertisement/advertisement.schema.js.map +0 -1
  371. package/dist/marketing/advertisement/index.d.ts +0 -2
  372. package/dist/marketing/advertisement/index.d.ts.map +0 -1
  373. package/dist/marketing/advertisement/index.js +0 -2
  374. package/dist/marketing/advertisement/index.js.map +0 -1
  375. package/dist/marketing/brand/brand.schema.d.ts +0 -18
  376. package/dist/marketing/brand/brand.schema.d.ts.map +0 -1
  377. package/dist/marketing/brand/brand.schema.js +0 -26
  378. package/dist/marketing/brand/brand.schema.js.map +0 -1
  379. package/dist/marketing/brand/index.d.ts +0 -2
  380. package/dist/marketing/brand/index.d.ts.map +0 -1
  381. package/dist/marketing/brand/index.js +0 -2
  382. package/dist/marketing/brand/index.js.map +0 -1
  383. package/dist/marketing/index.d.ts +0 -5
  384. package/dist/marketing/index.d.ts.map +0 -1
  385. package/dist/marketing/index.js +0 -5
  386. package/dist/marketing/index.js.map +0 -1
  387. package/dist/marketing/marketing-campaign/index.d.ts +0 -2
  388. package/dist/marketing/marketing-campaign/index.d.ts.map +0 -1
  389. package/dist/marketing/marketing-campaign/index.js +0 -2
  390. package/dist/marketing/marketing-campaign/index.js.map +0 -1
  391. package/dist/marketing/marketing-campaign/marketing-campaign.schema.d.ts +0 -54
  392. package/dist/marketing/marketing-campaign/marketing-campaign.schema.d.ts.map +0 -1
  393. package/dist/marketing/marketing-campaign/marketing-campaign.schema.js +0 -41
  394. package/dist/marketing/marketing-campaign/marketing-campaign.schema.js.map +0 -1
  395. package/dist/marketing/referral/index.d.ts +0 -2
  396. package/dist/marketing/referral/index.d.ts.map +0 -1
  397. package/dist/marketing/referral/index.js +0 -2
  398. package/dist/marketing/referral/index.js.map +0 -1
  399. package/dist/marketing/referral/referral.schema.d.ts +0 -28
  400. package/dist/marketing/referral/referral.schema.d.ts.map +0 -1
  401. package/dist/marketing/referral/referral.schema.js +0 -25
  402. package/dist/marketing/referral/referral.schema.js.map +0 -1
  403. package/dist/notification/index.d.ts +0 -3
  404. package/dist/notification/index.d.ts.map +0 -1
  405. package/dist/notification/index.js +0 -3
  406. package/dist/notification/index.js.map +0 -1
  407. package/dist/notification/notification/index.d.ts +0 -2
  408. package/dist/notification/notification/index.d.ts.map +0 -1
  409. package/dist/notification/notification/index.js +0 -2
  410. package/dist/notification/notification/index.js.map +0 -1
  411. package/dist/notification/notification/notification.schema.d.ts +0 -59
  412. package/dist/notification/notification/notification.schema.d.ts.map +0 -1
  413. package/dist/notification/notification/notification.schema.js +0 -35
  414. package/dist/notification/notification/notification.schema.js.map +0 -1
  415. package/dist/notification/notification-template/index.d.ts +0 -2
  416. package/dist/notification/notification-template/index.d.ts.map +0 -1
  417. package/dist/notification/notification-template/index.js +0 -2
  418. package/dist/notification/notification-template/index.js.map +0 -1
  419. package/dist/notification/notification-template/notification-template.schema.d.ts +0 -43
  420. package/dist/notification/notification-template/notification-template.schema.d.ts.map +0 -1
  421. package/dist/notification/notification-template/notification-template.schema.js +0 -36
  422. package/dist/notification/notification-template/notification-template.schema.js.map +0 -1
  423. package/dist/nutrition/diet-plan/diet-plan.schema.d.ts +0 -95
  424. package/dist/nutrition/diet-plan/diet-plan.schema.d.ts.map +0 -1
  425. package/dist/nutrition/diet-plan/diet-plan.schema.js +0 -46
  426. package/dist/nutrition/diet-plan/diet-plan.schema.js.map +0 -1
  427. package/dist/nutrition/diet-plan/index.d.ts +0 -2
  428. package/dist/nutrition/diet-plan/index.d.ts.map +0 -1
  429. package/dist/nutrition/diet-plan/index.js +0 -2
  430. package/dist/nutrition/diet-plan/index.js.map +0 -1
  431. package/dist/nutrition/diet-tracking/diet-tracking.schema.d.ts +0 -24
  432. package/dist/nutrition/diet-tracking/diet-tracking.schema.d.ts.map +0 -1
  433. package/dist/nutrition/diet-tracking/diet-tracking.schema.js +0 -22
  434. package/dist/nutrition/diet-tracking/diet-tracking.schema.js.map +0 -1
  435. package/dist/nutrition/diet-tracking/index.d.ts +0 -2
  436. package/dist/nutrition/diet-tracking/index.d.ts.map +0 -1
  437. package/dist/nutrition/diet-tracking/index.js +0 -2
  438. package/dist/nutrition/diet-tracking/index.js.map +0 -1
  439. package/dist/nutrition/hydration-tracking/hydration-tracking.schema.d.ts +0 -27
  440. package/dist/nutrition/hydration-tracking/hydration-tracking.schema.d.ts.map +0 -1
  441. package/dist/nutrition/hydration-tracking/hydration-tracking.schema.js +0 -16
  442. package/dist/nutrition/hydration-tracking/hydration-tracking.schema.js.map +0 -1
  443. package/dist/nutrition/hydration-tracking/index.d.ts +0 -2
  444. package/dist/nutrition/hydration-tracking/index.d.ts.map +0 -1
  445. package/dist/nutrition/hydration-tracking/index.js +0 -2
  446. package/dist/nutrition/hydration-tracking/index.js.map +0 -1
  447. package/dist/nutrition/index.d.ts +0 -6
  448. package/dist/nutrition/index.d.ts.map +0 -1
  449. package/dist/nutrition/index.js +0 -6
  450. package/dist/nutrition/index.js.map +0 -1
  451. package/dist/nutrition/ingredient/index.d.ts +0 -2
  452. package/dist/nutrition/ingredient/index.d.ts.map +0 -1
  453. package/dist/nutrition/ingredient/index.js +0 -2
  454. package/dist/nutrition/ingredient/index.js.map +0 -1
  455. package/dist/nutrition/ingredient/ingredient.schema.d.ts +0 -38
  456. package/dist/nutrition/ingredient/ingredient.schema.d.ts.map +0 -1
  457. package/dist/nutrition/ingredient/ingredient.schema.js +0 -38
  458. package/dist/nutrition/ingredient/ingredient.schema.js.map +0 -1
  459. package/dist/nutrition/recipe/index.d.ts +0 -2
  460. package/dist/nutrition/recipe/index.d.ts.map +0 -1
  461. package/dist/nutrition/recipe/index.js +0 -2
  462. package/dist/nutrition/recipe/index.js.map +0 -1
  463. package/dist/nutrition/recipe/recipe.schema.d.ts +0 -46
  464. package/dist/nutrition/recipe/recipe.schema.d.ts.map +0 -1
  465. package/dist/nutrition/recipe/recipe.schema.js +0 -34
  466. package/dist/nutrition/recipe/recipe.schema.js.map +0 -1
  467. package/dist/subscription/coupon/coupon.schema.d.ts +0 -25
  468. package/dist/subscription/coupon/coupon.schema.d.ts.map +0 -1
  469. package/dist/subscription/coupon/coupon.schema.js +0 -20
  470. package/dist/subscription/coupon/coupon.schema.js.map +0 -1
  471. package/dist/subscription/coupon/index.d.ts +0 -2
  472. package/dist/subscription/coupon/index.d.ts.map +0 -1
  473. package/dist/subscription/coupon/index.js +0 -3
  474. package/dist/subscription/coupon/index.js.map +0 -1
  475. package/dist/subscription/index.d.ts +0 -7
  476. package/dist/subscription/index.d.ts.map +0 -1
  477. package/dist/subscription/index.js +0 -8
  478. package/dist/subscription/index.js.map +0 -1
  479. package/dist/subscription/membership/index.d.ts +0 -2
  480. package/dist/subscription/membership/index.d.ts.map +0 -1
  481. package/dist/subscription/membership/index.js +0 -2
  482. package/dist/subscription/membership/index.js.map +0 -1
  483. package/dist/subscription/membership/membership.schema.d.ts +0 -28
  484. package/dist/subscription/membership/membership.schema.d.ts.map +0 -1
  485. package/dist/subscription/membership/membership.schema.js +0 -18
  486. package/dist/subscription/membership/membership.schema.js.map +0 -1
  487. package/dist/subscription/membership-plan/index.d.ts +0 -2
  488. package/dist/subscription/membership-plan/index.d.ts.map +0 -1
  489. package/dist/subscription/membership-plan/index.js +0 -2
  490. package/dist/subscription/membership-plan/index.js.map +0 -1
  491. package/dist/subscription/membership-plan/membership-plan.schema.d.ts +0 -23
  492. package/dist/subscription/membership-plan/membership-plan.schema.d.ts.map +0 -1
  493. package/dist/subscription/membership-plan/membership-plan.schema.js +0 -19
  494. package/dist/subscription/membership-plan/membership-plan.schema.js.map +0 -1
  495. package/dist/subscription/payment-transaction/index.d.ts +0 -2
  496. package/dist/subscription/payment-transaction/index.d.ts.map +0 -1
  497. package/dist/subscription/payment-transaction/index.js +0 -2
  498. package/dist/subscription/payment-transaction/index.js.map +0 -1
  499. package/dist/subscription/payment-transaction/payment-transaction.schema.d.ts +0 -47
  500. package/dist/subscription/payment-transaction/payment-transaction.schema.d.ts.map +0 -1
  501. package/dist/subscription/payment-transaction/payment-transaction.schema.js +0 -24
  502. package/dist/subscription/payment-transaction/payment-transaction.schema.js.map +0 -1
  503. package/dist/subscription/subscription/index.d.ts +0 -2
  504. package/dist/subscription/subscription/index.d.ts.map +0 -1
  505. package/dist/subscription/subscription/index.js +0 -2
  506. package/dist/subscription/subscription/index.js.map +0 -1
  507. package/dist/subscription/subscription/subscription.schema.d.ts +0 -29
  508. package/dist/subscription/subscription/subscription.schema.d.ts.map +0 -1
  509. package/dist/subscription/subscription/subscription.schema.js +0 -21
  510. package/dist/subscription/subscription/subscription.schema.js.map +0 -1
  511. package/dist/subscription/subscription-plan/index.d.ts +0 -2
  512. package/dist/subscription/subscription-plan/index.d.ts.map +0 -1
  513. package/dist/subscription/subscription-plan/index.js +0 -3
  514. package/dist/subscription/subscription-plan/index.js.map +0 -1
  515. package/dist/subscription/subscription-plan/subscription-plan.schema.d.ts +0 -24
  516. package/dist/subscription/subscription-plan/subscription-plan.schema.d.ts.map +0 -1
  517. package/dist/subscription/subscription-plan/subscription-plan.schema.js +0 -18
  518. package/dist/subscription/subscription-plan/subscription-plan.schema.js.map +0 -1
  519. package/dist/support/index.d.ts +0 -2
  520. package/dist/support/index.d.ts.map +0 -1
  521. package/dist/support/index.js +0 -2
  522. package/dist/support/index.js.map +0 -1
  523. package/dist/support/support-ticket/index.d.ts +0 -2
  524. package/dist/support/support-ticket/index.d.ts.map +0 -1
  525. package/dist/support/support-ticket/index.js +0 -2
  526. package/dist/support/support-ticket/index.js.map +0 -1
  527. package/dist/support/support-ticket/support-ticket.schema.d.ts +0 -79
  528. package/dist/support/support-ticket/support-ticket.schema.d.ts.map +0 -1
  529. package/dist/support/support-ticket/support-ticket.schema.js +0 -73
  530. package/dist/support/support-ticket/support-ticket.schema.js.map +0 -1
  531. package/dist/workout/exercise/exercise.schema.d.ts +0 -36
  532. package/dist/workout/exercise/exercise.schema.d.ts.map +0 -1
  533. package/dist/workout/exercise/exercise.schema.js +0 -34
  534. package/dist/workout/exercise/exercise.schema.js.map +0 -1
  535. package/dist/workout/exercise/index.d.ts +0 -2
  536. package/dist/workout/exercise/index.d.ts.map +0 -1
  537. package/dist/workout/exercise/index.js +0 -2
  538. package/dist/workout/exercise/index.js.map +0 -1
  539. package/dist/workout/index.d.ts +0 -4
  540. package/dist/workout/index.d.ts.map +0 -1
  541. package/dist/workout/index.js +0 -4
  542. package/dist/workout/index.js.map +0 -1
  543. package/dist/workout/workout-plan/index.d.ts +0 -2
  544. package/dist/workout/workout-plan/index.d.ts.map +0 -1
  545. package/dist/workout/workout-plan/index.js +0 -2
  546. package/dist/workout/workout-plan/index.js.map +0 -1
  547. package/dist/workout/workout-plan/workout-plan.schema.d.ts +0 -28
  548. package/dist/workout/workout-plan/workout-plan.schema.d.ts.map +0 -1
  549. package/dist/workout/workout-plan/workout-plan.schema.js +0 -32
  550. package/dist/workout/workout-plan/workout-plan.schema.js.map +0 -1
  551. package/dist/workout/workout-tracking/index.d.ts +0 -2
  552. package/dist/workout/workout-tracking/index.d.ts.map +0 -1
  553. package/dist/workout/workout-tracking/index.js +0 -2
  554. package/dist/workout/workout-tracking/index.js.map +0 -1
  555. package/dist/workout/workout-tracking/workout-tracking.schema.d.ts +0 -26
  556. package/dist/workout/workout-tracking/workout-tracking.schema.d.ts.map +0 -1
  557. package/dist/workout/workout-tracking/workout-tracking.schema.js +0 -22
  558. package/dist/workout/workout-tracking/workout-tracking.schema.js.map +0 -1
package/README.md CHANGED
@@ -1,93 +1,43 @@
1
- # Gym Schema
1
+ # gymmonk-schema
2
2
 
3
+ Shared **Zod** schemas, enums and domain types for **GymMonk** (fitness SaaS).
4
+ Single source of truth (SSOT) consumed by both `gymmonk-backend` and
5
+ `gymmonk-web-client`, so validation, wire types and enums never drift between
6
+ the API and the app.
3
7
 
8
+ ## What's inside
4
9
 
5
- ## Getting started
10
+ - **Common** (`common.ts`) — reusable primitives: `objectIdSchema`,
11
+ `paginationSchema`, `optionalTrimmedString`, `emptyStringToUndefined`.
12
+ - Domain modules (workouts, training library, membership, check-in, …) are
13
+ added here as they land, each re-exported through `src/index.ts`.
6
14
 
7
- To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
-
9
- Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
-
11
- ## Add your files
12
-
13
- - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
- - [ ] [Add files using the command line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository) or push an existing Git repository with the following command:
15
+ ## Build & publish (npm-first)
15
16
 
17
+ ```bash
18
+ npm install
19
+ npm run build # tsc -> dist/
20
+ npm publish --access public
16
21
  ```
17
- cd existing_repo
18
- git remote add origin https://gitlab.com/transcybernetics-group/inhouse/gym-saas/gym-schema.git
19
- git branch -M main
20
- git push -uf origin main
21
- ```
22
-
23
- ## Integrate with your tools
24
-
25
- - [ ] [Set up project integrations](https://gitlab.com/transcybernetics-group/inhouse/gym-saas/gym-schema/-/settings/integrations)
26
-
27
- ## Collaborate with your team
28
-
29
- - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
- - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
- - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
- - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
- - [ ] [Set auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)
34
-
35
- ## Test and Deploy
36
-
37
- Use the built-in continuous integration in GitLab.
38
-
39
- - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
40
- - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
- - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
- - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
- - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
-
45
- ***
46
22
 
47
- # Editing this README
23
+ `prepublishOnly` runs `build` + `check` (type-check + biome) as the publish gate.
24
+ `--access public` is a CLI flag, not a manifest field.
48
25
 
49
- When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
26
+ ## Consume
50
27
 
51
- ## Suggestions for a good README
28
+ In `gymmonk-backend` and `gymmonk-web-client`:
52
29
 
53
- Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
-
55
- ## Name
56
- Choose a self-explaining name for your project.
57
-
58
- ## Description
59
- Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
-
61
- ## Badges
62
- On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
-
64
- ## Visuals
65
- Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
-
67
- ## Installation
68
- Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
-
70
- ## Usage
71
- Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
-
73
- ## Support
74
- Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
-
76
- ## Roadmap
77
- If you have ideas for releases in the future, it is a good idea to list them in the README.
78
-
79
- ## Contributing
80
- State if you are open to contributions and what your requirements are for accepting them.
81
-
82
- For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
-
84
- You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
30
+ ```bash
31
+ npm install gymmonk-schema@<version>
32
+ # then delete any nested Zod dup so a single Zod instance is used:
33
+ rm -rf node_modules/gymmonk-schema/node_modules
34
+ ```
85
35
 
86
- ## Authors and acknowledgment
87
- Show your appreciation to those who have contributed to the project.
36
+ Bump the caret pin in each consumer's `package.json` on every publish (a `0.x`
37
+ caret locks to the same minor, so `npm install` won't auto-pick a new minor).
88
38
 
89
- ## License
90
- For open source projects, say how it is licensed.
39
+ ## Convention
91
40
 
92
- ## Project status
93
- If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
41
+ Mirrors the jansathi schema family (`dating-schema`, `near-me-schema`) exactly:
42
+ pure ESM, `tsc`-only build, Zod is a **peer** dependency (`^4.4.0`), NodeNext
43
+ `.js` import specifiers, const-object enums fed to `z.enum(...)`.
@@ -0,0 +1,27 @@
1
+ /**
2
+ * gymmonk-schema — Shared helpers and primitives
3
+ * ==============================================
4
+ * The stable building blocks reused across every GymMonk domain schema.
5
+ * Mirrors the `dating-schema` / `near-me-schema` idiom: pure Zod, const-object
6
+ * enums fed to `z.enum(...)`, NodeNext `.js` import specifiers.
7
+ *
8
+ * @module gymmonk-schema/common
9
+ */
10
+ import { z } from 'zod';
11
+ /**
12
+ * Converts empty / whitespace-only strings to `undefined`
13
+ * so Zod `.optional()` treats them as "not provided".
14
+ */
15
+ export declare const emptyStringToUndefined: (value: unknown) => unknown;
16
+ /** Optional trimmed string. Empty strings are coerced to `undefined`. */
17
+ export declare const optionalTrimmedString: (maxLength?: number) => z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
18
+ /** A 24-character hex MongoDB ObjectId string. */
19
+ export declare const objectIdSchema: z.ZodString;
20
+ export type ObjectIdString = z.infer<typeof objectIdSchema>;
21
+ /** Pagination query params shared across list endpoints. */
22
+ export declare const paginationSchema: z.ZodObject<{
23
+ page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
24
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
25
+ }, z.core.$strip>;
26
+ export type Pagination = z.infer<typeof paginationSchema>;
27
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,OAAO,KAAG,OAGvD,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,GAAI,kBAAe,gDAC8B,CAAC;AAIpF,kDAAkD;AAClD,eAAO,MAAM,cAAc,aAGgB,CAAC;AAC5C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAI5D,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
package/dist/common.js ADDED
@@ -0,0 +1,35 @@
1
+ /**
2
+ * gymmonk-schema — Shared helpers and primitives
3
+ * ==============================================
4
+ * The stable building blocks reused across every GymMonk domain schema.
5
+ * Mirrors the `dating-schema` / `near-me-schema` idiom: pure Zod, const-object
6
+ * enums fed to `z.enum(...)`, NodeNext `.js` import specifiers.
7
+ *
8
+ * @module gymmonk-schema/common
9
+ */
10
+ import { z } from 'zod';
11
+ // ─── String helpers ──────────────────────────────────────────────────────────
12
+ /**
13
+ * Converts empty / whitespace-only strings to `undefined`
14
+ * so Zod `.optional()` treats them as "not provided".
15
+ */
16
+ export const emptyStringToUndefined = (value) => {
17
+ if (typeof value === 'string' && value.trim() === '')
18
+ return undefined;
19
+ return value;
20
+ };
21
+ /** Optional trimmed string. Empty strings are coerced to `undefined`. */
22
+ export const optionalTrimmedString = (maxLength = 100) => z.preprocess(emptyStringToUndefined, z.string().trim().max(maxLength).optional());
23
+ // ─── Identifiers ─────────────────────────────────────────────────────────────
24
+ /** A 24-character hex MongoDB ObjectId string. */
25
+ export const objectIdSchema = z
26
+ .string()
27
+ .trim()
28
+ .regex(/^[0-9a-fA-F]{24}$/, 'Invalid id');
29
+ // ─── Pagination ──────────────────────────────────────────────────────────────
30
+ /** Pagination query params shared across list endpoints. */
31
+ export const paginationSchema = z.object({
32
+ page: z.coerce.number().int().min(1).default(1),
33
+ limit: z.coerce.number().int().min(1).max(100).default(20),
34
+ });
35
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAc,EAAW,EAAE;IAChE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IACvE,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,yEAAyE;AACzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,SAAS,GAAG,GAAG,EAAE,EAAE,CACvD,CAAC,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAEpF,gFAAgF;AAEhF,kDAAkD;AAClD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,EAAE;KACR,IAAI,EAAE;KACN,KAAK,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;AAG5C,gFAAgF;AAEhF,4DAA4D;AAC5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/C,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC3D,CAAC,CAAC","sourcesContent":["/**\n * gymmonk-schema — Shared helpers and primitives\n * ==============================================\n * The stable building blocks reused across every GymMonk domain schema.\n * Mirrors the `dating-schema` / `near-me-schema` idiom: pure Zod, const-object\n * enums fed to `z.enum(...)`, NodeNext `.js` import specifiers.\n *\n * @module gymmonk-schema/common\n */\n\nimport { z } from 'zod';\n\n// ─── String helpers ──────────────────────────────────────────────────────────\n\n/**\n * Converts empty / whitespace-only strings to `undefined`\n * so Zod `.optional()` treats them as \"not provided\".\n */\nexport const emptyStringToUndefined = (value: unknown): unknown => {\n if (typeof value === 'string' && value.trim() === '') return undefined;\n return value;\n};\n\n/** Optional trimmed string. Empty strings are coerced to `undefined`. */\nexport const optionalTrimmedString = (maxLength = 100) =>\n z.preprocess(emptyStringToUndefined, z.string().trim().max(maxLength).optional());\n\n// ─── Identifiers ─────────────────────────────────────────────────────────────\n\n/** A 24-character hex MongoDB ObjectId string. */\nexport const objectIdSchema = z\n .string()\n .trim()\n .regex(/^[0-9a-fA-F]{24}$/, 'Invalid id');\nexport type ObjectIdString = z.infer<typeof objectIdSchema>;\n\n// ─── Pagination ──────────────────────────────────────────────────────────────\n\n/** Pagination query params shared across list endpoints. */\nexport const paginationSchema = z.object({\n page: z.coerce.number().int().min(1).default(1),\n limit: z.coerce.number().int().min(1).max(100).default(20),\n});\nexport type Pagination = z.infer<typeof paginationSchema>;\n"]}
package/dist/index.d.ts CHANGED
@@ -1,14 +1,11 @@
1
- export * as Audit from './audit/index.js';
2
- export * as Auth from './auth/index.js';
3
- export * as Common from './common/index.js';
4
- export * as Community from './community/index.js';
5
- export * as Feedback from './feedback/index.js';
6
- export * as Gym from './gym/index.js';
7
- export * as Landing from './landing/index.js';
8
- export * as Marketing from './marketing/index.js';
9
- export * as Notification from './notification/index.js';
10
- export * as Nutrition from './nutrition/index.js';
11
- export * as Subscription from './subscription/index.js';
12
- export * as Support from './support/index.js';
13
- export * as Workout from './workout/index.js';
1
+ /**
2
+ * gymmonk-schema Public API
3
+ * ===========================
4
+ * Shared Zod schemas, enums and domain types for GymMonk (fitness SaaS).
5
+ * Single SSOT consumed by both gymmonk-backend and gymmonk-web-client.
6
+ *
7
+ * Domain modules (workouts, library, membership, check-in, …) are added here
8
+ * as they land — each exported through this barrel.
9
+ */
10
+ export { emptyStringToUndefined, type ObjectIdString, objectIdSchema, optionalTrimmedString, type Pagination, paginationSchema, } from './common.js';
14
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,sBAAsB,EACtB,KAAK,cAAc,EACnB,cAAc,EACd,qBAAqB,EACrB,KAAK,UAAU,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -1,18 +1,12 @@
1
- // Root barrel for gymmonk-schema package
2
- // Exposes all schema domains in a clean namespaced manner.
3
- // Domains (alphabetical)
4
- export * as Audit from './audit/index.js';
5
- export * as Auth from './auth/index.js';
6
- // Common primitives, enums, value-objects, pagination, etc.
7
- export * as Common from './common/index.js';
8
- export * as Community from './community/index.js';
9
- export * as Feedback from './feedback/index.js';
10
- export * as Gym from './gym/index.js';
11
- export * as Landing from './landing/index.js';
12
- export * as Marketing from './marketing/index.js';
13
- export * as Notification from './notification/index.js';
14
- export * as Nutrition from './nutrition/index.js';
15
- export * as Subscription from './subscription/index.js';
16
- export * as Support from './support/index.js';
17
- export * as Workout from './workout/index.js';
1
+ /**
2
+ * gymmonk-schema Public API
3
+ * ===========================
4
+ * Shared Zod schemas, enums and domain types for GymMonk (fitness SaaS).
5
+ * Single SSOT consumed by both gymmonk-backend and gymmonk-web-client.
6
+ *
7
+ * Domain modules (workouts, library, membership, check-in, …) are added here
8
+ * as they land — each exported through this barrel.
9
+ */
10
+ // ─── Common helpers + primitives ─────────────────────────────────────────────
11
+ export { emptyStringToUndefined, objectIdSchema, optionalTrimmedString, paginationSchema, } from './common.js';
18
12
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,2DAA2D;AAE3D,yBAAyB;AACzB,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,4DAA4D;AAC5D,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC","sourcesContent":["// Root barrel for gymmonk-schema package\n// Exposes all schema domains in a clean namespaced manner.\n\n// Domains (alphabetical)\nexport * as Audit from './audit/index.js';\nexport * as Auth from './auth/index.js';\n// Common primitives, enums, value-objects, pagination, etc.\nexport * as Common from './common/index.js';\nexport * as Community from './community/index.js';\nexport * as Feedback from './feedback/index.js';\nexport * as Gym from './gym/index.js';\nexport * as Landing from './landing/index.js';\nexport * as Marketing from './marketing/index.js';\nexport * as Notification from './notification/index.js';\nexport * as Nutrition from './nutrition/index.js';\nexport * as Subscription from './subscription/index.js';\nexport * as Support from './support/index.js';\nexport * as Workout from './workout/index.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,gFAAgF;AAChF,OAAO,EACL,sBAAsB,EAEtB,cAAc,EACd,qBAAqB,EAErB,gBAAgB,GACjB,MAAM,aAAa,CAAC","sourcesContent":["/**\n * gymmonk-schema Public API\n * ===========================\n * Shared Zod schemas, enums and domain types for GymMonk (fitness SaaS).\n * Single SSOT consumed by both gymmonk-backend and gymmonk-web-client.\n *\n * Domain modules (workouts, library, membership, check-in, …) are added here\n * as they land each exported through this barrel.\n */\n\n// ─── Common helpers + primitives ─────────────────────────────────────────────\nexport {\n emptyStringToUndefined,\n type ObjectIdString,\n objectIdSchema,\n optionalTrimmedString,\n type Pagination,\n paginationSchema,\n} from './common.js';\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gymmonk-schema",
3
- "version": "0.1.2",
4
- "description": "Shared Zod domain schemas for Gym SaaS (frontend + backend).",
3
+ "version": "0.2.0",
4
+ "description": "Shared Zod schemas, enums and domain types for GymMonk (fitness SaaS) — single source of truth (SSOT) consumed by gymmonk-backend and gymmonk-web-client.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -25,27 +25,25 @@
25
25
  "format": "biome format --write .",
26
26
  "check": "npm run type-check && biome check --write .",
27
27
  "check:staged": "biome check --staged --write --no-errors-on-unmatched",
28
- "prepublishOnly": "npm run build && npm run check",
29
- "prepare": "husky"
28
+ "prepublishOnly": "npm run build && npm run check"
30
29
  },
31
30
  "keywords": [
32
31
  "zod",
33
- "schemas",
32
+ "schema",
33
+ "gymmonk",
34
34
  "gym",
35
- "saas",
35
+ "fitness",
36
36
  "typescript"
37
37
  ],
38
38
  "author": "Hari",
39
39
  "license": "MIT",
40
40
  "peerDependencies": {
41
- "zod": "^3.25.0 || ^4.0.0"
41
+ "zod": "^4.4.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@biomejs/biome": "2.3.7",
45
- "@tsconfig/node22": "^22.0.5",
44
+ "@biomejs/biome": "^2.4.2",
46
45
  "@types/node": "^24.10.1",
47
- "husky": "^9.1.7",
48
46
  "typescript": "^5.9.3",
49
- "zod": "^4.1.12"
47
+ "zod": "^4.4.3"
50
48
  }
51
49
  }
@@ -1,78 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * Who performed the action recorded in this audit log.
4
- */
5
- export declare const auditActorTypeValues: readonly ["user", "system", "integration"];
6
- export declare const AuditActorTypeSchema: z.ZodEnum<{
7
- user: "user";
8
- system: "system";
9
- integration: "integration";
10
- }>;
11
- /**
12
- * What kind of action was performed.
13
- * Extend this list over time as needed, but prefer adding values
14
- * instead of changing/removing existing ones to avoid breaking changes.
15
- */
16
- export declare const auditActionValues: readonly ["create", "update", "delete", "restore", "login", "logout", "invite", "accept_invite", "reject_invite", "assign", "unassign", "status_change", "other"];
17
- export declare const AuditActionSchema: z.ZodEnum<{
18
- create: "create";
19
- update: "update";
20
- delete: "delete";
21
- restore: "restore";
22
- login: "login";
23
- logout: "logout";
24
- invite: "invite";
25
- accept_invite: "accept_invite";
26
- reject_invite: "reject_invite";
27
- assign: "assign";
28
- unassign: "unassign";
29
- status_change: "status_change";
30
- other: "other";
31
- }>;
32
- /**
33
- * Generic audit log entry for the gym SaaS.
34
- *
35
- * This should be able to describe:
36
- * - user logins / logouts
37
- * - membership changes
38
- * - plan updates
39
- * - role/permission changes
40
- * - critical configuration changes
41
- */
42
- export declare const AuditLogSchema: z.ZodObject<{
43
- id: z.ZodString;
44
- createdAt: z.ZodString;
45
- actorId: z.ZodOptional<z.ZodString>;
46
- actorType: z.ZodDefault<z.ZodEnum<{
47
- user: "user";
48
- system: "system";
49
- integration: "integration";
50
- }>>;
51
- resourceType: z.ZodString;
52
- resourceId: z.ZodOptional<z.ZodString>;
53
- organisationId: z.ZodOptional<z.ZodString>;
54
- centerId: z.ZodOptional<z.ZodString>;
55
- action: z.ZodEnum<{
56
- create: "create";
57
- update: "update";
58
- delete: "delete";
59
- restore: "restore";
60
- login: "login";
61
- logout: "logout";
62
- invite: "invite";
63
- accept_invite: "accept_invite";
64
- reject_invite: "reject_invite";
65
- assign: "assign";
66
- unassign: "unassign";
67
- status_change: "status_change";
68
- other: "other";
69
- }>;
70
- description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
71
- ipAddress: z.ZodOptional<z.ZodString>;
72
- userAgent: z.ZodOptional<z.ZodString>;
73
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
74
- }, z.core.$strip>;
75
- export type AuditActorType = z.infer<typeof AuditActorTypeSchema>;
76
- export type AuditAction = z.infer<typeof AuditActionSchema>;
77
- export type AuditLog = z.infer<typeof AuditLogSchema>;
78
- //# sourceMappingURL=audit-log.schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"audit-log.schema.d.ts","sourceRoot":"","sources":["../../src/audit/audit-log.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;GAEG;AACH,eAAO,MAAM,oBAAoB,4CAA6C,CAAC;AAC/E,eAAO,MAAM,oBAAoB;;;;EAA+B,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,mKAcpB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;EAA4B,CAAC;AAE3D;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6CzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -1,78 +0,0 @@
1
- import { z } from 'zod';
2
- import { IsoDateTimeStringSchema } from '../common/primitives/date.schema.js';
3
- import { ObjectIdSchema } from '../common/primitives/object-id.schema.js';
4
- import { NonEmptyStringSchema, OptionalStringSchema } from '../common/primitives/string.schema.js';
5
- /**
6
- * Who performed the action recorded in this audit log.
7
- */
8
- export const auditActorTypeValues = ['user', 'system', 'integration'];
9
- export const AuditActorTypeSchema = z.enum(auditActorTypeValues);
10
- /**
11
- * What kind of action was performed.
12
- * Extend this list over time as needed, but prefer adding values
13
- * instead of changing/removing existing ones to avoid breaking changes.
14
- */
15
- export const auditActionValues = [
16
- 'create',
17
- 'update',
18
- 'delete',
19
- 'restore',
20
- 'login',
21
- 'logout',
22
- 'invite',
23
- 'accept_invite',
24
- 'reject_invite',
25
- 'assign',
26
- 'unassign',
27
- 'status_change',
28
- 'other',
29
- ];
30
- export const AuditActionSchema = z.enum(auditActionValues);
31
- /**
32
- * Generic audit log entry for the gym SaaS.
33
- *
34
- * This should be able to describe:
35
- * - user logins / logouts
36
- * - membership changes
37
- * - plan updates
38
- * - role/permission changes
39
- * - critical configuration changes
40
- */
41
- export const AuditLogSchema = z.object({
42
- /** Unique id for the audit log entry (usually Mongo ObjectId). */
43
- id: ObjectIdSchema,
44
- /** When the action happened (server-side timestamp, ISO 8601). */
45
- createdAt: IsoDateTimeStringSchema,
46
- /** Who performed the action. */
47
- actorId: ObjectIdSchema.optional(),
48
- actorType: AuditActorTypeSchema.default('user'),
49
- /**
50
- * High-level resource type.
51
- * Example values: "user", "organisation", "center", "membership", "plan", "payment", etc.
52
- * This is intentionally free-form so you can evolve it without breaking changes.
53
- */
54
- resourceType: NonEmptyStringSchema,
55
- /** Optional resource id if applicable (e.g. user id, membership id). */
56
- resourceId: ObjectIdSchema.optional(),
57
- /** Optional organisation / gym scope, useful for multi-tenant analytics. */
58
- organisationId: ObjectIdSchema.optional(),
59
- centerId: ObjectIdSchema.optional(),
60
- /** What action was performed. */
61
- action: AuditActionSchema,
62
- /**
63
- * Human-readable description for admins.
64
- * Example: "User updated membership plan from BASIC to PRO".
65
- */
66
- description: OptionalStringSchema,
67
- /**
68
- * Optional IP address and User-Agent, useful for security investigations.
69
- */
70
- ipAddress: z.string().trim().min(3).max(100).optional(),
71
- userAgent: z.string().trim().min(3).max(500).optional(),
72
- /**
73
- * Arbitrary structured metadata.
74
- * For example, you can store previous vs new values, request ids, etc.
75
- */
76
- metadata: z.record(z.string(), z.unknown()).optional(),
77
- });
78
- //# sourceMappingURL=audit-log.schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"audit-log.schema.js","sourceRoot":"","sources":["../../src/audit/audit-log.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAEnG;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAU,CAAC;AAC/E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,eAAe;IACf,eAAe;IACf,QAAQ;IACR,UAAU;IACV,eAAe;IACf,OAAO;CACC,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;AAE3D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,kEAAkE;IAClE,EAAE,EAAE,cAAc;IAElB,kEAAkE;IAClE,SAAS,EAAE,uBAAuB;IAElC,gCAAgC;IAChC,OAAO,EAAE,cAAc,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC;IAE/C;;;;OAIG;IACH,YAAY,EAAE,oBAAoB;IAElC,wEAAwE;IACxE,UAAU,EAAE,cAAc,CAAC,QAAQ,EAAE;IAErC,4EAA4E;IAC5E,cAAc,EAAE,cAAc,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE;IAEnC,iCAAiC;IACjC,MAAM,EAAE,iBAAiB;IAEzB;;;OAGG;IACH,WAAW,EAAE,oBAAoB;IAEjC;;OAEG;IACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACvD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAEvD;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { IsoDateTimeStringSchema } from '../common/primitives/date.schema.js';\nimport { ObjectIdSchema } from '../common/primitives/object-id.schema.js';\nimport { NonEmptyStringSchema, OptionalStringSchema } from '../common/primitives/string.schema.js';\n\n/**\n * Who performed the action recorded in this audit log.\n */\nexport const auditActorTypeValues = ['user', 'system', 'integration'] as const;\nexport const AuditActorTypeSchema = z.enum(auditActorTypeValues);\n\n/**\n * What kind of action was performed.\n * Extend this list over time as needed, but prefer adding values\n * instead of changing/removing existing ones to avoid breaking changes.\n */\nexport const auditActionValues = [\n 'create',\n 'update',\n 'delete',\n 'restore',\n 'login',\n 'logout',\n 'invite',\n 'accept_invite',\n 'reject_invite',\n 'assign',\n 'unassign',\n 'status_change',\n 'other',\n] as const;\n\nexport const AuditActionSchema = z.enum(auditActionValues);\n\n/**\n * Generic audit log entry for the gym SaaS.\n *\n * This should be able to describe:\n * - user logins / logouts\n * - membership changes\n * - plan updates\n * - role/permission changes\n * - critical configuration changes\n */\nexport const AuditLogSchema = z.object({\n /** Unique id for the audit log entry (usually Mongo ObjectId). */\n id: ObjectIdSchema,\n\n /** When the action happened (server-side timestamp, ISO 8601). */\n createdAt: IsoDateTimeStringSchema,\n\n /** Who performed the action. */\n actorId: ObjectIdSchema.optional(),\n actorType: AuditActorTypeSchema.default('user'),\n\n /**\n * High-level resource type.\n * Example values: \"user\", \"organisation\", \"center\", \"membership\", \"plan\", \"payment\", etc.\n * This is intentionally free-form so you can evolve it without breaking changes.\n */\n resourceType: NonEmptyStringSchema,\n\n /** Optional resource id if applicable (e.g. user id, membership id). */\n resourceId: ObjectIdSchema.optional(),\n\n /** Optional organisation / gym scope, useful for multi-tenant analytics. */\n organisationId: ObjectIdSchema.optional(),\n centerId: ObjectIdSchema.optional(),\n\n /** What action was performed. */\n action: AuditActionSchema,\n\n /**\n * Human-readable description for admins.\n * Example: \"User updated membership plan from BASIC to PRO\".\n */\n description: OptionalStringSchema,\n\n /**\n * Optional IP address and User-Agent, useful for security investigations.\n */\n ipAddress: z.string().trim().min(3).max(100).optional(),\n userAgent: z.string().trim().min(3).max(500).optional(),\n\n /**\n * Arbitrary structured metadata.\n * For example, you can store previous vs new values, request ids, etc.\n */\n metadata: z.record(z.string(), z.unknown()).optional(),\n});\n\nexport type AuditActorType = z.infer<typeof AuditActorTypeSchema>;\nexport type AuditAction = z.infer<typeof AuditActionSchema>;\nexport type AuditLog = z.infer<typeof AuditLogSchema>;\n"]}
@@ -1,2 +0,0 @@
1
- export * from './audit-log.schema.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/audit/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './audit-log.schema.js';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/audit/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './audit-log.schema.js';\n"]}
@@ -1,10 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const DeviceInfoSchema: z.ZodObject<{
3
- userId: z.ZodString;
4
- deviceId: z.ZodString;
5
- userAgent: z.ZodOptional<z.ZodString>;
6
- ipAddress: z.ZodOptional<z.ZodString>;
7
- createdAt: z.ZodString;
8
- }, z.core.$strip>;
9
- export type DeviceInfo = z.infer<typeof DeviceInfoSchema>;
10
- //# sourceMappingURL=device.schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"device.schema.d.ts","sourceRoot":"","sources":["../../../src/auth/device/device.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gBAAgB;;;;;;iBAM3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- import { z } from 'zod';
2
- import { ObjectIdSchema } from '../../common/primitives/object-id.schema.js';
3
- export const DeviceInfoSchema = z.object({
4
- userId: ObjectIdSchema,
5
- deviceId: z.string().min(1),
6
- userAgent: z.string().optional(),
7
- ipAddress: z.string().optional(),
8
- createdAt: z.string().datetime({ offset: true }),
9
- });
10
- //# sourceMappingURL=device.schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"device.schema.js","sourceRoot":"","sources":["../../../src/auth/device/device.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,cAAc;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;CACjD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { ObjectIdSchema } from '../../common/primitives/object-id.schema.js';\n\nexport const DeviceInfoSchema = z.object({\n userId: ObjectIdSchema,\n deviceId: z.string().min(1),\n userAgent: z.string().optional(),\n ipAddress: z.string().optional(),\n createdAt: z.string().datetime({ offset: true }),\n});\n\nexport type DeviceInfo = z.infer<typeof DeviceInfoSchema>;\n"]}
@@ -1,2 +0,0 @@
1
- export * from './device.schema.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/device/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './device.schema.js';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/device/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './device.schema.js';\n"]}
@@ -1,10 +0,0 @@
1
- export * from './device/index.js';
2
- export * from './otp/index.js';
3
- export * from './password-history/index.js';
4
- export * from './permission/index.js';
5
- export * from './resource/index.js';
6
- export * from './role/index.js';
7
- export * from './token/index.js';
8
- export * from './user/index.js';
9
- export * from './user-activity/index.js';
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAElC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AAEtC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,0BAA0B,CAAC"}
@@ -1,10 +0,0 @@
1
- export * from './device/index.js';
2
- export * from './otp/index.js';
3
- export * from './password-history/index.js';
4
- export * from './permission/index.js';
5
- export * from './resource/index.js';
6
- export * from './role/index.js';
7
- export * from './token/index.js';
8
- export * from './user/index.js';
9
- export * from './user-activity/index.js';
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAElC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AAEtC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './device/index.js';\n\nexport * from './otp/index.js';\n\nexport * from './password-history/index.js';\n\nexport * from './permission/index.js';\n\nexport * from './resource/index.js';\n\nexport * from './role/index.js';\n\nexport * from './token/index.js';\n\nexport * from './user/index.js';\n\nexport * from './user-activity/index.js';\n"]}
@@ -1,2 +0,0 @@
1
- export * from './otp.schema.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/otp/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './otp.schema.js';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/otp/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './otp.schema.js';\n"]}
@@ -1,8 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const OtpSchema: z.ZodObject<{
3
- target: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
4
- code: z.ZodString;
5
- expiresAt: z.ZodString;
6
- }, z.core.$strip>;
7
- export type Otp = z.infer<typeof OtpSchema>;
8
- //# sourceMappingURL=otp.schema.d.ts.map