# Platform Methods Access TelemetryOS platform features including accounts, users, devices, applications, and proxy services for external content fetching. # Platform Methods Access to accounts, users, devices, applications, and proxy services. ## Overview These methods provide access to TelemetryOS platform features and information: * **Accounts** - Current account information * **Users** - Current user information * **Devices** - Device hardware information * **Applications** - Application discovery and embedding ## Accounts API Access information about the current TelemetryOS account. ### Import ```typescript import { accounts } from '@telemetryos/sdk'; ``` ### getCurrent() Retrieve current account information. **Signature:** ```typescript async getCurrent(): Promise<{ id: string }> ``` **Returns:** Promise resolving to account object **Example:** ```typescript const account = await accounts().getCurrent(); ``` ## Users API Access information about the current user. ### Import ```typescript import { users } from '@telemetryos/sdk'; ``` ### getCurrent() Retrieve current user information. **Signature:** ```typescript async getCurrent(): Promise<{ id: string }> ``` **Returns:** Promise resolving to user object **Example:** ```typescript const user = await users().getCurrent(); ``` ## Devices API Access device hardware information. ### Import ```typescript import { devices } from '@telemetryos/sdk'; ``` ### getInformation() Retrieve hardware information about the current device. **Signature:** ```typescript async getInformation(): Promise ``` **DeviceInformation Type:** ```typescript type DeviceInformation = { deviceSerialNumber: string; deviceModel: string; deviceManufacturer: string; devicePlatform: string; } ``` **Returns:** Promise resolving to device information **Example:** ```typescript const info = await devices().getInformation(); ``` **Note:** Only available on physical devices (not in admin portal) ## Applications API Discover and embed other TelemetryOS applications. ### Import ```typescript import { applications } from '@telemetryos/sdk'; ``` ### getAllByMountPoint() Find all applications with a specific mount point. **Signature:** ```typescript async getAllByMountPoint(mountPoint: string): Promise ``` **Application Type:** ```typescript type Application = { name: string; mountPoints: Record; } type MountPoint = { path: string; [key: string]: any; } ``` **Parameters:** * `mountPoint` - Mount point identifier to search for **Returns:** Array of applications with that mount point **Example:** ```typescript const widgets = await applications().getAllByMountPoint('dashboard-widget'); ``` ### getByName() Find a specific application by name. **Signature:** ```typescript async getByName(name: string): Promise ``` **Parameters:** * `name` - Application name **Returns:** Application object or `null` if not found **Example:** ```typescript const weatherApp = await applications().getByName('weather-widget'); ``` ### setDependencies() Declare application dependencies for preloading. **Signature:** ```typescript async setDependencies(applicationSpecifiers: string[]): Promise<{ ready: string[]; unavailable: string[]; }> ``` **Parameters:** * `applicationSpecifiers` - Array of application specifier strings **Returns:** Object with `ready` and `unavailable` arrays **Example:** ```typescript const result = await applications().setDependencies([ 'weather-widget-hash123', 'news-ticker-hash456' ]); ``` **Important:** Call and await `setDependencies()` before loading sub-applications in iframes. ## Next Steps * **[Storage API](./storage-methods.md)** - Store application data * **[Code Examples](../Development/code-examples.md)** - Complete integration examples * **[Client API](./client-methods.md)** - Low-level messaging API