@c-rex/services 0.3.0-build.39 → 0.3.0-build.40

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 (33) hide show
  1. package/dist/index.d.mts +3 -1
  2. package/dist/index.d.ts +3 -1
  3. package/dist/index.js +430 -147
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +411 -143
  6. package/dist/index.mjs.map +1 -1
  7. package/dist/metadata-visibility-policy.d.mts +29 -0
  8. package/dist/metadata-visibility-policy.d.ts +29 -0
  9. package/dist/metadata-visibility-policy.js +129 -0
  10. package/dist/metadata-visibility-policy.js.map +1 -0
  11. package/dist/metadata-visibility-policy.mjs +95 -0
  12. package/dist/metadata-visibility-policy.mjs.map +1 -0
  13. package/dist/read-models/index.d.mts +17 -39
  14. package/dist/read-models/index.d.ts +17 -39
  15. package/dist/read-models/index.js +430 -149
  16. package/dist/read-models/index.js.map +1 -1
  17. package/dist/read-models/index.mjs +410 -144
  18. package/dist/read-models/index.mjs.map +1 -1
  19. package/dist/read-models/metadata-display-builder.d.mts +34 -0
  20. package/dist/read-models/metadata-display-builder.d.ts +34 -0
  21. package/dist/read-models/metadata-display-builder.js +521 -0
  22. package/dist/read-models/metadata-display-builder.js.map +1 -0
  23. package/dist/read-models/metadata-display-builder.mjs +489 -0
  24. package/dist/read-models/metadata-display-builder.mjs.map +1 -0
  25. package/dist/read-models/metadata-presentation-config.js +2 -2
  26. package/dist/read-models/metadata-presentation-config.js.map +1 -1
  27. package/dist/read-models/metadata-presentation-config.mjs +2 -2
  28. package/dist/read-models/metadata-presentation-config.mjs.map +1 -1
  29. package/dist/read-models/metadata-view-profile.js +63 -4
  30. package/dist/read-models/metadata-view-profile.js.map +1 -1
  31. package/dist/read-models/metadata-view-profile.mjs +63 -4
  32. package/dist/read-models/metadata-view-profile.mjs.map +1 -1
  33. package/package.json +19 -1
