@centricare/contract 0.1.1 → 0.1.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 (371) hide show
  1. package/README.md +46 -26
  2. package/dist/commons/address.d.ts +35 -0
  3. package/dist/commons/address.d.ts.map +1 -0
  4. package/dist/commons/address.js +11 -0
  5. package/dist/commons/address.js.map +1 -0
  6. package/dist/commons/api-response.d.ts +8 -116
  7. package/dist/commons/api-response.d.ts.map +1 -1
  8. package/dist/commons/coded-concept.d.ts +3 -15
  9. package/dist/commons/coded-concept.d.ts.map +1 -1
  10. package/dist/commons/demographic.d.ts +29 -0
  11. package/dist/commons/demographic.d.ts.map +1 -0
  12. package/dist/commons/demographic.js +11 -0
  13. package/dist/commons/demographic.js.map +1 -0
  14. package/dist/commons/index.d.ts +3 -0
  15. package/dist/commons/index.d.ts.map +1 -1
  16. package/dist/commons/index.js +3 -0
  17. package/dist/commons/index.js.map +1 -1
  18. package/dist/commons/object-id.d.ts +8 -0
  19. package/dist/commons/object-id.d.ts.map +1 -0
  20. package/dist/commons/object-id.js +11 -0
  21. package/dist/commons/object-id.js.map +1 -0
  22. package/dist/commons/setting-option.d.ts +24 -16
  23. package/dist/commons/setting-option.d.ts.map +1 -1
  24. package/dist/models/assignment/assignment-minimal.schema.d.ts +18 -0
  25. package/dist/models/assignment/assignment-minimal.schema.d.ts.map +1 -0
  26. package/dist/models/assignment/assignment-minimal.schema.js +13 -0
  27. package/dist/models/assignment/assignment-minimal.schema.js.map +1 -0
  28. package/dist/models/assignment/assignment-partial.schema.d.ts +18 -0
  29. package/dist/models/assignment/assignment-partial.schema.d.ts.map +1 -0
  30. package/dist/models/assignment/assignment-partial.schema.js +6 -0
  31. package/dist/models/assignment/assignment-partial.schema.js.map +1 -0
  32. package/dist/models/assignment/assignment.schema.d.ts +84 -0
  33. package/dist/models/assignment/assignment.schema.d.ts.map +1 -0
  34. package/dist/models/assignment/assignment.schema.js +27 -0
  35. package/dist/models/assignment/assignment.schema.js.map +1 -0
  36. package/dist/models/assignment/index.d.ts +4 -0
  37. package/dist/models/assignment/index.d.ts.map +1 -0
  38. package/dist/models/assignment/index.js +4 -0
  39. package/dist/models/assignment/index.js.map +1 -0
  40. package/dist/models/department/department-minimal.schema.d.ts +17 -0
  41. package/dist/models/department/department-minimal.schema.d.ts.map +1 -0
  42. package/dist/models/department/department-minimal.schema.js +13 -0
  43. package/dist/models/department/department-minimal.schema.js.map +1 -0
  44. package/dist/models/department/department-partial.schema.d.ts +17 -0
  45. package/dist/models/department/department-partial.schema.d.ts.map +1 -0
  46. package/dist/models/department/department-partial.schema.js +6 -0
  47. package/dist/models/department/department-partial.schema.js.map +1 -0
  48. package/dist/models/department/department.schema.d.ts +83 -0
  49. package/dist/models/department/department.schema.d.ts.map +1 -0
  50. package/dist/models/department/department.schema.js +20 -0
  51. package/dist/models/department/department.schema.js.map +1 -0
  52. package/dist/models/department/index.d.ts +4 -0
  53. package/dist/models/department/index.d.ts.map +1 -0
  54. package/dist/models/department/index.js +4 -0
  55. package/dist/models/department/index.js.map +1 -0
  56. package/dist/models/facility/facility-minimal.schema.d.ts +19 -0
  57. package/dist/models/facility/facility-minimal.schema.d.ts.map +1 -0
  58. package/dist/models/facility/facility-minimal.schema.js +10 -0
  59. package/dist/models/facility/facility-minimal.schema.js.map +1 -0
  60. package/dist/models/facility/facility-partial.schema.d.ts +19 -0
  61. package/dist/models/facility/facility-partial.schema.d.ts.map +1 -0
  62. package/dist/models/facility/facility-partial.schema.js +6 -0
  63. package/dist/models/facility/facility-partial.schema.js.map +1 -0
  64. package/dist/models/facility/facility-settings.schema.d.ts +16 -0
  65. package/dist/models/facility/facility-settings.schema.d.ts.map +1 -0
  66. package/dist/models/facility/facility-settings.schema.js +12 -0
  67. package/dist/models/facility/facility-settings.schema.js.map +1 -0
  68. package/dist/models/facility/facility.schema.d.ts +82 -0
  69. package/dist/models/facility/facility.schema.d.ts.map +1 -0
  70. package/dist/models/facility/facility.schema.js +23 -0
  71. package/dist/models/facility/facility.schema.js.map +1 -0
  72. package/dist/models/facility/index.d.ts +5 -0
  73. package/dist/models/facility/index.d.ts.map +1 -0
  74. package/dist/models/facility/index.js +5 -0
  75. package/dist/models/facility/index.js.map +1 -0
  76. package/dist/models/index.d.ts +17 -0
  77. package/dist/models/index.d.ts.map +1 -1
  78. package/dist/models/index.js +17 -0
  79. package/dist/models/index.js.map +1 -1
  80. package/dist/models/ksm/index.d.ts +4 -0
  81. package/dist/models/ksm/index.d.ts.map +1 -0
  82. package/dist/models/ksm/index.js +4 -0
  83. package/dist/models/ksm/index.js.map +1 -0
  84. package/dist/models/ksm/ksm-minimal.schema.d.ts +12 -0
  85. package/dist/models/ksm/ksm-minimal.schema.d.ts.map +1 -0
  86. package/dist/models/ksm/ksm-minimal.schema.js +13 -0
  87. package/dist/models/ksm/ksm-minimal.schema.js.map +1 -0
  88. package/dist/models/ksm/ksm-partial.schema.d.ts +12 -0
  89. package/dist/models/ksm/ksm-partial.schema.d.ts.map +1 -0
  90. package/dist/models/ksm/ksm-partial.schema.js +6 -0
  91. package/dist/models/ksm/ksm-partial.schema.js.map +1 -0
  92. package/dist/models/ksm/ksm.schema.d.ts +78 -0
  93. package/dist/models/ksm/ksm.schema.d.ts.map +1 -0
  94. package/dist/models/ksm/ksm.schema.js +23 -0
  95. package/dist/models/ksm/ksm.schema.js.map +1 -0
  96. package/dist/models/location/index.d.ts +5 -0
  97. package/dist/models/location/index.d.ts.map +1 -0
  98. package/dist/models/location/index.js +5 -0
  99. package/dist/models/location/index.js.map +1 -0
  100. package/dist/models/location/location-minimal.schema.d.ts +33 -0
  101. package/dist/models/location/location-minimal.schema.d.ts.map +1 -0
  102. package/dist/models/location/location-minimal.schema.js +12 -0
  103. package/dist/models/location/location-minimal.schema.js.map +1 -0
  104. package/dist/models/location/location-partial.schema.d.ts +33 -0
  105. package/dist/models/location/location-partial.schema.d.ts.map +1 -0
  106. package/dist/models/location/location-partial.schema.js +6 -0
  107. package/dist/models/location/location-partial.schema.js.map +1 -0
  108. package/dist/models/location/location-settings.schema.d.ts +8 -0
  109. package/dist/models/location/location-settings.schema.d.ts.map +1 -0
  110. package/dist/models/location/location-settings.schema.js +7 -0
  111. package/dist/models/location/location-settings.schema.js.map +1 -0
  112. package/dist/models/location/location.schema.d.ts +98 -0
  113. package/dist/models/location/location.schema.d.ts.map +1 -0
  114. package/dist/models/location/location.schema.js +30 -0
  115. package/dist/models/location/location.schema.js.map +1 -0
  116. package/dist/models/member/index.d.ts +4 -0
  117. package/dist/models/member/index.d.ts.map +1 -0
  118. package/dist/models/member/index.js +4 -0
  119. package/dist/models/member/index.js.map +1 -0
  120. package/dist/models/member/member-minimal.schema.d.ts +11 -0
  121. package/dist/models/member/member-minimal.schema.d.ts.map +1 -0
  122. package/dist/models/member/member-minimal.schema.js +9 -0
  123. package/dist/models/member/member-minimal.schema.js.map +1 -0
  124. package/dist/models/member/member-partial.schema.d.ts +11 -0
  125. package/dist/models/member/member-partial.schema.d.ts.map +1 -0
  126. package/dist/models/member/member-partial.schema.js +6 -0
  127. package/dist/models/member/member-partial.schema.js.map +1 -0
  128. package/dist/models/member/member.schema.d.ts +73 -0
  129. package/dist/models/member/member.schema.d.ts.map +1 -0
  130. package/dist/models/member/member.schema.js +16 -0
  131. package/dist/models/member/member.schema.js.map +1 -0
  132. package/dist/models/organization/index.d.ts +5 -0
  133. package/dist/models/organization/index.d.ts.map +1 -0
  134. package/dist/models/organization/index.js +5 -0
  135. package/dist/models/organization/index.js.map +1 -0
  136. package/dist/models/organization/organization-minimal.schema.d.ts +22 -0
  137. package/dist/models/organization/organization-minimal.schema.d.ts.map +1 -0
  138. package/dist/models/organization/organization-minimal.schema.js +9 -0
  139. package/dist/models/organization/organization-minimal.schema.js.map +1 -0
  140. package/dist/models/organization/organization-partial.schema.d.ts +22 -0
  141. package/dist/models/organization/organization-partial.schema.d.ts.map +1 -0
  142. package/dist/models/organization/organization-partial.schema.js +6 -0
  143. package/dist/models/organization/organization-partial.schema.js.map +1 -0
  144. package/dist/models/organization/organization-settings.schema.d.ts +8 -0
  145. package/dist/models/organization/organization-settings.schema.d.ts.map +1 -0
  146. package/dist/models/organization/organization-settings.schema.js +7 -0
  147. package/dist/models/organization/organization-settings.schema.js.map +1 -0
  148. package/dist/models/organization/organization.schema.d.ts +84 -0
  149. package/dist/models/organization/organization.schema.d.ts.map +1 -0
  150. package/dist/models/organization/organization.schema.js +24 -0
  151. package/dist/models/organization/organization.schema.js.map +1 -0
  152. package/dist/models/patient/index.d.ts +4 -0
  153. package/dist/models/patient/index.d.ts.map +1 -0
  154. package/dist/models/patient/index.js +4 -0
  155. package/dist/models/patient/index.js.map +1 -0
  156. package/dist/models/patient/patient-minimal.schema.d.ts +95 -0
  157. package/dist/models/patient/patient-minimal.schema.d.ts.map +1 -0
  158. package/dist/models/patient/patient-minimal.schema.js +13 -0
  159. package/dist/models/patient/patient-minimal.schema.js.map +1 -0
  160. package/dist/models/patient/patient-partial.schema.d.ts +95 -0
  161. package/dist/models/patient/patient-partial.schema.d.ts.map +1 -0
  162. package/dist/models/patient/patient-partial.schema.js +6 -0
  163. package/dist/models/patient/patient-partial.schema.js.map +1 -0
  164. package/dist/models/patient/patient.schema.d.ts +161 -0
  165. package/dist/models/patient/patient.schema.d.ts.map +1 -0
  166. package/dist/models/patient/patient.schema.js +35 -0
  167. package/dist/models/patient/patient.schema.js.map +1 -0
  168. package/dist/models/patient-additional/index.d.ts +4 -0
  169. package/dist/models/patient-additional/index.d.ts.map +1 -0
  170. package/dist/models/patient-additional/index.js +4 -0
  171. package/dist/models/patient-additional/index.js.map +1 -0
  172. package/dist/models/patient-additional/patient-additional-minimal.schema.d.ts +17 -0
  173. package/dist/models/patient-additional/patient-additional-minimal.schema.d.ts.map +1 -0
  174. package/dist/models/patient-additional/patient-additional-minimal.schema.js +13 -0
  175. package/dist/models/patient-additional/patient-additional-minimal.schema.js.map +1 -0
  176. package/dist/models/patient-additional/patient-additional-partial.schema.d.ts +17 -0
  177. package/dist/models/patient-additional/patient-additional-partial.schema.d.ts.map +1 -0
  178. package/dist/models/patient-additional/patient-additional-partial.schema.js +6 -0
  179. package/dist/models/patient-additional/patient-additional-partial.schema.js.map +1 -0
  180. package/dist/models/patient-additional/patient-additional.schema.d.ts +83 -0
  181. package/dist/models/patient-additional/patient-additional.schema.d.ts.map +1 -0
  182. package/dist/models/patient-additional/patient-additional.schema.js +21 -0
  183. package/dist/models/patient-additional/patient-additional.schema.js.map +1 -0
  184. package/dist/models/payer/index.d.ts +5 -0
  185. package/dist/models/payer/index.d.ts.map +1 -0
  186. package/dist/models/payer/index.js +5 -0
  187. package/dist/models/payer/index.js.map +1 -0
  188. package/dist/models/payer/payer-minimal.schema.d.ts +67 -0
  189. package/dist/models/payer/payer-minimal.schema.d.ts.map +1 -0
  190. package/dist/models/payer/payer-minimal.schema.js +13 -0
  191. package/dist/models/payer/payer-minimal.schema.js.map +1 -0
  192. package/dist/models/payer/payer-partial.schema.d.ts +67 -0
  193. package/dist/models/payer/payer-partial.schema.d.ts.map +1 -0
  194. package/dist/models/payer/payer-partial.schema.js +6 -0
  195. package/dist/models/payer/payer-partial.schema.js.map +1 -0
  196. package/dist/models/payer/payer-settings.schema.d.ts +27 -0
  197. package/dist/models/payer/payer-settings.schema.d.ts.map +1 -0
  198. package/dist/models/payer/payer-settings.schema.js +20 -0
  199. package/dist/models/payer/payer-settings.schema.js.map +1 -0
  200. package/dist/models/payer/payer.schema.d.ts +133 -0
  201. package/dist/models/payer/payer.schema.d.ts.map +1 -0
  202. package/dist/models/payer/payer.schema.js +47 -0
  203. package/dist/models/payer/payer.schema.js.map +1 -0
  204. package/dist/models/practitioner-schedule/index.d.ts +4 -0
  205. package/dist/models/practitioner-schedule/index.d.ts.map +1 -0
  206. package/dist/models/practitioner-schedule/index.js +4 -0
  207. package/dist/models/practitioner-schedule/index.js.map +1 -0
  208. package/dist/models/practitioner-schedule/practitioner-schedule-minimal.schema.d.ts +20 -0
  209. package/dist/models/practitioner-schedule/practitioner-schedule-minimal.schema.d.ts.map +1 -0
  210. package/dist/models/practitioner-schedule/practitioner-schedule-minimal.schema.js +13 -0
  211. package/dist/models/practitioner-schedule/practitioner-schedule-minimal.schema.js.map +1 -0
  212. package/dist/models/practitioner-schedule/practitioner-schedule-partial.schema.d.ts +20 -0
  213. package/dist/models/practitioner-schedule/practitioner-schedule-partial.schema.d.ts.map +1 -0
  214. package/dist/models/practitioner-schedule/practitioner-schedule-partial.schema.js +6 -0
  215. package/dist/models/practitioner-schedule/practitioner-schedule-partial.schema.js.map +1 -0
  216. package/dist/models/practitioner-schedule/practitioner-schedule.schema.d.ts +86 -0
  217. package/dist/models/practitioner-schedule/practitioner-schedule.schema.d.ts.map +1 -0
  218. package/dist/models/practitioner-schedule/practitioner-schedule.schema.js +26 -0
  219. package/dist/models/practitioner-schedule/practitioner-schedule.schema.js.map +1 -0
  220. package/dist/models/practitioner-session/index.d.ts +4 -0
  221. package/dist/models/practitioner-session/index.d.ts.map +1 -0
  222. package/dist/models/practitioner-session/index.js +4 -0
  223. package/dist/models/practitioner-session/index.js.map +1 -0
  224. package/dist/models/practitioner-session/practitioner-session-minimal.schema.d.ts +14 -0
  225. package/dist/models/practitioner-session/practitioner-session-minimal.schema.d.ts.map +1 -0
  226. package/dist/models/practitioner-session/practitioner-session-minimal.schema.js +13 -0
  227. package/dist/models/practitioner-session/practitioner-session-minimal.schema.js.map +1 -0
  228. package/dist/models/practitioner-session/practitioner-session-partial.schema.d.ts +14 -0
  229. package/dist/models/practitioner-session/practitioner-session-partial.schema.d.ts.map +1 -0
  230. package/dist/models/practitioner-session/practitioner-session-partial.schema.js +6 -0
  231. package/dist/models/practitioner-session/practitioner-session-partial.schema.js.map +1 -0
  232. package/dist/models/practitioner-session/practitioner-session.schema.d.ts +80 -0
  233. package/dist/models/practitioner-session/practitioner-session.schema.d.ts.map +1 -0
  234. package/dist/models/practitioner-session/practitioner-session.schema.js +26 -0
  235. package/dist/models/practitioner-session/practitioner-session.schema.js.map +1 -0
  236. package/dist/models/queue/index.d.ts +5 -0
  237. package/dist/models/queue/index.d.ts.map +1 -0
  238. package/dist/models/queue/index.js +5 -0
  239. package/dist/models/queue/index.js.map +1 -0
  240. package/dist/models/queue/queue-minimal.schema.d.ts +31 -0
  241. package/dist/models/queue/queue-minimal.schema.d.ts.map +1 -0
  242. package/dist/models/queue/queue-minimal.schema.js +13 -0
  243. package/dist/models/queue/queue-minimal.schema.js.map +1 -0
  244. package/dist/models/queue/queue-partial.schema.d.ts +31 -0
  245. package/dist/models/queue/queue-partial.schema.d.ts.map +1 -0
  246. package/dist/models/queue/queue-partial.schema.js +6 -0
  247. package/dist/models/queue/queue-partial.schema.js.map +1 -0
  248. package/dist/models/queue/queue-settings.schema.d.ts +27 -0
  249. package/dist/models/queue/queue-settings.schema.d.ts.map +1 -0
  250. package/dist/models/queue/queue-settings.schema.js +22 -0
  251. package/dist/models/queue/queue-settings.schema.js.map +1 -0
  252. package/dist/models/queue/queue.schema.d.ts +97 -0
  253. package/dist/models/queue/queue.schema.d.ts.map +1 -0
  254. package/dist/models/queue/queue.schema.js +32 -0
  255. package/dist/models/queue/queue.schema.js.map +1 -0
  256. package/dist/models/queue-event-log/index.d.ts +4 -0
  257. package/dist/models/queue-event-log/index.d.ts.map +1 -0
  258. package/dist/models/queue-event-log/index.js +4 -0
  259. package/dist/models/queue-event-log/index.js.map +1 -0
  260. package/dist/models/queue-event-log/queue-event-log-minimal.schema.d.ts +18 -0
  261. package/dist/models/queue-event-log/queue-event-log-minimal.schema.d.ts.map +1 -0
  262. package/dist/models/queue-event-log/queue-event-log-minimal.schema.js +13 -0
  263. package/dist/models/queue-event-log/queue-event-log-minimal.schema.js.map +1 -0
  264. package/dist/models/queue-event-log/queue-event-log-partial.schema.d.ts +18 -0
  265. package/dist/models/queue-event-log/queue-event-log-partial.schema.d.ts.map +1 -0
  266. package/dist/models/queue-event-log/queue-event-log-partial.schema.js +6 -0
  267. package/dist/models/queue-event-log/queue-event-log-partial.schema.js.map +1 -0
  268. package/dist/models/queue-event-log/queue-event-log.schema.d.ts +84 -0
  269. package/dist/models/queue-event-log/queue-event-log.schema.d.ts.map +1 -0
  270. package/dist/models/queue-event-log/queue-event-log.schema.js +25 -0
  271. package/dist/models/queue-event-log/queue-event-log.schema.js.map +1 -0
  272. package/dist/models/queue-number/index.d.ts +5 -0
  273. package/dist/models/queue-number/index.d.ts.map +1 -0
  274. package/dist/models/queue-number/index.js +5 -0
  275. package/dist/models/queue-number/index.js.map +1 -0
  276. package/dist/models/queue-number/queue-number-minimal.schema.d.ts +21 -0
  277. package/dist/models/queue-number/queue-number-minimal.schema.d.ts.map +1 -0
  278. package/dist/models/queue-number/queue-number-minimal.schema.js +14 -0
  279. package/dist/models/queue-number/queue-number-minimal.schema.js.map +1 -0
  280. package/dist/models/queue-number/queue-number-partial.schema.d.ts +21 -0
  281. package/dist/models/queue-number/queue-number-partial.schema.d.ts.map +1 -0
  282. package/dist/models/queue-number/queue-number-partial.schema.js +6 -0
  283. package/dist/models/queue-number/queue-number-partial.schema.js.map +1 -0
  284. package/dist/models/queue-number/queue-number-settings.schema.d.ts +27 -0
  285. package/dist/models/queue-number/queue-number-settings.schema.d.ts.map +1 -0
  286. package/dist/models/queue-number/queue-number-settings.schema.js +22 -0
  287. package/dist/models/queue-number/queue-number-settings.schema.js.map +1 -0
  288. package/dist/models/queue-number/queue-number.schema.d.ts +88 -0
  289. package/dist/models/queue-number/queue-number.schema.d.ts.map +1 -0
  290. package/dist/models/queue-number/queue-number.schema.js +42 -0
  291. package/dist/models/queue-number/queue-number.schema.js.map +1 -0
  292. package/dist/models/settings/index.d.ts +4 -0
  293. package/dist/models/settings/index.d.ts.map +1 -0
  294. package/dist/models/settings/index.js +4 -0
  295. package/dist/models/settings/index.js.map +1 -0
  296. package/dist/models/settings/settings-minimal.schema.d.ts +26 -0
  297. package/dist/models/settings/settings-minimal.schema.d.ts.map +1 -0
  298. package/dist/models/settings/settings-minimal.schema.js +11 -0
  299. package/dist/models/settings/settings-minimal.schema.js.map +1 -0
  300. package/dist/models/settings/settings-partial.schema.d.ts +26 -0
  301. package/dist/models/settings/settings-partial.schema.d.ts.map +1 -0
  302. package/dist/models/settings/settings-partial.schema.js +6 -0
  303. package/dist/models/settings/settings-partial.schema.js.map +1 -0
  304. package/dist/models/settings/settings.schema.d.ts +96 -0
  305. package/dist/models/settings/settings.schema.d.ts.map +1 -0
  306. package/dist/models/settings/settings.schema.js +25 -0
  307. package/dist/models/settings/settings.schema.js.map +1 -0
  308. package/dist/models/staff/index.d.ts +4 -0
  309. package/dist/models/staff/index.d.ts.map +1 -0
  310. package/dist/models/staff/index.js +4 -0
  311. package/dist/models/staff/index.js.map +1 -0
  312. package/dist/models/staff/staff-minimal.schema.d.ts +27 -0
  313. package/dist/models/staff/staff-minimal.schema.d.ts.map +1 -0
  314. package/dist/models/staff/staff-minimal.schema.js +13 -0
  315. package/dist/models/staff/staff-minimal.schema.js.map +1 -0
  316. package/dist/models/staff/staff-partial.schema.d.ts +27 -0
  317. package/dist/models/staff/staff-partial.schema.d.ts.map +1 -0
  318. package/dist/models/staff/staff-partial.schema.js +6 -0
  319. package/dist/models/staff/staff-partial.schema.js.map +1 -0
  320. package/dist/models/staff/staff.schema.d.ts +93 -0
  321. package/dist/models/staff/staff.schema.d.ts.map +1 -0
  322. package/dist/models/staff/staff.schema.js +25 -0
  323. package/dist/models/staff/staff.schema.js.map +1 -0
  324. package/dist/models/unit/index.d.ts +4 -0
  325. package/dist/models/unit/index.d.ts.map +1 -0
  326. package/dist/models/unit/index.js +4 -0
  327. package/dist/models/unit/index.js.map +1 -0
  328. package/dist/models/unit/unit-minimal.schema.d.ts +27 -0
  329. package/dist/models/unit/unit-minimal.schema.d.ts.map +1 -0
  330. package/dist/models/unit/unit-minimal.schema.js +13 -0
  331. package/dist/models/unit/unit-minimal.schema.js.map +1 -0
  332. package/dist/models/unit/unit-partial.schema.d.ts +27 -0
  333. package/dist/models/unit/unit-partial.schema.d.ts.map +1 -0
  334. package/dist/models/unit/unit-partial.schema.js +6 -0
  335. package/dist/models/unit/unit-partial.schema.js.map +1 -0
  336. package/dist/models/unit/unit.schema.d.ts +93 -0
  337. package/dist/models/unit/unit.schema.d.ts.map +1 -0
  338. package/dist/models/unit/unit.schema.js +27 -0
  339. package/dist/models/unit/unit.schema.js.map +1 -0
  340. package/dist/models/user/index.d.ts +5 -0
  341. package/dist/models/user/index.d.ts.map +1 -0
  342. package/dist/models/user/index.js +5 -0
  343. package/dist/models/user/index.js.map +1 -0
  344. package/dist/models/user/user-minimal.schema.d.ts +65 -0
  345. package/dist/models/user/user-minimal.schema.d.ts.map +1 -0
  346. package/dist/models/user/user-minimal.schema.js +10 -0
  347. package/dist/models/user/user-minimal.schema.js.map +1 -0
  348. package/dist/models/user/user-partial.schema.d.ts +65 -0
  349. package/dist/models/user/user-partial.schema.d.ts.map +1 -0
  350. package/dist/models/user/user-partial.schema.js +6 -0
  351. package/dist/models/user/user-partial.schema.js.map +1 -0
  352. package/dist/models/user/user-settings.schema.d.ts +8 -0
  353. package/dist/models/user/user-settings.schema.d.ts.map +1 -0
  354. package/dist/models/user/user-settings.schema.js +7 -0
  355. package/dist/models/user/user-settings.schema.js.map +1 -0
  356. package/dist/models/user/user.schema.d.ts +134 -0
  357. package/dist/models/user/user.schema.d.ts.map +1 -0
  358. package/dist/models/{user.js → user/user.schema.js} +10 -30
  359. package/dist/models/user/user.schema.js.map +1 -0
  360. package/package.json +14 -2
  361. package/dist/example.test.d.ts +0 -6
  362. package/dist/example.test.d.ts.map +0 -1
  363. package/dist/example.test.js +0 -147
  364. package/dist/example.test.js.map +0 -1
  365. package/dist/models/settings.d.ts +0 -189
  366. package/dist/models/settings.d.ts.map +0 -1
  367. package/dist/models/settings.js +0 -34
  368. package/dist/models/settings.js.map +0 -1
  369. package/dist/models/user.d.ts +0 -1110
  370. package/dist/models/user.d.ts.map +0 -1
  371. package/dist/models/user.js.map +0 -1
