@c-rex/services 0.1.18 → 0.1.20
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/dist/{client-requests.d.mts → generated/client-requests.d.mts} +11 -7
- package/dist/{client-requests.d.ts → generated/client-requests.d.ts} +11 -7
- package/dist/{client-requests.js → generated/client-requests.js} +90 -80
- package/dist/generated/client-requests.js.map +1 -0
- package/dist/{client-requests.mjs → generated/client-requests.mjs} +88 -80
- package/dist/generated/client-requests.mjs.map +1 -0
- package/dist/{server-requests.d.mts → generated/server-requests.d.mts} +11 -7
- package/dist/{server-requests.d.ts → generated/server-requests.d.ts} +11 -7
- package/dist/{server-requests.js → generated/server-requests.js} +103 -81
- package/dist/generated/server-requests.js.map +1 -0
- package/dist/{server-requests.mjs → generated/server-requests.mjs} +101 -81
- package/dist/generated/server-requests.mjs.map +1 -0
- package/dist/index.d.mts +44 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +3268 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2905 -0
- package/dist/index.mjs.map +1 -0
- package/dist/read-models/index.d.mts +244 -0
- package/dist/read-models/index.d.ts +244 -0
- package/dist/read-models/index.js +1268 -0
- package/dist/read-models/index.js.map +1 -0
- package/dist/read-models/index.mjs +1226 -0
- package/dist/read-models/index.mjs.map +1 -0
- package/dist/vcard/index.d.mts +102 -0
- package/dist/vcard/index.d.ts +102 -0
- package/dist/vcard/index.js +561 -0
- package/dist/vcard/index.js.map +1 -0
- package/dist/vcard/index.mjs +522 -0
- package/dist/vcard/index.mjs.map +1 -0
- package/package.json +69 -49
- package/dist/client-requests.js.map +0 -1
- package/dist/client-requests.mjs.map +0 -1
- package/dist/server-requests.js.map +0 -1
- package/dist/server-requests.mjs.map +0 -1
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { InformationTypesGetAllQueryParams, ContentLifeCycleStatusGetAllQueryParams, FunctionalMetadatasGetAllQueryParams, PlanningTimesGetAllQueryParams, ProductFeaturesGetAllQueryParams, ProductLifeCyclePhasesGetAllQueryParams, ProductMetadataGetAllQueryParams, ProductVariantsGetAllQueryParams, QualificationsGetAllQueryParams, SuppliesGetAllQueryParams, TopicTypesGetAllQueryParams, InformationUnitModel } from '@c-rex/interfaces';
|
|
2
|
+
|
|
3
|
+
type TaxonomyEntityRef = {
|
|
4
|
+
id: string;
|
|
5
|
+
shortId?: string;
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
type TaxonomyNode = TaxonomyEntityRef & {
|
|
9
|
+
classRef?: TaxonomyEntityRef;
|
|
10
|
+
hasInformationUnits?: boolean;
|
|
11
|
+
parentIds: string[];
|
|
12
|
+
ancestorIds: string[];
|
|
13
|
+
children: TaxonomyNode[];
|
|
14
|
+
isVirtualGroup?: boolean;
|
|
15
|
+
};
|
|
16
|
+
type TaxonomyResult = {
|
|
17
|
+
roots: TaxonomyNode[];
|
|
18
|
+
nodesById: Record<string, TaxonomyNode>;
|
|
19
|
+
generatedAt: string;
|
|
20
|
+
};
|
|
21
|
+
type PartyNode = TaxonomyEntityRef & {
|
|
22
|
+
role?: TaxonomyEntityRef;
|
|
23
|
+
vcardId?: string;
|
|
24
|
+
};
|
|
25
|
+
type PartiesResult = {
|
|
26
|
+
groups: Array<{
|
|
27
|
+
role: TaxonomyEntityRef;
|
|
28
|
+
parties: PartyNode[];
|
|
29
|
+
}>;
|
|
30
|
+
generatedAt: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type MetadataPropertyKey = "parties" | "components" | "informationSubjects" | "topicTypes" | "documentTypes" | "contentLifeCycleStatus" | "applicableForTypes" | "planningTimes" | "functionalMetadata" | "productFeatures" | "productLifeCyclePhases" | "productMetadata" | "productVariants" | "qualifications" | "supplies";
|
|
34
|
+
type TaxonomyReadOptions = {
|
|
35
|
+
includeOnlyUsed?: boolean;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Returns a cached, class-grouped read model for Information Subjects.
|
|
39
|
+
* Prefers CREX Categories (hierarchy + usage flags) and falls back to legacy InformationSubjects.
|
|
40
|
+
*/
|
|
41
|
+
declare const getInformationSubjects: (options?: TaxonomyReadOptions) => Promise<TaxonomyResult>;
|
|
42
|
+
/**
|
|
43
|
+
* Returns a cached, class-grouped read model for Document Types.
|
|
44
|
+
* Current IDS payload does not expose parent links for this type; roots are grouped by class until hierarchy fields are available.
|
|
45
|
+
*/
|
|
46
|
+
declare const getDocumentTypes: () => Promise<TaxonomyResult>;
|
|
47
|
+
/**
|
|
48
|
+
* Returns a cached read model for Components.
|
|
49
|
+
* Uses IDS parent/ancestor fields when available and groups root nodes by class.
|
|
50
|
+
*/
|
|
51
|
+
declare const getComponents: () => Promise<TaxonomyResult>;
|
|
52
|
+
/**
|
|
53
|
+
* Returns a cached read model for Parties grouped by partyRole.
|
|
54
|
+
* VCard references are included when available and can be resolved separately via VCARD endpoints.
|
|
55
|
+
*/
|
|
56
|
+
declare const getParties: () => Promise<PartiesResult>;
|
|
57
|
+
declare const getTopicTypes: (query?: Partial<TopicTypesGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
58
|
+
declare const getContentLifeCycleStatus: (query?: Partial<ContentLifeCycleStatusGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
59
|
+
declare const getApplicableForTypes: (query?: Partial<InformationTypesGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
60
|
+
declare const getPlanningTimes: (query?: Partial<PlanningTimesGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
61
|
+
declare const getFunctionalMetadata: (query?: Partial<FunctionalMetadatasGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
62
|
+
declare const getProductFeatures: (query?: Partial<ProductFeaturesGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
63
|
+
declare const getProductLifeCyclePhases: (query?: Partial<ProductLifeCyclePhasesGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
64
|
+
declare const getProductMetadata: (query?: Partial<ProductMetadataGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
65
|
+
declare const getProductVariants: (query?: Partial<ProductVariantsGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
66
|
+
declare const getQualifications: (query?: Partial<QualificationsGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
67
|
+
declare const getSupplies: (query?: Partial<SuppliesGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
68
|
+
declare const getMetadataPropertyResolvers: () => Record<MetadataPropertyKey, () => Promise<TaxonomyResult | PartiesResult>>;
|
|
69
|
+
|
|
70
|
+
type InformationUnitPropertyKey = keyof InformationUnitModel;
|
|
71
|
+
/**
|
|
72
|
+
* Describes the raw shape of a metadata property value in InformationUnitModel.
|
|
73
|
+
* This drives generic rendering/grouping logic without coupling to one concrete UI control.
|
|
74
|
+
*/
|
|
75
|
+
type MetadataValueKind =
|
|
76
|
+
/** Primitive scalar (string/number/date-like value). */
|
|
77
|
+
"scalar"
|
|
78
|
+
/** Array of localized literals ({ language, value }). */
|
|
79
|
+
| "literalArray"
|
|
80
|
+
/** Array of primitive strings. */
|
|
81
|
+
| "stringArray"
|
|
82
|
+
/** Single ObjectRef relation. */
|
|
83
|
+
| "objectRef"
|
|
84
|
+
/** Multiple ObjectRef relations. */
|
|
85
|
+
| "objectRefArray"
|
|
86
|
+
/** Array of API resource links. */
|
|
87
|
+
| "resourceLinkArray"
|
|
88
|
+
/** Array of rendition entries. */
|
|
89
|
+
| "renditionArray";
|
|
90
|
+
/**
|
|
91
|
+
* Defines how facet search sections are derived for one metadata property.
|
|
92
|
+
*/
|
|
93
|
+
type FacetSectionStrategy = "none" | "class" | "partyRole";
|
|
94
|
+
/**
|
|
95
|
+
* Defines how generic metadata display sections are derived (property grid, card metadata, etc.).
|
|
96
|
+
* Name is intentionally control-agnostic and not tied to InformationUnitMetadataGrid.
|
|
97
|
+
*/
|
|
98
|
+
type MetadataDisplaySectionStrategy = "none" | "class" | "partyRole";
|
|
99
|
+
/**
|
|
100
|
+
* Central presentation contract for one InformationUnit metadata property.
|
|
101
|
+
* - facet: behavior for facet search grouping.
|
|
102
|
+
* - metadataDisplay: behavior for generic metadata rendering components.
|
|
103
|
+
*/
|
|
104
|
+
type MetadataPropertyPresentationConfig = {
|
|
105
|
+
/** Raw value shape from API model. */
|
|
106
|
+
valueKind: MetadataValueKind;
|
|
107
|
+
facet: {
|
|
108
|
+
/** If false, property is not used as facet dimension. */
|
|
109
|
+
supported: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* How facet sections are built:
|
|
112
|
+
* - "none": keep the property as one flat facet group (no additional taxonomy section split).
|
|
113
|
+
* - "class": split entries by their class label.
|
|
114
|
+
* - "partyRole": split entries by party role label.
|
|
115
|
+
*/
|
|
116
|
+
sectionStrategy: FacetSectionStrategy;
|
|
117
|
+
};
|
|
118
|
+
metadataDisplay: {
|
|
119
|
+
/** If false, property is not rendered in generic metadata displays. */
|
|
120
|
+
supported: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* How metadata sections are built in generic displays:
|
|
123
|
+
* - "none": keep one property row/group.
|
|
124
|
+
* - "class": split/group by class label.
|
|
125
|
+
* - "partyRole": split/group by party role label.
|
|
126
|
+
*/
|
|
127
|
+
sectionStrategy: MetadataDisplaySectionStrategy;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Central presentation rules for all InformationUnitModel properties.
|
|
132
|
+
* This is the single source of truth for facet grouping and generic metadata display behavior.
|
|
133
|
+
*/
|
|
134
|
+
declare const INFORMATION_UNIT_PROPERTY_PRESENTATION: Record<InformationUnitPropertyKey, MetadataPropertyPresentationConfig>;
|
|
135
|
+
|
|
136
|
+
type MetadataPresentationPropertyKey = InformationUnitPropertyKey;
|
|
137
|
+
/**
|
|
138
|
+
* UI-facing label override for one facet value (usually referenced by shortId).
|
|
139
|
+
* - `label`: display value label (item label in facet list)
|
|
140
|
+
* - `groupLabel`: optional nested group bucket (third level)
|
|
141
|
+
* - `sectionLabel`: optional section bucket (second level)
|
|
142
|
+
*/
|
|
143
|
+
type MetadataFacetLabelOverride = {
|
|
144
|
+
label: string;
|
|
145
|
+
groupLabel?: string;
|
|
146
|
+
sectionLabel?: string;
|
|
147
|
+
};
|
|
148
|
+
type MetadataFacetLabelOverrides = Partial<Record<MetadataPresentationPropertyKey, Record<string, MetadataFacetLabelOverride>>>;
|
|
149
|
+
/**
|
|
150
|
+
* Optional behavior flags for override generation.
|
|
151
|
+
* Example: enable API-driven "only used entries" mode for informationSubjects.
|
|
152
|
+
*/
|
|
153
|
+
type MetadataFacetLabelOptions = {
|
|
154
|
+
includeOnlyUsedByProperty?: Partial<Record<MetadataPresentationPropertyKey, boolean>>;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Builds localized facet label metadata from read-models.
|
|
158
|
+
*
|
|
159
|
+
* Output shape:
|
|
160
|
+
* - property key (`parties`, `topicTypes`, ...)
|
|
161
|
+
* - shortId map -> `{ label, sectionLabel?, groupLabel? }`
|
|
162
|
+
*
|
|
163
|
+
* Resolution strategy:
|
|
164
|
+
* 1) Reads central property config (`INFORMATION_UNIT_PROPERTY_PRESENTATION`).
|
|
165
|
+
* 2) Applies strategy per property:
|
|
166
|
+
* - `partyRole`: groups parties by role label.
|
|
167
|
+
* - `class`: groups by class label from taxonomy nodes.
|
|
168
|
+
* 3) Applies special class-label override for:
|
|
169
|
+
* - `topicTypes` -> section label from `TopicType` DomainEntity.
|
|
170
|
+
* - `contentLifeCycleStatus` -> section label from `ContentLifeCycleStatus` DomainEntity.
|
|
171
|
+
*
|
|
172
|
+
* This keeps UI components (facet sidebar/navbar) free from endpoint-specific
|
|
173
|
+
* branching and ensures one SSOT for label/group generation.
|
|
174
|
+
*/
|
|
175
|
+
declare const getMetadataFacetLabelOverrides: (properties?: MetadataPresentationPropertyKey[], uiLanguage?: string, options?: MetadataFacetLabelOptions) => Promise<MetadataFacetLabelOverrides>;
|
|
176
|
+
|
|
177
|
+
type MetadataDisplayRow = {
|
|
178
|
+
key: InformationUnitPropertyKey;
|
|
179
|
+
label: string;
|
|
180
|
+
labelSource: "translationKey" | "direct";
|
|
181
|
+
values: string[];
|
|
182
|
+
valueType?: "text" | "language";
|
|
183
|
+
};
|
|
184
|
+
type BuildMetadataDisplayRowsOptions = {
|
|
185
|
+
uiLanguage: string;
|
|
186
|
+
includeProperties?: InformationUnitPropertyKey[];
|
|
187
|
+
overrides?: MetadataFacetLabelOverrides;
|
|
188
|
+
};
|
|
189
|
+
declare const getMetadataDisplayRows: (data: InformationUnitModel, options: BuildMetadataDisplayRowsOptions) => Promise<MetadataDisplayRow[]>;
|
|
190
|
+
|
|
191
|
+
type AvailableLanguageVersion = {
|
|
192
|
+
shortId: string;
|
|
193
|
+
language: string;
|
|
194
|
+
};
|
|
195
|
+
declare const getAvailableLanguagesByVersionOf: (versionOfShortId?: string | null) => Promise<AvailableLanguageVersion[]>;
|
|
196
|
+
|
|
197
|
+
type MetadataViewProfileId = "default-search" | "information-unit-search" | "default-metadata-display";
|
|
198
|
+
type MetadataViewProfile = {
|
|
199
|
+
id: MetadataViewProfileId;
|
|
200
|
+
facet?: {
|
|
201
|
+
includeProperties?: InformationUnitPropertyKey[];
|
|
202
|
+
excludeProperties?: InformationUnitPropertyKey[];
|
|
203
|
+
includeZeroHits?: boolean;
|
|
204
|
+
extraTags?: string[];
|
|
205
|
+
};
|
|
206
|
+
metadataDisplay?: {
|
|
207
|
+
includeProperties?: InformationUnitPropertyKey[];
|
|
208
|
+
excludeProperties?: InformationUnitPropertyKey[];
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
declare const METADATA_VIEW_PROFILES: Record<MetadataViewProfileId, MetadataViewProfile>;
|
|
212
|
+
type ResolveFacetTagsOptions = {
|
|
213
|
+
profileId?: MetadataViewProfileId;
|
|
214
|
+
includeProperties?: string[];
|
|
215
|
+
excludeProperties?: string[];
|
|
216
|
+
extraTags?: string[];
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* Resolves API tag keys for facet requests from one central profile definition.
|
|
220
|
+
* Use this instead of hardcoded page-level tag arrays.
|
|
221
|
+
*/
|
|
222
|
+
declare const resolveFacetTags: (options?: ResolveFacetTagsOptions) => string[];
|
|
223
|
+
type ResolveMetadataDisplayPropertiesOptions = {
|
|
224
|
+
profileId?: MetadataViewProfileId;
|
|
225
|
+
includeProperties?: string[];
|
|
226
|
+
excludeProperties?: string[];
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Resolves the effective metadata properties used by generic metadata displays.
|
|
230
|
+
* Supports profile-level defaults and usage-specific include/exclude narrowing.
|
|
231
|
+
*/
|
|
232
|
+
declare const resolveMetadataDisplayProperties: (options?: ResolveMetadataDisplayPropertiesOptions) => InformationUnitPropertyKey[];
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Central read-model cache policy (seconds).
|
|
236
|
+
* Values can be overridden per environment to tune cache windows by top-level domain.
|
|
237
|
+
*/
|
|
238
|
+
declare const READMODEL_CACHE_POLICY: {
|
|
239
|
+
readonly metadataRevalidateSeconds: number;
|
|
240
|
+
readonly vcardRevalidateSeconds: number;
|
|
241
|
+
readonly requestsRevalidateSeconds: number;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
export { type AvailableLanguageVersion, type FacetSectionStrategy, INFORMATION_UNIT_PROPERTY_PRESENTATION, type InformationUnitPropertyKey, METADATA_VIEW_PROFILES, type MetadataDisplayRow, type MetadataDisplaySectionStrategy, type MetadataFacetLabelOptions, type MetadataFacetLabelOverride, type MetadataFacetLabelOverrides, type MetadataPresentationPropertyKey, type MetadataPropertyPresentationConfig, type MetadataValueKind, type MetadataViewProfile, type MetadataViewProfileId, 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, resolveFacetTags, resolveMetadataDisplayProperties };
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { InformationTypesGetAllQueryParams, ContentLifeCycleStatusGetAllQueryParams, FunctionalMetadatasGetAllQueryParams, PlanningTimesGetAllQueryParams, ProductFeaturesGetAllQueryParams, ProductLifeCyclePhasesGetAllQueryParams, ProductMetadataGetAllQueryParams, ProductVariantsGetAllQueryParams, QualificationsGetAllQueryParams, SuppliesGetAllQueryParams, TopicTypesGetAllQueryParams, InformationUnitModel } from '@c-rex/interfaces';
|
|
2
|
+
|
|
3
|
+
type TaxonomyEntityRef = {
|
|
4
|
+
id: string;
|
|
5
|
+
shortId?: string;
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
type TaxonomyNode = TaxonomyEntityRef & {
|
|
9
|
+
classRef?: TaxonomyEntityRef;
|
|
10
|
+
hasInformationUnits?: boolean;
|
|
11
|
+
parentIds: string[];
|
|
12
|
+
ancestorIds: string[];
|
|
13
|
+
children: TaxonomyNode[];
|
|
14
|
+
isVirtualGroup?: boolean;
|
|
15
|
+
};
|
|
16
|
+
type TaxonomyResult = {
|
|
17
|
+
roots: TaxonomyNode[];
|
|
18
|
+
nodesById: Record<string, TaxonomyNode>;
|
|
19
|
+
generatedAt: string;
|
|
20
|
+
};
|
|
21
|
+
type PartyNode = TaxonomyEntityRef & {
|
|
22
|
+
role?: TaxonomyEntityRef;
|
|
23
|
+
vcardId?: string;
|
|
24
|
+
};
|
|
25
|
+
type PartiesResult = {
|
|
26
|
+
groups: Array<{
|
|
27
|
+
role: TaxonomyEntityRef;
|
|
28
|
+
parties: PartyNode[];
|
|
29
|
+
}>;
|
|
30
|
+
generatedAt: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type MetadataPropertyKey = "parties" | "components" | "informationSubjects" | "topicTypes" | "documentTypes" | "contentLifeCycleStatus" | "applicableForTypes" | "planningTimes" | "functionalMetadata" | "productFeatures" | "productLifeCyclePhases" | "productMetadata" | "productVariants" | "qualifications" | "supplies";
|
|
34
|
+
type TaxonomyReadOptions = {
|
|
35
|
+
includeOnlyUsed?: boolean;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Returns a cached, class-grouped read model for Information Subjects.
|
|
39
|
+
* Prefers CREX Categories (hierarchy + usage flags) and falls back to legacy InformationSubjects.
|
|
40
|
+
*/
|
|
41
|
+
declare const getInformationSubjects: (options?: TaxonomyReadOptions) => Promise<TaxonomyResult>;
|
|
42
|
+
/**
|
|
43
|
+
* Returns a cached, class-grouped read model for Document Types.
|
|
44
|
+
* Current IDS payload does not expose parent links for this type; roots are grouped by class until hierarchy fields are available.
|
|
45
|
+
*/
|
|
46
|
+
declare const getDocumentTypes: () => Promise<TaxonomyResult>;
|
|
47
|
+
/**
|
|
48
|
+
* Returns a cached read model for Components.
|
|
49
|
+
* Uses IDS parent/ancestor fields when available and groups root nodes by class.
|
|
50
|
+
*/
|
|
51
|
+
declare const getComponents: () => Promise<TaxonomyResult>;
|
|
52
|
+
/**
|
|
53
|
+
* Returns a cached read model for Parties grouped by partyRole.
|
|
54
|
+
* VCard references are included when available and can be resolved separately via VCARD endpoints.
|
|
55
|
+
*/
|
|
56
|
+
declare const getParties: () => Promise<PartiesResult>;
|
|
57
|
+
declare const getTopicTypes: (query?: Partial<TopicTypesGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
58
|
+
declare const getContentLifeCycleStatus: (query?: Partial<ContentLifeCycleStatusGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
59
|
+
declare const getApplicableForTypes: (query?: Partial<InformationTypesGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
60
|
+
declare const getPlanningTimes: (query?: Partial<PlanningTimesGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
61
|
+
declare const getFunctionalMetadata: (query?: Partial<FunctionalMetadatasGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
62
|
+
declare const getProductFeatures: (query?: Partial<ProductFeaturesGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
63
|
+
declare const getProductLifeCyclePhases: (query?: Partial<ProductLifeCyclePhasesGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
64
|
+
declare const getProductMetadata: (query?: Partial<ProductMetadataGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
65
|
+
declare const getProductVariants: (query?: Partial<ProductVariantsGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
66
|
+
declare const getQualifications: (query?: Partial<QualificationsGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
67
|
+
declare const getSupplies: (query?: Partial<SuppliesGetAllQueryParams>) => Promise<TaxonomyResult>;
|
|
68
|
+
declare const getMetadataPropertyResolvers: () => Record<MetadataPropertyKey, () => Promise<TaxonomyResult | PartiesResult>>;
|
|
69
|
+
|
|
70
|
+
type InformationUnitPropertyKey = keyof InformationUnitModel;
|
|
71
|
+
/**
|
|
72
|
+
* Describes the raw shape of a metadata property value in InformationUnitModel.
|
|
73
|
+
* This drives generic rendering/grouping logic without coupling to one concrete UI control.
|
|
74
|
+
*/
|
|
75
|
+
type MetadataValueKind =
|
|
76
|
+
/** Primitive scalar (string/number/date-like value). */
|
|
77
|
+
"scalar"
|
|
78
|
+
/** Array of localized literals ({ language, value }). */
|
|
79
|
+
| "literalArray"
|
|
80
|
+
/** Array of primitive strings. */
|
|
81
|
+
| "stringArray"
|
|
82
|
+
/** Single ObjectRef relation. */
|
|
83
|
+
| "objectRef"
|
|
84
|
+
/** Multiple ObjectRef relations. */
|
|
85
|
+
| "objectRefArray"
|
|
86
|
+
/** Array of API resource links. */
|
|
87
|
+
| "resourceLinkArray"
|
|
88
|
+
/** Array of rendition entries. */
|
|
89
|
+
| "renditionArray";
|
|
90
|
+
/**
|
|
91
|
+
* Defines how facet search sections are derived for one metadata property.
|
|
92
|
+
*/
|
|
93
|
+
type FacetSectionStrategy = "none" | "class" | "partyRole";
|
|
94
|
+
/**
|
|
95
|
+
* Defines how generic metadata display sections are derived (property grid, card metadata, etc.).
|
|
96
|
+
* Name is intentionally control-agnostic and not tied to InformationUnitMetadataGrid.
|
|
97
|
+
*/
|
|
98
|
+
type MetadataDisplaySectionStrategy = "none" | "class" | "partyRole";
|
|
99
|
+
/**
|
|
100
|
+
* Central presentation contract for one InformationUnit metadata property.
|
|
101
|
+
* - facet: behavior for facet search grouping.
|
|
102
|
+
* - metadataDisplay: behavior for generic metadata rendering components.
|
|
103
|
+
*/
|
|
104
|
+
type MetadataPropertyPresentationConfig = {
|
|
105
|
+
/** Raw value shape from API model. */
|
|
106
|
+
valueKind: MetadataValueKind;
|
|
107
|
+
facet: {
|
|
108
|
+
/** If false, property is not used as facet dimension. */
|
|
109
|
+
supported: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* How facet sections are built:
|
|
112
|
+
* - "none": keep the property as one flat facet group (no additional taxonomy section split).
|
|
113
|
+
* - "class": split entries by their class label.
|
|
114
|
+
* - "partyRole": split entries by party role label.
|
|
115
|
+
*/
|
|
116
|
+
sectionStrategy: FacetSectionStrategy;
|
|
117
|
+
};
|
|
118
|
+
metadataDisplay: {
|
|
119
|
+
/** If false, property is not rendered in generic metadata displays. */
|
|
120
|
+
supported: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* How metadata sections are built in generic displays:
|
|
123
|
+
* - "none": keep one property row/group.
|
|
124
|
+
* - "class": split/group by class label.
|
|
125
|
+
* - "partyRole": split/group by party role label.
|
|
126
|
+
*/
|
|
127
|
+
sectionStrategy: MetadataDisplaySectionStrategy;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Central presentation rules for all InformationUnitModel properties.
|
|
132
|
+
* This is the single source of truth for facet grouping and generic metadata display behavior.
|
|
133
|
+
*/
|
|
134
|
+
declare const INFORMATION_UNIT_PROPERTY_PRESENTATION: Record<InformationUnitPropertyKey, MetadataPropertyPresentationConfig>;
|
|
135
|
+
|
|
136
|
+
type MetadataPresentationPropertyKey = InformationUnitPropertyKey;
|
|
137
|
+
/**
|
|
138
|
+
* UI-facing label override for one facet value (usually referenced by shortId).
|
|
139
|
+
* - `label`: display value label (item label in facet list)
|
|
140
|
+
* - `groupLabel`: optional nested group bucket (third level)
|
|
141
|
+
* - `sectionLabel`: optional section bucket (second level)
|
|
142
|
+
*/
|
|
143
|
+
type MetadataFacetLabelOverride = {
|
|
144
|
+
label: string;
|
|
145
|
+
groupLabel?: string;
|
|
146
|
+
sectionLabel?: string;
|
|
147
|
+
};
|
|
148
|
+
type MetadataFacetLabelOverrides = Partial<Record<MetadataPresentationPropertyKey, Record<string, MetadataFacetLabelOverride>>>;
|
|
149
|
+
/**
|
|
150
|
+
* Optional behavior flags for override generation.
|
|
151
|
+
* Example: enable API-driven "only used entries" mode for informationSubjects.
|
|
152
|
+
*/
|
|
153
|
+
type MetadataFacetLabelOptions = {
|
|
154
|
+
includeOnlyUsedByProperty?: Partial<Record<MetadataPresentationPropertyKey, boolean>>;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Builds localized facet label metadata from read-models.
|
|
158
|
+
*
|
|
159
|
+
* Output shape:
|
|
160
|
+
* - property key (`parties`, `topicTypes`, ...)
|
|
161
|
+
* - shortId map -> `{ label, sectionLabel?, groupLabel? }`
|
|
162
|
+
*
|
|
163
|
+
* Resolution strategy:
|
|
164
|
+
* 1) Reads central property config (`INFORMATION_UNIT_PROPERTY_PRESENTATION`).
|
|
165
|
+
* 2) Applies strategy per property:
|
|
166
|
+
* - `partyRole`: groups parties by role label.
|
|
167
|
+
* - `class`: groups by class label from taxonomy nodes.
|
|
168
|
+
* 3) Applies special class-label override for:
|
|
169
|
+
* - `topicTypes` -> section label from `TopicType` DomainEntity.
|
|
170
|
+
* - `contentLifeCycleStatus` -> section label from `ContentLifeCycleStatus` DomainEntity.
|
|
171
|
+
*
|
|
172
|
+
* This keeps UI components (facet sidebar/navbar) free from endpoint-specific
|
|
173
|
+
* branching and ensures one SSOT for label/group generation.
|
|
174
|
+
*/
|
|
175
|
+
declare const getMetadataFacetLabelOverrides: (properties?: MetadataPresentationPropertyKey[], uiLanguage?: string, options?: MetadataFacetLabelOptions) => Promise<MetadataFacetLabelOverrides>;
|
|
176
|
+
|
|
177
|
+
type MetadataDisplayRow = {
|
|
178
|
+
key: InformationUnitPropertyKey;
|
|
179
|
+
label: string;
|
|
180
|
+
labelSource: "translationKey" | "direct";
|
|
181
|
+
values: string[];
|
|
182
|
+
valueType?: "text" | "language";
|
|
183
|
+
};
|
|
184
|
+
type BuildMetadataDisplayRowsOptions = {
|
|
185
|
+
uiLanguage: string;
|
|
186
|
+
includeProperties?: InformationUnitPropertyKey[];
|
|
187
|
+
overrides?: MetadataFacetLabelOverrides;
|
|
188
|
+
};
|
|
189
|
+
declare const getMetadataDisplayRows: (data: InformationUnitModel, options: BuildMetadataDisplayRowsOptions) => Promise<MetadataDisplayRow[]>;
|
|
190
|
+
|
|
191
|
+
type AvailableLanguageVersion = {
|
|
192
|
+
shortId: string;
|
|
193
|
+
language: string;
|
|
194
|
+
};
|
|
195
|
+
declare const getAvailableLanguagesByVersionOf: (versionOfShortId?: string | null) => Promise<AvailableLanguageVersion[]>;
|
|
196
|
+
|
|
197
|
+
type MetadataViewProfileId = "default-search" | "information-unit-search" | "default-metadata-display";
|
|
198
|
+
type MetadataViewProfile = {
|
|
199
|
+
id: MetadataViewProfileId;
|
|
200
|
+
facet?: {
|
|
201
|
+
includeProperties?: InformationUnitPropertyKey[];
|
|
202
|
+
excludeProperties?: InformationUnitPropertyKey[];
|
|
203
|
+
includeZeroHits?: boolean;
|
|
204
|
+
extraTags?: string[];
|
|
205
|
+
};
|
|
206
|
+
metadataDisplay?: {
|
|
207
|
+
includeProperties?: InformationUnitPropertyKey[];
|
|
208
|
+
excludeProperties?: InformationUnitPropertyKey[];
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
declare const METADATA_VIEW_PROFILES: Record<MetadataViewProfileId, MetadataViewProfile>;
|
|
212
|
+
type ResolveFacetTagsOptions = {
|
|
213
|
+
profileId?: MetadataViewProfileId;
|
|
214
|
+
includeProperties?: string[];
|
|
215
|
+
excludeProperties?: string[];
|
|
216
|
+
extraTags?: string[];
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* Resolves API tag keys for facet requests from one central profile definition.
|
|
220
|
+
* Use this instead of hardcoded page-level tag arrays.
|
|
221
|
+
*/
|
|
222
|
+
declare const resolveFacetTags: (options?: ResolveFacetTagsOptions) => string[];
|
|
223
|
+
type ResolveMetadataDisplayPropertiesOptions = {
|
|
224
|
+
profileId?: MetadataViewProfileId;
|
|
225
|
+
includeProperties?: string[];
|
|
226
|
+
excludeProperties?: string[];
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Resolves the effective metadata properties used by generic metadata displays.
|
|
230
|
+
* Supports profile-level defaults and usage-specific include/exclude narrowing.
|
|
231
|
+
*/
|
|
232
|
+
declare const resolveMetadataDisplayProperties: (options?: ResolveMetadataDisplayPropertiesOptions) => InformationUnitPropertyKey[];
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Central read-model cache policy (seconds).
|
|
236
|
+
* Values can be overridden per environment to tune cache windows by top-level domain.
|
|
237
|
+
*/
|
|
238
|
+
declare const READMODEL_CACHE_POLICY: {
|
|
239
|
+
readonly metadataRevalidateSeconds: number;
|
|
240
|
+
readonly vcardRevalidateSeconds: number;
|
|
241
|
+
readonly requestsRevalidateSeconds: number;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
export { type AvailableLanguageVersion, type FacetSectionStrategy, INFORMATION_UNIT_PROPERTY_PRESENTATION, type InformationUnitPropertyKey, METADATA_VIEW_PROFILES, type MetadataDisplayRow, type MetadataDisplaySectionStrategy, type MetadataFacetLabelOptions, type MetadataFacetLabelOverride, type MetadataFacetLabelOverrides, type MetadataPresentationPropertyKey, type MetadataPropertyPresentationConfig, type MetadataValueKind, type MetadataViewProfile, type MetadataViewProfileId, 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, resolveFacetTags, resolveMetadataDisplayProperties };
|