@@ -0,0 +1,29 @@
1
+ import { InformationUnitPropertyKey } from './read-models/metadata-presentation-config.mjs';
2
+ import '@c-rex/interfaces';
3
+
4
+ type MetadataCacheFamily = "components" | "informationSubjects" | "documentTypes" | "topicTypes" | "contentLifeCycleStatus" | "planningTimes" | "functionalMetadata" | "productFeatures" | "productLifeCyclePhases" | "productMetadata" | "productVariants" | "qualifications" | "supplies" | "parties";
5
+ type MetadataPropertyVisibilityPolicy = {
6
+ cacheFamily?: MetadataCacheFamily;
7
+ deniedClassIds?: string[];
8
+ deniedPartyRoleIds?: string[];
9
+ };
10
+ declare const METADATA_VISIBILITY_POLICY: Partial<Record<InformationUnitPropertyKey, MetadataPropertyVisibilityPolicy>>;
11
+ type RuntimeSuppressionEntry = {
12
+ reason: "cache-overflow";
13
+ family: MetadataCacheFamily;
14
+ bytes: number;
15
+ limitBytes: number;
16
+ timestamp: string;
17
+ };
18
+ declare const getMetadataCacheFamily: (property: InformationUnitPropertyKey) => MetadataCacheFamily | undefined;
19
+ declare const isMetadataGroupDenied: (property: InformationUnitPropertyKey, options: {
20
+ classId?: string | null;
21
+ partyRoleId?: string | null;
22
+ }) => boolean;
23
+ declare const suppressMetadataCacheFamilyRuntime: (family: MetadataCacheFamily, entry: Omit<RuntimeSuppressionEntry, "family" | "reason" | "timestamp">) => void;
24
+ declare const clearMetadataCacheFamilyRuntimeSuppression: (family: MetadataCacheFamily) => void;
25
+ declare const isMetadataPropertyRuntimeSuppressed: (property: InformationUnitPropertyKey) => boolean;
26
+ declare const getRuntimeSuppressedMetadataFamilies: () => RuntimeSuppressionEntry[];
27
+ declare const resetRuntimeSuppressedMetadataFamiliesForTests: () => void;
28
+
29
+ export { METADATA_VISIBILITY_POLICY, type MetadataCacheFamily, type MetadataPropertyVisibilityPolicy, clearMetadataCacheFamilyRuntimeSuppression, getMetadataCacheFamily, getRuntimeSuppressedMetadataFamilies, isMetadataGroupDenied, isMetadataPropertyRuntimeSuppressed, resetRuntimeSuppressedMetadataFamiliesForTests, suppressMetadataCacheFamilyRuntime };
@@ -0,0 +1,29 @@
1
+ import { InformationUnitPropertyKey } from './read-models/metadata-presentation-config.js';
2
+ import '@c-rex/interfaces';
3
+
4
+ type MetadataCacheFamily = "components" | "informationSubjects" | "documentTypes" | "topicTypes" | "contentLifeCycleStatus" | "planningTimes" | "functionalMetadata" | "productFeatures" | "productLifeCyclePhases" | "productMetadata" | "productVariants" | "qualifications" | "supplies" | "parties";
5
+ type MetadataPropertyVisibilityPolicy = {
6
+ cacheFamily?: MetadataCacheFamily;
7
+ deniedClassIds?: string[];
8
+ deniedPartyRoleIds?: string[];
9
+ };
10
+ declare const METADATA_VISIBILITY_POLICY: Partial<Record<InformationUnitPropertyKey, MetadataPropertyVisibilityPolicy>>;
11
+ type RuntimeSuppressionEntry = {
12
+ reason: "cache-overflow";
13
+ family: MetadataCacheFamily;
14
+ bytes: number;
15
+ limitBytes: number;
16
+ timestamp: string;
17
+ };
18
+ declare const getMetadataCacheFamily: (property: InformationUnitPropertyKey) => MetadataCacheFamily | undefined;
19
+ declare const isMetadataGroupDenied: (property: InformationUnitPropertyKey, options: {
20
+ classId?: string | null;
21
+ partyRoleId?: string | null;
22
+ }) => boolean;
23
+ declare const suppressMetadataCacheFamilyRuntime: (family: MetadataCacheFamily, entry: Omit<RuntimeSuppressionEntry, "family" | "reason" | "timestamp">) => void;
24
+ declare const clearMetadataCacheFamilyRuntimeSuppression: (family: MetadataCacheFamily) => void;
25
+ declare const isMetadataPropertyRuntimeSuppressed: (property: InformationUnitPropertyKey) => boolean;
26
+ declare const getRuntimeSuppressedMetadataFamilies: () => RuntimeSuppressionEntry[];
27
+ declare const resetRuntimeSuppressedMetadataFamiliesForTests: () => void;
28
+
29
+ export { METADATA_VISIBILITY_POLICY, type MetadataCacheFamily, type MetadataPropertyVisibilityPolicy, clearMetadataCacheFamilyRuntimeSuppression, getMetadataCacheFamily, getRuntimeSuppressedMetadataFamilies, isMetadataGroupDenied, isMetadataPropertyRuntimeSuppressed, resetRuntimeSuppressedMetadataFamiliesForTests, suppressMetadataCacheFamilyRuntime };
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/metadata-visibility-policy.ts
21
+ var metadata_visibility_policy_exports = {};
22
+ __export(metadata_visibility_policy_exports, {
23
+ METADATA_VISIBILITY_POLICY: () => METADATA_VISIBILITY_POLICY,
24
+ clearMetadataCacheFamilyRuntimeSuppression: () => clearMetadataCacheFamilyRuntimeSuppression,
25
+ getMetadataCacheFamily: () => getMetadataCacheFamily,
26
+ getRuntimeSuppressedMetadataFamilies: () => getRuntimeSuppressedMetadataFamilies,
27
+ isMetadataGroupDenied: () => isMetadataGroupDenied,
28
+ isMetadataPropertyRuntimeSuppressed: () => isMetadataPropertyRuntimeSuppressed,
29
+ resetRuntimeSuppressedMetadataFamiliesForTests: () => resetRuntimeSuppressedMetadataFamiliesForTests,
30
+ suppressMetadataCacheFamilyRuntime: () => suppressMetadataCacheFamilyRuntime
31
+ });
32
+ module.exports = __toCommonJS(metadata_visibility_policy_exports);
33
+
34
+ // src/read-models/metadata-visibility-policy.ts
35
+ var CONTENT_LICENSE_CLASS_ID = "https://ids.c-crex.net/ns/iirds/ext#ContentLicense";
36
+ var METADATA_VISIBILITY_POLICY = {
37
+ parties: {
38
+ cacheFamily: "parties"
39
+ },
40
+ components: {
41
+ cacheFamily: "components"
42
+ },
43
+ informationSubjects: {
44
+ cacheFamily: "informationSubjects"
45
+ },
46
+ topicTypes: {
47
+ cacheFamily: "topicTypes"
48
+ },
49
+ documentTypes: {
50
+ cacheFamily: "documentTypes"
51
+ },
52
+ contentLifeCycleStatus: {
53
+ cacheFamily: "contentLifeCycleStatus"
54
+ },
55
+ applicableForTypes: {
56
+ cacheFamily: "documentTypes"
57
+ },
58
+ planningTimes: {
59
+ cacheFamily: "planningTimes"
60
+ },
61
+ functionalMetadata: {
62
+ cacheFamily: "functionalMetadata"
63
+ },
64
+ productFeatures: {
65
+ cacheFamily: "productFeatures"
66
+ },
67
+ productLifeCyclePhases: {
68
+ cacheFamily: "productLifeCyclePhases"
69
+ },
70
+ productMetadata: {
71
+ cacheFamily: "productMetadata"
72
+ },
73
+ productVariants: {
74
+ cacheFamily: "productVariants"
75
+ },
76
+ qualifications: {
77
+ cacheFamily: "qualifications",
78
+ deniedClassIds: [CONTENT_LICENSE_CLASS_ID]
79
+ },
80
+ supplies: {
81
+ cacheFamily: "supplies"
82
+ }
83
+ };
84
+ var runtimeSuppressedFamilies = /* @__PURE__ */ new Map();
85
+ var getMetadataCacheFamily = (property) => METADATA_VISIBILITY_POLICY[property]?.cacheFamily;
86
+ var isMetadataGroupDenied = (property, options) => {
87
+ const policy = METADATA_VISIBILITY_POLICY[property];
88
+ const classId = options.classId?.trim();
89
+ const partyRoleId = options.partyRoleId?.trim();
90
+ if (classId && policy?.deniedClassIds?.includes(classId)) {
91
+ return true;
92
+ }
93
+ if (partyRoleId && policy?.deniedPartyRoleIds?.includes(partyRoleId)) {
94
+ return true;
95
+ }
96
+ return false;
97
+ };
98
+ var suppressMetadataCacheFamilyRuntime = (family, entry) => {
99
+ runtimeSuppressedFamilies.set(family, {
100
+ family,
101
+ reason: "cache-overflow",
102
+ bytes: entry.bytes,
103
+ limitBytes: entry.limitBytes,
104
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
105
+ });
106
+ };
107
+ var clearMetadataCacheFamilyRuntimeSuppression = (family) => {
108
+ runtimeSuppressedFamilies.delete(family);
109
+ };
110
+ var isMetadataPropertyRuntimeSuppressed = (property) => {
111
+ const family = getMetadataCacheFamily(property);
112
+ return family ? runtimeSuppressedFamilies.has(family) : false;
113
+ };
114
+ var getRuntimeSuppressedMetadataFamilies = () => Array.from(runtimeSuppressedFamilies.values());
115
+ var resetRuntimeSuppressedMetadataFamiliesForTests = () => {
116
+ runtimeSuppressedFamilies.clear();
117
+ };
118
+ // Annotate the CommonJS export names for ESM import in node:
119
+ 0 && (module.exports = {
120
+ METADATA_VISIBILITY_POLICY,
121
+ clearMetadataCacheFamilyRuntimeSuppression,
122
+ getMetadataCacheFamily,
123
+ getRuntimeSuppressedMetadataFamilies,
124
+ isMetadataGroupDenied,
125
+ isMetadataPropertyRuntimeSuppressed,
126
+ resetRuntimeSuppressedMetadataFamiliesForTests,
127
+ suppressMetadataCacheFamilyRuntime
128
+ });
129
+ //# sourceMappingURL=metadata-visibility-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/metadata-visibility-policy.ts","../src/read-models/metadata-visibility-policy.ts"],"sourcesContent":["export * from \"./read-models/metadata-visibility-policy\";\r\n","import { InformationUnitPropertyKey } from \"./metadata-presentation-config\";\r\n\r\nexport type MetadataCacheFamily =\r\n | \"components\"\r\n | \"informationSubjects\"\r\n | \"documentTypes\"\r\n | \"topicTypes\"\r\n | \"contentLifeCycleStatus\"\r\n | \"planningTimes\"\r\n | \"functionalMetadata\"\r\n | \"productFeatures\"\r\n | \"productLifeCyclePhases\"\r\n | \"productMetadata\"\r\n | \"productVariants\"\r\n | \"qualifications\"\r\n | \"supplies\"\r\n | \"parties\";\r\n\r\nexport type MetadataPropertyVisibilityPolicy = {\r\n cacheFamily?: MetadataCacheFamily;\r\n deniedClassIds?: string[];\r\n deniedPartyRoleIds?: string[];\r\n};\r\n\r\nconst CONTENT_LICENSE_CLASS_ID = \"https://ids.c-crex.net/ns/iirds/ext#ContentLicense\";\r\n\r\nexport const METADATA_VISIBILITY_POLICY: Partial<Record<InformationUnitPropertyKey, MetadataPropertyVisibilityPolicy>> = {\r\n parties: {\r\n cacheFamily: \"parties\",\r\n },\r\n components: {\r\n cacheFamily: \"components\",\r\n },\r\n informationSubjects: {\r\n cacheFamily: \"informationSubjects\",\r\n },\r\n topicTypes: {\r\n cacheFamily: \"topicTypes\",\r\n },\r\n documentTypes: {\r\n cacheFamily: \"documentTypes\",\r\n },\r\n contentLifeCycleStatus: {\r\n cacheFamily: \"contentLifeCycleStatus\",\r\n },\r\n applicableForTypes: {\r\n cacheFamily: \"documentTypes\",\r\n },\r\n planningTimes: {\r\n cacheFamily: \"planningTimes\",\r\n },\r\n functionalMetadata: {\r\n cacheFamily: \"functionalMetadata\",\r\n },\r\n productFeatures: {\r\n cacheFamily: \"productFeatures\",\r\n },\r\n productLifeCyclePhases: {\r\n cacheFamily: \"productLifeCyclePhases\",\r\n },\r\n productMetadata: {\r\n cacheFamily: \"productMetadata\",\r\n },\r\n productVariants: {\r\n cacheFamily: \"productVariants\",\r\n },\r\n qualifications: {\r\n cacheFamily: \"qualifications\",\r\n deniedClassIds: [CONTENT_LICENSE_CLASS_ID],\r\n },\r\n supplies: {\r\n cacheFamily: \"supplies\",\r\n },\r\n};\r\n\r\ntype RuntimeSuppressionEntry = {\r\n reason: \"cache-overflow\";\r\n family: MetadataCacheFamily;\r\n bytes: number;\r\n limitBytes: number;\r\n timestamp: string;\r\n};\r\n\r\nconst runtimeSuppressedFamilies = new Map<MetadataCacheFamily, RuntimeSuppressionEntry>();\r\n\r\nexport const getMetadataCacheFamily = (\r\n property: InformationUnitPropertyKey\r\n): MetadataCacheFamily | undefined => METADATA_VISIBILITY_POLICY[property]?.cacheFamily;\r\n\r\nexport const isMetadataGroupDenied = (\r\n property: InformationUnitPropertyKey,\r\n options: { classId?: string | null; partyRoleId?: string | null }\r\n): boolean => {\r\n const policy = METADATA_VISIBILITY_POLICY[property];\r\n const classId = options.classId?.trim();\r\n const partyRoleId = options.partyRoleId?.trim();\r\n\r\n if (classId && policy?.deniedClassIds?.includes(classId)) {\r\n return true;\r\n }\r\n\r\n if (partyRoleId && policy?.deniedPartyRoleIds?.includes(partyRoleId)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nexport const suppressMetadataCacheFamilyRuntime = (\r\n family: MetadataCacheFamily,\r\n entry: Omit<RuntimeSuppressionEntry, \"family\" | \"reason\" | \"timestamp\">\r\n) => {\r\n runtimeSuppressedFamilies.set(family, {\r\n family,\r\n reason: \"cache-overflow\",\r\n bytes: entry.bytes,\r\n limitBytes: entry.limitBytes,\r\n timestamp: new Date().toISOString(),\r\n });\r\n};\r\n\r\nexport const clearMetadataCacheFamilyRuntimeSuppression = (family: MetadataCacheFamily) => {\r\n runtimeSuppressedFamilies.delete(family);\r\n};\r\n\r\nexport const isMetadataPropertyRuntimeSuppressed = (property: InformationUnitPropertyKey): boolean => {\r\n const family = getMetadataCacheFamily(property);\r\n return family ? runtimeSuppressedFamilies.has(family) : false;\r\n};\r\n\r\nexport const getRuntimeSuppressedMetadataFamilies = (): RuntimeSuppressionEntry[] =>\r\n Array.from(runtimeSuppressedFamilies.values());\r\n\r\nexport const resetRuntimeSuppressedMetadataFamiliesForTests = () => {\r\n runtimeSuppressedFamilies.clear();\r\n};\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACwBA,IAAM,2BAA2B;AAE1B,IAAM,6BAA4G;AAAA,EACrH,SAAS;AAAA,IACL,aAAa;AAAA,EACjB;AAAA,EACA,YAAY;AAAA,IACR,aAAa;AAAA,EACjB;AAAA,EACA,qBAAqB;AAAA,IACjB,aAAa;AAAA,EACjB;AAAA,EACA,YAAY;AAAA,IACR,aAAa;AAAA,EACjB;AAAA,EACA,eAAe;AAAA,IACX,aAAa;AAAA,EACjB;AAAA,EACA,wBAAwB;AAAA,IACpB,aAAa;AAAA,EACjB;AAAA,EACA,oBAAoB;AAAA,IAChB,aAAa;AAAA,EACjB;AAAA,EACA,eAAe;AAAA,IACX,aAAa;AAAA,EACjB;AAAA,EACA,oBAAoB;AAAA,IAChB,aAAa;AAAA,EACjB;AAAA,EACA,iBAAiB;AAAA,IACb,aAAa;AAAA,EACjB;AAAA,EACA,wBAAwB;AAAA,IACpB,aAAa;AAAA,EACjB;AAAA,EACA,iBAAiB;AAAA,IACb,aAAa;AAAA,EACjB;AAAA,EACA,iBAAiB;AAAA,IACb,aAAa;AAAA,EACjB;AAAA,EACA,gBAAgB;AAAA,IACZ,aAAa;AAAA,IACb,gBAAgB,CAAC,wBAAwB;AAAA,EAC7C;AAAA,EACA,UAAU;AAAA,IACN,aAAa;AAAA,EACjB;AACJ;AAUA,IAAM,4BAA4B,oBAAI,IAAkD;AAEjF,IAAM,yBAAyB,CAClC,aACkC,2BAA2B,QAAQ,GAAG;AAErE,IAAM,wBAAwB,CACjC,UACA,YACU;AACV,QAAM,SAAS,2BAA2B,QAAQ;AAClD,QAAM,UAAU,QAAQ,SAAS,KAAK;AACtC,QAAM,cAAc,QAAQ,aAAa,KAAK;AAE9C,MAAI,WAAW,QAAQ,gBAAgB,SAAS,OAAO,GAAG;AACtD,WAAO;AAAA,EACX;AAEA,MAAI,eAAe,QAAQ,oBAAoB,SAAS,WAAW,GAAG;AAClE,WAAO;AAAA,EACX;AAEA,SAAO;AACX;AAEO,IAAM,qCAAqC,CAC9C,QACA,UACC;AACD,4BAA0B,IAAI,QAAQ;AAAA,IAClC;AAAA,IACA,QAAQ;AAAA,IACR,OAAO,MAAM;AAAA,IACb,YAAY,MAAM;AAAA,IAClB,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,EACtC,CAAC;AACL;AAEO,IAAM,6CAA6C,CAAC,WAAgC;AACvF,4BAA0B,OAAO,MAAM;AAC3C;AAEO,IAAM,sCAAsC,CAAC,aAAkD;AAClG,QAAM,SAAS,uBAAuB,QAAQ;AAC9C,SAAO,SAAS,0BAA0B,IAAI,MAAM,IAAI;AAC5D;AAEO,IAAM,uCAAuC,MAChD,MAAM,KAAK,0BAA0B,OAAO,CAAC;AAE1C,IAAM,iDAAiD,MAAM;AAChE,4BAA0B,MAAM;AACpC;","names":[]}
@@ -0,0 +1,95 @@
1
+ // src/read-models/metadata-visibility-policy.ts
2
+ var CONTENT_LICENSE_CLASS_ID = "https://ids.c-crex.net/ns/iirds/ext#ContentLicense";
3
+ var METADATA_VISIBILITY_POLICY = {
4
+ parties: {
5
+ cacheFamily: "parties"
6
+ },
7
+ components: {
8
+ cacheFamily: "components"
9
+ },
10
+ informationSubjects: {
11
+ cacheFamily: "informationSubjects"
12
+ },
13
+ topicTypes: {
14
+ cacheFamily: "topicTypes"
15
+ },
16
+ documentTypes: {
17
+ cacheFamily: "documentTypes"
18
+ },
19
+ contentLifeCycleStatus: {
20
+ cacheFamily: "contentLifeCycleStatus"
21
+ },
22
+ applicableForTypes: {
23
+ cacheFamily: "documentTypes"
24
+ },
25
+ planningTimes: {
26
+ cacheFamily: "planningTimes"
27
+ },
28
+ functionalMetadata: {
29
+ cacheFamily: "functionalMetadata"
30
+ },
31
+ productFeatures: {
32
+ cacheFamily: "productFeatures"
33
+ },
34
+ productLifeCyclePhases: {
35
+ cacheFamily: "productLifeCyclePhases"
36
+ },
37
+ productMetadata: {
38
+ cacheFamily: "productMetadata"
39
+ },
40
+ productVariants: {
41
+ cacheFamily: "productVariants"
42
+ },
43
+ qualifications: {
44
+ cacheFamily: "qualifications",
45
+ deniedClassIds: [CONTENT_LICENSE_CLASS_ID]
46
+ },
47
+ supplies: {
48
+ cacheFamily: "supplies"
49
+ }
50
+ };
51
+ var runtimeSuppressedFamilies = /* @__PURE__ */ new Map();
52
+ var getMetadataCacheFamily = (property) => METADATA_VISIBILITY_POLICY[property]?.cacheFamily;
53
+ var isMetadataGroupDenied = (property, options) => {
54
+ const policy = METADATA_VISIBILITY_POLICY[property];
55
+ const classId = options.classId?.trim();
56
+ const partyRoleId = options.partyRoleId?.trim();
57
+ if (classId && policy?.deniedClassIds?.includes(classId)) {
58
+ return true;
59
+ }
60
+ if (partyRoleId && policy?.deniedPartyRoleIds?.includes(partyRoleId)) {
61
+ return true;
62
+ }
63
+ return false;
64
+ };
65
+ var suppressMetadataCacheFamilyRuntime = (family, entry) => {
66
+ runtimeSuppressedFamilies.set(family, {
67
+ family,
68
+ reason: "cache-overflow",
69
+ bytes: entry.bytes,
70
+ limitBytes: entry.limitBytes,
71
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
72
+ });
73
+ };
74
+ var clearMetadataCacheFamilyRuntimeSuppression = (family) => {
75
+ runtimeSuppressedFamilies.delete(family);
76
+ };
77
+ var isMetadataPropertyRuntimeSuppressed = (property) => {
78
+ const family = getMetadataCacheFamily(property);
79
+ return family ? runtimeSuppressedFamilies.has(family) : false;
80
+ };
81
+ var getRuntimeSuppressedMetadataFamilies = () => Array.from(runtimeSuppressedFamilies.values());
82
+ var resetRuntimeSuppressedMetadataFamiliesForTests = () => {
83
+ runtimeSuppressedFamilies.clear();
84
+ };
85
+ export {
86
+ METADATA_VISIBILITY_POLICY,
87
+ clearMetadataCacheFamilyRuntimeSuppression,
88
+ getMetadataCacheFamily,
89
+ getRuntimeSuppressedMetadataFamilies,
90
+ isMetadataGroupDenied,
91
+ isMetadataPropertyRuntimeSuppressed,
92
+ resetRuntimeSuppressedMetadataFamiliesForTests,
93
+ suppressMetadataCacheFamilyRuntime
94
+ };
95
+ //# sourceMappingURL=metadata-visibility-policy.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/read-models/metadata-visibility-policy.ts"],"sourcesContent":["import { InformationUnitPropertyKey } from \"./metadata-presentation-config\";\r\n\r\nexport type MetadataCacheFamily =\r\n | \"components\"\r\n | \"informationSubjects\"\r\n | \"documentTypes\"\r\n | \"topicTypes\"\r\n | \"contentLifeCycleStatus\"\r\n | \"planningTimes\"\r\n | \"functionalMetadata\"\r\n | \"productFeatures\"\r\n | \"productLifeCyclePhases\"\r\n | \"productMetadata\"\r\n | \"productVariants\"\r\n | \"qualifications\"\r\n | \"supplies\"\r\n | \"parties\";\r\n\r\nexport type MetadataPropertyVisibilityPolicy = {\r\n cacheFamily?: MetadataCacheFamily;\r\n deniedClassIds?: string[];\r\n deniedPartyRoleIds?: string[];\r\n};\r\n\r\nconst CONTENT_LICENSE_CLASS_ID = \"https://ids.c-crex.net/ns/iirds/ext#ContentLicense\";\r\n\r\nexport const METADATA_VISIBILITY_POLICY: Partial<Record<InformationUnitPropertyKey, MetadataPropertyVisibilityPolicy>> = {\r\n parties: {\r\n cacheFamily: \"parties\",\r\n },\r\n components: {\r\n cacheFamily: \"components\",\r\n },\r\n informationSubjects: {\r\n cacheFamily: \"informationSubjects\",\r\n },\r\n topicTypes: {\r\n cacheFamily: \"topicTypes\",\r\n },\r\n documentTypes: {\r\n cacheFamily: \"documentTypes\",\r\n },\r\n contentLifeCycleStatus: {\r\n cacheFamily: \"contentLifeCycleStatus\",\r\n },\r\n applicableForTypes: {\r\n cacheFamily: \"documentTypes\",\r\n },\r\n planningTimes: {\r\n cacheFamily: \"planningTimes\",\r\n },\r\n functionalMetadata: {\r\n cacheFamily: \"functionalMetadata\",\r\n },\r\n productFeatures: {\r\n cacheFamily: \"productFeatures\",\r\n },\r\n productLifeCyclePhases: {\r\n cacheFamily: \"productLifeCyclePhases\",\r\n },\r\n productMetadata: {\r\n cacheFamily: \"productMetadata\",\r\n },\r\n productVariants: {\r\n cacheFamily: \"productVariants\",\r\n },\r\n qualifications: {\r\n cacheFamily: \"qualifications\",\r\n deniedClassIds: [CONTENT_LICENSE_CLASS_ID],\r\n },\r\n supplies: {\r\n cacheFamily: \"supplies\",\r\n },\r\n};\r\n\r\ntype RuntimeSuppressionEntry = {\r\n reason: \"cache-overflow\";\r\n family: MetadataCacheFamily;\r\n bytes: number;\r\n limitBytes: number;\r\n timestamp: string;\r\n};\r\n\r\nconst runtimeSuppressedFamilies = new Map<MetadataCacheFamily, RuntimeSuppressionEntry>();\r\n\r\nexport const getMetadataCacheFamily = (\r\n property: InformationUnitPropertyKey\r\n): MetadataCacheFamily | undefined => METADATA_VISIBILITY_POLICY[property]?.cacheFamily;\r\n\r\nexport const isMetadataGroupDenied = (\r\n property: InformationUnitPropertyKey,\r\n options: { classId?: string | null; partyRoleId?: string | null }\r\n): boolean => {\r\n const policy = METADATA_VISIBILITY_POLICY[property];\r\n const classId = options.classId?.trim();\r\n const partyRoleId = options.partyRoleId?.trim();\r\n\r\n if (classId && policy?.deniedClassIds?.includes(classId)) {\r\n return true;\r\n }\r\n\r\n if (partyRoleId && policy?.deniedPartyRoleIds?.includes(partyRoleId)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nexport const suppressMetadataCacheFamilyRuntime = (\r\n family: MetadataCacheFamily,\r\n entry: Omit<RuntimeSuppressionEntry, \"family\" | \"reason\" | \"timestamp\">\r\n) => {\r\n runtimeSuppressedFamilies.set(family, {\r\n family,\r\n reason: \"cache-overflow\",\r\n bytes: entry.bytes,\r\n limitBytes: entry.limitBytes,\r\n timestamp: new Date().toISOString(),\r\n });\r\n};\r\n\r\nexport const clearMetadataCacheFamilyRuntimeSuppression = (family: MetadataCacheFamily) => {\r\n runtimeSuppressedFamilies.delete(family);\r\n};\r\n\r\nexport const isMetadataPropertyRuntimeSuppressed = (property: InformationUnitPropertyKey): boolean => {\r\n const family = getMetadataCacheFamily(property);\r\n return family ? runtimeSuppressedFamilies.has(family) : false;\r\n};\r\n\r\nexport const getRuntimeSuppressedMetadataFamilies = (): RuntimeSuppressionEntry[] =>\r\n Array.from(runtimeSuppressedFamilies.values());\r\n\r\nexport const resetRuntimeSuppressedMetadataFamiliesForTests = () => {\r\n runtimeSuppressedFamilies.clear();\r\n};\r\n"],"mappings":";AAwBA,IAAM,2BAA2B;AAE1B,IAAM,6BAA4G;AAAA,EACrH,SAAS;AAAA,IACL,aAAa;AAAA,EACjB;AAAA,EACA,YAAY;AAAA,IACR,aAAa;AAAA,EACjB;AAAA,EACA,qBAAqB;AAAA,IACjB,aAAa;AAAA,EACjB;AAAA,EACA,YAAY;AAAA,IACR,aAAa;AAAA,EACjB;AAAA,EACA,eAAe;AAAA,IACX,aAAa;AAAA,EACjB;AAAA,EACA,wBAAwB;AAAA,IACpB,aAAa;AAAA,EACjB;AAAA,EACA,oBAAoB;AAAA,IAChB,aAAa;AAAA,EACjB;AAAA,EACA,eAAe;AAAA,IACX,aAAa;AAAA,EACjB;AAAA,EACA,oBAAoB;AAAA,IAChB,aAAa;AAAA,EACjB;AAAA,EACA,iBAAiB;AAAA,IACb,aAAa;AAAA,EACjB;AAAA,EACA,wBAAwB;AAAA,IACpB,aAAa;AAAA,EACjB;AAAA,EACA,iBAAiB;AAAA,IACb,aAAa;AAAA,EACjB;AAAA,EACA,iBAAiB;AAAA,IACb,aAAa;AAAA,EACjB;AAAA,EACA,gBAAgB;AAAA,IACZ,aAAa;AAAA,IACb,gBAAgB,CAAC,wBAAwB;AAAA,EAC7C;AAAA,EACA,UAAU;AAAA,IACN,aAAa;AAAA,EACjB;AACJ;AAUA,IAAM,4BAA4B,oBAAI,IAAkD;AAEjF,IAAM,yBAAyB,CAClC,aACkC,2BAA2B,QAAQ,GAAG;AAErE,IAAM,wBAAwB,CACjC,UACA,YACU;AACV,QAAM,SAAS,2BAA2B,QAAQ;AAClD,QAAM,UAAU,QAAQ,SAAS,KAAK;AACtC,QAAM,cAAc,QAAQ,aAAa,KAAK;AAE9C,MAAI,WAAW,QAAQ,gBAAgB,SAAS,OAAO,GAAG;AACtD,WAAO;AAAA,EACX;AAEA,MAAI,eAAe,QAAQ,oBAAoB,SAAS,WAAW,GAAG;AAClE,WAAO;AAAA,EACX;AAEA,SAAO;AACX;AAEO,IAAM,qCAAqC,CAC9C,QACA,UACC;AACD,4BAA0B,IAAI,QAAQ;AAAA,IAClC;AAAA,IACA,QAAQ;AAAA,IACR,OAAO,MAAM;AAAA,IACb,YAAY,MAAM;AAAA,IAClB,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,EACtC,CAAC;AACL;AAEO,IAAM,6CAA6C,CAAC,WAAgC;AACvF,4BAA0B,OAAO,MAAM;AAC3C;AAEO,IAAM,sCAAsC,CAAC,aAAkD;AAClG,QAAM,SAAS,uBAAuB,QAAQ;AAC9C,SAAO,SAAS,0BAA0B,IAAI,MAAM,IAAI;AAC5D;AAEO,IAAM,uCAAuC,MAChD,MAAM,KAAK,0BAA0B,OAAO,CAAC;AAE1C,IAAM,iDAAiD,MAAM;AAChE,4BAA0B,MAAM;AACpC;","names":[]}
@@ -1,7 +1,10 @@
1
- import { InformationTypesGetAllQueryParams, ContentLifeCycleStatusGetAllQueryParams, FunctionalMetadatasGetAllQueryParams, PlanningTimesGetAllQueryParams, ProductFeaturesGetAllQueryParams, ProductLifeCyclePhasesGetAllQueryParams, ProductMetadataGetAllQueryParams, ProductVariantsGetAllQueryParams, QualificationsGetAllQueryParams, SuppliesGetAllQueryParams, TopicTypesGetAllQueryParams, RenditionModel, InformationUnitModel } from '@c-rex/interfaces';
1
+ import { InformationTypesGetAllQueryParams, ContentLifeCycleStatusGetAllQueryParams, FunctionalMetadatasGetAllQueryParams, PlanningTimesGetAllQueryParams, ProductFeaturesGetAllQueryParams, ProductLifeCyclePhasesGetAllQueryParams, ProductMetadataGetAllQueryParams, ProductVariantsGetAllQueryParams, QualificationsGetAllQueryParams, SuppliesGetAllQueryParams, TopicTypesGetAllQueryParams, InformationUnitModel } from '@c-rex/interfaces';
2
2
  import { InformationUnitPropertyKey } from './metadata-presentation-config.mjs';
