@yuuvis/client-core 2.1.31 → 2.1.33
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.
|
@@ -1343,6 +1343,13 @@ class SystemService {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
return objectType;
|
|
1345
1345
|
}
|
|
1346
|
+
getRelationship(id, withLabel) {
|
|
1347
|
+
const relationship = this.system.relationships.find((r) => r.id === id);
|
|
1348
|
+
if (relationship && withLabel) {
|
|
1349
|
+
relationship.label = this.getLocalizedResource(`${relationship.id}_label`) || relationship.id;
|
|
1350
|
+
}
|
|
1351
|
+
return relationship;
|
|
1352
|
+
}
|
|
1346
1353
|
/**
|
|
1347
1354
|
* Get the base document type all documents belong to
|
|
1348
1355
|
* @param withLabel Whether or not to also add the types label
|
|
@@ -1654,11 +1661,21 @@ class SystemService {
|
|
|
1654
1661
|
isFolder: false,
|
|
1655
1662
|
fields: this.#resolveObjectTypeFields(std, propertiesQA, objectTypesQA)
|
|
1656
1663
|
}));
|
|
1664
|
+
const relationships = schemaResponse.typeRelationshipDefinition.map((std) => ({
|
|
1665
|
+
id: std.id,
|
|
1666
|
+
description: std.description,
|
|
1667
|
+
baseId: std.baseId,
|
|
1668
|
+
fields: this.#resolveObjectTypeFields(std, propertiesQA, objectTypesQA),
|
|
1669
|
+
// allowedSourceType
|
|
1670
|
+
allowedSourceTypes: std.allowedSourceType.map(t => t.objectTypeReference),
|
|
1671
|
+
allowedTargetTypes: std.allowedTargetType.map(t => t.objectTypeReference)
|
|
1672
|
+
}));
|
|
1657
1673
|
this.system = {
|
|
1658
1674
|
version: schemaResponse.version,
|
|
1659
1675
|
lastModificationDate: schemaResponse.lastModificationDate,
|
|
1660
1676
|
objectTypes,
|
|
1661
1677
|
secondaryObjectTypes,
|
|
1678
|
+
relationships,
|
|
1662
1679
|
i18n: localizedResource,
|
|
1663
1680
|
allFields: propertiesQA
|
|
1664
1681
|
};
|