package/README.md CHANGED
@@ -14,6 +14,8 @@ pnpm add @centricare/contract
14
14
 
15
15
  ## Usage
16
16
 
17
+ Import from the package root (all schemas):
18
+
17
19
  ```ts
18
20
  import { userSchema, User } from "@centricare/contract";
19
21
 
@@ -27,37 +29,50 @@ if (!result.success) {
27
29
  const user: User = result.data;
28
30
  ```
29
31
 
30
- ## Schemas
32
+ Import from a specific model subpath:
31
33
 
32
- | Schema | File | Description |
33
- | --------------------- | ------------------------------- | ------------------------------------------------------------------------ |
34
- | `timestampSchema` | `src/commons/timestamp.ts` | ISO date string |
35
- | `apiResponseSchema` | `src/commons/api-response.ts` | Standardized API response envelope |
36
- | `metadataSchema` | `src/commons/api-response.ts` | Pagination metadata (total, offset, limit, next, previous) |
37
- | `codedConceptSchema` | `src/commons/coded-concept.ts` | Coded system value (system, value, display, valid, tags) |
38
- | `settingOptionSchema` | `src/commons/setting-option.ts` | Single setting option item |
39
- | `userSchema` | `src/models/user.ts` | User record (full_name, email, statuses, identifiers, demographic, etc.) |
40
- | `settingsSchema` | `src/models/settings.ts` | Settings / preferences record |
34
+ ```ts
35
+ import { departmentSchema, Department } from "@centricare/contract/department";
36
+ ```
41
37
 
