Labels Module
Functions and values
| Function or value |
Description
|
|
The built-in AT Protocol label definitions.
|
Full Usage:
createLabelMap customLabels
Parameters:
LabelDefinition list
Returns: Map<(string * string), LabelDefinition>
|
Merge built-in labels with custom labeler-defined labels into a lookup map. Custom labels are keyed by (labelerDid, identifier). Built-in labels use ("", identifier). When looking up, the label source DID is used to prefer custom definitions from the same labeler, falling back to built-in definitions.
|
|
Find a built-in label definition by its identifier string.
|
Full Usage:
findLabelWithCustom labelMap labelerDid identifier
Parameters:
Map<(string * string), LabelDefinition>
labelerDid : string
identifier : string
Returns: LabelDefinition option
|
Find a label definition by identifier and optional labeler DID. First checks for a custom definition from the given labeler, then falls back to the built-in definition.
|
Full Usage:
interpretLabelValueDefinition def definedBy
Parameters:
CustomLabelValueDef
definedBy : string option
Returns: LabelDefinition
|
Interpret a custom label value definition from a labeler into a LabelDefinition. Follows the TypeScript SDK's interpretLabelValueDefinition pattern: maps severity/blurs to context-specific behaviors, sets configurable=true, and adds NoSelf + optional Adult flags.
|
Full Usage:
interpretLabelValueDefinitions labelerDid defs
Parameters:
string
defs : CustomLabelValueDef list
Returns: LabelDefinition list
|
Interpret multiple custom label value definitions from a labeler. Filters to only valid custom label identifiers (not system labels starting with '!').
|
Full Usage:
isCustomLabelValue identifier
Parameters:
string
Returns: bool
|
Check whether a label identifier matches the custom label value pattern (lowercase letters and hyphens).
|