@htilabs/platform-common-models 0.2.0-beta.3 → 0.3.0-beta.5

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 (75) hide show
  1. package/README.md +38 -0
  2. package/dist/constants/index.cjs +0 -140
  3. package/dist/constants/index.cjs.map +1 -1
  4. package/dist/constants/index.d.cts +146 -5
  5. package/dist/constants/index.d.ts +146 -5
  6. package/dist/constants/index.js +0 -128
  7. package/dist/constants/index.js.map +1 -1
  8. package/dist/{platform-role-AHv1l5Og.d.cts → cvcEntry-wqktWfzE.d.cts} +231 -37
  9. package/dist/{platform-role-AHv1l5Og.d.ts → cvcEntry-wqktWfzE.d.ts} +231 -37
  10. package/dist/cvcs/index.cjs +2184 -0
  11. package/dist/cvcs/index.cjs.map +1 -0
  12. package/dist/cvcs/index.d.cts +2384 -0
  13. package/dist/cvcs/index.d.ts +2384 -0
  14. package/dist/cvcs/index.js +2154 -0
  15. package/dist/cvcs/index.js.map +1 -0
  16. package/dist/index--NCIPluF.d.cts +378 -0
  17. package/dist/index-CFOrHA8l.d.ts +378 -0
  18. package/dist/index.cjs +2962 -140
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +217 -3
  21. package/dist/index.d.ts +217 -3
  22. package/dist/index.js +2934 -128
  23. package/dist/index.js.map +1 -1
  24. package/dist/models/index.cjs +211 -0
  25. package/dist/models/index.cjs.map +1 -1
  26. package/dist/models/index.d.cts +3 -292
  27. package/dist/models/index.d.ts +3 -292
  28. package/dist/models/index.js +209 -0
  29. package/dist/models/index.js.map +1 -1
  30. package/dist/{platform-auth-DHSJP7XP.d.cts → platform-auth-C-G2qeGM.d.cts} +1 -36
  31. package/dist/{platform-auth-DHSJP7XP.d.ts → platform-auth-C-G2qeGM.d.ts} +1 -36
  32. package/dist/schemas/index.cjs +195 -116
  33. package/dist/schemas/index.cjs.map +1 -1
  34. package/dist/schemas/index.d.cts +11 -11
  35. package/dist/schemas/index.d.ts +11 -11
  36. package/dist/schemas/index.js +189 -116
  37. package/dist/schemas/index.js.map +1 -1
  38. package/dist/services/index.cjs +1442 -0
  39. package/dist/services/index.cjs.map +1 -0
  40. package/dist/services/index.d.cts +305 -0
  41. package/dist/services/index.d.ts +305 -0
  42. package/dist/services/index.js +1417 -0
  43. package/dist/services/index.js.map +1 -0
  44. package/dist/types/index.d.cts +2 -2
  45. package/dist/types/index.d.ts +2 -2
  46. package/dist/validation/index.cjs +261 -0
  47. package/dist/validation/index.cjs.map +1 -0
  48. package/dist/validation/index.d.cts +251 -0
  49. package/dist/validation/index.d.ts +251 -0
  50. package/dist/validation/index.js +228 -0
  51. package/dist/validation/index.js.map +1 -0
  52. package/package.json +36 -12
  53. package/src/__tests__/__snapshots__/cvc-sot.snap +22 -0
  54. package/src/__tests__/cvc-sot-snapshot.test.ts +184 -0
  55. package/src/__tests__/cvc-structural.test.ts +130 -0
  56. package/src/constants/ic.ts +0 -154
  57. package/src/constants/service-catalog.ts +146 -4
  58. package/src/cvcs/index.ts +31 -0
  59. package/src/cvcs/missingness.v1.0.0.json +50 -0
  60. package/src/cvcs/serviceCategories.v1.0.0.json +1947 -0
  61. package/src/cvcs/serviceMechanisms.v1.0.0.json +47 -0
  62. package/src/cvcs/serviceStates.v1.0.0.json +106 -0
  63. package/src/generated/cvc-enums.ts +215 -0
  64. package/src/index.ts +61 -1
  65. package/src/models/cvcEntryModel.ts +32 -0
  66. package/src/models/cvcRegistryModel.ts +35 -0
  67. package/src/models/index.ts +8 -0
  68. package/src/schemas/cvcEntry.ts +158 -0
  69. package/src/schemas/cvcRegistry.ts +149 -0
  70. package/src/schemas/index.ts +16 -0
  71. package/src/services/__tests__/cvcRegistryService.test.ts +614 -0
  72. package/src/services/cvcRegistryService.ts +729 -0
  73. package/src/services/index.ts +21 -0
  74. package/src/validation/cvc.ts +414 -0
  75. package/src/validation/index.ts +15 -0
@@ -495,7 +495,6 @@ declare const CVC_17_TRANSGENDER_VALUES: CVC17Value[];
495
495
  * Used for LGBTQ auto-population logic.
496
496
  */
497
497
  declare function isTransgenderGenderIdentity(value: CVC17Value | null | undefined): boolean;
