feat(1c): expose unresolved template descriptor codes
This commit is contained in:
@@ -4173,7 +4173,15 @@ def public_template_summary(
|
||||
}
|
||||
)
|
||||
descriptor_type_codes = sorted(
|
||||
{code for code in (template_descriptor_type_code_from_part(part) for part in parts) if code is not None},
|
||||
{
|
||||
code
|
||||
for code in (
|
||||
str(part.get("descriptor_type_code")) if str(part.get("descriptor_type_code") or "").isdecimal()
|
||||
else template_descriptor_type_code_from_part(part)
|
||||
for part in parts
|
||||
)
|
||||
if code is not None
|
||||
},
|
||||
key=int,
|
||||
)
|
||||
features = {
|
||||
@@ -42503,6 +42511,9 @@ def metadata_object_templates(payload: dict[str, Any]) -> dict[str, Any]:
|
||||
for part in parts_result.get("parts") or []:
|
||||
classification = part.get("classification") or {}
|
||||
public_part = payload_public_properties(classification)
|
||||
descriptor_type_code = template_descriptor_type_code_from_part(part)
|
||||
if descriptor_type_code is not None:
|
||||
public_part["descriptor_type_code"] = descriptor_type_code
|
||||
public_part["undecoded_evidence"] = payload_public_undecoded_evidence(
|
||||
classification,
|
||||
include_text_preview=bool(include_text),
|
||||
|
||||
Reference in New Issue
Block a user