42
- ### Folder structure
38
+ ## Folder structure
43
39
 
44
40
  ```
45
41
  src/
46
- ├── commons/ # Shared/primitive schemas (one file per schema)
42
+ ├── index.ts # Package root barrel export (@centricare/contract)
43
+ ├── commons/ # Shared/primitive schemas (one file per schema)
44
+ │ ├── index.ts
47
45
  │ ├── timestamp.ts
48
46
  │ ├── api-response.ts
49
47
  │ ├── setting-option.ts
50
48
  │ ├── coded-concept.ts
51
- │ └── index.ts
52
- ├── models/ # Data entity schemas
53
- │ ├── user.ts
54
- │ ├── settings.ts
55
- │ └── index.ts
56
- ├── index.ts # Package root export
57
- └── example.test.ts
49
+ │ ├── address.ts
50
+ │ └── demographic.ts
51
+ └── models/ # Data entity schemas (one folder per model)
52
+ ├── index.ts
53
+ ├── user/
54
+ │ ├── index.ts
55
+ │ ├── user.schema.ts # Full schema + User type
56
+ │ ├── user-minimal.schema.ts # Omit server-generated fields + UserMinimal type
57
+ │ ├── user-partial.schema.ts # Based on minimal, all optional + UserPartial type
58
+ │ ├── user-settings.schema.ts # Settings schema (if model has settings)
59
+ │ └── ... (other schemas as needed)
60
+ ├── settings/
61
+ │ ├── index.ts
62
+ │ ├── settings.schema.ts
63
+ │ ├── settings-minimal.schema.ts
64
+ │ ├── settings-partial.schema.ts
65
+ │ └── ...
66
+ └── ... (one folder per model)
58
67
  ```
