Constructors

Properties

addDeviceToFleet: ((deviceId, fleetId) => Promise<any>) = addDeviceToFleet

Type declaration

    • (deviceId, fleetId): Promise<any>
    • Parameters

      • deviceId: string
      • fleetId: string

      Returns Promise<any>

aggregateTelemetry: ((query) => Promise<IStreamAggregateData<keyof IStreamTypeMap>[]>) = aggregateTelemetry

Type declaration

createFleet: ((fleet) => Promise<IFleet>) = createFleet

Type declaration

createShareLink: ((share, view) => Promise<null | string>) = createShareLink

Type declaration

    • (share, view): Promise<null | string>
    • Parameters

      • share: IShare
      • view: string

        View name

      Returns Promise<null | string>

defaultDeviceId: undefined | string
deleteFleet: ((id) => Promise<void>) = deleteFleet

Type declaration

    • (id): Promise<void>
    • Parameters

      • id: string

      Returns Promise<void>

eventsCounter: ((eventTypes, timeFrame, range, time, query?) => Promise<{
    date: string;
    events: IEvent[];
}[]>) = eventsCounter

Type declaration

    • (eventTypes, timeFrame, range, time, query?): Promise<{
          date: string;
          events: IEvent[];
      }[]>
    • Parameters

      • eventTypes: ("custom" | "annotation" | "triggered-event" | "datapoint-event" | "device-online" | "device-offline" | "intervention-request" | "teleop-session-record" | "port-forwarding-session-record" | "command-request" | "command-response" | "command-delivery" | "intervention-response" | "comment" | "system" | "task-summary" | "stateful")[]
      • timeFrame: AggregateLevel
      • range: number
      • time: number
      • Optional query: IEventQuery

      Returns Promise<{
          date: string;
          events: IEvent[];
      }[]>

getAllEventTriggerGroup: (() => Promise<IEventTriggerGroup[]>) = getAllEventTriggerGroup

Type declaration

    • (): Promise<IEventTriggerGroup[]>
    • Returns Promise<IEventTriggerGroup[]>

getAnalyticStreams: (() => Promise<IStreamColumn[]>) = getAnalyticStreams

Type declaration

    • (): Promise<IStreamColumn[]>
    • retrieves a list of all available data streams that can be used for running analytics. This function takes no arguments and returns a list of stream names that can be used for analyzing data.

      Returns Promise<IStreamColumn[]>

      Example

      // Returns
      [
      {
      streamName: "$.agent.health",
      streamType : "health"
      },
      {
      streamName: "up.hours",
      streamType : "numeric"
      }
      ]
getAnalyticsModules: (() => Promise<IAnalyticsModule>) = getAnalyticsModules

Type declaration

getAnalyticsRows: ((query) => Promise<any>) = getAnalyticsRows

Type declaration

    • (query): Promise<any>
    • Retrieves all rows sqlQuery is required

      Parameters

      Returns Promise<any>

getAnnotationCount: ((query, tagKey) => Promise<{
    [key: string]: number;
}>) = getAnnotationCount

Type declaration

    • (query, tagKey): Promise<{
          [key: string]: number;
      }>
    • Parameters

      Returns Promise<{
          [key: string]: number;
      }>

getAnnotationCountByIntervals: ((query, tagKey, aggregate) => Promise<{
    annotations: {
        [key: string]: number;
    };
    date: string;
}[]>) = getAnnotationCountByIntervals

Type declaration

    • (query, tagKey, aggregate): Promise<{
          annotations: {
              [key: string]: number;
          };
          date: string;
      }[]>
    • Parameters

      Returns Promise<{
          annotations: {
              [key: string]: number;
          };
          date: string;
      }[]>

getCurrentGroup: (() => Promise<Device[] | undefined>) = getCurrentGroup

Type declaration

    • (): Promise<Device[] | undefined>
    • Returns Promise<Device[] | undefined>

getDevices: (() => Promise<Device[]>) = getDevices

Type declaration

getEvent: ((uuid) => Promise<IEvent>) = getEvent

Type declaration

    • (uuid): Promise<IEvent>
    • Parameters

      • uuid: string

      Returns Promise<IEvent>

getEventTriggerGroup: ((id) => Promise<IEventTriggerGroup>) = getEventTriggerGroup

Type declaration

    • (id): Promise<IEventTriggerGroup>
    • Parameters

      • id: string

      Returns Promise<IEventTriggerGroup>

getFileUrl: ((uuid) => Promise<string>) = getFileUrl

Type declaration

    • (uuid): Promise<string>
    • Parameters

      • uuid: string

      Returns Promise<string>

getFleet: ((id) => Promise<IFleet>) = getFleet

Type declaration

    • (id): Promise<IFleet>
    • Parameters

      • id: string

      Returns Promise<IFleet>

getFleetDevices: ((id) => Promise<void>) = getFleetDevices

Type declaration

    • (id): Promise<void>
    • Parameters

      • id: string

      Returns Promise<void>

getInterventions: (() => Promise<IEvent[]>) = getInterventions

