• Preparing search index...
  • The search index is not available
@espressif/rainmaker-neo-base-sdk
  • @espressif/rainmaker-neo-base-sdk
  • utils/tsDataUtils
  • transformTSAggregateEntry

Function transformTSAggregateEntry

  • transformTSAggregateEntry(
        entry: ESPRMNeoTSAggregateEntryAPI,
        requestedWindow?: ESPRMNeoTSAggregationWindow,
    ): ESPRMNeoTSAggregateEntry

    Maps a raw API aggregate entry into an ESPRMNeoTSAggregateEntry.

    The backend emits two entry shapes:

    • Nested (windows: {hourly: {...}, ...}) — only the current-aggregates query with no window param (all windows at once).
    • Flat — historical date/start_date+end_date queries and the current-single-window query put the stats directly on the entry ({date, window_start, count, average, ...}), with no windows map.

    Flat entries are nested under requestedWindow so consumers always read entry.windows[window] regardless of query mode.

    Parameters

    • entry: ESPRMNeoTSAggregateEntryAPI
    • OptionalrequestedWindow: ESPRMNeoTSAggregationWindow

    Returns ESPRMNeoTSAggregateEntry

    • Defined in src/utils/tsDataUtils.ts:208

Settings

Member Visibility
@espressif/rainmaker-neo-base-sdk
  • Loading...

Generated using TypeDoc