59
68
 
60
- Add new shared schemas under `src/commons/` (one file each) and new entity schemas under `src/models/`. Re-export both from `src/index.ts`.
69
+ Add new shared schemas under `src/commons/` (one file each) and new entity models under `src/models/<model>/`. Each model folder contains an `index.ts` barrel and the following schema files:
70
+ - `<model>.schema.ts` — Full schema definition
71
+ - `<model>-minimal.schema.ts` — Omits server-generated fields
72
+ - `<model>-partial.schema.ts` — Based on minimal, all fields optional
73
+ - `<model>-settings.schema.ts` — Settings schema (only if model has settings)
74
+
75
+ Re-export model folders from `src/models/index.ts`.
61
76
 
62
77
  ## Development
63
78
 
@@ -80,21 +95,26 @@ If you are an AI agent contributing to this package, read [`AGENTS.md`](./AGENTS
80
95
 
81
96
  ### Without an AI agent
82
97
 
83
- 1. **Create a new schema file**
98
+ 1. **Create a new model folder**
84
99
  - Shared/primitive schema → `src/commons/<name>.ts` (one file per schema, kebab-case)
85
- - Data entity schema → `src/models/<name>.ts`
100
+ - Data entity model → `src/models/<model>/` with the following files:
101
+ - `<model>.schema.ts` — Full schema definition
102
+ - `<model>-minimal.schema.ts` — Omits server-generated fields
103
+ - `<model>-partial.schema.ts` — Based on minimal, all fields optional
104
+ - `<model>-settings.schema.ts` — Settings schema (if model has settings)
105
+ - `index.ts` — Barrel export
86
106
 
87
107
  2. **Follow the code conventions**
88
108
  - Every Zod schema must export an inferred TypeScript type: `export type X = z.infer<typeof xSchema>;`
89
109
  - Use `message` (not `error`) for custom Zod error messages
90
110
  - Use `z.coerce.number()` for query-string parameters
91
- - Omit auto-generated fields (`_id`, `id`, `created_at`, `updated_at`, `updated_by`, `schema_version`) from `create` and `update` schemas
111
+ - Omit auto-generated fields (`_id`, `id`, `created_at`, `updated_at`, `updated_by`, `schema_version`) from minimal schemas
92
112
  - Use `.nullable()` for fields that can be `null` but must be present; use `.optional()` for fields that may be absent
93
113
 
94
114
  3. **Register the schema**
95
- - Add `export * from "./<name>";` to the appropriate barrel file (`src/commons/index.ts` or `src/models/index.ts`)
96
- - The root `src/index.ts` re-exports both, so no change is needed there unless you add a new top-level folder
115
+ - Add `export * from "./<model>";` to `src/models/index.ts`
116
+ - The root `src/index.ts` re-exports `./commons` and `./models`, so no change is needed there
97
117
 
98
118
  4. **Build and verify**
99
119
  - Run `npm run build` to compile TypeScript to `dist/`
100
- - Add validation examples to `src/example.test.ts` for new schemas
120
+ - Add validation examples to `EXAMPLES.md` for new schemas
@@ -0,0 +1,35 @@
1
+ import { z } from "zod";
2
+ export declare const addressSchema: z.ZodObject<{
3
+ street: z.ZodString;
4
+ subdistrict: z.ZodObject<{
5
+ system: z.ZodString;
6
+ value: z.ZodString;
7
+ display: z.ZodOptional<z.ZodString>;
8
+ valid: z.ZodOptional<z.ZodString>;
9
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
10
+ }, z.core.$strip>;
11
+ district: z.ZodObject<{
12
+ system: z.ZodString;
13
+ value: z.ZodString;
14
+ display: z.ZodOptional<z.ZodString>;
15
+ valid: z.ZodOptional<z.ZodString>;
16
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
17
+ }, z.core.$strip>;
18
+ city: z.ZodObject<{
19
+ system: z.ZodString;
20
+ value: z.ZodString;
21
+ display: z.ZodOptional<z.ZodString>;
22
+ valid: z.ZodOptional<z.ZodString>;
23
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
24
+ }, z.core.$strip>;
25
+ province: z.ZodObject<{
26
+ system: z.ZodString;
27
+ value: z.ZodString;
28
+ display: z.ZodOptional<z.ZodString>;
29
+ valid: z.ZodOptional<z.ZodString>;
30
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ }, z.core.$strip>;
32
+ postal_code: z.ZodOptional<z.ZodString>;
33
+ }, z.core.$strip>;
34
+ export type Address = z.infer<typeof addressSchema>;
35
+ //# sourceMappingURL=address.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src/commons/address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { z } from "zod";
2
+ import { codedConceptSchema } from "./coded-concept";
3
+ export const addressSchema = z.object({
4
+ street: z.string().min(1, { message: "street is required" }),
5
+ subdistrict: codedConceptSchema,
6
+ district: codedConceptSchema,
7
+ city: codedConceptSchema,
8
+ province: codedConceptSchema,
9
+ postal_code: z.string().optional(),
10
+ });
11
+ //# sourceMappingURL=address.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.js","sourceRoot":"","sources":["../../src/commons/address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAC5D,WAAW,EAAE,kBAAkB;IAC/B,QAAQ,EAAE,kBAAkB;IAC5B,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,kBAAkB;IAC5B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC"}
@@ -8,19 +8,7 @@ export declare const metadataSchema: z.ZodObject<{
8
8
  limit: z.ZodNumber;
9
9
  next: z.ZodNullable<z.ZodString>;
10
10
  previous: z.ZodNullable<z.ZodString>;
11
- }, "strip", z.ZodTypeAny, {
12
- offset: number;
13
- total: number;
14
- limit: number;
15
- next: string | null;
16
- previous: string | null;
17
- }, {
18
- offset: number;
19
- total: number;
20
- limit: number;
21
- next: string | null;
22
- previous: string | null;
23
- }>;
11
+ }, z.core.$strip>;
24
12
  export type Metadata = z.infer<typeof metadataSchema>;