3
3
  export { FacetSectionStrategy, INFORMATION_UNIT_PROPERTY_PRESENTATION, MetadataDisplaySectionStrategy, MetadataPropertyPresentationConfig, MetadataValueKind } from './metadata-presentation-config.mjs';
4
+ import { MetadataFacetPresentation, MetadataDisplayRow } from './metadata-display-builder.mjs';
5
+ export { MetadataFacetLabelOverride, MetadataFacetLabelOverrides, MetadataFacetPresentationItem, buildMetadataDisplayRows, resolveFacetPresentationProperties, resolveLiteralLabel, resolveObjectRefClassLabel, resolveObjectRefLabel, resolveOverrideProperties } from './metadata-display-builder.mjs';
4
6
  export { METADATA_VIEW_PROFILES, MetadataViewProfile, MetadataViewProfileId, resolveFacetTags, resolveMetadataDisplayProperties } from './metadata-view-profile.mjs';
7
+ export { METADATA_VISIBILITY_POLICY, MetadataCacheFamily, MetadataPropertyVisibilityPolicy, clearMetadataCacheFamilyRuntimeSuppression, getMetadataCacheFamily, getRuntimeSuppressedMetadataFamilies, isMetadataGroupDenied, isMetadataPropertyRuntimeSuppressed, resetRuntimeSuppressedMetadataFamiliesForTests, suppressMetadataCacheFamilyRuntime } from '../metadata-visibility-policy.mjs';
5
8
 
