labelwriter / core/src / skuInfoToMedia
Function: skuInfoToMedia()
skuInfoToMedia(
sku):object
Map a SkuInfo payload to a PrinterStatus-compatible detectedMedia descriptor for round-tripping into the registry.
The SKU number and dimensions are sufficient to identify the roll for downstream UI ("you have X loaded"). We deliberately don't extend the MediaDescriptor shape here; consumers that need material / counter / NFC fields can read the full SkuInfo.
Parameters
sku
Returns
object
heightMm?
optionalheightMm?:number
id
id:
string
name
name:
string
type
type:
"die-cut"|"continuous"
widthMm
widthMm:
number