25
13
  /**
26
14
  * Standardized API response envelope used by CentriCare services.
@@ -44,51 +32,15 @@ export declare const apiResponseSchema: <T extends z.ZodTypeAny>(dataSchema: T)
44
32
  success: z.ZodBoolean;
45
33
  message: z.ZodString;
46
34
  status_code: z.ZodString;
47
- data: z.ZodArray<T, "many">;
35
+ data: z.ZodArray<T>;
48
36
  metadata: z.ZodObject<{
49
37
  total: z.ZodNumber;
50
38
  offset: z.ZodNumber;
51
39
  limit: z.ZodNumber;
52
40
  next: z.ZodNullable<z.ZodString>;
53
41
  previous: z.ZodNullable<z.ZodString>;
54
- }, "strip", z.ZodTypeAny, {
55
- offset: number;
56
- total: number;
57
- limit: number;
58
- next: string | null;
59
- previous: string | null;
60
- }, {
61
- offset: number;
62
- total: number;
63
- limit: number;
64
- next: string | null;
65
- previous: string | null;
66
- }>;
67
- }, "strip", z.ZodTypeAny, {
68
- message: string;
69
- success: boolean;
70
- status_code: string;
71
- data: T["_output"][];
72
- metadata: {
73
- offset: number;
74
- total: number;
75
- limit: number;
76
- next: string | null;
77
- previous: string | null;
78
- };
79
- }, {
80
- message: string;
81
- success: boolean;
82
- status_code: string;
83
- data: T["_input"][];
84
- metadata: {
85
- offset: number;
86
- total: number;
87
- limit: number;
88
- next: string | null;
89
- previous: string | null;
90
- };
91
- }>;
42
+ }, z.core.$strip>;
43
+ }, z.core.$strip>;
92
44
  export type ApiResponse<T> = {
93
45
  success: boolean;
94
46
  message: string;
@@ -101,78 +53,18 @@ export type ApiResponse<T> = {
101
53
  * For single-resource requests, metadata.total is always 1,
102
54
  * offset and limit default to 0, and next/previous are null.
103
55
  */
