@htilabs/platform-common-models 0.23.0 → 0.24.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.
- package/README.md +39 -0
- package/dist/authz/index.cjs +143 -12
- package/dist/authz/index.cjs.map +1 -1
- package/dist/authz/index.d.cts +121 -12
- package/dist/authz/index.d.ts +121 -12
- package/dist/authz/index.js +136 -12
- package/dist/authz/index.js.map +1 -1
- package/dist/constants/index.cjs +30 -0
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +26 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/{cvcEntry-0BIB9sen.d.cts → cvcEntry-BqAGctqK.d.cts} +4 -1
- package/dist/{cvcEntry-0BIB9sen.d.ts → cvcEntry-BqAGctqK.d.ts} +4 -1
- package/dist/{index-Zu_mOJRn.d.cts → index-BTqHP4DM.d.cts} +1 -1
- package/dist/{index-CDoqrfc1.d.ts → index-Dr6GBCoY.d.ts} +1 -1
- package/dist/index.cjs +147 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +140 -13
- package/dist/index.js.map +1 -1
- package/dist/models/index.cjs +26 -1
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.d.cts +2 -2
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +26 -1
- package/dist/models/index.js.map +1 -1
- package/dist/{platform-auth-B49Ly57B.d.cts → platform-auth-DJO-r9Pf.d.cts} +48 -1
- package/dist/{platform-auth-B49Ly57B.d.ts → platform-auth-DJO-r9Pf.d.ts} +48 -1
- package/dist/schemas/index.cjs +26 -1
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +26 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/index.cjs +26 -1
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.js +26 -1
- package/dist/services/index.js.map +1 -1
- package/dist/types/index.d.cts +11 -3
- package/dist/types/index.d.ts +11 -3
- package/dist/validation/index.cjs +22 -0
- package/dist/validation/index.cjs.map +1 -1
- package/dist/validation/index.js +22 -0
- package/dist/validation/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__sot__/README.md +1 -1
- package/src/__sot__/coreFunctionFields.ts +88 -4
- package/src/__sot__/coreFunctions.pin.json +1040 -113
- package/src/__tests__/authz-resolve.test.ts +115 -31
- package/src/__tests__/core-function-default-bounds.test.ts +374 -0
- package/src/__tests__/core-functions-case-close.test.ts +82 -0
- package/src/authz/defaultBounds.ts +69 -0
- package/src/authz/index.ts +12 -3
- package/src/authz/resolveEffectiveFunctions.ts +69 -29
- package/src/constants/platform-auth.ts +60 -0
- package/src/generated/coreFunctionDefaultBounds.ts +109 -0
- package/src/schemas/platform-role.ts +4 -1
- package/src/types/platform-auth.ts +9 -2
|
@@ -1299,7 +1299,10 @@ declare const platformRoleSchemaDefinition: {
|
|
|
1299
1299
|
type: BooleanConstructor;
|
|
1300
1300
|
default: boolean;
|
|
1301
1301
|
};
|
|
1302
|
-
/**
|
|
1302
|
+
/**
|
|
1303
|
+
* Dynamic map of functionCode → DefaultBoundStateValue (a PERMISSION_STATE
|
|
1304
|
+
* value or the codebook's `NA`); an unlisted function is unbound.
|
|
1305
|
+
*/
|
|
1303
1306
|
functions: {
|
|
1304
1307
|
type: typeof Schema.Types.Mixed;
|
|
1305
1308
|
default: {};
|
|
@@ -1299,7 +1299,10 @@ declare const platformRoleSchemaDefinition: {
|
|
|
1299
1299
|
type: BooleanConstructor;
|
|
1300
1300
|
default: boolean;
|
|
1301
1301
|
};
|
|
1302
|
-
/**
|
|
1302
|
+
/**
|
|
1303
|
+
* Dynamic map of functionCode → DefaultBoundStateValue (a PERMISSION_STATE
|
|
1304
|
+
* value or the codebook's `NA`); an unlisted function is unbound.
|
|
1305
|
+
*/
|
|
1303
1306
|
functions: {
|
|
1304
1307
|
type: typeof Schema.Types.Mixed;
|
|
1305
1308
|
default: {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-
|
|
1
|
+
import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-BqAGctqK.cjs';
|
|
2
2
|
import * as mongoose from 'mongoose';
|
|
3
3
|
import { HydratedDocument, Connection, Model } from 'mongoose';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-
|
|
1
|
+
import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-BqAGctqK.js';
|
|
2
2
|
import * as mongoose from 'mongoose';
|
|
3
3
|
import { HydratedDocument, Connection, Model } from 'mongoose';
|
|
4
4
|
|
package/dist/index.cjs
CHANGED
|
@@ -50,6 +50,8 @@ __export(src_exports, {
|
|
|
50
50
|
BIRTH_LOCATION_VALUES: () => BIRTH_LOCATION_VALUES,
|
|
51
51
|
BasisQuickPicksKeys: () => BasisQuickPicksKeys,
|
|
52
52
|
CALLER_IS_VICTIM_ROLES: () => CALLER_IS_VICTIM_ROLES,
|
|
53
|
+
CORE_FUNCTION_DEFAULT_BOUNDS: () => CORE_FUNCTION_DEFAULT_BOUNDS,
|
|
54
|
+
CORE_FUNCTION_DEFAULT_BOUNDS_SOT_VERSION: () => CORE_FUNCTION_DEFAULT_BOUNDS_SOT_VERSION,
|
|
53
55
|
CVC_100_LABELS: () => CVC_100_LABELS,
|
|
54
56
|
CVC_100_LIVES_RURAL: () => CVC_100_LIVES_RURAL,
|
|
55
57
|
CVC_100_VALUES: () => CVC_100_VALUES,
|
|
@@ -224,6 +226,10 @@ __export(src_exports, {
|
|
|
224
226
|
DATA_QUALITY_DESCRIPTIONS: () => DATA_QUALITY_DESCRIPTIONS,
|
|
225
227
|
DATA_QUALITY_LABELS: () => DATA_QUALITY_LABELS,
|
|
226
228
|
DATA_QUALITY_VALUES: () => DATA_QUALITY_VALUES,
|
|
229
|
+
DEFAULT_BOUND_STATE: () => DEFAULT_BOUND_STATE,
|
|
230
|
+
DEFAULT_BOUND_STATE_DISPLAY: () => DEFAULT_BOUND_STATE_DISPLAY,
|
|
231
|
+
DEFAULT_BOUND_STATE_LABELS: () => DEFAULT_BOUND_STATE_LABELS,
|
|
232
|
+
DEFAULT_BOUND_STATE_VALUES: () => DEFAULT_BOUND_STATE_VALUES,
|
|
227
233
|
DEFAULT_PARTICIPATION_ROLE_BY_CATEGORY: () => DEFAULT_PARTICIPATION_ROLE_BY_CATEGORY,
|
|
228
234
|
DaIncidentArchiveReasonKeys: () => DaIncidentArchiveReasonKeys,
|
|
229
235
|
DaIncidentConfidenceKeys: () => DaIncidentConfidenceKeys,
|
|
@@ -552,6 +558,7 @@ __export(src_exports, {
|
|
|
552
558
|
childCustodyArrangementSot: () => childCustodyArrangement_v1_0_0_default,
|
|
553
559
|
choiceSchema: () => choiceSchema,
|
|
554
560
|
citizenshipSot: () => citizenship_v1_0_0_default,
|
|
561
|
+
codebookDefaultBound: () => codebookDefaultBound,
|
|
555
562
|
collectionContextSot: () => collectionContext_v1_0_0_default,
|
|
556
563
|
compileCvcEntryModel: () => compileModel8,
|
|
557
564
|
compileCvcRegistryModel: () => compileModel7,
|
|
@@ -6749,6 +6756,28 @@ var PERMISSION_STATE_DISPLAY = {
|
|
|
6749
6756
|
icon: "\u{1F512}"
|
|
6750
6757
|
}
|
|
6751
6758
|
};
|
|
6759
|
+
var DEFAULT_BOUND_STATE = {
|
|
6760
|
+
...PERMISSION_STATE,
|
|
6761
|
+
/** Not relevant — canon's `not_applicable_roles` for this function. */
|
|
6762
|
+
NA: "NA"
|
|
6763
|
+
};
|
|
6764
|
+
var DEFAULT_BOUND_STATE_VALUES = [
|
|
6765
|
+
...PERMISSION_STATE_VALUES,
|
|
6766
|
+
DEFAULT_BOUND_STATE.NA
|
|
6767
|
+
];
|
|
6768
|
+
var DEFAULT_BOUND_STATE_LABELS = {
|
|
6769
|
+
...PERMISSION_STATE_LABELS,
|
|
6770
|
+
[DEFAULT_BOUND_STATE.NA]: "Not relevant"
|
|
6771
|
+
};
|
|
6772
|
+
var DEFAULT_BOUND_STATE_DISPLAY = {
|
|
6773
|
+
...PERMISSION_STATE_DISPLAY,
|
|
6774
|
+
[DEFAULT_BOUND_STATE.NA]: {
|
|
6775
|
+
label: "Not relevant",
|
|
6776
|
+
color: "#616161",
|
|
6777
|
+
bgColor: "#f5f5f5",
|
|
6778
|
+
icon: "\u25CC"
|
|
6779
|
+
}
|
|
6780
|
+
};
|
|
6752
6781
|
var SHARE_VIEW = {
|
|
6753
6782
|
/** System metadata only (partial access). */
|
|
6754
6783
|
SYS_INFO: "sys_info",
|
|
@@ -8482,7 +8511,10 @@ var platformRoleSchemaDefinition = {
|
|
|
8482
8511
|
type: Boolean,
|
|
8483
8512
|
default: false
|
|
8484
8513
|
},
|
|
8485
|
-
/**
|
|
8514
|
+
/**
|
|
8515
|
+
* Dynamic map of functionCode → DefaultBoundStateValue (a PERMISSION_STATE
|
|
8516
|
+
* value or the codebook's `NA`); an unlisted function is unbound.
|
|
8517
|
+
*/
|
|
8486
8518
|
functions: {
|
|
8487
8519
|
type: import_mongoose7.Schema.Types.Mixed,
|
|
8488
8520
|
default: {}
|
|
@@ -14296,11 +14328,9 @@ var STATES = new Set(Object.values(PERMISSION_STATE));
|
|
|
14296
14328
|
function readState(map, code) {
|
|
14297
14329
|
const v = own(map, code);
|
|
14298
14330
|
if (v === void 0 || v === null) return void 0;
|
|
14331
|
+
if (v === DEFAULT_BOUND_STATE.NA) return PERMISSION_STATE.NEVER;
|
|
14299
14332
|
return typeof v === "string" && STATES.has(v) ? v : "malformed";
|
|
14300
14333
|
}
|
|
14301
|
-
function stringList(v) {
|
|
14302
|
-
return Array.isArray(v) ? v.filter((x) => typeof x === "string") : [];
|
|
14303
|
-
}
|
|
14304
14334
|
function teamValueRestricts(map, code) {
|
|
14305
14335
|
const gate = readState(map, code);
|
|
14306
14336
|
return gate !== void 0 && gate !== PERMISSION_STATE.PREF_YES && gate !== PERMISSION_STATE.ALWAYS;
|
|
@@ -14373,31 +14403,30 @@ function resolveEffectiveFunctions(input) {
|
|
|
14373
14403
|
const retired = own(fn, "retired");
|
|
14374
14404
|
if (typeof code !== "string" || !isCanonEvaluableFunction(code)) continue;
|
|
14375
14405
|
if (retired !== void 0 && retired !== false) continue;
|
|
14376
|
-
vocabulary.push(
|
|
14406
|
+
vocabulary.push(code);
|
|
14377
14407
|
}
|
|
14378
14408
|
const agencyAll = readContainer(input.agencyOverrides);
|
|
14379
14409
|
const team = compileTeamGate(input.teamPolicy);
|
|
14380
14410
|
const granted = /* @__PURE__ */ new Set();
|
|
14381
14411
|
for (const roleCode of heldCodes) {
|
|
14382
14412
|
const role = rolesByCode.get(roleCode);
|
|
14383
|
-
const roleTools = new Set(stringList(own(role, "tools")));
|
|
14384
14413
|
const roleFunctions = readContainer(own(role, "functions"));
|
|
14385
14414
|
if (roleFunctions.kind === "malformed") continue;
|
|
14386
14415
|
const agency = agencyAll.kind === "map" ? readContainer(own(agencyAll.map, roleCode)) : agencyAll;
|
|
14387
14416
|
for (const fn of vocabulary) {
|
|
14388
|
-
if (granted.has(fn
|
|
14389
|
-
const listed = roleFunctions.kind === "map" ? readState(roleFunctions.map, fn
|
|
14390
|
-
|
|
14391
|
-
const tier1 = listed === "malformed" ? PERMISSION_STATE.NEVER : listed
|
|
14417
|
+
if (granted.has(fn)) continue;
|
|
14418
|
+
const listed = roleFunctions.kind === "map" ? readState(roleFunctions.map, fn) : void 0;
|
|
14419
|
+
if (listed === void 0) continue;
|
|
14420
|
+
const tier1 = listed === "malformed" ? PERMISSION_STATE.NEVER : listed;
|
|
14392
14421
|
let state = tier1;
|
|
14393
14422
|
if (tier1 !== PERMISSION_STATE.ALWAYS && tier1 !== PERMISSION_STATE.NEVER) {
|
|
14394
|
-
const override = agency.kind === "malformed" ? "malformed" : agency.kind === "map" ? readState(agency.map, fn
|
|
14423
|
+
const override = agency.kind === "malformed" ? "malformed" : agency.kind === "map" ? readState(agency.map, fn) : void 0;
|
|
14395
14424
|
if (override === "malformed") state = PERMISSION_STATE.NEVER;
|
|
14396
14425
|
else if (override !== void 0) state = override;
|
|
14397
14426
|
}
|
|
14398
14427
|
if (state !== PERMISSION_STATE.ALWAYS && state !== PERMISSION_STATE.PREF_YES) continue;
|
|
14399
|
-
if (state !== PERMISSION_STATE.ALWAYS && teamRestricts(team, roleCode, fn
|
|
14400
|
-
granted.add(fn
|
|
14428
|
+
if (state !== PERMISSION_STATE.ALWAYS && teamRestricts(team, roleCode, fn)) continue;
|
|
14429
|
+
granted.add(fn);
|
|
14401
14430
|
}
|
|
14402
14431
|
}
|
|
14403
14432
|
return [...granted].sort();
|
|
@@ -14420,6 +14449,104 @@ function resolveEffectiveViewingLevel(input, teamViewingLevel) {
|
|
|
14420
14449
|
return viewingLevelFromFunctions(resolveEffectiveFunctions(input), teamViewingLevel);
|
|
14421
14450
|
}
|
|
14422
14451
|
|
|
14452
|
+
// src/generated/coreFunctionDefaultBounds.ts
|
|
14453
|
+
var CORE_FUNCTION_DEFAULT_BOUNDS_SOT_VERSION = "1.3.0";
|
|
14454
|
+
var CORE_FUNCTION_DEFAULT_BOUNDS = {
|
|
14455
|
+
"agency_info_manage": { "MEM-ADM": "ALWAYS", "PLT-ADM": "ALWAYS", "TEAM-ADM": "PREF_YES" },
|
|
14456
|
+
"announcement_publish": { "MEM-ADM": "PREF_NO", "PLT-ADM": "ALWAYS", "PLT-SUP": "ALWAYS", "case_nav": "NA" },
|
|
14457
|
+
"api_key_manage": { "MEM-ADM": "ALWAYS", "PLT-ADM": "ALWAYS", "SUP": "NEVER", "TEAM-ADM": "NEVER", "case_nav": "NA", "research_analytics": "NA" },
|
|
14458
|
+
"assessments_conduct": { "PLT-ADM": "NA", "behavioral_health_provider": "ALWAYS", "case_nav": "PREF_YES", "crisis_response": "NEVER", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "le_liaison_vsp": "NEVER", "research_analytics": "NA", "screener": "NEVER", "volunteer": "NEVER" },
|
|
14459
|
+
"auth_model_manage_platform": { "AUD": "NEVER", "CIRO": "NEVER", "DATA-ADM": "NEVER", "GOV-AUD": "NEVER", "MEM-ADM": "NEVER", "PLT-ADM": "ALWAYS", "PLT-SUP": "NEVER", "SUP": "NEVER", "TEAM-ADM": "NEVER", "research_analytics": "NA" },
|
|
14460
|
+
"case_assign_reassign": { "AUD": "NA", "CIRO": "NA", "DATA-ADM": "NA", "GOV-AUD": "NA", "MEM-ADM": "ALWAYS", "PLT-ADM": "NA", "SUP": "ALWAYS", "TEAM-ADM": "PREF_YES", "behavioral_health_provider": "NA", "case_nav": "ALWAYS", "crisis_response": "NA", "healthcare_provider_medical": "NA", "intel_analyst": "NA", "investigator": "NA", "le_liaison_vsp": "NA", "legal_advocate": "NA", "mandatory_reporter": "NA", "mdt_participant": "NA", "prosecutor_review": "NA", "public_reporter": "NA", "research_analytics": "NA", "screener": "NA", "volunteer": "NA" },
|
|
14461
|
+
"case_claim": { "PLT-ADM": "NA", "behavioral_health_provider": "PREF_YES", "case_nav": "ALWAYS", "crisis_response": "PREF_YES", "healthcare_provider_medical": "PREF_YES", "intel_analyst": "PREF_YES", "investigator": "PREF_YES", "le_liaison_vsp": "PREF_YES", "legal_advocate": "PREF_YES", "mandatory_reporter": "PREF_YES", "mdt_participant": "PREF_YES", "prosecutor_review": "PREF_YES", "public_reporter": "PREF_YES", "research_analytics": "NA", "screener": "PREF_YES", "volunteer": "PREF_YES" },
|
|
14462
|
+
"case_close": { "AUD": "NA", "CIRO": "NA", "DATA-ADM": "NA", "GOV-AUD": "NA", "MEM-ADM": "ALWAYS", "PLT-ADM": "NA", "SUP": "ALWAYS", "TEAM-ADM": "PREF_YES", "behavioral_health_provider": "NA", "case_nav": "ALWAYS", "crisis_response": "NA", "healthcare_provider_medical": "NA", "intel_analyst": "NA", "investigator": "NA", "le_liaison_vsp": "NA", "legal_advocate": "NA", "mandatory_reporter": "NA", "mdt_participant": "NA", "prosecutor_review": "NA", "public_reporter": "NA", "research_analytics": "NA", "screener": "NA", "volunteer": "NA" },
|
|
14463
|
+
"case_collaborator_add": { "case_nav": "NA", "investigator": "ALWAYS", "mdt_participant": "ALWAYS", "research_analytics": "NA" },
|
|
14464
|
+
"case_edit": { "PLT-ADM": "NA", "behavioral_health_provider": "ALWAYS", "case_nav": "ALWAYS", "crisis_response": "ALWAYS", "healthcare_provider_medical": "ALWAYS", "intel_analyst": "PREF_YES", "investigator": "ALWAYS", "le_liaison_vsp": "ALWAYS", "research_analytics": "NA", "screener": "ALWAYS", "volunteer": "PREF_NO" },
|
|
14465
|
+
"case_reopen": { "case_nav": "ALWAYS", "crisis_response": "PREF_YES", "investigator": "ALWAYS", "le_liaison_vsp": "NEVER", "research_analytics": "NA", "screener": "NEVER", "volunteer": "PREF_NO" },
|
|
14466
|
+
"case_side_panel_use": { "behavioral_health_provider": "PREF_YES", "case_nav": "ALWAYS", "crisis_response": "PREF_YES", "healthcare_provider_medical": "PREF_YES", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "le_liaison_vsp": "PREF_YES", "legal_advocate": "PREF_YES", "mdt_participant": "PREF_YES", "research_analytics": "NA", "screener": "PREF_YES", "volunteer": "PREF_NO" },
|
|
14467
|
+
"case_status_manage": { "SUP": "PREF_YES", "case_nav": "NA", "investigator": "ALWAYS", "research_analytics": "NA", "volunteer": "NEVER" },
|
|
14468
|
+
"case_transfer_bulk": { "MEM-ADM": "PREF_YES", "PLT-ADM": "ALWAYS", "SUP": "NEVER", "TEAM-ADM": "PREF_NO", "research_analytics": "NA" },
|
|
14469
|
+
"case_view": { "PLT-ADM": "ALWAYS", "behavioral_health_provider": "ALWAYS", "case_nav": "ALWAYS", "crisis_response": "ALWAYS", "healthcare_provider_medical": "ALWAYS", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "le_liaison_vsp": "ALWAYS", "legal_advocate": "PREF_YES", "mdt_participant": "PREF_YES", "prosecutor_review": "PREF_YES", "public_reporter": "NEVER", "research_analytics": "NA", "screener": "ALWAYS", "volunteer": "NEVER" },
|
|
14470
|
+
"case_visibility_manage": { "MEM-ADM": "ALWAYS", "SUP": "ALWAYS", "case_nav": "NA", "intel_analyst": "PREF_NO", "investigator": "ALWAYS", "research_analytics": "NA", "volunteer": "NEVER" },
|
|
14471
|
+
"ci_periodic_review": { "CIRO": "ALWAYS", "case_nav": "NA", "research_analytics": "NA" },
|
|
14472
|
+
"ci_record_purge_or_retire": { "CIRO": "ALWAYS", "case_nav": "NA", "research_analytics": "NA" },
|
|
14473
|
+
"ci_record_validate": { "CIRO": "ALWAYS", "case_nav": "NA", "research_analytics": "NA" },
|
|
14474
|
+
"ci_to_evidence_export_authorize": { "CIRO": "ALWAYS", "case_nav": "NA", "research_analytics": "NA" },
|
|
14475
|
+
"deconfliction_alert_acknowledge": { "case_nav": "NA", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "research_analytics": "NA" },
|
|
14476
|
+
"deconfliction_unmask": { "case_nav": "NA", "intel_analyst": "PREF_YES", "investigator": "ALWAYS", "research_analytics": "NA", "volunteer": "NEVER" },
|
|
14477
|
+
"determination_perform": { "PLT-ADM": "NA", "behavioral_health_provider": "ALWAYS", "case_nav": "PREF_YES", "crisis_response": "NEVER", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "le_liaison_vsp": "NEVER", "legal_advocate": "PREF_YES", "research_analytics": "NA", "screener": "NEVER", "volunteer": "NEVER" },
|
|
14478
|
+
"disclose_external_request": { "CIRO": "PREF_YES", "PLT-ADM": "ALWAYS", "case_nav": "ALWAYS", "investigator": "ALWAYS", "le_liaison_vsp": "ALWAYS", "legal_advocate": "ALWAYS" },
|
|
14479
|
+
"enrollment_manage": { "behavioral_health_provider": "PREF_YES", "case_nav": "ALWAYS", "healthcare_provider_medical": "PREF_YES", "legal_advocate": "PREF_YES", "public_reporter": "NEVER", "research_analytics": "NA", "screener": "PREF_NO", "volunteer": "PREF_NO" },
|
|
14480
|
+
"exit_discharge_conduct": { "case_nav": "ALWAYS", "crisis_response": "PREF_NO", "legal_advocate": "PREF_YES", "public_reporter": "NEVER", "research_analytics": "NA", "screener": "NEVER", "volunteer": "NEVER" },
|
|
14481
|
+
"export_deidentified": { "DATA-ADM": "PREF_YES", "PLT-ADM": "ALWAYS", "research_analytics": "PREF_YES" },
|
|
14482
|
+
"goals_plan_manage": { "PLT-ADM": "NA", "behavioral_health_provider": "PREF_YES", "case_nav": "ALWAYS", "crisis_response": "PREF_NO", "legal_advocate": "PREF_YES", "public_reporter": "NEVER", "research_analytics": "NA", "volunteer": "PREF_NO" },
|
|
14483
|
+
"idb_record_create": { "PLT-ADM": "ALWAYS", "case_nav": "NA", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "research_analytics": "NA" },
|
|
14484
|
+
"indicator_manual_add": { "PLT-ADM": "NA", "behavioral_health_provider": "ALWAYS", "case_nav": "ALWAYS", "crisis_response": "PREF_YES", "healthcare_provider_medical": "ALWAYS", "intel_analyst": "PREF_YES", "investigator": "PREF_YES", "legal_advocate": "PREF_YES", "public_reporter": "NEVER", "research_analytics": "NA", "screener": "ALWAYS", "volunteer": "PREF_NO" },
|
|
14485
|
+
"investigation_create_claim": { "case_nav": "NA", "investigator": "ALWAYS", "research_analytics": "NA" },
|
|
14486
|
+
"investigation_session_run": { "case_nav": "NA", "intel_analyst": "ALWAYS", "investigator": "PREF_YES", "research_analytics": "NA" },
|
|
14487
|
+
"investigative_database_search": { "case_nav": "NA", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "research_analytics": "NA" },
|
|
14488
|
+
"investigative_request_send": { "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "research_analytics": "NA" },
|
|
14489
|
+
"lead_create": { "case_nav": "NA", "investigator": "ALWAYS", "research_analytics": "NA" },
|
|
14490
|
+
"lead_publish": { "case_nav": "NA", "investigator": "ALWAYS", "research_analytics": "NA" },
|
|
14491
|
+
"lead_route_assign": { "PLT-ADM": "ALWAYS", "PLT-SUP": "ALWAYS", "case_nav": "NA" },
|
|
14492
|
+
"lead_triage_manage": { "case_nav": "NA", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "research_analytics": "NA" },
|
|
14493
|
+
"magic_link_share_send": { "PLT-ADM": "NA", "case_nav": "PREF_YES", "crisis_response": "PREF_YES", "le_liaison_vsp": "PREF_YES", "legal_advocate": "PREF_YES", "mdt_participant": "ALWAYS", "research_analytics": "NA", "screener": "PREF_NO", "volunteer": "PREF_NO" },
|
|
14494
|
+
"mandatory_report_send": { "MEM-ADM": "PREF_YES", "PLT-ADM": "NA", "SUP": "PREF_YES", "behavioral_health_provider": "PREF_YES", "case_nav": "ALWAYS", "healthcare_provider_medical": "PREF_YES", "mandatory_reporter": "ALWAYS", "public_reporter": "PREF_NO", "screener": "PREF_NO", "volunteer": "PREF_NO" },
|
|
14495
|
+
"member_account_report_generate": { "DATA-ADM": "ALWAYS", "PLT-ADM": "ALWAYS", "research_analytics": "PREF_YES" },
|
|
14496
|
+
"member_onboarding_support": { "PLT-ADM": "ALWAYS", "PLT-SUP": "ALWAYS", "research_analytics": "NA" },
|
|
14497
|
+
"message_moderate": { "PLT-ADM": "ALWAYS", "PLT-SUP": "ALWAYS" },
|
|
14498
|
+
"message_send": { "PLT-ADM": "ALWAYS", "behavioral_health_provider": "ALWAYS", "case_nav": "ALWAYS", "crisis_response": "ALWAYS", "healthcare_provider_medical": "ALWAYS", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "le_liaison_vsp": "ALWAYS", "legal_advocate": "ALWAYS", "mandatory_reporter": "ALWAYS", "mdt_participant": "ALWAYS", "prosecutor_review": "ALWAYS", "public_reporter": "PREF_NO", "research_analytics": "ALWAYS", "screener": "ALWAYS", "volunteer": "PREF_YES" },
|
|
14499
|
+
"milestone_log": { "case_nav": "NA", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "research_analytics": "NA" },
|
|
14500
|
+
"needs_priorities_conduct": { "PLT-ADM": "NA", "behavioral_health_provider": "PREF_YES", "case_nav": "ALWAYS", "crisis_response": "ALWAYS", "healthcare_provider_medical": "PREF_YES", "legal_advocate": "PREF_YES", "public_reporter": "NEVER", "research_analytics": "NA", "screener": "ALWAYS", "volunteer": "PREF_YES" },
|
|
14501
|
+
"network_corpus_access": { "PLT-ADM": "ALWAYS", "PLT-SUP": "ALWAYS", "case_nav": "NA" },
|
|
14502
|
+
"note_open_departed_author": { "MEM-ADM": "PREF_NO" },
|
|
14503
|
+
"onboarding_config_sign_off": { "MEM-ADM": "ALWAYS", "PLT-ADM": "ALWAYS" },
|
|
14504
|
+
"open_source_search": { "case_nav": "NA", "intel_analyst": "ALWAYS", "investigator": "ALWAYS" },
|
|
14505
|
+
"person_association_update": { "PLT-ADM": "ALWAYS", "behavioral_health_provider": "PREF_YES", "case_nav": "ALWAYS", "crisis_response": "PREF_YES", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "research_analytics": "NA", "screener": "PREF_YES" },
|
|
14506
|
+
"person_merge_manage": { "PLT-ADM": "ALWAYS", "case_nav": "NA", "intel_analyst": "ALWAYS", "investigator": "PREF_YES", "research_analytics": "NA", "volunteer": "NEVER" },
|
|
14507
|
+
"platform_perm_modify": { "PLT-ADM": "ALWAYS", "research_analytics": "NA" },
|
|
14508
|
+
"profile_domain_edit": { "PLT-ADM": "ALWAYS", "behavioral_health_provider": "ALWAYS", "case_nav": "ALWAYS", "crisis_response": "ALWAYS", "healthcare_provider_medical": "ALWAYS", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "le_liaison_vsp": "ALWAYS", "legal_advocate": "ALWAYS", "public_reporter": "NEVER", "research_analytics": "NA", "screener": "ALWAYS", "volunteer": "PREF_NO" },
|
|
14509
|
+
"record_activity_view": { "PLT-ADM": "ALWAYS", "behavioral_health_provider": "PREF_YES", "case_nav": "ALWAYS", "crisis_response": "PREF_YES", "healthcare_provider_medical": "PREF_YES", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "le_liaison_vsp": "PREF_YES", "legal_advocate": "ALWAYS", "mdt_participant": "PREF_YES", "prosecutor_review": "ALWAYS", "public_reporter": "NEVER", "research_analytics": "NA", "screener": "PREF_YES", "volunteer": "PREF_NO" },
|
|
14510
|
+
"record_print": { "CIRO": "PREF_YES", "PLT-ADM": "ALWAYS", "case_nav": "ALWAYS", "crisis_response": "PREF_YES", "investigator": "ALWAYS", "le_liaison_vsp": "NEVER", "legal_advocate": "ALWAYS", "prosecutor_review": "ALWAYS", "research_analytics": "ALWAYS", "screener": "PREF_NO", "volunteer": "NEVER" },
|
|
14511
|
+
"referral_receive_external": { "PLT-ADM": "NA", "behavioral_health_provider": "PREF_YES", "case_nav": "ALWAYS", "crisis_response": "PREF_YES", "healthcare_provider_medical": "PREF_YES", "intel_analyst": "PREF_YES", "investigator": "PREF_YES", "le_liaison_vsp": "PREF_YES", "legal_advocate": "PREF_YES", "mandatory_reporter": "PREF_YES", "mdt_participant": "PREF_YES", "prosecutor_review": "ALWAYS", "public_reporter": "PREF_YES", "research_analytics": "NA", "screener": "PREF_YES", "volunteer": "PREF_YES" },
|
|
14512
|
+
"referral_receive_internal": { "PLT-ADM": "NA", "behavioral_health_provider": "ALWAYS", "case_nav": "ALWAYS", "crisis_response": "PREF_NO", "healthcare_provider_medical": "ALWAYS", "le_liaison_vsp": "ALWAYS", "legal_advocate": "ALWAYS", "mdt_participant": "ALWAYS", "research_analytics": "NA", "screener": "ALWAYS", "volunteer": "PREF_NO" },
|
|
14513
|
+
"referral_send_external": { "PLT-ADM": "NA", "case_nav": "ALWAYS", "crisis_response": "ALWAYS", "le_liaison_vsp": "ALWAYS", "mandatory_reporter": "ALWAYS", "mdt_participant": "ALWAYS", "research_analytics": "NA", "screener": "PREF_YES", "volunteer": "PREF_YES" },
|
|
14514
|
+
"referral_send_internal": { "PLT-ADM": "NA", "behavioral_health_provider": "ALWAYS", "case_nav": "ALWAYS", "crisis_response": "ALWAYS", "healthcare_provider_medical": "ALWAYS", "le_liaison_vsp": "ALWAYS", "mandatory_reporter": "ALWAYS", "mdt_participant": "ALWAYS", "research_analytics": "NA", "screener": "ALWAYS", "volunteer": "ALWAYS" },
|
|
14515
|
+
"roi_submit_manage": { "PLT-ADM": "NA", "behavioral_health_provider": "ALWAYS", "case_nav": "ALWAYS", "crisis_response": "ALWAYS", "healthcare_provider_medical": "ALWAYS", "le_liaison_vsp": "ALWAYS", "legal_advocate": "ALWAYS", "mdt_participant": "ALWAYS", "research_analytics": "NA", "screener": "ALWAYS", "volunteer": "ALWAYS" },
|
|
14516
|
+
"role_assign": { "MEM-ADM": "ALWAYS", "PLT-ADM": "ALWAYS", "SUP": "NA", "TEAM-ADM": "PREF_NO", "research_analytics": "NA" },
|
|
14517
|
+
"roles_accounts_toggle": { "MEM-ADM": "ALWAYS", "PLT-ADM": "ALWAYS", "PLT-SUP": "ALWAYS" },
|
|
14518
|
+
"sandbox_environment_manage": { "PLT-ADM": "ALWAYS", "research_analytics": "NA" },
|
|
14519
|
+
"screening_conduct": { "PLT-ADM": "NA", "behavioral_health_provider": "ALWAYS", "case_nav": "PREF_YES", "crisis_response": "PREF_YES", "healthcare_provider_medical": "ALWAYS", "legal_advocate": "PREF_YES", "research_analytics": "NA", "screener": "ALWAYS", "volunteer": "PREF_YES" },
|
|
14520
|
+
"screening_view": { "PLT-ADM": "NA", "behavioral_health_provider": "ALWAYS", "case_nav": "ALWAYS", "crisis_response": "PREF_NO", "healthcare_provider_medical": "ALWAYS", "le_liaison_vsp": "NEVER", "prosecutor_review": "NEVER", "research_analytics": "NA", "screener": "PREF_YES", "volunteer": "NEVER" },
|
|
14521
|
+
"service_log_manage": { "PLT-ADM": "NA", "behavioral_health_provider": "PREF_YES", "case_nav": "ALWAYS", "crisis_response": "ALWAYS", "healthcare_provider_medical": "PREF_YES", "legal_advocate": "PREF_YES", "public_reporter": "NEVER", "research_analytics": "NA", "screener": "PREF_YES", "volunteer": "PREF_YES" },
|
|
14522
|
+
"session_create": { "behavioral_health_provider": "ALWAYS", "case_nav": "ALWAYS", "crisis_response": "ALWAYS", "healthcare_provider_medical": "ALWAYS", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "le_liaison_vsp": "ALWAYS", "legal_advocate": "ALWAYS", "mandatory_reporter": "ALWAYS", "mdt_participant": "ALWAYS", "prosecutor_review": "ALWAYS", "public_reporter": "ALWAYS", "research_analytics": "NA", "screener": "ALWAYS", "volunteer": "ALWAYS" },
|
|
14523
|
+
"share_config": { "MEM-ADM": "ALWAYS", "PLT-ADM": "ALWAYS", "PLT-SUP": "PREF_YES", "SUP": "NEVER", "TEAM-ADM": "NEVER", "research_analytics": "NA" },
|
|
14524
|
+
"share_revoke": { "PLT-ADM": "ALWAYS", "behavioral_health_provider": "PREF_YES", "case_nav": "ALWAYS", "crisis_response": "PREF_YES", "healthcare_provider_medical": "PREF_YES", "le_liaison_vsp": "PREF_YES", "legal_advocate": "ALWAYS", "mdt_participant": "PREF_YES", "public_reporter": "NEVER", "research_analytics": "NA", "screener": "PREF_NO", "volunteer": "PREF_NO" },
|
|
14525
|
+
"share_rule_approve_cross_agency": { "GOV-AUD": "PREF_YES", "PLT-ADM": "ALWAYS", "research_analytics": "NA" },
|
|
14526
|
+
"share_vsp_to_le": { "PLT-ADM": "ALWAYS", "case_nav": "PREF_YES", "crisis_response": "NA", "le_liaison_vsp": "ALWAYS", "research_analytics": "NA", "screener": "NEVER", "volunteer": "NEVER" },
|
|
14527
|
+
"srl_manage": { "DATA-ADM": "PREF_YES", "MEM-ADM": "ALWAYS", "PLT-ADM": "ALWAYS", "TEAM-ADM": "PREF_YES" },
|
|
14528
|
+
"supervisee_thread_view": { "PLT-ADM": "ALWAYS", "SUP": "ALWAYS", "TEAM-ADM": "PREF_YES", "case_nav": "NA" },
|
|
14529
|
+
"support_ticket_triage": { "PLT-ADM": "ALWAYS", "PLT-SUP": "ALWAYS", "case_nav": "NA", "research_analytics": "NA" },
|
|
14530
|
+
"system_diagnostics_view": { "PLT-ADM": "ALWAYS", "PLT-SUP": "ALWAYS", "case_nav": "NA" },
|
|
14531
|
+
"team_config_manage": { "MEM-ADM": "ALWAYS", "PLT-ADM": "ALWAYS", "PLT-SUP": "ALWAYS", "SUP": "NEVER", "TEAM-ADM": "NEVER", "research_analytics": "NA" },
|
|
14532
|
+
"team_membership_manage": { "MEM-ADM": "ALWAYS", "PLT-ADM": "ALWAYS", "SUP": "NA", "TEAM-ADM": "ALWAYS", "case_nav": "NA", "research_analytics": "NA" },
|
|
14533
|
+
"team_share_narrowing": { "MEM-ADM": "ALWAYS", "SUP": "PREF_NO", "TEAM-ADM": "PREF_YES", "research_analytics": "NA" },
|
|
14534
|
+
"team_workflow_config_manage": { "MEM-ADM": "ALWAYS", "TEAM-ADM": "PREF_YES", "research_analytics": "NA" },
|
|
14535
|
+
"training_gate_manage": { "MEM-ADM": "ALWAYS", "PLT-ADM": "ALWAYS", "PLT-SUP": "PREF_YES", "SUP": "NA", "TEAM-ADM": "PREF_YES", "TRAIN-ADM": "ALWAYS", "research_analytics": "NA" },
|
|
14536
|
+
"usr_manage": { "MEM-ADM": "ALWAYS", "PLT-ADM": "ALWAYS", "SUP": "NEVER", "TEAM-ADM": "PREF_NO", "research_analytics": "NA" },
|
|
14537
|
+
"viewing_config_manage": { "MEM-ADM": "ALWAYS", "PLT-ADM": "ALWAYS", "SUP": "PREF_YES" },
|
|
14538
|
+
"viewing_level_1_search": { "PLT-ADM": "NA", "behavioral_health_provider": "ALWAYS", "case_nav": "ALWAYS", "crisis_response": "ALWAYS", "healthcare_provider_medical": "PREF_YES", "intel_analyst": "ALWAYS", "investigator": "ALWAYS", "le_liaison_vsp": "PREF_YES", "legal_advocate": "PREF_YES", "mandatory_reporter": "PREF_NO", "mdt_participant": "PREF_YES", "prosecutor_review": "PREF_YES", "public_reporter": "NEVER", "research_analytics": "NA", "screener": "ALWAYS", "volunteer": "PREF_NO" },
|
|
14539
|
+
"viewing_level_2_autocomplete": { "PLT-ADM": "NA", "behavioral_health_provider": "PREF_YES", "case_nav": "ALWAYS", "crisis_response": "PREF_YES", "healthcare_provider_medical": "PREF_NO", "intel_analyst": "PREF_YES", "investigator": "ALWAYS", "le_liaison_vsp": "PREF_YES", "legal_advocate": "PREF_NO", "mandatory_reporter": "NEVER", "mdt_participant": "PREF_NO", "prosecutor_review": "PREF_NO", "public_reporter": "NEVER", "research_analytics": "NA", "screener": "ALWAYS", "volunteer": "NEVER" },
|
|
14540
|
+
"viewing_level_3_components": { "PLT-ADM": "NA", "behavioral_health_provider": "PREF_NO", "case_nav": "PREF_YES", "crisis_response": "PREF_NO", "healthcare_provider_medical": "PREF_NO", "intel_analyst": "PREF_NO", "investigator": "PREF_YES", "le_liaison_vsp": "PREF_NO", "legal_advocate": "PREF_NO", "mandatory_reporter": "NEVER", "mdt_participant": "PREF_NO", "prosecutor_review": "PREF_NO", "public_reporter": "NEVER", "research_analytics": "NA", "screener": "PREF_YES", "volunteer": "NEVER" }
|
|
14541
|
+
};
|
|
14542
|
+
|
|
14543
|
+
// src/authz/defaultBounds.ts
|
|
14544
|
+
function codebookDefaultBound(functionCode, roleCode) {
|
|
14545
|
+
if (!Object.hasOwn(CORE_FUNCTION_DEFAULT_BOUNDS, functionCode)) return null;
|
|
14546
|
+
const roles = CORE_FUNCTION_DEFAULT_BOUNDS[functionCode];
|
|
14547
|
+
return Object.hasOwn(roles, roleCode) ? roles[roleCode] : null;
|
|
14548
|
+
}
|
|
14549
|
+
|
|
14423
14550
|
// src/validation/cvc.ts
|
|
14424
14551
|
var import_zod = require("zod");
|
|
14425
14552
|
var CvcCodeSchema = import_zod.z.string().regex(/^\d{3}(-\d{3}){6}$/);
|
|
@@ -63687,6 +63814,8 @@ var CVC_197_VALUES = selectableCodes(
|
|
|
63687
63814
|
BIRTH_LOCATION_VALUES,
|
|
63688
63815
|
BasisQuickPicksKeys,
|
|
63689
63816
|
CALLER_IS_VICTIM_ROLES,
|
|
63817
|
+
CORE_FUNCTION_DEFAULT_BOUNDS,
|
|
63818
|
+
CORE_FUNCTION_DEFAULT_BOUNDS_SOT_VERSION,
|
|
63690
63819
|
CVC_100_LABELS,
|
|
63691
63820
|
CVC_100_LIVES_RURAL,
|
|
63692
63821
|
CVC_100_VALUES,
|
|
@@ -63861,6 +63990,10 @@ var CVC_197_VALUES = selectableCodes(
|
|
|
63861
63990
|
DATA_QUALITY_DESCRIPTIONS,
|
|
63862
63991
|
DATA_QUALITY_LABELS,
|
|
63863
63992
|
DATA_QUALITY_VALUES,
|
|
63993
|
+
DEFAULT_BOUND_STATE,
|
|
63994
|
+
DEFAULT_BOUND_STATE_DISPLAY,
|
|
63995
|
+
DEFAULT_BOUND_STATE_LABELS,
|
|
63996
|
+
DEFAULT_BOUND_STATE_VALUES,
|
|
63864
63997
|
DEFAULT_PARTICIPATION_ROLE_BY_CATEGORY,
|
|
63865
63998
|
DaIncidentArchiveReasonKeys,
|
|
63866
63999
|
DaIncidentConfidenceKeys,
|
|
@@ -64189,6 +64322,7 @@ var CVC_197_VALUES = selectableCodes(
|
|
|
64189
64322
|
childCustodyArrangementSot,
|
|
64190
64323
|
choiceSchema,
|
|
64191
64324
|
citizenshipSot,
|
|
64325
|
+
codebookDefaultBound,
|
|
64192
64326
|
collectionContextSot,
|
|
64193
64327
|
compileCvcEntryModel,
|
|
64194
64328
|
compileCvcRegistryModel,
|