6
9
  type TaxonomyEntityRef = {
7
10
  id: string;
@@ -10,10 +13,7 @@ type TaxonomyEntityRef = {
10
13
  };
11
14
  type TaxonomyNode = TaxonomyEntityRef & {
12
15
  classRef?: TaxonomyEntityRef;
13
- hasInformationUnits?: boolean;
14
16
  parentIds: string[];
15
- ancestorIds: string[];
16
- children: TaxonomyNode[];
17
17
  isVirtualGroup?: boolean;
18
18
  };
19
19
  type TaxonomyResult = {
@@ -34,14 +34,11 @@ type PartiesResult = {
34
34
  };
35
35
 
36
36
  type MetadataPropertyKey = "parties" | "components" | "informationSubjects" | "topicTypes" | "documentTypes" | "contentLifeCycleStatus" | "applicableForTypes" | "planningTimes" | "functionalMetadata" | "productFeatures" | "productLifeCyclePhases" | "productMetadata" | "productVariants" | "qualifications" | "supplies";
37
- type TaxonomyReadOptions = {
38
- includeOnlyUsed?: boolean;
39
- };
40
37
  /**
41
38
  * Returns a cached, class-grouped read model for Information Subjects.
42
39
  * Prefers CREX Categories (hierarchy + usage flags) and falls back to legacy InformationSubjects.
43
40
  */
44
- declare const getInformationSubjects: (options?: TaxonomyReadOptions) => Promise<TaxonomyResult>;
41
+ declare const getInformationSubjects: () => Promise<TaxonomyResult>;
45
42
  /**
46
43
  * Returns a cached, class-grouped read model for Document Types.
47
44
  * Current IDS payload does not expose parent links for this type; roots are grouped by class until hierarchy fields are available.
@@ -72,26 +69,13 @@ declare const getMetadataPropertyResolvers: () => Record<MetadataPropertyKey, ()
72
69
 
73
70
  type MetadataPresentationPropertyKey = InformationUnitPropertyKey;
74
71
  /**
75
- * UI-facing label override for one facet value (usually referenced by shortId).
76
- * - `label`: display value label (item label in facet list)
77
- * - `groupLabel`: optional nested group bucket (third level)
78
- * - `sectionLabel`: optional section bucket (second level)
79
- */
80
- type MetadataFacetLabelOverride = {
81
- label: string;
82
- groupLabel?: string;
83
- sectionLabel?: string;
84
- };
85
- type MetadataFacetLabelOverrides = Partial<Record<MetadataPresentationPropertyKey, Record<string, MetadataFacetLabelOverride>>>;
86
- /**
87
- * Optional behavior flags for override generation.
72
+ * Optional behavior flags for facet presentation generation.
88
73
  * Example: enable API-driven "only used entries" mode for informationSubjects.
89
74
  */
90
- type MetadataFacetLabelOptions = {
91
- includeOnlyUsedByProperty?: Partial<Record<MetadataPresentationPropertyKey, boolean>>;
92
- };
75
+ type MetadataFacetPresentationOptions = {};
76
+ type MetadataFacetLabelOptions = MetadataFacetPresentationOptions;
93
77
  /**
94
- * Builds localized facet label metadata from read-models.
78
+ * Builds localized facet presentation metadata from read-models.
95
79
  *
96
80
  * Output shape:
97
81
  * - property key (`parties`, `topicTypes`, ...)
@@ -102,29 +86,23 @@ type MetadataFacetLabelOptions = {
102
86
  * 2) Applies strategy per property:
103
87
  * - `partyRole`: groups parties by role label.
104
88
  * - `class`: groups by class label from taxonomy nodes.
105
- * 3) Applies special class-label override for:
89
+ * 3) Applies special class-label presentation for:
106
90
  * - `topicTypes` -> section label from `TopicType` DomainEntity.
107
91
  * - `contentLifeCycleStatus` -> section label from `ContentLifeCycleStatus` DomainEntity.
108
92
  *
109
93
  * This keeps UI components (facet sidebar/navbar) free from endpoint-specific
110
94
  * branching and ensures one SSOT for label/group generation.
111
95
  */
112
- declare const getMetadataFacetLabelOverrides: (properties?: MetadataPresentationPropertyKey[], uiLanguage?: string, options?: MetadataFacetLabelOptions) => Promise<MetadataFacetLabelOverrides>;
96
+ declare const getMetadataFacetPresentation: (properties?: MetadataPresentationPropertyKey[], uiLanguage?: string, options?: MetadataFacetPresentationOptions) => Promise<MetadataFacetPresentation>;
97
+ declare const getMetadataFacetLabelOverrides: (properties?: MetadataPresentationPropertyKey[], uiLanguage?: string, options?: MetadataFacetPresentationOptions) => Promise<MetadataFacetPresentation>;
113
98
 
114
- type MetadataDisplayRow = {
115
- key: InformationUnitPropertyKey;
116
- label: string;
117
- labelSource: "translationKey" | "direct";
118
- values: string[];
119
- valueType?: "text" | "language" | "rendition";
120
- renditions?: RenditionModel[];
121
- };
122
- type BuildMetadataDisplayRowsOptions = {
99
+ type GetMetadataDisplayRowsOptions = {
123
100
  uiLanguage: string;
124
101
  includeProperties?: InformationUnitPropertyKey[];
125
- overrides?: MetadataFacetLabelOverrides;
102
+ presentation?: MetadataFacetPresentation;
103
+ overrides?: MetadataFacetPresentation;
126
104
  };
127
- declare const getMetadataDisplayRows: (data: InformationUnitModel, options: BuildMetadataDisplayRowsOptions) => Promise<MetadataDisplayRow[]>;
105
+ declare const getMetadataDisplayRows: (data: InformationUnitModel, options: GetMetadataDisplayRowsOptions) => Promise<MetadataDisplayRow[]>;
128
106
 
129
107
  type AvailableLanguageVersion = {
130
108
  shortId: string;
@@ -142,4 +120,4 @@ declare const READMODEL_CACHE_POLICY: {
142
120
  readonly requestsRevalidateSeconds: number;
143
121
  };
144
122
 
145
- export { type AvailableLanguageVersion, InformationUnitPropertyKey, type MetadataDisplayRow, type MetadataFacetLabelOptions, type MetadataFacetLabelOverride, type MetadataFacetLabelOverrides, type MetadataPresentationPropertyKey, type PartiesResult, type PartyNode, READMODEL_CACHE_POLICY, type TaxonomyEntityRef, type TaxonomyNode, type TaxonomyResult, getApplicableForTypes, getAvailableLanguagesByVersionOf, getComponents, getContentLifeCycleStatus, getDocumentTypes, getFunctionalMetadata, getInformationSubjects, getMetadataDisplayRows, getMetadataFacetLabelOverrides, getMetadataPropertyResolvers, getParties, getPlanningTimes, getProductFeatures, getProductLifeCyclePhases, getProductMetadata, getProductVariants, getQualifications, getSupplies, getTopicTypes };
123
+ export { type AvailableLanguageVersion, InformationUnitPropertyKey, MetadataDisplayRow, type MetadataFacetLabelOptions, MetadataFacetPresentation, type MetadataFacetPresentationOptions, type MetadataPresentationPropertyKey, type PartiesResult, type PartyNode, READMODEL_CACHE_POLICY, type TaxonomyEntityRef, type TaxonomyNode, type TaxonomyResult, getApplicableForTypes, getAvailableLanguagesByVersionOf, getComponents, getContentLifeCycleStatus, getDocumentTypes, getFunctionalMetadata, getInformationSubjects, getMetadataDisplayRows, getMetadataFacetLabelOverrides, getMetadataFacetPresentation, getMetadataPropertyResolvers, getParties, getPlanningTimes, getProductFeatures, getProductLifeCyclePhases, getProductMetadata, getProductVariants, getQualifications, getSupplies, getTopicTypes };
@@ -1,7 +1,10 @@
1
- import { InformationTypesGetAllQueryParams, ContentLifeCycleStatusGetAllQueryParams, FunctionalMetadatasGetAllQueryParams, PlanningTimesGetAllQueryParams, ProductFeaturesGetAllQueryParams, ProductLifeCyclePhasesGetAllQueryParams, ProductMetadataGetAllQueryParams, ProductVariantsGetAllQueryParams, QualificationsGetAllQueryParams, SuppliesGetAllQueryParams, TopicTypesGetAllQueryParams, RenditionModel, InformationUnitModel } from '@c-rex/interfaces';
1
+ import { InformationTypesGetAllQueryParams, ContentLifeCycleStatusGetAllQueryParams, FunctionalMetadatasGetAllQueryParams, PlanningTimesGetAllQueryParams, ProductFeaturesGetAllQueryParams, ProductLifeCyclePhasesGetAllQueryParams, ProductMetadataGetAllQueryParams, ProductVariantsGetAllQueryParams, QualificationsGetAllQueryParams, SuppliesGetAllQueryParams, TopicTypesGetAllQueryParams, InformationUnitModel } from '@c-rex/interfaces';
2
2
  import { InformationUnitPropertyKey } from './metadata-presentation-config.js';
3
3
  export { FacetSectionStrategy, INFORMATION_UNIT_PROPERTY_PRESENTATION, MetadataDisplaySectionStrategy, MetadataPropertyPresentationConfig, MetadataValueKind } from './metadata-presentation-config.js';
4
+ import { MetadataFacetPresentation, MetadataDisplayRow } from './metadata-display-builder.js';
5
+ export { MetadataFacetLabelOverride, MetadataFacetLabelOverrides, MetadataFacetPresentationItem, buildMetadataDisplayRows, resolveFacetPresentationProperties, resolveLiteralLabel, resolveObjectRefClassLabel, resolveObjectRefLabel, resolveOverrideProperties } from './metadata-display-builder.js';
4
6
  export { METADATA_VIEW_PROFILES, MetadataViewProfile, MetadataViewProfileId, resolveFacetTags, resolveMetadataDisplayProperties } from './metadata-view-profile.js';
7
+ export { METADATA_VISIBILITY_POLICY, MetadataCacheFamily, MetadataPropertyVisibilityPolicy, clearMetadataCacheFamilyRuntimeSuppression, getMetadataCacheFamily, getRuntimeSuppressedMetadataFamilies, isMetadataGroupDenied, isMetadataPropertyRuntimeSuppressed, resetRuntimeSuppressedMetadataFamiliesForTests, suppressMetadataCacheFamilyRuntime } from '../metadata-visibility-policy.js';
5
8
 
6
9
  type TaxonomyEntityRef = {
7
10
  id: string;
@@ -10,10 +13,7 @@ type TaxonomyEntityRef = {
10
13
  };
11
14
  type TaxonomyNode = TaxonomyEntityRef & {
12
15
  classRef?: TaxonomyEntityRef;
13
- hasInformationUnits?: boolean;
14
16
  parentIds: string[];
15
- ancestorIds: string[];
16
- children: TaxonomyNode[];
17
17
  isVirtualGroup?: boolean;
18
18
  };
19
19
  type TaxonomyResult = {
@@ -34,14 +34,11 @@ type PartiesResult = {
34
34
  };
35
35
 
36
36
  type MetadataPropertyKey = "parties" | "components" | "informationSubjects" | "topicTypes" | "documentTypes" | "contentLifeCycleStatus" | "applicableForTypes" | "planningTimes" | "functionalMetadata" | "productFeatures" | "productLifeCyclePhases" | "productMetadata" | "productVariants" | "qualifications" | "supplies";
37
- type TaxonomyReadOptions = {
38
- includeOnlyUsed?: boolean;
39
- };
40
37
  /**
41
38
  * Returns a cached, class-grouped read model for Information Subjects.
42
39
  * Prefers CREX Categories (hierarchy + usage flags) and falls back to legacy InformationSubjects.
43
40
  */
44
- declare const getInformationSubjects: (options?: TaxonomyReadOptions) => Promise<TaxonomyResult>;
41
+ declare const getInformationSubjects: () => Promise<TaxonomyResult>;
45
42
  /**
46
43
  * Returns a cached, class-grouped read model for Document Types.
47
44
  * Current IDS payload does not expose parent links for this type; roots are grouped by class until hierarchy fields are available.
@@ -72,26 +69,13 @@ declare const getMetadataPropertyResolvers: () => Record<MetadataPropertyKey, ()
72
69
 
73
70
  type MetadataPresentationPropertyKey = InformationUnitPropertyKey;
74
71
  /**
75
- * UI-facing label override for one facet value (usually referenced by shortId).
76
- * - `label`: display value label (item label in facet list)
77
- * - `groupLabel`: optional nested group bucket (third level)
78
- * - `sectionLabel`: optional section bucket (second level)
79
- */
80
- type MetadataFacetLabelOverride = {
81
- label: string;
82
- groupLabel?: string;
83
- sectionLabel?: string;
84
- };
85
- type MetadataFacetLabelOverrides = Partial<Record<MetadataPresentationPropertyKey, Record<string, MetadataFacetLabelOverride>>>;
86
- /**
87
- * Optional behavior flags for override generation.
72
+ * Optional behavior flags for facet presentation generation.
88
73
  * Example: enable API-driven "only used entries" mode for informationSubjects.
89
74
  */
90
- type MetadataFacetLabelOptions = {
91
- includeOnlyUsedByProperty?: Partial<Record<MetadataPresentationPropertyKey, boolean>>;
92
- };
75
+ type MetadataFacetPresentationOptions = {};
76
+ type MetadataFacetLabelOptions = MetadataFacetPresentationOptions;
93
77
  /**
94
- * Builds localized facet label metadata from read-models.
78
+ * Builds localized facet presentation metadata from read-models.
95
79
  *
96
80
  * Output shape:
97
81
  * - property key (`parties`, `topicTypes`, ...)
@@ -102,29 +86,23 @@ type MetadataFacetLabelOptions = {
102
86
  * 2) Applies strategy per property:
103
87
  * - `partyRole`: groups parties by role label.
104
88
  * - `class`: groups by class label from taxonomy nodes.
105
- * 3) Applies special class-label override for:
89
+ * 3) Applies special class-label presentation for:
106
90
  * - `topicTypes` -> section label from `TopicType` DomainEntity.
107
91
  * - `contentLifeCycleStatus` -> section label from `ContentLifeCycleStatus` DomainEntity.
108
92
  *
109
93
  * This keeps UI components (facet sidebar/navbar) free from endpoint-specific
110
94
  * branching and ensures one SSOT for label/group generation.
111
95
  */
112
- declare const getMetadataFacetLabelOverrides: (properties?: MetadataPresentationPropertyKey[], uiLanguage?: string, options?: MetadataFacetLabelOptions) => Promise<MetadataFacetLabelOverrides>;
96
+ declare const getMetadataFacetPresentation: (properties?: MetadataPresentationPropertyKey[], uiLanguage?: string, options?: MetadataFacetPresentationOptions) => Promise<MetadataFacetPresentation>;
97
+ declare const getMetadataFacetLabelOverrides: (properties?: MetadataPresentationPropertyKey[], uiLanguage?: string, options?: MetadataFacetPresentationOptions) => Promise<MetadataFacetPresentation>;
113
98
 
114
- type MetadataDisplayRow = {
115
- key: InformationUnitPropertyKey;
116
- label: string;
117
- labelSource: "translationKey" | "direct";
118
- values: string[];
119
- valueType?: "text" | "language" | "rendition";
120
- renditions?: RenditionModel[];
121
- };
122
- type BuildMetadataDisplayRowsOptions = {
99
+ type GetMetadataDisplayRowsOptions = {
123
100
  uiLanguage: string;
124
101
  includeProperties?: InformationUnitPropertyKey[];
125
- overrides?: MetadataFacetLabelOverrides;
102
+ presentation?: MetadataFacetPresentation;
103
+ overrides?: MetadataFacetPresentation;
126
104
  };
127
- declare const getMetadataDisplayRows: (data: InformationUnitModel, options: BuildMetadataDisplayRowsOptions) => Promise<MetadataDisplayRow[]>;
105
+ declare const getMetadataDisplayRows: (data: InformationUnitModel, options: GetMetadataDisplayRowsOptions) => Promise<MetadataDisplayRow[]>;
128
106
 
129
107
  type AvailableLanguageVersion = {
130
108
  shortId: string;
@@ -142,4 +120,4 @@ declare const READMODEL_CACHE_POLICY: {
142
120
  readonly requestsRevalidateSeconds: number;
143
121
  };
144
122
 
145
- export { type AvailableLanguageVersion, InformationUnitPropertyKey, type MetadataDisplayRow, type MetadataFacetLabelOptions, type MetadataFacetLabelOverride, type MetadataFacetLabelOverrides, type MetadataPresentationPropertyKey, type PartiesResult, type PartyNode, READMODEL_CACHE_POLICY, type TaxonomyEntityRef, type TaxonomyNode, type TaxonomyResult, getApplicableForTypes, getAvailableLanguagesByVersionOf, getComponents, getContentLifeCycleStatus, getDocumentTypes, getFunctionalMetadata, getInformationSubjects, getMetadataDisplayRows, getMetadataFacetLabelOverrides, getMetadataPropertyResolvers, getParties, getPlanningTimes, getProductFeatures, getProductLifeCyclePhases, getProductMetadata, getProductVariants, getQualifications, getSupplies, getTopicTypes };
123
+ export { type AvailableLanguageVersion, InformationUnitPropertyKey, MetadataDisplayRow, type MetadataFacetLabelOptions, MetadataFacetPresentation, type MetadataFacetPresentationOptions, type MetadataPresentationPropertyKey, type PartiesResult, type PartyNode, READMODEL_CACHE_POLICY, type TaxonomyEntityRef, type TaxonomyNode, type TaxonomyResult, getApplicableForTypes, getAvailableLanguagesByVersionOf, getComponents, getContentLifeCycleStatus, getDocumentTypes, getFunctionalMetadata, getInformationSubjects, getMetadataDisplayRows, getMetadataFacetLabelOverrides, getMetadataFacetPresentation, getMetadataPropertyResolvers, getParties, getPlanningTimes, getProductFeatures, getProductLifeCyclePhases, getProductMetadata, getProductVariants, getQualifications, getSupplies, getTopicTypes };