@htilabs/platform-common-models 0.1.0-beta.3 → 0.2.0-beta.2

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 (43) hide show
  1. package/dist/constants/index.cjs +437 -153
  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 +414 -153
  6. package/dist/constants/index.js.map +1 -1
  7. package/dist/index.cjs +610 -154
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.cts +3 -3
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.js +579 -154
  12. package/dist/index.js.map +1 -1
  13. package/dist/models/index.cjs +306 -1
  14. package/dist/models/index.cjs.map +1 -1
  15. package/dist/models/index.d.cts +99 -11
  16. package/dist/models/index.d.ts +99 -11
  17. package/dist/models/index.js +304 -1
  18. package/dist/models/index.js.map +1 -1
  19. package/dist/{index-Cww9rH3H.d.cts → platform-auth-C-G2qeGM.d.cts} +167 -56
  20. package/dist/{index-Cww9rH3H.d.ts → platform-auth-C-G2qeGM.d.ts} +167 -56
  21. package/dist/{scoring-rule-liZlPytD.d.cts → platform-role-AHv1l5Og.d.cts} +177 -1
  22. package/dist/{scoring-rule-liZlPytD.d.ts → platform-role-AHv1l5Og.d.ts} +177 -1
  23. package/dist/schemas/index.cjs +539 -153
  24. package/dist/schemas/index.cjs.map +1 -1
  25. package/dist/schemas/index.d.cts +1 -1
  26. package/dist/schemas/index.d.ts +1 -1
  27. package/dist/schemas/index.js +533 -153
  28. package/dist/schemas/index.js.map +1 -1
  29. package/dist/types/index.cjs.map +1 -1
  30. package/dist/types/index.d.cts +45 -1
  31. package/dist/types/index.d.ts +45 -1
  32. package/package.json +1 -1
  33. package/src/constants/ic.ts +254 -153
  34. package/src/constants/index.ts +1 -0
  35. package/src/constants/platform-auth.ts +189 -0
  36. package/src/models/index.ts +18 -1
  37. package/src/models/platformFunctionModel.ts +33 -0
  38. package/src/models/platformRoleModel.ts +33 -0
  39. package/src/schemas/index.ts +16 -0
  40. package/src/schemas/platform-function.ts +97 -0
  41. package/src/schemas/platform-role.ts +100 -0
  42. package/src/types/index.ts +14 -0
  43. package/src/types/platform-auth.ts +49 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["/**\n * @htilabs/platform-common-models - Types\n *\n * Shared TypeScript types for HTI Labs applications.\n * Type definitions are co-located with constants and exported from here.\n */\n\n// Re-export all types from constants\nexport type {\n DataQualityValue,\n IC5Value,\n IC13Value,\n IC13Category,\n RelationshipDynamicValue,\n RelationshipConcernValue,\n IC49Value,\n IC56Value,\n IC57Value,\n IC58Value,\n IC59Value,\n IC49ReferralOutcomeValue,\n IC49ReferralVerificationValue,\n SessionStateValue,\n RecordStateValue,\n InteractionTypeValue,\n IncidentInvolvementRoleValue,\n PersonRoleValue,\n IC4Value,\n IC22Value,\n IC23Value,\n IC24Value,\n IC25Value,\n AccommodationValue,\n MinorAdultStatusValue,\n ApparentAgeValue,\n AgeBinReportingValue,\n QuickStartTemplateId,\n SubmissionStateValue,\n FormStatusValue,\n QuestionFormatValue,\n AppScopeValue,\n FormTypeValue,\n UserStatusValue,\n IncidentParticipationRoleValue,\n PersonDisplayCategoryValue,\n PersonTypeValue,\n} from \"../constants/ic.js\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["/**\n * @htilabs/platform-common-models - Types\n *\n * Shared TypeScript types for HTI Labs applications.\n * Type definitions are co-located with constants and exported from here.\n */\n\n// Re-export all types from constants\nexport type {\n DataQualityValue,\n IC5Value,\n IC13Value,\n IC13Category,\n RelationshipDynamicValue,\n RelationshipConcernValue,\n IC49Value,\n IC56Value,\n IC57Value,\n IC58Value,\n IC59Value,\n IC49ReferralOutcomeValue,\n IC49ReferralVerificationValue,\n SessionStateValue,\n RecordStateValue,\n InteractionTypeValue,\n IncidentInvolvementRoleValue,\n PersonRoleValue,\n IC4Value,\n IC22Value,\n IC23Value,\n IC24Value,\n IC25Value,\n AccommodationValue,\n MinorAdultStatusValue,\n ApparentAgeValue,\n AgeBinReportingValue,\n QuickStartTemplateId,\n SubmissionStateValue,\n FormStatusValue,\n QuestionFormatValue,\n AppScopeValue,\n FormTypeValue,\n UserStatusValue,\n IncidentParticipationRoleValue,\n PersonDisplayCategoryValue,\n PersonTypeValue,\n} from \"../constants/ic.js\";\n\n// Re-export platform authorization types\nexport type {\n PermissionStateValue,\n ShareViewValue,\n PlatformToolValue,\n RoleLevelValue,\n FunctionStatusValue,\n} from \"../constants/platform-auth.js\";\n\nexport type {\n PlatformFunctionDef,\n PlatformRoleDef,\n} from \"./platform-auth.js\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +1,45 @@
1
- export { h as AccommodationValue, i as AgeBinReportingValue, j as AppScopeValue, k as ApparentAgeValue, cu as DataQualityValue, cz as FormStatusValue, cA as FormTypeValue, cB as IC13Category, cD as IC13Value, cE as IC22Value, cF as IC23Value, cG as IC24Value, cH as IC25Value, cI as IC49ReferralOutcomeValue, cJ as IC49ReferralVerificationValue, cK as IC49Value, cL as IC4Value, cN as IC56Value, cO as IC57Value, cQ as IC58Value, cR as IC59Value, cS as IC5Value, dG as IncidentInvolvementRoleValue, dH as IncidentParticipationRoleValue, dI as InteractionTypeValue, dL as MinorAdultStatusValue, dT as PersonDisplayCategoryValue, dU as PersonRoleValue, dV as PersonTypeValue, d$ as QuestionFormatValue, e0 as QuickStartTemplateId, e9 as RecordStateValue, eb as RelationshipConcernValue, ec as RelationshipDynamicValue, ej as SessionStateValue, ek as SubmissionStateValue, eo as UserStatusValue } from '../index-Cww9rH3H.cjs';
1
+ import { ef as PlatformToolValue, cN as FunctionStatusValue, eC as RoleLevelValue, eN as ShareViewValue, eb as PermissionStateValue } from '../platform-auth-C-G2qeGM.cjs';
2
+ export { h as AccommodationValue, i as AgeBinReportingValue, j as AppScopeValue, k as ApparentAgeValue, cD as DataQualityValue, cL as FormStatusValue, cM as FormTypeValue, cO as IC13Category, cQ as IC13Value, cR as IC22Value, cS as IC23Value, cT as IC24Value, cU as IC25Value, cV as IC49ReferralOutcomeValue, cW as IC49ReferralVerificationValue, cX as IC49Value, cY as IC4Value, c_ as IC56Value, c$ as IC57Value, d1 as IC58Value, d2 as IC59Value, d3 as IC5Value, dT as IncidentInvolvementRoleValue, dU as IncidentParticipationRoleValue, dV as InteractionTypeValue, dY as MinorAdultStatusValue, ec as PersonDisplayCategoryValue, ed as PersonRoleValue, ee as PersonTypeValue, el as QuestionFormatValue, em as QuickStartTemplateId, ey as RecordStateValue, eA as RelationshipConcernValue, eB as RelationshipDynamicValue, eM as SessionStateValue, eO as SubmissionStateValue, eS as UserStatusValue } from '../platform-auth-C-G2qeGM.cjs';
3
+
4
+ /**
5
+ * @htilabs/platform-common-models — Platform Authorization Types
6
+ *
7
+ * Plain interfaces for platform role and function documents.
8
+ * These represent the logical shape of the data — no Mongoose dependency.
9
+ * Consumers add `_id: string` or `_id: ObjectId` depending on context.
10
+ */
11
+
12
+ /**
13
+ * A platform function definition (action that can be performed).
14
+ * Stored in the `platformFunctions` collection.
15
+ */
16
+ interface PlatformFunctionDef {
17
+ code: string;
18
+ label: string;
19
+ description: string;
20
+ category: string;
21
+ tools: PlatformToolValue[];
22
+ isAdminRelevant: boolean;
23
+ isUserRelevant: boolean;
24
+ isHtiOnly: boolean;
25
+ status: FunctionStatusValue;
26
+ sortOrder: number;
27
+ }
28
+ /**
29
+ * A platform role definition (permission bundle mapping functions).
30
+ * Stored in the `platformRoles` collection.
31
+ */
32
+ interface PlatformRoleDef {
33
+ code: string;
34
+ label: string;
35
+ description: string;
36
+ level: RoleLevelValue;
37
+ tools: PlatformToolValue[];
38
+ shareView: ShareViewValue | null;
39
+ trainingRequirements: string | null;
40
+ isHtiOnly: boolean;
41
+ functions: Record<string, PermissionStateValue>;
42
+ sortOrder: number;
43
+ }
44
+
45
+ export { FunctionStatusValue, PermissionStateValue, type PlatformFunctionDef, type PlatformRoleDef, PlatformToolValue, RoleLevelValue, ShareViewValue };
@@ -1 +1,45 @@
1
- export { h as AccommodationValue, i as AgeBinReportingValue, j as AppScopeValue, k as ApparentAgeValue, cu as DataQualityValue, cz as FormStatusValue, cA as FormTypeValue, cB as IC13Category, cD as IC13Value, cE as IC22Value, cF as IC23Value, cG as IC24Value, cH as IC25Value, cI as IC49ReferralOutcomeValue, cJ as IC49ReferralVerificationValue, cK as IC49Value, cL as IC4Value, cN as IC56Value, cO as IC57Value, cQ as IC58Value, cR as IC59Value, cS as IC5Value, dG as IncidentInvolvementRoleValue, dH as IncidentParticipationRoleValue, dI as InteractionTypeValue, dL as MinorAdultStatusValue, dT as PersonDisplayCategoryValue, dU as PersonRoleValue, dV as PersonTypeValue, d$ as QuestionFormatValue, e0 as QuickStartTemplateId, e9 as RecordStateValue, eb as RelationshipConcernValue, ec as RelationshipDynamicValue, ej as SessionStateValue, ek as SubmissionStateValue, eo as UserStatusValue } from '../index-Cww9rH3H.js';
1
+ import { ef as PlatformToolValue, cN as FunctionStatusValue, eC as RoleLevelValue, eN as ShareViewValue, eb as PermissionStateValue } from '../platform-auth-C-G2qeGM.js';
2
+ export { h as AccommodationValue, i as AgeBinReportingValue, j as AppScopeValue, k as ApparentAgeValue, cD as DataQualityValue, cL as FormStatusValue, cM as FormTypeValue, cO as IC13Category, cQ as IC13Value, cR as IC22Value, cS as IC23Value, cT as IC24Value, cU as IC25Value, cV as IC49ReferralOutcomeValue, cW as IC49ReferralVerificationValue, cX as IC49Value, cY as IC4Value, c_ as IC56Value, c$ as IC57Value, d1 as IC58Value, d2 as IC59Value, d3 as IC5Value, dT as IncidentInvolvementRoleValue, dU as IncidentParticipationRoleValue, dV as InteractionTypeValue, dY as MinorAdultStatusValue, ec as PersonDisplayCategoryValue, ed as PersonRoleValue, ee as PersonTypeValue, el as QuestionFormatValue, em as QuickStartTemplateId, ey as RecordStateValue, eA as RelationshipConcernValue, eB as RelationshipDynamicValue, eM as SessionStateValue, eO as SubmissionStateValue, eS as UserStatusValue } from '../platform-auth-C-G2qeGM.js';
3
+
4
+ /**
5
+ * @htilabs/platform-common-models — Platform Authorization Types
6
+ *
7
+ * Plain interfaces for platform role and function documents.
8
+ * These represent the logical shape of the data — no Mongoose dependency.
9
+ * Consumers add `_id: string` or `_id: ObjectId` depending on context.
10
+ */
11
+
12
+ /**
13
+ * A platform function definition (action that can be performed).
14
+ * Stored in the `platformFunctions` collection.
15
+ */
16
+ interface PlatformFunctionDef {
17
+ code: string;
18
+ label: string;
19
+ description: string;
20
+ category: string;
21
+ tools: PlatformToolValue[];
22
+ isAdminRelevant: boolean;
23
+ isUserRelevant: boolean;
24
+ isHtiOnly: boolean;
25
+ status: FunctionStatusValue;
26
+ sortOrder: number;
27
+ }
28
+ /**
29
+ * A platform role definition (permission bundle mapping functions).
30
+ * Stored in the `platformRoles` collection.
31
+ */
32
+ interface PlatformRoleDef {
33
+ code: string;
34
+ label: string;
35
+ description: string;
36
+ level: RoleLevelValue;
37
+ tools: PlatformToolValue[];
38
+ shareView: ShareViewValue | null;
39
+ trainingRequirements: string | null;
40
+ isHtiOnly: boolean;
41
+ functions: Record<string, PermissionStateValue>;
42
+ sortOrder: number;
43
+ }
44
+
45
+ export { FunctionStatusValue, PermissionStateValue, type PlatformFunctionDef, type PlatformRoleDef, PlatformToolValue, RoleLevelValue, ShareViewValue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htilabs/platform-common-models",
3
- "version": "0.1.0-beta.3",
3
+ "version": "0.2.0-beta.2",
4
4
  "description": "Shared constants, types, and models for HTI Labs applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",