@htilabs/platform-common-models 0.23.0 → 0.25.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 +104 -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-Asg7mxjB.d.cts} +12 -9
- package/dist/{cvcEntry-0BIB9sen.d.ts → cvcEntry-Asg7mxjB.d.ts} +12 -9
- package/dist/{index-CDoqrfc1.d.ts → index-ClTjjJ_S.d.ts} +1 -1
- package/dist/{index-Zu_mOJRn.d.cts → index-Pt82NxQg.d.cts} +1 -1
- package/dist/index.cjs +604 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +577 -15
- package/dist/index.js.map +1 -1
- package/dist/information-scope/index.d.cts +3 -350
- package/dist/information-scope/index.d.ts +3 -350
- package/dist/informationScopeResolver-BzYu97DE.d.cts +351 -0
- package/dist/informationScopeResolver-BzYu97DE.d.ts +351 -0
- 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 +25 -25
- package/dist/schemas/index.d.ts +25 -25
- 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.d.cts +2 -1
- package/dist/services/index.d.ts +2 -1
- package/dist/services/index.js +26 -1
- package/dist/services/index.js.map +1 -1
- package/dist/sharing-ceiling/index.cjs +497 -0
- package/dist/sharing-ceiling/index.cjs.map +1 -0
- package/dist/sharing-ceiling/index.d.cts +318 -0
- package/dist/sharing-ceiling/index.d.ts +318 -0
- package/dist/sharing-ceiling/index.js +451 -0
- package/dist/sharing-ceiling/index.js.map +1 -0
- 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 +7 -1
- package/src/__sot__/README.md +2 -1
- package/src/__sot__/coreFunctionFields.ts +88 -4
- package/src/__sot__/coreFunctions.pin.json +1040 -113
- package/src/__sot__/sharingStarter.pin.json +229 -0
- 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/__tests__/sharing-starter-canon.test.ts +178 -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/generated/sharingPlatformStarter.ts +165 -0
- package/src/index.ts +5 -0
- package/src/schemas/platform-role.ts +4 -1
- package/src/sharingCeiling/__tests__/sharingCeiling.test.ts +678 -0
- package/src/sharingCeiling/chain.ts +269 -0
- package/src/sharingCeiling/coverage.ts +346 -0
- package/src/sharingCeiling/index.ts +14 -0
- package/src/sharingCeiling/starter.ts +89 -0
- package/src/types/platform-auth.ts +9 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Connection, Types } from 'mongoose';
|
|
2
|
-
export {
|
|
2
|
+
export { C as CreateInformationScopeResolverInput, I as INFORMATION_SCOPE_POLICY_VERSION_ROW_NOTE, a as INFORMATION_SCOPE_READABLE_VERSIONS, b as INFORMATION_SCOPE_SYSTEM_INFO, c as INFORMATION_SCOPE_VERSION, d as InformationScopeResolver, S as ScopeApp, e as ScopeApps, f as ScopeCodeReading, g as ScopeKindBranch, h as ScopeMigration, i as ScopeMigrationRule, j as ScopePersonKind, k as ScopeReadOptions, l as ScopeReading, m as ScopeReadingRule, n as ScopeReadingSubject, o as ScopeRetainedReading, p as ScopeRow, q as ScopeRowStatus, r as ScopeRowType, s as ScopeShareOptions, t as ScopeShareReason, u as ScopeShareVerdict, v as ScopeSpecialDataType, w as ScopeSubjectKind, x as StoredScopeList, y as createInformationScopeResolver, z as isScopeInstrumentRow, A as isScopeRestRow, B as isSelectableScopeRow, D as kindForPerson } from '../informationScopeResolver-BzYu97DE.cjs';
|
|
3
|
+
export { CoreInformationScopeSot, CoreInformationScopeSotEntry, CoreInformationScopeSotMigrationLine, scopeMigrationsFromSot, scopeRowsFromSot } from '../information-scope/index.cjs';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @htilabs/platform-common-models — CvcRegistryService
|
package/dist/services/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Connection, Types } from 'mongoose';
|
|
2
|
-
export {
|
|
2
|
+
export { C as CreateInformationScopeResolverInput, I as INFORMATION_SCOPE_POLICY_VERSION_ROW_NOTE, a as INFORMATION_SCOPE_READABLE_VERSIONS, b as INFORMATION_SCOPE_SYSTEM_INFO, c as INFORMATION_SCOPE_VERSION, d as InformationScopeResolver, S as ScopeApp, e as ScopeApps, f as ScopeCodeReading, g as ScopeKindBranch, h as ScopeMigration, i as ScopeMigrationRule, j as ScopePersonKind, k as ScopeReadOptions, l as ScopeReading, m as ScopeReadingRule, n as ScopeReadingSubject, o as ScopeRetainedReading, p as ScopeRow, q as ScopeRowStatus, r as ScopeRowType, s as ScopeShareOptions, t as ScopeShareReason, u as ScopeShareVerdict, v as ScopeSpecialDataType, w as ScopeSubjectKind, x as StoredScopeList, y as createInformationScopeResolver, z as isScopeInstrumentRow, A as isScopeRestRow, B as isSelectableScopeRow, D as kindForPerson } from '../informationScopeResolver-BzYu97DE.js';
|
|
3
|
+
export { CoreInformationScopeSot, CoreInformationScopeSotEntry, CoreInformationScopeSotMigrationLine, scopeMigrationsFromSot, scopeRowsFromSot } from '../information-scope/index.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @htilabs/platform-common-models — CvcRegistryService
|
package/dist/services/index.js
CHANGED
|
@@ -621,6 +621,28 @@ var PERMISSION_STATE_DISPLAY = {
|
|
|
621
621
|
icon: "\u{1F512}"
|
|
622
622
|
}
|
|
623
623
|
};
|
|
624
|
+
var DEFAULT_BOUND_STATE = {
|
|
625
|
+
...PERMISSION_STATE,
|
|
626
|
+
/** Not relevant — canon's `not_applicable_roles` for this function. */
|
|
627
|
+
NA: "NA"
|
|
628
|
+
};
|
|
629
|
+
var DEFAULT_BOUND_STATE_VALUES = [
|
|
630
|
+
...PERMISSION_STATE_VALUES,
|
|
631
|
+
DEFAULT_BOUND_STATE.NA
|
|
632
|
+
];
|
|
633
|
+
var DEFAULT_BOUND_STATE_LABELS = {
|
|
634
|
+
...PERMISSION_STATE_LABELS,
|
|
635
|
+
[DEFAULT_BOUND_STATE.NA]: "Not relevant"
|
|
636
|
+
};
|
|
637
|
+
var DEFAULT_BOUND_STATE_DISPLAY = {
|
|
638
|
+
...PERMISSION_STATE_DISPLAY,
|
|
639
|
+
[DEFAULT_BOUND_STATE.NA]: {
|
|
640
|
+
label: "Not relevant",
|
|
641
|
+
color: "#616161",
|
|
642
|
+
bgColor: "#f5f5f5",
|
|
643
|
+
icon: "\u25CC"
|
|
644
|
+
}
|
|
645
|
+
};
|
|
624
646
|
var SHARE_VIEW = {
|
|
625
647
|
/** System metadata only (partial access). */
|
|
626
648
|
SYS_INFO: "sys_info",
|
|
@@ -814,7 +836,10 @@ var platformRoleSchemaDefinition = {
|
|
|
814
836
|
type: Boolean,
|
|
815
837
|
default: false
|
|
816
838
|
},
|
|
817
|
-
/**
|
|
839
|
+
/**
|
|
840
|
+
* Dynamic map of functionCode → DefaultBoundStateValue (a PERMISSION_STATE
|
|
841
|
+
* value or the codebook's `NA`); an unlisted function is unbound.
|
|
842
|
+
*/
|
|
818
843
|
functions: {
|
|
819
844
|
type: Schema6.Types.Mixed,
|
|
820
845
|
default: {}
|