Type declaration

getLatestTelemetry: ((...ids) => Promise<IStreamCurrentValue<keyof IStreamTypeMap>[]>) = getLatestTelemetry

Type declaration

getOnlineDevices: (() => Promise<Device[]>) = getOnlineDevices

Type declaration

getPeers: (() => Promise<IRtcPeer[]>) = getPeers

Type declaration

    • (): Promise<IRtcPeer[]>
    • Returns Promise<IRtcPeer[]>

getRealtimeDevices: (() => Promise<Device[]>) = getRealtimeDevices

Type declaration

getRealtimeSessions: (() => Promise<{
    [key in string]: string[]
}>) = getRealtimeSessions

Type declaration

    • (): Promise<{
          [key in string]: string[]
      }>
    • Returns Promise<{
          [key in string]: string[]
      }>

getStreams: (() => Promise<IStream[]>) = getStreams

Type declaration

getTaskReportRows: ((query) => Promise<any>) = getTaskReportRows

Type declaration

    • (query): Promise<any>
    • Parameters

      Returns Promise<any>

getTaskReportTables: (() => Promise<ITaskReportColumn[]>) = getTaskReportTables

Type declaration

    • (): Promise<ITaskReportColumn[]>
    • retrieves a list of all available tables that can be used to create task reports. This function takes no arguments and returns a list of table names that can be used for creating task reports.

      Returns Promise<ITaskReportColumn[]>

      List all available tables

      Example

      // Returns
      [
      {
      name: "",
      tableName: "TASK_REPORTS_CLEANING_MODE",
      columns: [
      {
      name: "TYPE",
      isNullable: true,
      dataType: "string",
      tableName: "custom"
      }
      ]
      }
      ]
getTelemetry: ((deviceIdOrDeviceIds, streamNameOrStreamNames, start, end, tags?, latestOnly?) => Promise<TelemetryResult[]>) = getTelemetry

Type declaration

    • (deviceIdOrDeviceIds, streamNameOrStreamNames, start, end, tags?, latestOnly?): Promise<TelemetryResult[]>
    • Parameters

      • deviceIdOrDeviceIds: string | string[]
      • streamNameOrStreamNames: string | string[]
      • start: Date
      • end: Date
      • Optional tags: {}
        • Optional latestOnly: boolean

        Returns Promise<TelemetryResult[]>

    getViews: (() => Promise<IView[]>) = getViews

    Type declaration

    knownContext: WeakRef<Device>[] = []
    listFleets: (() => Promise<IFleet[]>) = listFleets

    Type declaration

    patchEventTriggergroup: ((id, eventTrigger) => Promise<IEventTriggerGroup>) = patchEventTriggerGroup

    Type declaration

      • (id, eventTrigger): Promise<IEventTriggerGroup>
      • Parameters

        • id: string
        • eventTrigger: Partial<IEventTriggerGroup>

        Returns Promise<IEventTriggerGroup>

    patchFleet: ((id, role) => Promise<IFleet>) = patchFleet

    Type declaration

      • (id, role): Promise<IFleet>
      • Parameters

        • id: string
        • role: Partial<IFleet>

        Returns Promise<IFleet>

    patchStream: ((stream) => Promise<IStream>) = patchStream

    Type declaration

    patchView: ((view) => Promise<IView>) = patchView

    Type declaration

    queryAnalytics: ((query) => Promise<ISqlResult>) = queryAnalytics

    Type declaration

      • (query): Promise<ISqlResult>
      • Retrieves all stream rows

        Parameters

        Returns Promise<ISqlResult>

        Example

        // Body
        const analytics = await queryAnalytics({
        aggregateLevel: "day",
        orderByColumn: "TIMESTAMP",
        streamColumns: [
        {
        streamName: "consumables_residual_percentage",
        streamType: "numeric set",
        },
        ],
        });
        //Returns
        {
        aggregates: [],
        columns: [
        {
        name: 'TIMESTAMP',
        isNullable: true,
        dataType: 'string',
        tableName: 'NUMERIC_SET_MAIN'
        }
        ],
        items: [
        {
        axisLabel: "suction_blade",
        name: "consumables_residual_percentage",
        tableName: "NUMERIC_SET_TEST",
        time: "2020-04-20T08:00:00.000Z",
        type: "numeric set",
        unitLabel: "percent"
        }
        ],
        rowCount: 14,
        rows: []
        sqlText: "SELECT dateadd(day, dayofweek(TIMESTAMP), to_timestamp_tz('4/20/2020')) AS TIMESTAMP, SUM(VALUE)"
        }
    queryDevices: ((query) => Promise<Device[]>) = queryDevices

    Type declaration

    queryEvents: ((query) => Promise<IEvent[]>) = queryEvents

    Type declaration

    queryTelemetry: ((query) => Promise<IStreamData<keyof IStreamTypeMap>[]>) = queryTelemetry

    Type declaration

    Methods

    • Parameters

      • deviceId: string

      Returns Promise<void>

    Generated using TypeDoc