104
- export declare const singleResourceResponseSchema: <T extends z.ZodTypeAny>(dataSchema: T) => z.ZodEffects<z.ZodObject<{
56
+ export declare const singleResourceResponseSchema: <T extends z.ZodTypeAny>(dataSchema: T) => z.ZodObject<{
105
57
  success: z.ZodBoolean;
106
58
  message: z.ZodString;
107
59
  status_code: z.ZodString;
108
- data: z.ZodArray<T, "many">;
60
+ data: z.ZodArray<T>;
109
61
  metadata: z.ZodObject<{
110
62
  total: z.ZodNumber;
111
63
  offset: z.ZodNumber;
112
64
  limit: z.ZodNumber;
113
65
  next: z.ZodNullable<z.ZodString>;
114
66
  previous: z.ZodNullable<z.ZodString>;
115
- }, "strip", z.ZodTypeAny, {
116
- offset: number;
117
- total: number;
118
- limit: number;
119
- next: string | null;
120
- previous: string | null;
121
- }, {
122
- offset: number;
123
- total: number;
124
- limit: number;
125
- next: string | null;
126
- previous: string | null;
127
- }>;
128
- }, "strip", z.ZodTypeAny, {
129
- message: string;
130
- success: boolean;
131
- status_code: string;
132
- data: T["_output"][];
133
- metadata: {
134
- offset: number;
135
- total: number;
136
- limit: number;
137
- next: string | null;
138
- previous: string | null;
139
- };
140
- }, {
141
- message: string;
142
- success: boolean;
143
- status_code: string;
144
- data: T["_input"][];
145
- metadata: {
146
- offset: number;
147
- total: number;
148
- limit: number;
149
- next: string | null;
150
- previous: string | null;
151
- };
152
- }>, {
153
- message: string;
154
- success: boolean;
155
- status_code: string;
156
- data: T["_output"][];
157
- metadata: {
158
- offset: number;
159
- total: number;
160
- limit: number;
161
- next: string | null;
162
- previous: string | null;
163
- };
164
- }, {
165
- message: string;
166
- success: boolean;
167
- status_code: string;
168
- data: T["_input"][];
169
- metadata: {
170
- offset: number;
171
- total: number;
172
- limit: number;
173
- next: string | null;
174
- previous: string | null;
175
- };
176
- }>;
67
+ }, z.core.$strip>;
68
+ }, z.core.$strip>;
177
69
  export type SingleResourceResponse<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof singleResourceResponseSchema<T>>>;
