@htilabs/platform-common-models 0.13.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/constants/index.cjs +33 -0
  2. package/dist/constants/index.cjs.map +1 -1
  3. package/dist/constants/index.d.cts +1 -1
  4. package/dist/constants/index.d.ts +1 -1
  5. package/dist/constants/index.js +29 -0
  6. package/dist/constants/index.js.map +1 -1
  7. package/dist/cvcs/index.cjs +96 -13
  8. package/dist/cvcs/index.cjs.map +1 -1
  9. package/dist/cvcs/index.d.cts +101 -12
  10. package/dist/cvcs/index.d.ts +101 -12
  11. package/dist/cvcs/index.js +96 -13
  12. package/dist/cvcs/index.js.map +1 -1
  13. package/dist/enums/index.cjs +7 -1
  14. package/dist/enums/index.cjs.map +1 -1
  15. package/dist/enums/index.d.cts +8 -2
  16. package/dist/enums/index.d.ts +8 -2
  17. package/dist/enums/index.js +7 -1
  18. package/dist/enums/index.js.map +1 -1
  19. package/dist/index.cjs +136 -14
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +132 -14
  24. package/dist/index.js.map +1 -1
  25. package/dist/{platform-auth-64U8jjuw.d.cts → platform-auth-CrF5U_JH.d.cts} +43 -2
  26. package/dist/{platform-auth-64U8jjuw.d.ts → platform-auth-CrF5U_JH.d.ts} +43 -2
  27. package/dist/schemas/index.cjs +234 -0
  28. package/dist/schemas/index.cjs.map +1 -1
  29. package/dist/schemas/index.js +234 -0
  30. package/dist/schemas/index.js.map +1 -1
  31. package/dist/types/index.d.cts +2 -2
  32. package/dist/types/index.d.ts +2 -2
  33. package/package.json +1 -1
  34. package/src/__sot__/coreIndicatorFields.ts +4 -4
  35. package/src/__sot__/coreIndicators.pin.json +62 -2
  36. package/src/__sot__/scoringEmits.pin.json +9 -4
  37. package/src/__tests__/__snapshots__/cvc-sot.snap +2 -2
  38. package/src/__tests__/cvc-136-scoring-invariant.test.ts +89 -28
  39. package/src/__tests__/cvc-drift-gate.test.ts +149 -27
  40. package/src/__tests__/cvc-sot-snapshot.test.ts +3 -1
  41. package/src/__tests__/cvc-structural.test.ts +1 -1
  42. package/src/constants/ic.ts +163 -3
  43. package/src/cvcs/{coreIndicators.v1.0.0.json → coreIndicators.v1.1.0.json} +93 -10
  44. package/src/cvcs/index.ts +1 -1
  45. package/src/generated/cvc-enums.ts +8 -2
