edilkamin
    Preparing search index...

    Function deriveUsageAnalytics

    • Derives usage analytics from an existing DeviceInfo response. This is a pure function that performs client-side calculations without API calls.

      Use this when you already have a DeviceInfo object (e.g., from a previous deviceInfo() call) to avoid making an additional API request.

      Parameters

      • deviceInfo: DeviceInfoType

        The device info response object.

      • OptionalserviceThreshold: number = DEFAULT_SERVICE_THRESHOLD

        Service threshold in hours.

      Returns UsageAnalyticsType

      • Comprehensive usage analytics.
      const info = await api.deviceInfo(token, mac);
      const analytics = deriveUsageAnalytics(info);