Skip to main content

Vendor

A Vendor groups related StatusCode definitions together. Vendors are defined in the Resource Status Definition Asset and accessed through StatusRegistry or Status lookup methods.

The internal vendor "LAY" (ID 1) is reserved for layline.io system statuses. Your custom vendors start from ID 2.


At a Glance

// Get vendor via Status helper
const vendor = Status.getVendorByName('MyApplication');

// Or via registry
const vendor = statusRegistry.getVendorByLongName('MyApplication');

// Browse status codes
vendor.statusCodes.forEach(code => {
stream.logInfo(`${code.code}: ${code.message}`);
});

Properties

PropertyTypeDescription
idnumberVendor ID (1 = internal LAY, 2+ = custom)
longNamestringFull vendor name
shortNamestringShort vendor identifier
statusCodesStatusCode[]All status codes for this vendor
const vendor = Status.getVendorByName('MyApplication');

stream.logInfo(vendor.id); // 2
stream.logInfo(vendor.longName); // "MyApplication"
stream.logInfo(vendor.shortName); // "MYAPP"
stream.logInfo(vendor.statusCodes.length); // 25

See Also