@@ -22,6 +22,7 @@ var constants_exports = {};
22
22
  __export(constants_exports, {
23
23
  ACCOMMODATION_LABELS: () => ACCOMMODATION_LABELS,
24
24
  ACCOMMODATION_OPTIONS: () => ACCOMMODATION_OPTIONS,
25
+ ACTIVE_CVC_136_CORE_INDICATOR_VALUES: () => ACTIVE_CVC_136_CORE_INDICATOR_VALUES,
25
26
  ACTIVE_INCIDENT_PARTICIPATION_ROLE_VALUES: () => ACTIVE_INCIDENT_PARTICIPATION_ROLE_VALUES,
26
27
  AGE_BIN_REPORTING: () => AGE_BIN_REPORTING,
27
28
  AGE_BIN_REPORTING_IS_MINOR: () => AGE_BIN_REPORTING_IS_MINOR,
@@ -59,6 +60,7 @@ __export(constants_exports, {
59
60
  CVC_136_ALERT_INDICATOR: () => CVC_136_ALERT_INDICATOR,
60
61
  CVC_136_CATEGORY_LABELS: () => CVC_136_CATEGORY_LABELS,
61
62
  CVC_136_CORE_INDICATOR_LABELS: () => CVC_136_CORE_INDICATOR_LABELS,
63
+ CVC_136_CORE_INDICATOR_SUPERSEDED_BY: () => CVC_136_CORE_INDICATOR_SUPERSEDED_BY,
62
64
  CVC_136_CORE_INDICATOR_VALUES: () => CVC_136_CORE_INDICATOR_VALUES,
63
65
  CVC_136_INDICATOR_CATEGORY: () => CVC_136_INDICATOR_CATEGORY,
64
66
  CVC_136_LABELS: () => CVC_136_LABELS,
@@ -288,6 +290,7 @@ __export(constants_exports, {
288
290
  USER_STATUS_LABELS: () => USER_STATUS_LABELS,
289
291
  VALID_INTERACTION_TYPES: () => VALID_INTERACTION_TYPES,
290
292
  VALID_RECORD_STATES: () => VALID_RECORD_STATES,
293
+ canonicalCoreIndicator: () => canonicalCoreIndicator,
291
294
  canonicalIncidentParticipationRole: () => canonicalIncidentParticipationRole,
292
295
  deriveAgeBinFromAge: () => deriveAgeBinFromAge,
293
296
  getDisplayCategoryForRole: () => getDisplayCategoryForRole,
@@ -302,6 +305,7 @@ __export(constants_exports, {
302
305
  getIC48TopicForCategory: () => getIC48TopicForCategory,
303
306
  getPersonTypeForRole: () => getPersonTypeForRole,
304
307
  getRelationshipCategory: () => getRelationshipCategory,
308
+ isDeprecatedCoreIndicator: () => isDeprecatedCoreIndicator,
305
309
  isDeprecatedIncidentParticipationRole: () => isDeprecatedIncidentParticipationRole,
306
310
  isIC56Missingness: () => isIC56Missingness,
307
311
  isIC56ValidChannel: () => isIC56ValidChannel,
@@ -4318,7 +4322,9 @@ var CVC_136_CORE_INDICATOR_VALUES = [
4318
4322
  "denied_basic_needs",
4319
4323
  "depends_on_employer_for_immigration_status",
4320
4324
  "depends_on_spouse_or_family_for_immigration_status",
4325
+ "disclosed_fear_at_intake",
4321
4326
  "does_not_control_finances_or_earnings",
4327
+ "does_not_control_housing",
4322
4328
  "does_not_control_identity_documents",
4323
4329
  "elevated_lethality_risk_signal",
4324
4330
  "employer_keeps_pay_or_pays_less_than_expected",
@@ -4380,6 +4386,7 @@ var CVC_136_CORE_INDICATOR_VALUES = [
4380
4386
  "new_to_commercial_sex_industry",
4381
4387
  "non_consensual_photography_or_recording",
4382
4388
  "not_in_control_of_immigration_documentation",
4389
+ "oppressive_home_life",
4383
4390
  "other_instability_or_vulnerability_factors",
4384
4391
  "owes_money_and_cannot_pay_off",
4385
4392
  "paid_or_owes_fee_to_arrange_travel_to_us",
@@ -4399,6 +4406,7 @@ var CVC_136_CORE_INDICATOR_VALUES = [
4399
4406
  "promise_of_work_different_than_current_work",
4400
4407
  "received_things_of_value_while_missing_from_care",
4401
4408
  "recent_le_engagement",
4409
+ "recent_separation",
4402
4410
  "recruited_by_third_party_into_cs_industry",
4403
4411
  "regular_alcohol_use",
4404
4412
  "relies_on_temporary_resources_for_basic_needs",
@@ -4446,6 +4454,7 @@ var CVC_136_CORE_INDICATOR_VALUES = [
4446
4454
  "suicidal_ideation_history",
4447
4455
  "suicidal_ideation_recent",
4448
4456
  "suicide_attempt_history",
4457
+ "survival_sex",
4449
4458
  "third_party_advertises_or_posts_for_person",
4450
4459
  "third_party_arranged_commercial_sex_acts",
4451
4460
  "threats_by_employer_or_partner",
@@ -4461,6 +4470,7 @@ var CVC_136_CORE_INDICATOR_VALUES = [
4461
4470
  "trauma_perpetrator_is_current_manager",
4462
4471
  "travel_organized_by_third_party",
4463
4472
  "tricked_or_pressured_into_unwanted_acts",
4473
+ "unable_to_speak_freely",
4464
4474
  "under_18_advertised_age",
4465
4475
  "under_18_appears_underage",
4466
4476
  "under_18_known_age",
@@ -4536,7 +4546,9 @@ var CVC_136_CORE_INDICATOR_LABELS = {
4536
4546
  "denied_basic_needs": "Denied basic needs (food, water, sleep, medical care)",
4537
4547
  "depends_on_employer_for_immigration_status": "Depends on employer for immigration status (tied visa / living with employer)",
4538
4548
  "depends_on_spouse_or_family_for_immigration_status": "Depends on spouse / family member for immigration status (tied family visa)",
4549
+ "disclosed_fear_at_intake": "Disclosed fear of a specific person",
4539
4550
  "does_not_control_finances_or_earnings": "Limited independence: does not control finances or earnings",
4551
+ "does_not_control_housing": "Limited independence: does not control where they live",
4540
4552
  "does_not_control_identity_documents": "Limited independence: does not control identity documents",
4541
4553
  "elevated_lethality_risk_signal": "Elevated lethality risk",
4542
4554
  "employer_keeps_pay_or_pays_less_than_expected": "Employer keeps portion of pay or pays less than expected",
@@ -4598,6 +4610,7 @@ var CVC_136_CORE_INDICATOR_LABELS = {
4598
4610
  "new_to_commercial_sex_industry": "New to commercial sex industry (recent entry / early experience)",
4599
4611
  "non_consensual_photography_or_recording": "Non-consensual photography or recording",
4600
4612
  "not_in_control_of_immigration_documentation": "Not in control of immigration documentation",
4613
+ "oppressive_home_life": "Oppressive, unsafe, or unstable home life",
4601
4614
  "other_instability_or_vulnerability_factors": "Other instability/vulnerability factors (general)",
4602
4615
  "owes_money_and_cannot_pay_off": "Unusual work circumstances: owes money and cannot pay it off (debt pressure)",
4603
4616
  "paid_or_owes_fee_to_arrange_travel_to_us": "Paid or owes fee to arrange travel to U.S. (migration debt)",
@@ -4617,6 +4630,7 @@ var CVC_136_CORE_INDICATOR_LABELS = {
4617
4630
  "promise_of_work_different_than_current_work": "Promise of work differed from current work (migration deception)",
4618
4631
  "received_things_of_value_while_missing_from_care": "Received money, drugs, or other things of value from someone while missing from care (youth)",
4619
4632
  "recent_le_engagement": "Recent law enforcement engagement",
4633
+ "recent_separation": "Recent separation from abusive partner",
4620
4634
  "recruited_by_third_party_into_cs_industry": "Recruited by another person/entity into commercial sex industry",
4621
4635
  "regular_alcohol_use": "Regular alcohol use",
4622
4636
  "relies_on_temporary_resources_for_basic_needs": "Does not consistently meet basic needs / relies on temporary resources",
@@ -4664,6 +4678,7 @@ var CVC_136_CORE_INDICATOR_LABELS = {
4664
4678
  "suicidal_ideation_history": "Suicidal ideation (past)",
4665
4679
  "suicidal_ideation_recent": "Suicidal ideation (recent)",
4666
4680
  "suicide_attempt_history": "Past suicide attempt disclosed",
4681
+ "survival_sex": "Survival sex (sex exchanged to meet basic needs)",
4667
4682
  "third_party_advertises_or_posts_for_person": "Third party posts or manages the person's commercial-sex ads",
4668
4683
  "third_party_arranged_commercial_sex_acts": "Someone else arranged commercial sex acts (posting, scheduling, managing)",
4669
4684
  "threats_by_employer_or_partner": "Threats by employer/partner (general)",
@@ -4679,6 +4694,7 @@ var CVC_136_CORE_INDICATOR_LABELS = {
4679
4694
  "trauma_perpetrator_is_current_manager": "Trauma perpetrator is a current manager / facilitator (trauma-bonded control)",
4680
4695
  "travel_organized_by_third_party": "Travel organized by a third party (sex provider does not control own movement)",
4681
4696
  "tricked_or_pressured_into_unwanted_acts": "Tricked or pressured into unwanted acts or activities (generic coercion)",
4697
+ "unable_to_speak_freely": "Unable to speak freely",
4682
4698
  "under_18_advertised_age": "Under 18 (ad-derived / advertised age)",
4683
4699
  "under_18_appears_underage": "Under 18 (appears underage; investigator assessment)",
4684
4700
  "under_18_known_age": "Under 18 (known age)",
@@ -4698,6 +4714,19 @@ var CVC_136_CORE_INDICATOR_LABELS = {
4698
4714
  "works_for_little_or_no_pay": "Works for little or no pay",
4699
4715
  "youth_watched_filmed_or_photographed_sexually_explicit": "Watched, filmed, or photographed in sexually explicit manner (youth)"
4700
4716
  };
4717
+ var CVC_136_CORE_INDICATOR_SUPERSEDED_BY = {
4718
+ coercive_debt_pressure_youth: "coercive_debt_pressure",
4719
+ debt_terms_deceptive_youth: "debt_terms_deceptive"
4720
+ };
4721
+ function isDeprecatedCoreIndicator(code) {
4722
+ return typeof code === "string" && Object.prototype.hasOwnProperty.call(CVC_136_CORE_INDICATOR_SUPERSEDED_BY, code);
4723
+ }
4724
+ function canonicalCoreIndicator(code) {
4725
+ return isDeprecatedCoreIndicator(code) ? CVC_136_CORE_INDICATOR_SUPERSEDED_BY[code] : code;
4726
+ }
4727
+ var ACTIVE_CVC_136_CORE_INDICATOR_VALUES = CVC_136_CORE_INDICATOR_VALUES.filter(
4728
+ (v) => !isDeprecatedCoreIndicator(v)
4729
+ );
4701
4730
  var CVC_67_HMIS_SEX = {
4702
4731
  MALE: "male",
4703
4732
  FEMALE: "female",
@@ -6307,6 +6336,7 @@ var FUNCTION_STATUS_LABELS = {
6307
6336
  0 && (module.exports = {
6308
6337
  ACCOMMODATION_LABELS,
6309
6338
  ACCOMMODATION_OPTIONS,
6339
+ ACTIVE_CVC_136_CORE_INDICATOR_VALUES,
6310
6340
  ACTIVE_INCIDENT_PARTICIPATION_ROLE_VALUES,
6311
6341
  AGE_BIN_REPORTING,
6312
6342
  AGE_BIN_REPORTING_IS_MINOR,
@@ -6344,6 +6374,7 @@ var FUNCTION_STATUS_LABELS = {
6344
6374
  CVC_136_ALERT_INDICATOR,
6345
6375
  CVC_136_CATEGORY_LABELS,
6346
6376
  CVC_136_CORE_INDICATOR_LABELS,
6377
+ CVC_136_CORE_INDICATOR_SUPERSEDED_BY,
6347
6378
  CVC_136_CORE_INDICATOR_VALUES,
6348
6379
  CVC_136_INDICATOR_CATEGORY,
6349
6380
  CVC_136_LABELS,
@@ -6573,6 +6604,7 @@ var FUNCTION_STATUS_LABELS = {
6573
6604
  USER_STATUS_LABELS,
6574
6605
  VALID_INTERACTION_TYPES,
6575
6606
  VALID_RECORD_STATES,
6607
+ canonicalCoreIndicator,
6576
6608
  canonicalIncidentParticipationRole,
6577
6609
  deriveAgeBinFromAge,
6578
6610
  getDisplayCategoryForRole,
@@ -6587,6 +6619,7 @@ var FUNCTION_STATUS_LABELS = {
6587
6619
  getIC48TopicForCategory,
6588
6620
  getPersonTypeForRole,
6589
6621
  getRelationshipCategory,
6622
+ isDeprecatedCoreIndicator,
6590
6623
  isDeprecatedIncidentParticipationRole,
6591
6624
  isIC56Missingness,
6592
6625
  isIC56ValidChannel,