498
- declare const CVC_17_VALUES: CVC17Value[];
499
498
  declare const IC_24_RACE: {
500
499
  readonly AMERICAN_INDIAN_ALASKA_NATIVE: 1;
501
500
  readonly ASIAN: 2;
@@ -1726,40 +1725,6 @@ type CVC67Value = (typeof CVC_67_HMIS_SEX)[keyof typeof CVC_67_HMIS_SEX];
1726
1725
  declare const CVC_67_LABELS: Record<CVC67Value, string>;
1727
1726
  declare const CVC_67_SELECTABLE_VALUES: CVC67Value[];
1728
1727
  declare const CVC_67_MISSINGNESS_VALUES: CVC67Value[];
1729
- declare const CVC_67_VALUES: CVC67Value[];
1730
- declare const CVC_137_RECENCY_BAND: {
1731
- readonly WITHIN_3_MONTHS: "W3M";
1732
- readonly MONTHS_3_TO_6: "M3_6";
1733
- readonly MONTHS_6_TO_12: "M6_12";
1734
- readonly ONE_YEAR_OR_MORE: "Y1P";
1735
- readonly LESS_THAN_3_YEARS: "YLT3";
1736
- readonly YEARS_3_TO_10: "Y3_10";
1737
- readonly TEN_PLUS_YEARS: "Y10P";
1738
- readonly UNKNOWN: "UNK";
1739
- readonly DATA_NOT_COLLECTED: "DNC";
1740
- readonly ANONYMOUS: "ANON";
1741
- readonly PREFERS_NOT_TO_ANSWER: "PNA";
1742
- };
1743
- type CVC137Value = (typeof CVC_137_RECENCY_BAND)[keyof typeof CVC_137_RECENCY_BAND];
1744
- declare const CVC_137_LABELS: Record<CVC137Value, string>;
1745
- declare const CVC_137_VALUES: CVC137Value[];
1746
- declare const CVC_137_SELECTABLE_VALUES: CVC137Value[];
1747
- declare const CVC_137_MISSINGNESS_VALUES: CVC137Value[];
1748
- declare const CVC_197_JUVENILE_JUSTICE_EPISODE: {
1749
- readonly DIVERSION_PROGRAM: "diversion_program";
1750
- readonly PROBATION_SUPERVISION: "probation_supervision";
1751
- readonly PENDING_ADJUDICATION: "pending_adjudication";
1752
- readonly DETENTION_STAY: "detention_stay";
1753
- readonly RESIDENTIAL_JJ_PLACEMENT: "residential_jj_placement";
1754
- readonly DATA_NOT_COLLECTED: "DNC";
1755
- readonly UNKNOWN: "UNK";
1756
- readonly ANONYMOUS: "ANON";
1757
- };
1758
- type CVC197Value = (typeof CVC_197_JUVENILE_JUSTICE_EPISODE)[keyof typeof CVC_197_JUVENILE_JUSTICE_EPISODE];
1759
- declare const CVC_197_LABELS: Record<CVC197Value, string>;
1760
- declare const CVC_197_VALUES: CVC197Value[];
1761
- declare const CVC_197_SELECTABLE_VALUES: CVC197Value[];
1762
- declare const CVC_197_MISSINGNESS_VALUES: CVC197Value[];
1763
1728
 
1764
1729
  /**
1765
1730
  * @htilabs/platform-common-models — Platform Authorization Constants
@@ -1838,4 +1803,4 @@ type FunctionStatusValue = (typeof FUNCTION_STATUS)[keyof typeof FUNCTION_STATUS
1838
1803
  declare const FUNCTION_STATUS_VALUES: readonly ["Not started", "Defined; new function", "Defined; existing PAVE function", "Functional on all apps", "Future function (not v1)"];
1839
1804
  declare const FUNCTION_STATUS_LABELS: Record<FunctionStatusValue, string>;
1840
1805
 
1841
- export { type CVC180Value as $, ACCOMMODATION_LABELS as A, BIRTH_LOCATION as B, CALLER_IS_VICTIM_ROLES as C, type CVC145Category as D, type CVC145Option as E, type CVC145Value as F, type CVC147Value as G, type CVC148Value as H, type CVC150Value as I, type CVC151Value as J, type CVC152Value as K, type CVC153Value as L, type CVC156Value as M, type CVC157Value as N, type CVC158Value as O, type CVC159Category as P, type CVC159Option as Q, type CVC159Value as R, type CVC15Value as S, type CVC16Value as T, type CVC171Category as U, type CVC171Option as V, type CVC171Value as W, type CVC179HierarchicalCategory as X, type CVC179HierarchicalValue as Y, type CVC179Value as Z, type CVC17Value as _, ACCOMMODATION_OPTIONS as a, CVC_150_EYE_COLOR as a$, type CVC181Value as a0, type CVC196Value as a1, type CVC197Value as a2, type CVC1Value as a3, type CVC67Value as a4, type CVC72Value as a5, type CVC76Value as a6, type CVC93Value as a7, type CVC95Value as a8, type CVC96Value as a9, CVC_136_ALERT_INDICATOR as aA, CVC_136_CATEGORY_LABELS as aB, CVC_136_INDICATOR_CATEGORY as aC, CVC_136_LABELS as aD, CVC_136_OPTIONS as aE, CVC_136_TYPE_TO_CATEGORY as aF, CVC_136_VALUES as aG, CVC_137_LABELS as aH, CVC_137_MISSINGNESS_VALUES as aI, CVC_137_RECENCY_BAND as aJ, CVC_137_SELECTABLE_VALUES as aK, CVC_137_VALUES as aL, CVC_145_CATEGORY as aM, CVC_145_CATEGORY_LABELS as aN, CVC_145_CATEGORY_ORDER as aO, CVC_145_LABELS as aP, CVC_145_OPTIONS as aQ, CVC_145_RELATIONSHIP_DYNAMICS as aR, CVC_145_SELECTABLE_OPTIONS as aS, CVC_145_TYPE_TO_CATEGORY as aT, CVC_145_VALUES as aU, CVC_147_LABELS as aV, CVC_147_PRONOUNS as aW, CVC_147_VALUES as aX, CVC_148_LABELS as aY, CVC_148_TRIBES as aZ, CVC_148_VALUES as a_, type CVC97Value as aa, type CVC98Value as ab, type CVC99Value as ac, CVC_100_LABELS as ad, CVC_100_LIVES_RURAL as ae, CVC_100_VALUES as af, CVC_115_LABELS as ag, CVC_115_SERVICE_PLANNING as ah, CVC_115_VALUES as ai, CVC_120_LABELS as aj, CVC_120_MILITARY_BRANCH as ak, CVC_120_VALUES as al, CVC_121_LABELS as am, CVC_121_MILITARY_STATUS as an, CVC_121_VALUES as ao, CVC_122_LABELS as ap, CVC_122_PRIMARY_LANGUAGE as aq, CVC_122_VALUES as ar, CVC_126_CATEGORY as as, CVC_126_CATEGORY_LABELS as at, CVC_126_LABELS as au, CVC_126_OPTIONS as av, CVC_126_PERSON_RELATIONSHIP as aw, CVC_126_PROTECTED_CATEGORIES as ax, CVC_126_TYPE_TO_CATEGORY as ay, CVC_126_VALUES as az, AGE_BIN_REPORTING as b, CVC_17_VALUES as b$, CVC_150_LABELS as b0, CVC_150_VALUES as b1, CVC_151_HAIR_COLOR as b2, CVC_151_LABELS as b3, CVC_151_VALUES as b4, CVC_152_HAS_TATTOOS as b5, CVC_152_LABELS as b6, CVC_152_VALUES as b7, CVC_153_LABELS as b8, CVC_153_SMT_TYPE as b9, CVC_171_CATEGORY_LABELS as bA, CVC_171_CHILD_TO_PARENT as bB, CVC_171_INCOME_BENEFITS as bC, CVC_171_INCOME_SOURCES as bD, CVC_171_LABELS as bE, CVC_171_PARENT_CHILDREN as bF, CVC_171_SELECTABLE_OPTIONS as bG, CVC_171_VALUES as bH, CVC_171_VALUE_TO_CATEGORY as bI, CVC_179_CHILD_TO_PARENT as bJ, CVC_179_EMPLOYMENT_STATUS as bK, CVC_179_HIERARCHICAL_CATEGORY as bL, CVC_179_HIERARCHICAL_CATEGORY_LABELS as bM, CVC_179_HIERARCHICAL_CATEGORY_ORDER as bN, CVC_179_HIERARCHICAL_LABELS as bO, CVC_179_HIERARCHICAL_VALUES as bP, CVC_179_LABELS as bQ, CVC_179_PARENT_CHILDREN as bR, CVC_179_PRIMARY_CATEGORY as bS, CVC_179_SELECTABLE_OPTIONS as bT, CVC_179_VALUES as bU, CVC_179_VALUE_TO_CATEGORY as bV, CVC_17_CORE_GENDER_IDENTITY as bW, CVC_17_LABELS as bX, CVC_17_LEVEL_1_OPTIONS as bY, CVC_17_LEVEL_2_TRANSGENDER_OPTIONS as bZ, CVC_17_TRANSGENDER_VALUES as b_, CVC_153_VALUES as ba, CVC_156_LABELS as bb, CVC_156_MARITAL_STATUS as bc, CVC_156_VALUES as bd, CVC_157_LABELS as be, CVC_157_RELATIONSHIP_STATUS as bf, CVC_157_VALUES as bg, CVC_158_CUSTODY_STATUS as bh, CVC_158_LABELS as bi, CVC_158_VALUES as bj, CVC_159_CATEGORY as bk, CVC_159_CATEGORY_LABELS as bl, CVC_159_CATEGORY_ORDER as bm, CVC_159_LABELS as bn, CVC_159_OPTIONS as bo, CVC_159_RELATIONSHIP_TIES as bp, CVC_159_SELECTABLE_OPTIONS as bq, CVC_159_TYPE_TO_CATEGORY as br, CVC_159_VALUES as bs, CVC_15_CORE_SEX as bt, CVC_15_LABELS as bu, CVC_15_SELECTABLE_VALUES as bv, CVC_16_CORE_ORIENTATION as bw, CVC_16_LABELS as bx, CVC_16_LGBTQ_VALUES as by, CVC_171_CATEGORY as bz, AGE_BIN_REPORTING_IS_MINOR as c, type FunctionStatusValue as c$, CVC_180_EDUCATION_LEVEL as c0, CVC_180_LABELS as c1, CVC_180_ORDINAL as c2, CVC_180_VALUES as c3, CVC_181_COUNTRIES as c4, CVC_181_LABELS as c5, CVC_196_CHILD_WELFARE_EPISODE_TYPE as c6, CVC_196_LABELS as c7, CVC_196_VALUES as c8, CVC_197_JUVENILE_JUSTICE_EPISODE as c9, CVC_96_HOMELESS_STATUS as cA, CVC_96_LABELS as cB, CVC_96_VALUES as cC, CVC_97_IMMIGRANT_REFUGEE as cD, CVC_97_LABELS as cE, CVC_97_VALUES as cF, CVC_98_LABELS as cG, CVC_98_US_VETERAN as cH, CVC_98_VALUES as cI, CVC_99_ENGLISH_PROFICIENCY as cJ, CVC_99_LABELS as cK, CVC_99_VALUES as cL, DATA_QUALITY as cM, DATA_QUALITY_DESCRIPTIONS as cN, DATA_QUALITY_LABELS as cO, DATA_QUALITY_VALUES as cP, DEFAULT_PARTICIPATION_ROLE_BY_CATEGORY as cQ, type DataQualityValue as cR, FORM_STATUS as cS, FORM_STATUS_LABELS as cT, FORM_TYPE as cU, FORM_TYPE_LABELS as cV, FUNCTION_STATUS as cW, FUNCTION_STATUS_LABELS as cX, FUNCTION_STATUS_VALUES as cY, type FormStatusValue as cZ, type FormTypeValue as c_, CVC_197_LABELS as ca, CVC_197_MISSINGNESS_VALUES as cb, CVC_197_SELECTABLE_VALUES as cc, CVC_197_VALUES as cd, CVC_1_LABELS as ce, CVC_1_NAME_TYPE as cf, CVC_1_STRUCTURED_NAME_TYPES as cg, CVC_1_UNSTRUCTURED_NAME_TYPES as ch, CVC_1_VALUES as ci, CVC_67_HMIS_SEX as cj, CVC_67_LABELS as ck, CVC_67_MISSINGNESS_VALUES as cl, CVC_67_SELECTABLE_VALUES as cm, CVC_67_VALUES as cn, CVC_72_HT_TYPE as co, CVC_72_LABELS as cp, CVC_72_VALUES as cq, CVC_76_LABELS as cr, CVC_76_RACE_ETHNICITY as cs, CVC_76_VALUES as ct, CVC_93_CHILD_WELFARE_INVOLVEMENT as cu, CVC_93_LABELS as cv, CVC_93_VALUES as cw, CVC_95_JUVENILE_JUSTICE_INVOLVEMENT as cx, CVC_95_LABELS as cy, CVC_95_VALUES as cz, AGE_BIN_REPORTING_LABELS as d, INCIDENT_PARTICIPATION_ROLE as d$, type IC13Category as d0, type IC13PriorityGroup as d1, type IC13Value as d2, type IC22Value as d3, type IC23Value as d4, type IC24Value as d5, type IC25Value as d6, type IC49ReferralOutcomeValue as d7, type IC49ReferralVerificationValue as d8, type IC49Value as d9, IC_49_LABELS as dA, IC_49_REFERRAL_OUTCOME as dB, IC_49_REFERRAL_OUTCOME_LABELS as dC, IC_49_REFERRAL_VERIFICATION as dD, IC_49_REFERRAL_VERIFICATION_LABELS as dE, IC_49_SERVICE_MECHANISM as dF, IC_4_AGE_TYPE as dG, IC_4_LABELS as dH, IC_56_DESCRIPTIONS as dI, IC_56_LABELS as dJ, IC_56_OPTIONS as dK, IC_56_SERVICE_DELIVERY_CHANNEL as dL, IC_57_LABELS as dM, IC_57_SERVICE_AUDIENCE as dN, IC_58_EXTERNAL_TIERED as dO, IC_58_LABELS as dP, IC_58_ORG_TYPE_GROUPS as dQ, IC_58_PRIMARY_BRANCHES as dR, IC_58_REFERRAL_ENTITY as dS, IC_59_LABELS as dT, IC_59_SERVICE_STATE as dU, IC_5_FULL_LABELS as dV, IC_5_LABELS as dW, IC_5_VICTIMIZATION as dX, INCIDENT_INVOLVEMENT_ROLE as dY, INCIDENT_INVOLVEMENT_ROLE_LABELS as dZ, INCIDENT_INVOLVEMENT_ROLE_TO_PERSON_ROLE as d_, type IC4Value as da, type IC56ChannelValue as db, type IC56Value as dc, type IC57Value as dd, type IC58ExternalCategory as de, type IC58Value as df, type IC59Value as dg, type IC5Value as dh, IC_13_CATEGORIES as di, IC_13_CATEGORY_ORDER as dj, IC_13_LABELS as dk, IC_13_PRIORITY_GROUPS as dl, IC_13_RELATIONSHIP_ABBREV as dm, IC_13_RELATIONSHIP_TYPE as dn, IC_13_REVERSE_CONTEXT_LABELS as dp, IC_22_CORE_SEX as dq, IC_22_LABELS as dr, IC_23_CORE_GENDER_IDENTITY as ds, IC_23_LABELS as dt, IC_24_LABELS as du, IC_24_RACE as dv, IC_25_ETHNICITY as dw, IC_25_LABELS as dx, IC_48_SERVICE_CATEGORIES as dy, IC_49_DESCRIPTIONS as dz, APPARENT_AGE as e, type ShareViewValue as e$, INCIDENT_PARTICIPATION_ROLE_LABELS as e0, INCIDENT_PARTICIPATION_ROLE_VALUES as e1, INTERACTION_TYPES as e2, INTERACTION_TYPE_LABELS as e3, INVOLVEMENT_ROLE_TO_PERSON_TYPE as e4, type IncidentInvolvementRoleValue as e5, type IncidentParticipationRoleValue as e6, type InteractionTypeValue as e7, MINOR_ADULT_STATUS as e8, MINOR_ADULT_STATUS_LABELS as e9, type QuickStartTemplateId as eA, RECORD_STATES as eB, RECORD_STATE_LABELS as eC, RELATIONSHIP_CONCERNS as eD, RELATIONSHIP_CONCERNS_LABELS as eE, RELATIONSHIP_CONCERNS_VALUES as eF, RELATIONSHIP_DYNAMICS as eG, RELATIONSHIP_DYNAMICS_LABELS as eH, RELATIONSHIP_DYNAMICS_VALUES as eI, ROLE_LEVEL as eJ, ROLE_LEVEL_LABELS as eK, ROLE_LEVEL_VALUES as eL, type RecordStateValue as eM, type ReferralBranch as eN, type RelationshipConcernValue as eO, type RelationshipDynamicValue as eP, type RoleLevelValue as eQ, SESSION_STATES as eR, SESSION_STATE_LABELS as eS, SHARE_VIEW as eT, SHARE_VIEW_LABELS as eU, SHARE_VIEW_VALUES as eV, SUBMISSION_STATES as eW, SUBMISSION_STATE_LABELS as eX, type ServiceCategory as eY, type ServiceCategoryChild as eZ, type SessionStateValue as e_, type MinorAdultStatusValue as ea, type OrgTypeGroup as eb, PARTICIPATION_ROLE_CATEGORIES as ec, PERMISSION_STATE as ed, PERMISSION_STATE_DISPLAY as ee, PERMISSION_STATE_LABELS as ef, PERMISSION_STATE_VALUES as eg, PERSON_DISPLAY_CATEGORY as eh, PERSON_DISPLAY_CATEGORY_LABELS as ei, PERSON_ROLES as ej, PERSON_TYPE as ek, PERSON_TYPE_VALUES as el, PLATFORM_TOOL as em, PLATFORM_TOOL_LABELS as en, PLATFORM_TOOL_VALUES as eo, type PermissionStateValue as ep, type PersonDisplayCategoryValue as eq, type PersonRoleValue as er, type PersonTypeValue as es, type PlatformToolValue as et, QUESTION_FORMAT as eu, QUESTION_FORMAT_LABELS as ev, QUICK_START_CONFIG as ew, QUICK_START_LABELS as ex, QUICK_START_TEMPLATES as ey, type QuestionFormatValue as ez, APPARENT_AGE_LABELS as f, type SubmissionStateValue as f0, THREAD_INVOLVEMENT_ROLES as f1, USER_STATUS as f2, USER_STATUS_LABELS as f3, type UserStatusValue as f4, VALID_INTERACTION_TYPES as f5, VALID_RECORD_STATES as f6, deriveAgeBinFromAge as f7, getDisplayCategoryForRole as f8, getPersonTypeForRole as f9, getRelationshipCategory as fa, isIC56Missingness as fb, isIC56ValidChannel as fc, isLgbtqOrientation as fd, isProtectedRelationship as fe, isStructuredNameType as ff, isTransgenderGenderIdentity as fg, sortRelationshipsByPriority as fh, APP_SCOPE as g, type AccommodationValue as h, type AgeBinReportingValue as i, type AppScopeValue as j, type ApparentAgeValue as k, BIRTH_LOCATION_LABELS as l, BIRTH_LOCATION_VALUES as m, type BirthLocationValue as n, type CVC100Value as o, type CVC115Value as p, type CVC120Value as q, type CVC121Value as r, type CVC122Value as s, type CVC126Category as t, type CVC126Option as u, type CVC126Value as v, type CVC136Category as w, type CVC136Option as x, type CVC136Value as y, type CVC137Value as z };
1806
+ export { type CVC181Value as $, ACCOMMODATION_LABELS as A, BIRTH_LOCATION as B, CALLER_IS_VICTIM_ROLES as C, type CVC145Option as D, type CVC145Value as E, type CVC147Value as F, type CVC148Value as G, type CVC150Value as H, type CVC151Value as I, type CVC152Value as J, type CVC153Value as K, type CVC156Value as L, type CVC157Value as M, type CVC158Value as N, type CVC159Category as O, type CVC159Option as P, type CVC159Value as Q, type CVC15Value as R, type CVC16Value as S, type CVC171Category as T, type CVC171Option as U, type CVC171Value as V, type CVC179HierarchicalCategory as W, type CVC179HierarchicalValue as X, type CVC179Value as Y, type CVC17Value as Z, type CVC180Value as _, ACCOMMODATION_OPTIONS as a, CVC_152_LABELS as a$, type CVC196Value as a0, type CVC1Value as a1, type CVC67Value as a2, type CVC72Value as a3, type CVC76Value as a4, type CVC93Value as a5, type CVC95Value as a6, type CVC96Value as a7, type CVC97Value as a8, type CVC98Value as a9, CVC_136_INDICATOR_CATEGORY as aA, CVC_136_LABELS as aB, CVC_136_OPTIONS as aC, CVC_136_TYPE_TO_CATEGORY as aD, CVC_136_VALUES as aE, CVC_145_CATEGORY as aF, CVC_145_CATEGORY_LABELS as aG, CVC_145_CATEGORY_ORDER as aH, CVC_145_LABELS as aI, CVC_145_OPTIONS as aJ, CVC_145_RELATIONSHIP_DYNAMICS as aK, CVC_145_SELECTABLE_OPTIONS as aL, CVC_145_TYPE_TO_CATEGORY as aM, CVC_145_VALUES as aN, CVC_147_LABELS as aO, CVC_147_PRONOUNS as aP, CVC_147_VALUES as aQ, CVC_148_LABELS as aR, CVC_148_TRIBES as aS, CVC_148_VALUES as aT, CVC_150_EYE_COLOR as aU, CVC_150_LABELS as aV, CVC_150_VALUES as aW, CVC_151_HAIR_COLOR as aX, CVC_151_LABELS as aY, CVC_151_VALUES as aZ, CVC_152_HAS_TATTOOS as a_, type CVC99Value as aa, CVC_100_LABELS as ab, CVC_100_LIVES_RURAL as ac, CVC_100_VALUES as ad, CVC_115_LABELS as ae, CVC_115_SERVICE_PLANNING as af, CVC_115_VALUES as ag, CVC_120_LABELS as ah, CVC_120_MILITARY_BRANCH as ai, CVC_120_VALUES as aj, CVC_121_LABELS as ak, CVC_121_MILITARY_STATUS as al, CVC_121_VALUES as am, CVC_122_LABELS as an, CVC_122_PRIMARY_LANGUAGE as ao, CVC_122_VALUES as ap, CVC_126_CATEGORY as aq, CVC_126_CATEGORY_LABELS as ar, CVC_126_LABELS as as, CVC_126_OPTIONS as at, CVC_126_PERSON_RELATIONSHIP as au, CVC_126_PROTECTED_CATEGORIES as av, CVC_126_TYPE_TO_CATEGORY as aw, CVC_126_VALUES as ax, CVC_136_ALERT_INDICATOR as ay, CVC_136_CATEGORY_LABELS as az, AGE_BIN_REPORTING as b, CVC_196_LABELS as b$, CVC_152_VALUES as b0, CVC_153_LABELS as b1, CVC_153_SMT_TYPE as b2, CVC_153_VALUES as b3, CVC_156_LABELS as b4, CVC_156_MARITAL_STATUS as b5, CVC_156_VALUES as b6, CVC_157_LABELS as b7, CVC_157_RELATIONSHIP_STATUS as b8, CVC_157_VALUES as b9, CVC_171_VALUES as bA, CVC_171_VALUE_TO_CATEGORY as bB, CVC_179_CHILD_TO_PARENT as bC, CVC_179_EMPLOYMENT_STATUS as bD, CVC_179_HIERARCHICAL_CATEGORY as bE, CVC_179_HIERARCHICAL_CATEGORY_LABELS as bF, CVC_179_HIERARCHICAL_CATEGORY_ORDER as bG, CVC_179_HIERARCHICAL_LABELS as bH, CVC_179_HIERARCHICAL_VALUES as bI, CVC_179_LABELS as bJ, CVC_179_PARENT_CHILDREN as bK, CVC_179_PRIMARY_CATEGORY as bL, CVC_179_SELECTABLE_OPTIONS as bM, CVC_179_VALUES as bN, CVC_179_VALUE_TO_CATEGORY as bO, CVC_17_CORE_GENDER_IDENTITY as bP, CVC_17_LABELS as bQ, CVC_17_LEVEL_1_OPTIONS as bR, CVC_17_LEVEL_2_TRANSGENDER_OPTIONS as bS, CVC_17_TRANSGENDER_VALUES as bT, CVC_180_EDUCATION_LEVEL as bU, CVC_180_LABELS as bV, CVC_180_ORDINAL as bW, CVC_180_VALUES as bX, CVC_181_COUNTRIES as bY, CVC_181_LABELS as bZ, CVC_196_CHILD_WELFARE_EPISODE_TYPE as b_, CVC_158_CUSTODY_STATUS as ba, CVC_158_LABELS as bb, CVC_158_VALUES as bc, CVC_159_CATEGORY as bd, CVC_159_CATEGORY_LABELS as be, CVC_159_CATEGORY_ORDER as bf, CVC_159_LABELS as bg, CVC_159_OPTIONS as bh, CVC_159_RELATIONSHIP_TIES as bi, CVC_159_SELECTABLE_OPTIONS as bj, CVC_159_TYPE_TO_CATEGORY as bk, CVC_159_VALUES as bl, CVC_15_CORE_SEX as bm, CVC_15_LABELS as bn, CVC_15_SELECTABLE_VALUES as bo, CVC_16_CORE_ORIENTATION as bp, CVC_16_LABELS as bq, CVC_16_LGBTQ_VALUES as br, CVC_171_CATEGORY as bs, CVC_171_CATEGORY_LABELS as bt, CVC_171_CHILD_TO_PARENT as bu, CVC_171_INCOME_BENEFITS as bv, CVC_171_INCOME_SOURCES as bw, CVC_171_LABELS as bx, CVC_171_PARENT_CHILDREN as by, CVC_171_SELECTABLE_OPTIONS as bz, AGE_BIN_REPORTING_IS_MINOR as c, type IC57Value as c$, CVC_196_VALUES as c0, CVC_1_LABELS as c1, CVC_1_NAME_TYPE as c2, CVC_1_STRUCTURED_NAME_TYPES as c3, CVC_1_UNSTRUCTURED_NAME_TYPES as c4, CVC_1_VALUES as c5, CVC_67_HMIS_SEX as c6, CVC_67_LABELS as c7, CVC_67_MISSINGNESS_VALUES as c8, CVC_67_SELECTABLE_VALUES as c9, DATA_QUALITY_LABELS as cA, DATA_QUALITY_VALUES as cB, DEFAULT_PARTICIPATION_ROLE_BY_CATEGORY as cC, type DataQualityValue as cD, FORM_STATUS as cE, FORM_STATUS_LABELS as cF, FORM_TYPE as cG, FORM_TYPE_LABELS as cH, FUNCTION_STATUS as cI, FUNCTION_STATUS_LABELS as cJ, FUNCTION_STATUS_VALUES as cK, type FormStatusValue as cL, type FormTypeValue as cM, type FunctionStatusValue as cN, type IC13Category as cO, type IC13PriorityGroup as cP, type IC13Value as cQ, type IC22Value as cR, type IC23Value as cS, type IC24Value as cT, type IC25Value as cU, type IC49ReferralOutcomeValue as cV, type IC49ReferralVerificationValue as cW, type IC49Value as cX, type IC4Value as cY, type IC56ChannelValue as cZ, type IC56Value as c_, CVC_72_HT_TYPE as ca, CVC_72_LABELS as cb, CVC_72_VALUES as cc, CVC_76_LABELS as cd, CVC_76_RACE_ETHNICITY as ce, CVC_76_VALUES as cf, CVC_93_CHILD_WELFARE_INVOLVEMENT as cg, CVC_93_LABELS as ch, CVC_93_VALUES as ci, CVC_95_JUVENILE_JUSTICE_INVOLVEMENT as cj, CVC_95_LABELS as ck, CVC_95_VALUES as cl, CVC_96_HOMELESS_STATUS as cm, CVC_96_LABELS as cn, CVC_96_VALUES as co, CVC_97_IMMIGRANT_REFUGEE as cp, CVC_97_LABELS as cq, CVC_97_VALUES as cr, CVC_98_LABELS as cs, CVC_98_US_VETERAN as ct, CVC_98_VALUES as cu, CVC_99_ENGLISH_PROFICIENCY as cv, CVC_99_LABELS as cw, CVC_99_VALUES as cx, DATA_QUALITY as cy, DATA_QUALITY_DESCRIPTIONS as cz, AGE_BIN_REPORTING_LABELS as d, PERMISSION_STATE as d$, type IC58ExternalCategory as d0, type IC58Value as d1, type IC59Value as d2, type IC5Value as d3, IC_13_CATEGORIES as d4, IC_13_CATEGORY_ORDER as d5, IC_13_LABELS as d6, IC_13_PRIORITY_GROUPS as d7, IC_13_RELATIONSHIP_ABBREV as d8, IC_13_RELATIONSHIP_TYPE as d9, IC_58_EXTERNAL_TIERED as dA, IC_58_LABELS as dB, IC_58_ORG_TYPE_GROUPS as dC, IC_58_PRIMARY_BRANCHES as dD, IC_58_REFERRAL_ENTITY as dE, IC_59_LABELS as dF, IC_59_SERVICE_STATE as dG, IC_5_FULL_LABELS as dH, IC_5_LABELS as dI, IC_5_VICTIMIZATION as dJ, INCIDENT_INVOLVEMENT_ROLE as dK, INCIDENT_INVOLVEMENT_ROLE_LABELS as dL, INCIDENT_INVOLVEMENT_ROLE_TO_PERSON_ROLE as dM, INCIDENT_PARTICIPATION_ROLE as dN, INCIDENT_PARTICIPATION_ROLE_LABELS as dO, INCIDENT_PARTICIPATION_ROLE_VALUES as dP, INTERACTION_TYPES as dQ, INTERACTION_TYPE_LABELS as dR, INVOLVEMENT_ROLE_TO_PERSON_TYPE as dS, type IncidentInvolvementRoleValue as dT, type IncidentParticipationRoleValue as dU, type InteractionTypeValue as dV, MINOR_ADULT_STATUS as dW, MINOR_ADULT_STATUS_LABELS as dX, type MinorAdultStatusValue as dY, type OrgTypeGroup as dZ, PARTICIPATION_ROLE_CATEGORIES as d_, IC_13_REVERSE_CONTEXT_LABELS as da, IC_22_CORE_SEX as db, IC_22_LABELS as dc, IC_23_CORE_GENDER_IDENTITY as dd, IC_23_LABELS as de, IC_24_LABELS as df, IC_24_RACE as dg, IC_25_ETHNICITY as dh, IC_25_LABELS as di, IC_48_SERVICE_CATEGORIES as dj, IC_49_DESCRIPTIONS as dk, IC_49_LABELS as dl, IC_49_REFERRAL_OUTCOME as dm, IC_49_REFERRAL_OUTCOME_LABELS as dn, IC_49_REFERRAL_VERIFICATION as dp, IC_49_REFERRAL_VERIFICATION_LABELS as dq, IC_49_SERVICE_MECHANISM as dr, IC_4_AGE_TYPE as ds, IC_4_LABELS as dt, IC_56_DESCRIPTIONS as du, IC_56_LABELS as dv, IC_56_OPTIONS as dw, IC_56_SERVICE_DELIVERY_CHANNEL as dx, IC_57_LABELS as dy, IC_57_SERVICE_AUDIENCE as dz, APPARENT_AGE as e, isLgbtqOrientation as e$, PERMISSION_STATE_DISPLAY as e0, PERMISSION_STATE_LABELS as e1, PERMISSION_STATE_VALUES as e2, PERSON_DISPLAY_CATEGORY as e3, PERSON_DISPLAY_CATEGORY_LABELS as e4, PERSON_ROLES as e5, PERSON_TYPE as e6, PERSON_TYPE_VALUES as e7, PLATFORM_TOOL as e8, PLATFORM_TOOL_LABELS as e9, type RelationshipConcernValue as eA, type RelationshipDynamicValue as eB, type RoleLevelValue as eC, SESSION_STATES as eD, SESSION_STATE_LABELS as eE, SHARE_VIEW as eF, SHARE_VIEW_LABELS as eG, SHARE_VIEW_VALUES as eH, SUBMISSION_STATES as eI, SUBMISSION_STATE_LABELS as eJ, type ServiceCategory as eK, type ServiceCategoryChild as eL, type SessionStateValue as eM, type ShareViewValue as eN, type SubmissionStateValue as eO, THREAD_INVOLVEMENT_ROLES as eP, USER_STATUS as eQ, USER_STATUS_LABELS as eR, type UserStatusValue as eS, VALID_INTERACTION_TYPES as eT, VALID_RECORD_STATES as eU, deriveAgeBinFromAge as eV, getDisplayCategoryForRole as eW, getPersonTypeForRole as eX, getRelationshipCategory as eY, isIC56Missingness as eZ, isIC56ValidChannel as e_, PLATFORM_TOOL_VALUES as ea, type PermissionStateValue as eb, type PersonDisplayCategoryValue as ec, type PersonRoleValue as ed, type PersonTypeValue as ee, type PlatformToolValue as ef, QUESTION_FORMAT as eg, QUESTION_FORMAT_LABELS as eh, QUICK_START_CONFIG as ei, QUICK_START_LABELS as ej, QUICK_START_TEMPLATES as ek, type QuestionFormatValue as el, type QuickStartTemplateId as em, RECORD_STATES as en, RECORD_STATE_LABELS as eo, RELATIONSHIP_CONCERNS as ep, RELATIONSHIP_CONCERNS_LABELS as eq, RELATIONSHIP_CONCERNS_VALUES as er, RELATIONSHIP_DYNAMICS as es, RELATIONSHIP_DYNAMICS_LABELS as et, RELATIONSHIP_DYNAMICS_VALUES as eu, ROLE_LEVEL as ev, ROLE_LEVEL_LABELS as ew, ROLE_LEVEL_VALUES as ex, type RecordStateValue as ey, type ReferralBranch as ez, APPARENT_AGE_LABELS as f, isProtectedRelationship as f0, isStructuredNameType as f1, isTransgenderGenderIdentity as f2, sortRelationshipsByPriority as f3, APP_SCOPE as g, type AccommodationValue as h, type AgeBinReportingValue as i, type AppScopeValue as j, type ApparentAgeValue as k, BIRTH_LOCATION_LABELS as l, BIRTH_LOCATION_VALUES as m, type BirthLocationValue as n, type CVC100Value as o, type CVC115Value as p, type CVC120Value as q, type CVC121Value as r, type CVC122Value as s, type CVC126Category as t, type CVC126Option as u, type CVC126Value as v, type CVC136Category as w, type CVC136Option as x, type CVC136Value as y, type CVC145Category as z };
@@ -21,6 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var schemas_exports = {};
22
22
  __export(schemas_exports, {
23
23
  addressSchema: () => addressSchema,
24
+ buildCvcEntrySchema: () => buildCvcEntrySchema,
25
+ buildCvcRegistrySchema: () => buildCvcRegistrySchema,
24
26
  buildFormSchema: () => buildFormSchema,
25
27
  buildPlatformFunctionSchema: () => buildPlatformFunctionSchema,
26
28
  buildPlatformRoleSchema: () => buildPlatformRoleSchema,
@@ -28,6 +30,10 @@ __export(schemas_exports, {
28
30
  buildScoringRuleSchema: () => buildScoringRuleSchema,
29
31
  buildSectionSchema: () => buildSectionSchema,
30
32
  choiceSchema: () => choiceSchema,
33
+ cvcEntrySchemaDefinition: () => cvcEntrySchemaDefinition,
34
+ cvcEntrySchemaOptions: () => cvcEntrySchemaOptions,
35
+ cvcRegistrySchemaDefinition: () => cvcRegistrySchemaDefinition,
36
+ cvcRegistrySchemaOptions: () => cvcRegistrySchemaOptions,
31
37
  demographicsSchema: () => demographicsSchema,
32
38
  emailSchema: () => emailSchema,
33
39
  formSchemaDefinition: () => formSchemaDefinition,
@@ -677,16 +683,6 @@ var CVC_17_TRANSGENDER_VALUES = [
677
683
  CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM,
678
684
  CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF
679
685
  ];
680
- var CVC_17_VALUES = [
681
- CVC_17_CORE_GENDER_IDENTITY.MALE,
682
- CVC_17_CORE_GENDER_IDENTITY.FEMALE,
683
- CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER,
684
- CVC_17_CORE_GENDER_IDENTITY.NON_BINARY,
685
- CVC_17_CORE_GENDER_IDENTITY.OTHER,
686
- CVC_17_CORE_GENDER_IDENTITY.UNKNOWN,
687
- CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM,
688
- CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF
689
- ];
690
686
  var IC_24_RACE = {
691
687
  AMERICAN_INDIAN_ALASKA_NATIVE: 1,
692
688
  ASIAN: 2,
@@ -3531,112 +3527,6 @@ var CVC_67_SELECTABLE_VALUES = [
3531
3527
  var CVC_67_MISSINGNESS_VALUES = [
3532
3528
  CVC_67_HMIS_SEX.DATA_NOT_COLLECTED
3533
3529
  ];
3534
- var CVC_67_VALUES = [
3535
- CVC_67_HMIS_SEX.MALE,
3536
- CVC_67_HMIS_SEX.FEMALE,
3537
- CVC_67_HMIS_SEX.CLIENT_PREFERS_NOT_TO_ANSWER,
3538
- CVC_67_HMIS_SEX.CLIENT_DOESNT_KNOW,
3539
- CVC_67_HMIS_SEX.DATA_NOT_COLLECTED
3540
- ];
3541
- var CVC_137_RECENCY_BAND = {
3542
- // Primary recency values
3543
- WITHIN_3_MONTHS: "W3M",
3544
- MONTHS_3_TO_6: "M3_6",
3545
- MONTHS_6_TO_12: "M6_12",
3546
- ONE_YEAR_OR_MORE: "Y1P",
3547
- LESS_THAN_3_YEARS: "YLT3",
3548
- YEARS_3_TO_10: "Y3_10",
3549
- TEN_PLUS_YEARS: "Y10P",
3550
- // Missingness values
3551
- UNKNOWN: "UNK",
3552
- DATA_NOT_COLLECTED: "DNC",
3553
- ANONYMOUS: "ANON",
3554
- PREFERS_NOT_TO_ANSWER: "PNA"
3555
- };
3556
- var CVC_137_LABELS = {
3557
- [CVC_137_RECENCY_BAND.WITHIN_3_MONTHS]: "Within past 3 months",
3558
- [CVC_137_RECENCY_BAND.MONTHS_3_TO_6]: "3-6 months ago",
3559
- [CVC_137_RECENCY_BAND.MONTHS_6_TO_12]: "6-12 months ago",
3560
- [CVC_137_RECENCY_BAND.ONE_YEAR_OR_MORE]: "One year or more",
3561
- [CVC_137_RECENCY_BAND.LESS_THAN_3_YEARS]: "Less than 3 years ago",
3562
- [CVC_137_RECENCY_BAND.YEARS_3_TO_10]: "3-10 years ago",
3563
- [CVC_137_RECENCY_BAND.TEN_PLUS_YEARS]: "10+ years ago",
3564
- [CVC_137_RECENCY_BAND.UNKNOWN]: "Unknown",
3565
- [CVC_137_RECENCY_BAND.DATA_NOT_COLLECTED]: "Data not collected",
3566
- [CVC_137_RECENCY_BAND.ANONYMOUS]: "Anonymous",
3567
- [CVC_137_RECENCY_BAND.PREFERS_NOT_TO_ANSWER]: "Client prefers not to answer"
3568
- };
3569
- var CVC_137_VALUES = [
3570
- CVC_137_RECENCY_BAND.WITHIN_3_MONTHS,
3571
- CVC_137_RECENCY_BAND.MONTHS_3_TO_6,
3572
- CVC_137_RECENCY_BAND.MONTHS_6_TO_12,
3573
- CVC_137_RECENCY_BAND.ONE_YEAR_OR_MORE,
3574
- CVC_137_RECENCY_BAND.LESS_THAN_3_YEARS,
3575
- CVC_137_RECENCY_BAND.YEARS_3_TO_10,
3576
- CVC_137_RECENCY_BAND.TEN_PLUS_YEARS,
3577
- CVC_137_RECENCY_BAND.UNKNOWN,
3578
- CVC_137_RECENCY_BAND.DATA_NOT_COLLECTED,
3579
- CVC_137_RECENCY_BAND.ANONYMOUS,
3580
- CVC_137_RECENCY_BAND.PREFERS_NOT_TO_ANSWER
3581
- ];
3582
- var CVC_137_SELECTABLE_VALUES = [
3583
- CVC_137_RECENCY_BAND.WITHIN_3_MONTHS,
3584
- CVC_137_RECENCY_BAND.MONTHS_3_TO_6,
3585
- CVC_137_RECENCY_BAND.MONTHS_6_TO_12,
3586
- CVC_137_RECENCY_BAND.ONE_YEAR_OR_MORE,
3587
- CVC_137_RECENCY_BAND.LESS_THAN_3_YEARS,
3588
- CVC_137_RECENCY_BAND.YEARS_3_TO_10,
3589
- CVC_137_RECENCY_BAND.TEN_PLUS_YEARS
3590
- ];
3591
- var CVC_137_MISSINGNESS_VALUES = [
3592
- CVC_137_RECENCY_BAND.UNKNOWN,
3593
- CVC_137_RECENCY_BAND.DATA_NOT_COLLECTED,
3594
- CVC_137_RECENCY_BAND.ANONYMOUS,
3595
- CVC_137_RECENCY_BAND.PREFERS_NOT_TO_ANSWER
3596
- ];
3597
- var CVC_197_JUVENILE_JUSTICE_EPISODE = {
3598
- DIVERSION_PROGRAM: "diversion_program",
3599
- PROBATION_SUPERVISION: "probation_supervision",
3600
- PENDING_ADJUDICATION: "pending_adjudication",
3601
- DETENTION_STAY: "detention_stay",
3602
- RESIDENTIAL_JJ_PLACEMENT: "residential_jj_placement",
3603
- // Missingness values
3604
- DATA_NOT_COLLECTED: "DNC",
3605
- UNKNOWN: "UNK",
3606
- ANONYMOUS: "ANON"
3607
- };
3608
- var CVC_197_LABELS = {
3609
- [CVC_197_JUVENILE_JUSTICE_EPISODE.DIVERSION_PROGRAM]: "Diversion program",
3610
- [CVC_197_JUVENILE_JUSTICE_EPISODE.PROBATION_SUPERVISION]: "Probation supervision",
3611
- [CVC_197_JUVENILE_JUSTICE_EPISODE.PENDING_ADJUDICATION]: "Pending adjudication",
3612
- [CVC_197_JUVENILE_JUSTICE_EPISODE.DETENTION_STAY]: "Detention stay",
3613
- [CVC_197_JUVENILE_JUSTICE_EPISODE.RESIDENTIAL_JJ_PLACEMENT]: "Residential JJ placement",
3614
- [CVC_197_JUVENILE_JUSTICE_EPISODE.DATA_NOT_COLLECTED]: "Data not collected",
3615
- [CVC_197_JUVENILE_JUSTICE_EPISODE.UNKNOWN]: "Unknown",
3616
- [CVC_197_JUVENILE_JUSTICE_EPISODE.ANONYMOUS]: "Anonymous"
3617
- };
3618
- var CVC_197_VALUES = [
3619
- CVC_197_JUVENILE_JUSTICE_EPISODE.DIVERSION_PROGRAM,
3620
- CVC_197_JUVENILE_JUSTICE_EPISODE.PROBATION_SUPERVISION,
3621
- CVC_197_JUVENILE_JUSTICE_EPISODE.PENDING_ADJUDICATION,
3622
- CVC_197_JUVENILE_JUSTICE_EPISODE.DETENTION_STAY,
3623
- CVC_197_JUVENILE_JUSTICE_EPISODE.RESIDENTIAL_JJ_PLACEMENT,
3624
- CVC_197_JUVENILE_JUSTICE_EPISODE.DATA_NOT_COLLECTED,
3625
- CVC_197_JUVENILE_JUSTICE_EPISODE.UNKNOWN,
3626
- CVC_197_JUVENILE_JUSTICE_EPISODE.ANONYMOUS
3627
- ];
3628
- var CVC_197_SELECTABLE_VALUES = [
3629
- CVC_197_JUVENILE_JUSTICE_EPISODE.DIVERSION_PROGRAM,
3630
- CVC_197_JUVENILE_JUSTICE_EPISODE.PROBATION_SUPERVISION,
3631
- CVC_197_JUVENILE_JUSTICE_EPISODE.PENDING_ADJUDICATION,
3632
- CVC_197_JUVENILE_JUSTICE_EPISODE.DETENTION_STAY,
3633
- CVC_197_JUVENILE_JUSTICE_EPISODE.RESIDENTIAL_JJ_PLACEMENT
3634
- ];
3635
- var CVC_197_MISSINGNESS_VALUES = [
3636
- CVC_197_JUVENILE_JUSTICE_EPISODE.DATA_NOT_COLLECTED,
3637
- CVC_197_JUVENILE_JUSTICE_EPISODE.UNKNOWN,
3638
- CVC_197_JUVENILE_JUSTICE_EPISODE.ANONYMOUS
3639
- ];
3640
3530
 
3641
3531
  // src/schemas/common.ts
3642
3532
  var addressSchema = new import_mongoose.Schema(
@@ -4558,9 +4448,194 @@ function buildPlatformRoleSchema() {
4558
4448
  return schema;
4559
4449
  }
4560
4450
  var _platformRoleSchema = buildPlatformRoleSchema();
4451
+
4452
+ // src/schemas/cvcRegistry.ts
4453
+ var import_mongoose8 = require("mongoose");
4454
+ var cvcRegistrySchemaDefinition = {
4455
+ // Versioning — semantic version of this registry bundle
4456
+ version: {
4457
+ type: String,
4458
+ required: true,
4459
+ match: /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/
4460
+ },
4461
+ // Human-readable name (e.g. "PAVE production registry")
4462
+ name: {
4463
+ type: String,
4464
+ required: true
4465
+ },
4466
+ // Scope keys. `null` widens scope: a null `application` means platform-wide;
4467
+ // a null `agencyId` means all agencies within `application`.
4468
+ application: {
4469
+ type: String,
4470
+ default: null
4471
+ },
4472
+ agencyId: {
4473
+ type: import_mongoose8.Schema.Types.ObjectId,
4474
+ default: null
4475
+ },
4476
+ // Lifecycle
4477
+ status: {
4478
+ type: String,
4479
+ required: true,
4480
+ enum: ["draft", "active", "deprecated"],
4481
+ default: "draft",
4482
+ index: true
4483
+ },
4484
+ dateActivated: {
4485
+ type: Date
4486
+ },
4487
+ dateDeactivated: {
4488
+ type: Date
4489
+ },
4490
+ // Pinned domain versions: { service_categories: "1.0.0", ... }
4491
+ // Stored as a Map<string, string> so individual domains can be added or
4492
+ // bumped without re-validating the whole document shape.
4493
+ cvcVersions: {
4494
+ type: Map,
4495
+ of: String,
4496
+ required: true,
4497
+ default: () => /* @__PURE__ */ new Map()
4498
+ },
4499
+ // Selective inclusion/exclusion lists. Both contain CVC entry codes
4500
+ // (positional 7-segment, e.g. "01-02-00-00-00-00-00"). The runtime
4501
+ // applies excludes after includes when resolving the effective set.
4502
+ excludedEntries: {
4503
+ type: [String],
4504
+ default: []
4505
+ },
4506
+ includedEntries: {
4507
+ type: [String],
4508
+ default: []
4509
+ },
4510
+ // Inheritance pointer — when set, this registry inherits cvcVersions /
4511
+ // include / exclude lists from its base before applying its own overrides.
4512
+ // Indexed below so a base-version bump can find every dependent registry.
4513
+ basedOn: {
4514
+ type: import_mongoose8.Schema.Types.ObjectId,
4515
+ default: null
4516
+ }
4517
+ };
4518
+ var cvcRegistrySchemaOptions = {
4519
+ timestamps: true,
4520
+ collection: "cvc_registries"
4521
+ };
4522
+ function buildCvcRegistrySchema() {
4523
+ const schema = new import_mongoose8.Schema(
4524
+ cvcRegistrySchemaDefinition,
4525
+ cvcRegistrySchemaOptions
4526
+ );
4527
+ schema.index(
4528
+ { application: 1, agencyId: 1, version: 1 },
4529
+ { unique: true }
4530
+ );
4531
+ schema.index(
4532
+ { application: 1, agencyId: 1, status: 1 },
4533
+ {
4534
+ unique: true,
4535
+ partialFilterExpression: { status: "active" }
4536
+ }
4537
+ );
4538
+ schema.index({ basedOn: 1 });
4539
+ return schema;
4540
+ }
4541
+ var _cvcRegistrySchema = buildCvcRegistrySchema();
4542
+
4543
+ // src/schemas/cvcEntry.ts
4544
+ var import_mongoose9 = require("mongoose");
4545
+ var CVC_CODE_PATTERN = /^\d{2}(-\d{2}){6}$/;
4546
+ var CVC_KEY_PATTERN = /^[a-z][a-z0-9_]*$/;
4547
+ var cvcEntrySchemaDefinition = {
4548
+ // Compound identity: (domain, version, code) uniquely identifies an entry.
4549
+ // `domain` is the SOT family (e.g. "service_categories"); `version` is the
4550
+ // semantic version of the SOT JSON file the entry was loaded from.
4551
+ domain: {
4552
+ type: String,
4553
+ required: true
4554
+ },
4555
+ version: {
4556
+ type: String,
4557
+ required: true
4558
+ },
4559
+ code: {
4560
+ type: String,
4561
+ required: true,
4562
+ match: CVC_CODE_PATTERN
4563
+ },
4564
+ // Stable machine key for cross-CVC references (e.g. `relevantMechanisms`
4565
+ // in service_categories points at service_mechanisms entries by `key`).
4566
+ key: {
4567
+ type: String,
4568
+ required: true,
4569
+ match: CVC_KEY_PATTERN
4570
+ },
4571
+ // Display fields
4572
+ title: {
4573
+ type: String,
4574
+ required: true
4575
+ },
4576
+ // `selectable` distinguishes leaf entries (selectable) from structural
4577
+ // grouping rows (not selectable). Required because the seed CLI must
4578
+ // populate it explicitly — there is no sane default.
4579
+ selectable: {
4580
+ type: Boolean,
4581
+ required: true
4582
+ },
4583
+ // Tree structure. `parentCode` is `null` for root rows; `childCodes` is
4584
+ // empty for leaves. We give `parentCode` a `default: null` (rather than
4585
+ // marking it required) because Mongoose's `required` validator rejects
4586
+ // `null` outright — the default ensures the field is always present on
4587
+ // disk while still allowing the documented `string | null` shape. The
4588
+ // `match` validator is skipped by Mongoose when the value is null.
4589
+ parentCode: {
4590
+ type: String,
4591
+ default: null,
4592
+ match: CVC_CODE_PATTERN
4593
+ },
4594
+ childCodes: {
4595
+ type: [String],
4596
+ required: true,
4597
+ default: []
4598
+ },
4599
+ // Long-form definition. Same `default: null` treatment as `parentCode`
4600
+ // above — every row reaches disk with `definition` set to either a
4601
+ // string or an explicit null.
4602
+ definition: {
4603
+ type: String,
4604
+ default: null
4605
+ },
4606
+ // Domain-specific extension bag. Used for fields that only apply to a
4607
+ // particular CVC family — e.g. `relevantMechanisms` on service_categories
4608
+ // entries (a cross-CVC reference into service_mechanisms by key).
4609
+ meta: {
4610
+ type: import_mongoose9.Schema.Types.Mixed
4611
+ }
4612
+ };
4613
+ var cvcEntrySchemaOptions = {
4614
+ timestamps: true,
4615
+ collection: "cvc_entities",
4616
+ // `parentCode` defaults to null but Mongoose strips required-with-default
4617
+ // null assignments unless we keep minimize off.
4618
+ minimize: false
4619
+ };
4620
+ function buildCvcEntrySchema() {
4621
+ const schema = new import_mongoose9.Schema(cvcEntrySchemaDefinition, cvcEntrySchemaOptions);
4622
+ schema.index(
4623
+ { domain: 1, version: 1, code: 1 },
4624
+ { unique: true }
4625
+ );
4626
+ schema.index(
4627
+ { domain: 1, version: 1, key: 1 },
4628
+ { unique: true }
4629
+ );
4630
+ schema.index({ domain: 1, version: 1, parentCode: 1 });
4631
+ return schema;
4632
+ }
4633
+ var _cvcEntrySchema = buildCvcEntrySchema();
4561
4634
  // Annotate the CommonJS export names for ESM import in node:
4562
4635
  0 && (module.exports = {
4563
4636
  addressSchema,
4637
+ buildCvcEntrySchema,
4638
+ buildCvcRegistrySchema,
4564
4639
  buildFormSchema,
4565
4640
  buildPlatformFunctionSchema,
4566
4641
  buildPlatformRoleSchema,
@@ -4568,6 +4643,10 @@ var _platformRoleSchema = buildPlatformRoleSchema();
4568
4643
  buildScoringRuleSchema,
4569
4644
  buildSectionSchema,
4570
4645
  choiceSchema,
4646
+ cvcEntrySchemaDefinition,
4647
+ cvcEntrySchemaOptions,
4648
+ cvcRegistrySchemaDefinition,
4649
+ cvcRegistrySchemaOptions,
4571
4650
  demographicsSchema,
4572
4651
  emailSchema,
4573
4652
  formSchemaDefinition,