import IPostMessage from '../IPostMessage'; import { IDeviceInfo, IDeviceLocation, IDeviceTag, IOrganizationTag } from './IDeviceInfo'; /** * The `sos.deviceInfo` API groups together methods for retrieving information about the device set in the CloudControl, such as location or * tags. */ export default class DeviceInfo implements IDeviceInfo { private messagePrefix; private postMessage; static MESSAGE_PREFIX: string; /** @internal */ constructor(messagePrefix: string, postMessage: IPostMessage); /** * The `getLocation()` method returns location of the device with child tags if available. Location is requested from server on application start, automatically * updated when changed and persisted in local storage. * * :::note * Location can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/DeviceLocation/paths/~1v1~1device~1%7BdeviceUid%7D~1location~1%7BlocationUid%7D/get). * ::: * * @returns {Promise} A promise that resolves to the device location or `null` if not set. * @since 5.2.0 */ getLocation(): Promise; /** * @deprecated Please use `getDeviceTags()` method instead. */ getOrganizationTags(): Promise; /** * The `getDeviceName()` method returns a name of the device. Name is requested from server on application start, automatically * updated when changed and persisted in local storage. * * :::note * Device name can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/Device/paths/~1v2~1device~1%7BdeviceUid%7D/get). * ::: * * @returns {Promise} A promise that resolves to the device name. * @since 6.6.0 * * @example * const deviceName = await sos.deviceInfo.getDeviceName(); * console.log(`Device name is: ${deviceName}`); */ getDeviceName(): Promise; /** * The `getDeviceTags()` method returns all organization tags assigned to the device including parent tags, if available. * Tags are requested from server on application start, automatically updated when changed and persisted in local storage. * * :::note * Tags can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/DeviceTag-(Device-Tags)). * ::: * * @returns {Promise} A promise that returns the device tags. * @since 8.5.0 */ getDeviceTags(): Promise; private getMessage; private geDeviceNameFromTittle; }