178
70
  //# sourceMappingURL=api-response.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-response.d.ts","sourceRoot":"","sources":["../../src/commons/api-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;EAMzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOnE,CAAC;AAEL,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EACjE,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaZ,CAAC;AAEJ,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,KAAK,CAClE,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC,CAAC,CAAC,CACnD,CAAC"}
1
+ {"version":3,"file":"api-response.d.ts","sourceRoot":"","sources":["../../src/commons/api-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;iBAMzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,YAAY,CAAC;;;;;;;;;;;;iBAOnE,CAAC;AAEL,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EACjE,YAAY,CAAC;;;;;;;;;;;;iBAaZ,CAAC;AAEJ,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,KAAK,CAClE,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC,CAAC,CAAC,CACnD,CAAC"}
@@ -9,20 +9,8 @@ export declare const codedConceptSchema: z.ZodObject<{
9
9
  system: z.ZodString;
10
10
  value: z.ZodString;
11
11
  display: z.ZodOptional<z.ZodString>;
12
- valid: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
13
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
14
- }, "strip", z.ZodTypeAny, {
15
- value: string;
16
- system: string;
17
- valid?: string | undefined;
18
- display?: string | undefined;
19
- tags?: string[] | undefined;
20
- }, {
21
- value: string;
22
- system: string;
23
- valid?: string | undefined;
24
- display?: string | undefined;
25
- tags?: string[] | undefined;
26
- }>;
12
+ valid: z.ZodOptional<z.ZodString>;
13
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
+ }, z.core.$strip>;
27
15
  export type CodedConcept = z.infer<typeof codedConceptSchema>;
28
16
  //# sourceMappingURL=coded-concept.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"coded-concept.d.ts","sourceRoot":"","sources":["../../src/commons/coded-concept.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;EAa7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
