@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
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { j as AccommodationValue, m as AgeBinReportingValue, n as AppScopeValue, o as ApparentAgeValue, cw as DataQualityValue, cD as FormStatusValue, cE as FormTypeValue, cF as IC13Category, cH as IC13Value, cI as IC22Value, cJ as IC23Value, cK as IC24Value, cL as IC25Value, cM as IC49ReferralOutcomeValue, cN as IC49ReferralVerificationValue, cO as IC49Value, cP as IC4Value, cR as IC56Value, cS as IC57Value, cU as IC58Value, cV as IC59Value, cW as IC5Value, dM as IncidentInvolvementRoleValue, dN as IncidentParticipationRoleValue, dO as InteractionTypeValue, dR as MinorAdultStatusValue, dZ as PersonDisplayCategoryValue, d_ as PersonRoleValue, d$ as PersonTypeValue, e5 as QuestionFormatValue, e6 as QuickStartTemplateId, ef as RecordStateValue, eh as RelationshipConcernValue, ei as RelationshipDynamicValue, ep as SessionStateValue, eq as SubmissionStateValue, eu as UserStatusValue } from '../ic-DpKrdgQP.cjs';
|
|
2
|
-
import {
|
|
2
|
+
import { o as PlatformToolValue, g as FunctionStatusValue, r as RoleLevelValue, u as ShareViewValue, d as DefaultBoundStateValue } from '../platform-auth-DJO-r9Pf.cjs';
|
|
3
|
+
export { n as PermissionStateValue } from '../platform-auth-DJO-r9Pf.cjs';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @htilabs/platform-common-models — Platform Authorization Types
|
|
@@ -38,8 +39,15 @@ interface PlatformRoleDef {
|
|
|
38
39
|
shareView: ShareViewValue | null;
|
|
39
40
|
trainingRequirements: string | null;
|
|
40
41
|
isHtiOnly: boolean;
|
|
41
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Tier-1 state per function code. A PERMISSION_STATE value, or the codebook's
|
|
44
|
+
* `NA` ("Not relevant", since 0.24.0 — seeded from
|
|
45
|
+
* `CORE_FUNCTION_DEFAULT_BOUNDS`). An unlisted function is UNBOUND: the
|
|
46
|
+
* shared resolver treats the role as ineligible for it, and reads `NA` as
|
|
47
|
+
* NEVER. Label it with `DEFAULT_BOUND_STATE_LABELS` / `_DISPLAY`.
|
|
48
|
+
*/
|
|
49
|
+
functions: Record<string, DefaultBoundStateValue>;
|
|
42
50
|
sortOrder: number;
|
|
43
51
|
}
|
|
44
52
|
|
|
45
|
-
export { FunctionStatusValue,
|
|
53
|
+
export { FunctionStatusValue, type PlatformFunctionDef, type PlatformRoleDef, PlatformToolValue, RoleLevelValue, ShareViewValue };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { j as AccommodationValue, m as AgeBinReportingValue, n as AppScopeValue, o as ApparentAgeValue, cw as DataQualityValue, cD as FormStatusValue, cE as FormTypeValue, cF as IC13Category, cH as IC13Value, cI as IC22Value, cJ as IC23Value, cK as IC24Value, cL as IC25Value, cM as IC49ReferralOutcomeValue, cN as IC49ReferralVerificationValue, cO as IC49Value, cP as IC4Value, cR as IC56Value, cS as IC57Value, cU as IC58Value, cV as IC59Value, cW as IC5Value, dM as IncidentInvolvementRoleValue, dN as IncidentParticipationRoleValue, dO as InteractionTypeValue, dR as MinorAdultStatusValue, dZ as PersonDisplayCategoryValue, d_ as PersonRoleValue, d$ as PersonTypeValue, e5 as QuestionFormatValue, e6 as QuickStartTemplateId, ef as RecordStateValue, eh as RelationshipConcernValue, ei as RelationshipDynamicValue, ep as SessionStateValue, eq as SubmissionStateValue, eu as UserStatusValue } from '../ic-DpKrdgQP.js';
|
|
2
|
-
import {
|
|
2
|
+
import { o as PlatformToolValue, g as FunctionStatusValue, r as RoleLevelValue, u as ShareViewValue, d as DefaultBoundStateValue } from '../platform-auth-DJO-r9Pf.js';
|
|
3
|
+
export { n as PermissionStateValue } from '../platform-auth-DJO-r9Pf.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @htilabs/platform-common-models — Platform Authorization Types
|
|
@@ -38,8 +39,15 @@ interface PlatformRoleDef {
|
|
|
38
39
|
shareView: ShareViewValue | null;
|
|
39
40
|
trainingRequirements: string | null;
|
|
40
41
|
isHtiOnly: boolean;
|
|
41
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Tier-1 state per function code. A PERMISSION_STATE value, or the codebook's
|
|
44
|
+
* `NA` ("Not relevant", since 0.24.0 — seeded from
|
|
45
|
+
* `CORE_FUNCTION_DEFAULT_BOUNDS`). An unlisted function is UNBOUND: the
|
|
46
|
+
* shared resolver treats the role as ineligible for it, and reads `NA` as
|
|
47
|
+
* NEVER. Label it with `DEFAULT_BOUND_STATE_LABELS` / `_DISPLAY`.
|
|
48
|
+
*/
|
|
49
|
+
functions: Record<string, DefaultBoundStateValue>;
|
|
42
50
|
sortOrder: number;
|
|
43
51
|
}
|
|
44
52
|
|
|
45
|
-
export { FunctionStatusValue,
|
|
53
|
+
export { FunctionStatusValue, type PlatformFunctionDef, type PlatformRoleDef, PlatformToolValue, RoleLevelValue, ShareViewValue };
|
|
@@ -367,6 +367,28 @@ var PERMISSION_STATE_DISPLAY = {
|
|
|
367
367
|
icon: "\u{1F512}"
|
|
368
368
|
}
|
|
369
369
|
};
|
|
370
|
+
var DEFAULT_BOUND_STATE = {
|
|
371
|
+
...PERMISSION_STATE,
|
|
372
|
+
/** Not relevant — canon's `not_applicable_roles` for this function. */
|
|
373
|
+
NA: "NA"
|
|
374
|
+
};
|
|
375
|
+
var DEFAULT_BOUND_STATE_VALUES = [
|
|
376
|
+
...PERMISSION_STATE_VALUES,
|
|
377
|
+
DEFAULT_BOUND_STATE.NA
|
|
378
|
+
];
|
|
379
|
+
var DEFAULT_BOUND_STATE_LABELS = {
|
|
380
|
+
...PERMISSION_STATE_LABELS,
|
|
381
|
+
[DEFAULT_BOUND_STATE.NA]: "Not relevant"
|
|
382
|
+
};
|
|
383
|
+
var DEFAULT_BOUND_STATE_DISPLAY = {
|
|
384
|
+
...PERMISSION_STATE_DISPLAY,
|
|
385
|
+
[DEFAULT_BOUND_STATE.NA]: {
|
|
386
|
+
label: "Not relevant",
|
|
387
|
+
color: "#616161",
|
|
388
|
+
bgColor: "#f5f5f5",
|
|
389
|
+
icon: "\u25CC"
|
|
390
|
+
}
|
|
391
|
+
};
|
|
370
392
|
var SHARE_VIEW = {
|
|
371
393
|
/** System metadata only (partial access). */
|
|
372
394
|
SYS_INFO: "sys_info",
|