@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.
- package/README.md +46 -26
- package/dist/commons/address.d.ts +35 -0
- package/dist/commons/address.d.ts.map +1 -0
- package/dist/commons/address.js +11 -0
- package/dist/commons/address.js.map +1 -0
- package/dist/commons/api-response.d.ts +8 -116
- package/dist/commons/api-response.d.ts.map +1 -1
- package/dist/commons/coded-concept.d.ts +3 -15
- package/dist/commons/coded-concept.d.ts.map +1 -1
- package/dist/commons/demographic.d.ts +29 -0
- package/dist/commons/demographic.d.ts.map +1 -0
- package/dist/commons/demographic.js +11 -0
- package/dist/commons/demographic.js.map +1 -0
- package/dist/commons/index.d.ts +3 -0
- package/dist/commons/index.d.ts.map +1 -1
- package/dist/commons/index.js +3 -0
- package/dist/commons/index.js.map +1 -1
- package/dist/commons/object-id.d.ts +8 -0
- package/dist/commons/object-id.d.ts.map +1 -0
- package/dist/commons/object-id.js +11 -0
- package/dist/commons/object-id.js.map +1 -0
- package/dist/commons/setting-option.d.ts +24 -16
- package/dist/commons/setting-option.d.ts.map +1 -1
- package/dist/models/assignment/assignment-minimal.schema.d.ts +18 -0
- package/dist/models/assignment/assignment-minimal.schema.d.ts.map +1 -0
- package/dist/models/assignment/assignment-minimal.schema.js +13 -0
- package/dist/models/assignment/assignment-minimal.schema.js.map +1 -0
- package/dist/models/assignment/assignment-partial.schema.d.ts +18 -0
- package/dist/models/assignment/assignment-partial.schema.d.ts.map +1 -0
- package/dist/models/assignment/assignment-partial.schema.js +6 -0
- package/dist/models/assignment/assignment-partial.schema.js.map +1 -0
- package/dist/models/assignment/assignment.schema.d.ts +84 -0
- package/dist/models/assignment/assignment.schema.d.ts.map +1 -0
- package/dist/models/assignment/assignment.schema.js +27 -0
- package/dist/models/assignment/assignment.schema.js.map +1 -0
- package/dist/models/assignment/index.d.ts +4 -0
- package/dist/models/assignment/index.d.ts.map +1 -0
- package/dist/models/assignment/index.js +4 -0
- package/dist/models/assignment/index.js.map +1 -0
- package/dist/models/department/department-minimal.schema.d.ts +17 -0
- package/dist/models/department/department-minimal.schema.d.ts.map +1 -0
- package/dist/models/department/department-minimal.schema.js +13 -0
- package/dist/models/department/department-minimal.schema.js.map +1 -0
- package/dist/models/department/department-partial.schema.d.ts +17 -0
- package/dist/models/department/department-partial.schema.d.ts.map +1 -0
- package/dist/models/department/department-partial.schema.js +6 -0
- package/dist/models/department/department-partial.schema.js.map +1 -0
- package/dist/models/department/department.schema.d.ts +83 -0
- package/dist/models/department/department.schema.d.ts.map +1 -0
- package/dist/models/department/department.schema.js +20 -0
- package/dist/models/department/department.schema.js.map +1 -0
- package/dist/models/department/index.d.ts +4 -0
- package/dist/models/department/index.d.ts.map +1 -0
- package/dist/models/department/index.js +4 -0
- package/dist/models/department/index.js.map +1 -0
- package/dist/models/facility/facility-minimal.schema.d.ts +19 -0
- package/dist/models/facility/facility-minimal.schema.d.ts.map +1 -0
- package/dist/models/facility/facility-minimal.schema.js +10 -0
- package/dist/models/facility/facility-minimal.schema.js.map +1 -0
- package/dist/models/facility/facility-partial.schema.d.ts +19 -0
- package/dist/models/facility/facility-partial.schema.d.ts.map +1 -0
- package/dist/models/facility/facility-partial.schema.js +6 -0
- package/dist/models/facility/facility-partial.schema.js.map +1 -0
- package/dist/models/facility/facility-settings.schema.d.ts +16 -0
- package/dist/models/facility/facility-settings.schema.d.ts.map +1 -0
- package/dist/models/facility/facility-settings.schema.js +12 -0
- package/dist/models/facility/facility-settings.schema.js.map +1 -0
- package/dist/models/facility/facility.schema.d.ts +82 -0
- package/dist/models/facility/facility.schema.d.ts.map +1 -0
- package/dist/models/facility/facility.schema.js +23 -0
- package/dist/models/facility/facility.schema.js.map +1 -0
- package/dist/models/facility/index.d.ts +5 -0
- package/dist/models/facility/index.d.ts.map +1 -0
- package/dist/models/facility/index.js +5 -0
- package/dist/models/facility/index.js.map +1 -0
- package/dist/models/index.d.ts +17 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +17 -0
- package/dist/models/index.js.map +1 -1
- package/dist/models/ksm/index.d.ts +4 -0
- package/dist/models/ksm/index.d.ts.map +1 -0
- package/dist/models/ksm/index.js +4 -0
- package/dist/models/ksm/index.js.map +1 -0
- package/dist/models/ksm/ksm-minimal.schema.d.ts +12 -0
- package/dist/models/ksm/ksm-minimal.schema.d.ts.map +1 -0
- package/dist/models/ksm/ksm-minimal.schema.js +13 -0
- package/dist/models/ksm/ksm-minimal.schema.js.map +1 -0
- package/dist/models/ksm/ksm-partial.schema.d.ts +12 -0
- package/dist/models/ksm/ksm-partial.schema.d.ts.map +1 -0
- package/dist/models/ksm/ksm-partial.schema.js +6 -0
- package/dist/models/ksm/ksm-partial.schema.js.map +1 -0
- package/dist/models/ksm/ksm.schema.d.ts +78 -0
- package/dist/models/ksm/ksm.schema.d.ts.map +1 -0
- package/dist/models/ksm/ksm.schema.js +23 -0
- package/dist/models/ksm/ksm.schema.js.map +1 -0
- package/dist/models/location/index.d.ts +5 -0
- package/dist/models/location/index.d.ts.map +1 -0
- package/dist/models/location/index.js +5 -0
- package/dist/models/location/index.js.map +1 -0
- package/dist/models/location/location-minimal.schema.d.ts +33 -0
- package/dist/models/location/location-minimal.schema.d.ts.map +1 -0
- package/dist/models/location/location-minimal.schema.js +12 -0
- package/dist/models/location/location-minimal.schema.js.map +1 -0
- package/dist/models/location/location-partial.schema.d.ts +33 -0
- package/dist/models/location/location-partial.schema.d.ts.map +1 -0
- package/dist/models/location/location-partial.schema.js +6 -0
- package/dist/models/location/location-partial.schema.js.map +1 -0
- package/dist/models/location/location-settings.schema.d.ts +8 -0
- package/dist/models/location/location-settings.schema.d.ts.map +1 -0
- package/dist/models/location/location-settings.schema.js +7 -0
- package/dist/models/location/location-settings.schema.js.map +1 -0
- package/dist/models/location/location.schema.d.ts +98 -0
- package/dist/models/location/location.schema.d.ts.map +1 -0
- package/dist/models/location/location.schema.js +30 -0
- package/dist/models/location/location.schema.js.map +1 -0
- package/dist/models/member/index.d.ts +4 -0
- package/dist/models/member/index.d.ts.map +1 -0
- package/dist/models/member/index.js +4 -0
- package/dist/models/member/index.js.map +1 -0
- package/dist/models/member/member-minimal.schema.d.ts +11 -0
- package/dist/models/member/member-minimal.schema.d.ts.map +1 -0
- package/dist/models/member/member-minimal.schema.js +9 -0
- package/dist/models/member/member-minimal.schema.js.map +1 -0
- package/dist/models/member/member-partial.schema.d.ts +11 -0
- package/dist/models/member/member-partial.schema.d.ts.map +1 -0
- package/dist/models/member/member-partial.schema.js +6 -0
- package/dist/models/member/member-partial.schema.js.map +1 -0
- package/dist/models/member/member.schema.d.ts +73 -0
- package/dist/models/member/member.schema.d.ts.map +1 -0
- package/dist/models/member/member.schema.js +16 -0
- package/dist/models/member/member.schema.js.map +1 -0
- package/dist/models/organization/index.d.ts +5 -0
- package/dist/models/organization/index.d.ts.map +1 -0
- package/dist/models/organization/index.js +5 -0
- package/dist/models/organization/index.js.map +1 -0
- package/dist/models/organization/organization-minimal.schema.d.ts +22 -0
- package/dist/models/organization/organization-minimal.schema.d.ts.map +1 -0
- package/dist/models/organization/organization-minimal.schema.js +9 -0
- package/dist/models/organization/organization-minimal.schema.js.map +1 -0
- package/dist/models/organization/organization-partial.schema.d.ts +22 -0
- package/dist/models/organization/organization-partial.schema.d.ts.map +1 -0
- package/dist/models/organization/organization-partial.schema.js +6 -0
- package/dist/models/organization/organization-partial.schema.js.map +1 -0
- package/dist/models/organization/organization-settings.schema.d.ts +8 -0
- package/dist/models/organization/organization-settings.schema.d.ts.map +1 -0
- package/dist/models/organization/organization-settings.schema.js +7 -0
- package/dist/models/organization/organization-settings.schema.js.map +1 -0
- package/dist/models/organization/organization.schema.d.ts +84 -0
- package/dist/models/organization/organization.schema.d.ts.map +1 -0
- package/dist/models/organization/organization.schema.js +24 -0
- package/dist/models/organization/organization.schema.js.map +1 -0
- package/dist/models/patient/index.d.ts +4 -0
- package/dist/models/patient/index.d.ts.map +1 -0
- package/dist/models/patient/index.js +4 -0
- package/dist/models/patient/index.js.map +1 -0
- package/dist/models/patient/patient-minimal.schema.d.ts +95 -0
- package/dist/models/patient/patient-minimal.schema.d.ts.map +1 -0
- package/dist/models/patient/patient-minimal.schema.js +13 -0
- package/dist/models/patient/patient-minimal.schema.js.map +1 -0
- package/dist/models/patient/patient-partial.schema.d.ts +95 -0
- package/dist/models/patient/patient-partial.schema.d.ts.map +1 -0
- package/dist/models/patient/patient-partial.schema.js +6 -0
- package/dist/models/patient/patient-partial.schema.js.map +1 -0
- package/dist/models/patient/patient.schema.d.ts +161 -0
- package/dist/models/patient/patient.schema.d.ts.map +1 -0
- package/dist/models/patient/patient.schema.js +35 -0
- package/dist/models/patient/patient.schema.js.map +1 -0
- package/dist/models/patient-additional/index.d.ts +4 -0
- package/dist/models/patient-additional/index.d.ts.map +1 -0
- package/dist/models/patient-additional/index.js +4 -0
- package/dist/models/patient-additional/index.js.map +1 -0
- package/dist/models/patient-additional/patient-additional-minimal.schema.d.ts +17 -0
- package/dist/models/patient-additional/patient-additional-minimal.schema.d.ts.map +1 -0
- package/dist/models/patient-additional/patient-additional-minimal.schema.js +13 -0
- package/dist/models/patient-additional/patient-additional-minimal.schema.js.map +1 -0
- package/dist/models/patient-additional/patient-additional-partial.schema.d.ts +17 -0
- package/dist/models/patient-additional/patient-additional-partial.schema.d.ts.map +1 -0
- package/dist/models/patient-additional/patient-additional-partial.schema.js +6 -0
- package/dist/models/patient-additional/patient-additional-partial.schema.js.map +1 -0
- package/dist/models/patient-additional/patient-additional.schema.d.ts +83 -0
- package/dist/models/patient-additional/patient-additional.schema.d.ts.map +1 -0
- package/dist/models/patient-additional/patient-additional.schema.js +21 -0
- package/dist/models/patient-additional/patient-additional.schema.js.map +1 -0
- package/dist/models/payer/index.d.ts +5 -0
- package/dist/models/payer/index.d.ts.map +1 -0
- package/dist/models/payer/index.js +5 -0
- package/dist/models/payer/index.js.map +1 -0
- package/dist/models/payer/payer-minimal.schema.d.ts +67 -0
- package/dist/models/payer/payer-minimal.schema.d.ts.map +1 -0
- package/dist/models/payer/payer-minimal.schema.js +13 -0
- package/dist/models/payer/payer-minimal.schema.js.map +1 -0
- package/dist/models/payer/payer-partial.schema.d.ts +67 -0
- package/dist/models/payer/payer-partial.schema.d.ts.map +1 -0
- package/dist/models/payer/payer-partial.schema.js +6 -0
- package/dist/models/payer/payer-partial.schema.js.map +1 -0
- package/dist/models/payer/payer-settings.schema.d.ts +27 -0
- package/dist/models/payer/payer-settings.schema.d.ts.map +1 -0
- package/dist/models/payer/payer-settings.schema.js +20 -0
- package/dist/models/payer/payer-settings.schema.js.map +1 -0
- package/dist/models/payer/payer.schema.d.ts +133 -0
- package/dist/models/payer/payer.schema.d.ts.map +1 -0
- package/dist/models/payer/payer.schema.js +47 -0
- package/dist/models/payer/payer.schema.js.map +1 -0
- package/dist/models/practitioner-schedule/index.d.ts +4 -0
- package/dist/models/practitioner-schedule/index.d.ts.map +1 -0
- package/dist/models/practitioner-schedule/index.js +4 -0
- package/dist/models/practitioner-schedule/index.js.map +1 -0
- package/dist/models/practitioner-schedule/practitioner-schedule-minimal.schema.d.ts +20 -0
- package/dist/models/practitioner-schedule/practitioner-schedule-minimal.schema.d.ts.map +1 -0
- package/dist/models/practitioner-schedule/practitioner-schedule-minimal.schema.js +13 -0
- package/dist/models/practitioner-schedule/practitioner-schedule-minimal.schema.js.map +1 -0
- package/dist/models/practitioner-schedule/practitioner-schedule-partial.schema.d.ts +20 -0
- package/dist/models/practitioner-schedule/practitioner-schedule-partial.schema.d.ts.map +1 -0
- package/dist/models/practitioner-schedule/practitioner-schedule-partial.schema.js +6 -0
- package/dist/models/practitioner-schedule/practitioner-schedule-partial.schema.js.map +1 -0
- package/dist/models/practitioner-schedule/practitioner-schedule.schema.d.ts +86 -0
- package/dist/models/practitioner-schedule/practitioner-schedule.schema.d.ts.map +1 -0
- package/dist/models/practitioner-schedule/practitioner-schedule.schema.js +26 -0
- package/dist/models/practitioner-schedule/practitioner-schedule.schema.js.map +1 -0
- package/dist/models/practitioner-session/index.d.ts +4 -0
- package/dist/models/practitioner-session/index.d.ts.map +1 -0
- package/dist/models/practitioner-session/index.js +4 -0
- package/dist/models/practitioner-session/index.js.map +1 -0
- package/dist/models/practitioner-session/practitioner-session-minimal.schema.d.ts +14 -0
- package/dist/models/practitioner-session/practitioner-session-minimal.schema.d.ts.map +1 -0
- package/dist/models/practitioner-session/practitioner-session-minimal.schema.js +13 -0
- package/dist/models/practitioner-session/practitioner-session-minimal.schema.js.map +1 -0
- package/dist/models/practitioner-session/practitioner-session-partial.schema.d.ts +14 -0
- package/dist/models/practitioner-session/practitioner-session-partial.schema.d.ts.map +1 -0
- package/dist/models/practitioner-session/practitioner-session-partial.schema.js +6 -0
- package/dist/models/practitioner-session/practitioner-session-partial.schema.js.map +1 -0
- package/dist/models/practitioner-session/practitioner-session.schema.d.ts +80 -0
- package/dist/models/practitioner-session/practitioner-session.schema.d.ts.map +1 -0
- package/dist/models/practitioner-session/practitioner-session.schema.js +26 -0
- package/dist/models/practitioner-session/practitioner-session.schema.js.map +1 -0
- package/dist/models/queue/index.d.ts +5 -0
- package/dist/models/queue/index.d.ts.map +1 -0
- package/dist/models/queue/index.js +5 -0
- package/dist/models/queue/index.js.map +1 -0
- package/dist/models/queue/queue-minimal.schema.d.ts +31 -0
- package/dist/models/queue/queue-minimal.schema.d.ts.map +1 -0
- package/dist/models/queue/queue-minimal.schema.js +13 -0
- package/dist/models/queue/queue-minimal.schema.js.map +1 -0
- package/dist/models/queue/queue-partial.schema.d.ts +31 -0
- package/dist/models/queue/queue-partial.schema.d.ts.map +1 -0
- package/dist/models/queue/queue-partial.schema.js +6 -0
- package/dist/models/queue/queue-partial.schema.js.map +1 -0
- package/dist/models/queue/queue-settings.schema.d.ts +27 -0
- package/dist/models/queue/queue-settings.schema.d.ts.map +1 -0
- package/dist/models/queue/queue-settings.schema.js +22 -0
- package/dist/models/queue/queue-settings.schema.js.map +1 -0
- package/dist/models/queue/queue.schema.d.ts +97 -0
- package/dist/models/queue/queue.schema.d.ts.map +1 -0
- package/dist/models/queue/queue.schema.js +32 -0
- package/dist/models/queue/queue.schema.js.map +1 -0
- package/dist/models/queue-event-log/index.d.ts +4 -0
- package/dist/models/queue-event-log/index.d.ts.map +1 -0
- package/dist/models/queue-event-log/index.js +4 -0
- package/dist/models/queue-event-log/index.js.map +1 -0
- package/dist/models/queue-event-log/queue-event-log-minimal.schema.d.ts +18 -0
- package/dist/models/queue-event-log/queue-event-log-minimal.schema.d.ts.map +1 -0
- package/dist/models/queue-event-log/queue-event-log-minimal.schema.js +13 -0
- package/dist/models/queue-event-log/queue-event-log-minimal.schema.js.map +1 -0
- package/dist/models/queue-event-log/queue-event-log-partial.schema.d.ts +18 -0
- package/dist/models/queue-event-log/queue-event-log-partial.schema.d.ts.map +1 -0
- package/dist/models/queue-event-log/queue-event-log-partial.schema.js +6 -0
- package/dist/models/queue-event-log/queue-event-log-partial.schema.js.map +1 -0
- package/dist/models/queue-event-log/queue-event-log.schema.d.ts +84 -0
- package/dist/models/queue-event-log/queue-event-log.schema.d.ts.map +1 -0
- package/dist/models/queue-event-log/queue-event-log.schema.js +25 -0
- package/dist/models/queue-event-log/queue-event-log.schema.js.map +1 -0
- package/dist/models/queue-number/index.d.ts +5 -0
- package/dist/models/queue-number/index.d.ts.map +1 -0
- package/dist/models/queue-number/index.js +5 -0
- package/dist/models/queue-number/index.js.map +1 -0
- package/dist/models/queue-number/queue-number-minimal.schema.d.ts +21 -0
- package/dist/models/queue-number/queue-number-minimal.schema.d.ts.map +1 -0
- package/dist/models/queue-number/queue-number-minimal.schema.js +14 -0
- package/dist/models/queue-number/queue-number-minimal.schema.js.map +1 -0
- package/dist/models/queue-number/queue-number-partial.schema.d.ts +21 -0
- package/dist/models/queue-number/queue-number-partial.schema.d.ts.map +1 -0
- package/dist/models/queue-number/queue-number-partial.schema.js +6 -0
- package/dist/models/queue-number/queue-number-partial.schema.js.map +1 -0
- package/dist/models/queue-number/queue-number-settings.schema.d.ts +27 -0
- package/dist/models/queue-number/queue-number-settings.schema.d.ts.map +1 -0
- package/dist/models/queue-number/queue-number-settings.schema.js +22 -0
- package/dist/models/queue-number/queue-number-settings.schema.js.map +1 -0
- package/dist/models/queue-number/queue-number.schema.d.ts +88 -0
- package/dist/models/queue-number/queue-number.schema.d.ts.map +1 -0
- package/dist/models/queue-number/queue-number.schema.js +42 -0
- package/dist/models/queue-number/queue-number.schema.js.map +1 -0
- package/dist/models/settings/index.d.ts +4 -0
- package/dist/models/settings/index.d.ts.map +1 -0
- package/dist/models/settings/index.js +4 -0
- package/dist/models/settings/index.js.map +1 -0
- package/dist/models/settings/settings-minimal.schema.d.ts +26 -0
- package/dist/models/settings/settings-minimal.schema.d.ts.map +1 -0
- package/dist/models/settings/settings-minimal.schema.js +11 -0
- package/dist/models/settings/settings-minimal.schema.js.map +1 -0
- package/dist/models/settings/settings-partial.schema.d.ts +26 -0
- package/dist/models/settings/settings-partial.schema.d.ts.map +1 -0
- package/dist/models/settings/settings-partial.schema.js +6 -0
- package/dist/models/settings/settings-partial.schema.js.map +1 -0
- package/dist/models/settings/settings.schema.d.ts +96 -0
- package/dist/models/settings/settings.schema.d.ts.map +1 -0
- package/dist/models/settings/settings.schema.js +25 -0
- package/dist/models/settings/settings.schema.js.map +1 -0
- package/dist/models/staff/index.d.ts +4 -0
- package/dist/models/staff/index.d.ts.map +1 -0
- package/dist/models/staff/index.js +4 -0
- package/dist/models/staff/index.js.map +1 -0
- package/dist/models/staff/staff-minimal.schema.d.ts +27 -0
- package/dist/models/staff/staff-minimal.schema.d.ts.map +1 -0
- package/dist/models/staff/staff-minimal.schema.js +13 -0
- package/dist/models/staff/staff-minimal.schema.js.map +1 -0
- package/dist/models/staff/staff-partial.schema.d.ts +27 -0
- package/dist/models/staff/staff-partial.schema.d.ts.map +1 -0
- package/dist/models/staff/staff-partial.schema.js +6 -0
- package/dist/models/staff/staff-partial.schema.js.map +1 -0
- package/dist/models/staff/staff.schema.d.ts +93 -0
- package/dist/models/staff/staff.schema.d.ts.map +1 -0
- package/dist/models/staff/staff.schema.js +25 -0
- package/dist/models/staff/staff.schema.js.map +1 -0
- package/dist/models/unit/index.d.ts +4 -0
- package/dist/models/unit/index.d.ts.map +1 -0
- package/dist/models/unit/index.js +4 -0
- package/dist/models/unit/index.js.map +1 -0
- package/dist/models/unit/unit-minimal.schema.d.ts +27 -0
- package/dist/models/unit/unit-minimal.schema.d.ts.map +1 -0
- package/dist/models/unit/unit-minimal.schema.js +13 -0
- package/dist/models/unit/unit-minimal.schema.js.map +1 -0
- package/dist/models/unit/unit-partial.schema.d.ts +27 -0
- package/dist/models/unit/unit-partial.schema.d.ts.map +1 -0
- package/dist/models/unit/unit-partial.schema.js +6 -0
- package/dist/models/unit/unit-partial.schema.js.map +1 -0
- package/dist/models/unit/unit.schema.d.ts +93 -0
- package/dist/models/unit/unit.schema.d.ts.map +1 -0
- package/dist/models/unit/unit.schema.js +27 -0
- package/dist/models/unit/unit.schema.js.map +1 -0
- package/dist/models/user/index.d.ts +5 -0
- package/dist/models/user/index.d.ts.map +1 -0
- package/dist/models/user/index.js +5 -0
- package/dist/models/user/index.js.map +1 -0
- package/dist/models/user/user-minimal.schema.d.ts +65 -0
- package/dist/models/user/user-minimal.schema.d.ts.map +1 -0
- package/dist/models/user/user-minimal.schema.js +10 -0
- package/dist/models/user/user-minimal.schema.js.map +1 -0
- package/dist/models/user/user-partial.schema.d.ts +65 -0
- package/dist/models/user/user-partial.schema.d.ts.map +1 -0
- package/dist/models/user/user-partial.schema.js +6 -0
- package/dist/models/user/user-partial.schema.js.map +1 -0
- package/dist/models/user/user-settings.schema.d.ts +8 -0
- package/dist/models/user/user-settings.schema.d.ts.map +1 -0
- package/dist/models/user/user-settings.schema.js +7 -0
- package/dist/models/user/user-settings.schema.js.map +1 -0
- package/dist/models/user/user.schema.d.ts +134 -0
- package/dist/models/user/user.schema.d.ts.map +1 -0
- package/dist/models/{user.js → user/user.schema.js} +10 -30
- package/dist/models/user/user.schema.js.map +1 -0
- package/package.json +14 -2
- package/dist/example.test.d.ts +0 -6
- package/dist/example.test.d.ts.map +0 -1
- package/dist/example.test.js +0 -147
- package/dist/example.test.js.map +0 -1
- package/dist/models/settings.d.ts +0 -189
- package/dist/models/settings.d.ts.map +0 -1
- package/dist/models/settings.js +0 -34
- package/dist/models/settings.js.map +0 -1
- package/dist/models/user.d.ts +0 -1110
- package/dist/models/user.d.ts.map +0 -1
- 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
|
-
|
|
32
|
+
Import from a specific model subpath:
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
38
|
+
## Folder structure
|
|
43
39
|
|
|
44
40
|
```
|
|
45
41
|
src/
|
|
46
|
-
├──
|
|
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
|
-
│
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
├── index.ts
|
|
57
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 "./<
|
|
96
|
-
- The root `src/index.ts` re-exports
|
|
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 `
|
|
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
|
-
},
|
|
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
|
|
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
|
-
},
|
|
55
|
-
|
|
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.
|
|
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
|
|
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
|
-
},
|
|
116
|
-
|
|
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
|
|
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.
|
|
13
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString
|
|
14
|
-
},
|
|
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
|
|
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"}
|
package/dist/commons/index.d.ts
CHANGED
|
@@ -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"}
|
package/dist/commons/index.js
CHANGED
|
@@ -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<
|
|
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<
|
|
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
|
-
},
|
|
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,
|
|
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"}
|