1
+ {"version":3,"file":"coded-concept.d.ts","sourceRoot":"","sources":["../../src/commons/coded-concept.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;iBAa7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ import z from "zod";
2
+ export declare const demographicSchema: z.ZodObject<{
3
+ sex: z.ZodObject<{
4
+ system: z.ZodString;
5
+ value: z.ZodString;
6
+ display: z.ZodOptional<z.ZodString>;
7
+ valid: z.ZodOptional<z.ZodString>;
8
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
+ }, z.core.$strip>;
10
+ religion: z.ZodObject<{
11
+ system: z.ZodString;
12
+ value: z.ZodString;
13
+ display: z.ZodOptional<z.ZodString>;
14
+ valid: z.ZodOptional<z.ZodString>;
15
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
+ }, z.core.$strip>;
17
+ ethnicity: z.ZodOptional<z.ZodString>;
18
+ marital_status: z.ZodObject<{
19
+ system: z.ZodString;
20
+ value: z.ZodString;
21
+ display: z.ZodOptional<z.ZodString>;
22
+ valid: z.ZodOptional<z.ZodString>;
23
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
24
+ }, z.core.$strip>;
25
+ date_of_birth: z.ZodString;
26
+ place_of_birth: z.ZodOptional<z.ZodString>;
27
+ }, z.core.$strip>;
28
+ export type Demographic = z.infer<typeof demographicSchema>;
29
+ //# sourceMappingURL=demographic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demographic.d.ts","sourceRoot":"","sources":["../../src/commons/demographic.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;iBAO5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import z from "zod";
2
+ import { codedConceptSchema } from "./coded-concept";
3
+ export const demographicSchema = z.object({
4
+ sex: codedConceptSchema,
5
+ religion: codedConceptSchema,
6
+ ethnicity: z.string().optional(),
7
+ marital_status: codedConceptSchema,
8
+ date_of_birth: z.string(),
9
+ place_of_birth: z.string().optional(),
10
+ });
11
+ //# sourceMappingURL=demographic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demographic.js","sourceRoot":"","sources":["../../src/commons/demographic.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,GAAG,EAAE,kBAAkB;IACvB,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,cAAc,EAAE,kBAAkB;IAClC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC"}
@@ -6,4 +6,7 @@ export * from "./timestamp";
6
6
  export * from "./api-response";
7
7
  export * from "./setting-option";
8
8
  export * from "./coded-concept";
9
+ export * from "./demographic";
10
+ export * from "./address";
11
+ export * from "./object-id";
9
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commons/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commons/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
@@ -6,4 +6,7 @@ export * from "./timestamp";
6
6
  export * from "./api-response";
7
7
  export * from "./setting-option";
8
8
  export * from "./coded-concept";
9
+ export * from "./demographic";
10
+ export * from "./address";
11
+ export * from "./object-id";
9
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commons/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commons/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * ObjectId schema for MongoDB document IDs.
4
+ * Validates a 24-character hexadecimal string (MongoDB ObjectId format).
5
+ */
6
+ export declare const objectIdSchema: z.ZodString;
7
+ export type ObjectId = string;
8
+ //# sourceMappingURL=object-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object-id.d.ts","sourceRoot":"","sources":["../../src/commons/object-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,cAAc,aAIzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * ObjectId schema for MongoDB document IDs.
4
+ * Validates a 24-character hexadecimal string (MongoDB ObjectId format).
5
+ */
6
+ export const objectIdSchema = z.string().length(24, {
7
+ message: "ObjectId must be a 24-character hexadecimal string",
8
+ }).regex(/^[0-9a-fA-F]{24}$/, {
9
+ message: "ObjectId must be a valid MongoDB ObjectId (24-character hex string)",
10
+ });
11
+ //# sourceMappingURL=object-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object-id.js","sourceRoot":"","sources":["../../src/commons/object-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE;IAClD,OAAO,EAAE,oDAAoD;CAC9D,CAAC,CAAC,KAAK,CAAC,mBAAmB,EAAE;IAC5B,OAAO,EAAE,qEAAqE;CAC/E,CAAC,CAAC"}
@@ -7,7 +7,17 @@ import { z } from "zod";
7
7
  * path (e.g. "crn:status:system") for options whose input type is determined
8
8
  * by a registry code system.
9
9
  */
10
- export declare const settingOptionTypeSchema: z.ZodUnion<[z.ZodEnum<["string", "number", "boolean", "date"]>, z.ZodArray<z.ZodEnum<["string", "number", "boolean", "date"]>, "many">, z.ZodString]>;
10
+ export declare const settingOptionTypeSchema: z.ZodUnion<readonly [z.ZodEnum<{
11
+ string: "string";
12
+ number: "number";
13
+ boolean: "boolean";
14
+ date: "date";
15
+ }>, z.ZodArray<z.ZodEnum<{
16
+ string: "string";
17
+ number: "number";
18
+ boolean: "boolean";
19
+ date: "date";
20
+ }>>, z.ZodString]>;
11
21
  export type SettingOptionType = z.infer<typeof settingOptionTypeSchema>;
12
22
  /**
13
23
  * A single setting option item.
@@ -17,21 +27,19 @@ export type SettingOptionType = z.infer<typeof settingOptionTypeSchema>;
17
27
  export declare const settingOptionSchema: z.ZodObject<{
18
28
  field: z.ZodString;
19
29
  label: z.ZodOptional<z.ZodString>;
20
- type: z.ZodUnion<[z.ZodEnum<["string", "number", "boolean", "date"]>, z.ZodArray<z.ZodEnum<["string", "number", "boolean", "date"]>, "many">, z.ZodString]>;
30
+ type: z.ZodUnion<readonly [z.ZodEnum<{
31
+ string: "string";
32
+ number: "number";
33
+ boolean: "boolean";
34
+ date: "date";
35
+ }>, z.ZodArray<z.ZodEnum<{
36
+ string: "string";
37
+ number: "number";
38
+ boolean: "boolean";
39
+ date: "date";
40
+ }>>, z.ZodString]>;
21
41
  default: z.ZodNullable<z.ZodString>;
22
- value: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNumber]>>;
23
- }, "strip", z.ZodTypeAny, {
24
- value: string | number | boolean | null;
25
- type: string | ("string" | "number" | "boolean" | "date")[];
26
- field: string;
27
- default: string | null;
28
- label?: string | undefined;
29
- }, {
30
- value: string | number | boolean | null;
31
- type: string | ("string" | "number" | "boolean" | "date")[];
32
- field: string;
33
- default: string | null;
34
- label?: string | undefined;
35
- }>;
42
+ value: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>;
43
+ }, z.core.$strip>;
36
44
  export type SettingOption = z.infer<typeof settingOptionSchema>;
37
45
  //# sourceMappingURL=setting-option.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setting-option.d.ts","sourceRoot":"","sources":["../../src/commons/setting-option.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,uJAIlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;EAM9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"setting-option.d.ts","sourceRoot":"","sources":["../../src/commons/setting-option.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;kBAIlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;iBAM9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Minimal assignment schema (omits server-generated fields).
4
+ */
5
+ export declare const assignmentMinimalSchema: z.ZodObject<{
6
+ type: z.ZodObject<{
7
+ system: z.ZodString;
8
+ value: z.ZodString;
9
+ display: z.ZodOptional<z.ZodString>;
10
+ valid: z.ZodOptional<z.ZodString>;
11
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
+ }, z.core.$strip>;
13
+ facility_id: z.ZodString;
14
+ for: z.ZodString;
15
+ assigned_to: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>;
16
+ }, z.core.$strip>;
17
+ export type AssignmentMinimal = z.infer<typeof assignmentMinimalSchema>;
18
+ //# sourceMappingURL=assignment-minimal.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assignment-minimal.schema.d.ts","sourceRoot":"","sources":["../../../src/models/assignment/assignment-minimal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;iBAOlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { assignmentSchema } from "./assignment.schema";
2
+ /**
3
+ * Minimal assignment schema (omits server-generated fields).
4
+ */
5
+ export const assignmentMinimalSchema = assignmentSchema.omit({
6
+ _id: true,
7
+ created_at: true,
8
+ created_by: true,
9
+ updated_at: true,
10
+ updated_by: true,
11
+ schema_version: true,
12
+ });
13
+ //# sourceMappingURL=assignment-minimal.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assignment-minimal.schema.js","sourceRoot":"","sources":["../../../src/models/assignment/assignment-minimal.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AAExE;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,IAAI,CAAC;IAC3D,GAAG,EAAE,IAAI;IACT,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,cAAc,EAAE,IAAI;CACrB,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Partial assignment schema (based on minimal, all fields optional).
4
+ */
5
+ export declare const assignmentPartialSchema: z.ZodObject<{
6
+ type: z.ZodOptional<z.ZodObject<{
7
+ system: z.ZodString;
8
+ value: z.ZodString;
9
+ display: z.ZodOptional<z.ZodString>;
10
+ valid: z.ZodOptional<z.ZodString>;
11
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
+ }, z.core.$strip>>;
13
+ facility_id: z.ZodOptional<z.ZodString>;
14
+ for: z.ZodOptional<z.ZodString>;
15
+ assigned_to: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>>;
16
+ }, z.core.$strip>;
17
+ export type AssignmentPartial = z.infer<typeof assignmentPartialSchema>;
18
+ //# sourceMappingURL=assignment-partial.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assignment-partial.schema.d.ts","sourceRoot":"","sources":["../../../src/models/assignment/assignment-partial.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;iBAAoC,CAAC;AAEzE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { assignmentMinimalSchema } from "./assignment-minimal.schema";
2
+ /**
3
+ * Partial assignment schema (based on minimal, all fields optional).
4
+ */
5
+ export const assignmentPartialSchema = assignmentMinimalSchema.partial();
6
+ //# sourceMappingURL=assignment-partial.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assignment-partial.schema.js","sourceRoot":"","sources":["../../../src/models/assignment/assignment-partial.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAA0B,MAAM,6BAA6B,CAAC;AAE9F;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC,OAAO,EAAE,CAAC"}