@formant/data-sdk 1.357.8 → 1.357.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-sdk.cjs.js +111 -111
- package/dist/data-sdk.cjs.js.map +1 -1
- package/dist/data-sdk.es.js +20461 -22627
- package/dist/data-sdk.es.js.map +1 -1
- package/dist/data-sdk.es6.js +20461 -22627
- package/dist/data-sdk.umd.js +111 -111
- package/dist/types/data-sdk/src/Fleet.d.ts +8 -75
- package/dist/types/data-sdk/src/Views.d.ts +1 -6
- package/dist/types/data-sdk/src/api/teleopViews.d.ts +1 -9
- package/dist/types/data-sdk/src/connector/data/BaseUniverseDataConnector.d.ts +1 -1
- package/dist/types/data-sdk/src/devices/Device.d.ts +1 -5
- package/dist/types/data-sdk/src/main.d.ts +0 -1
- package/package.json +3 -1
- package/dist/types/data-sdk/src/Account.d.ts +0 -10
- package/dist/types/data-sdk/src/api/addDeviceToFleet.d.ts +0 -1
- package/dist/types/data-sdk/src/api/aggregateTelemetry.d.ts +0 -3
- package/dist/types/data-sdk/src/api/createFleet.d.ts +0 -2
- package/dist/types/data-sdk/src/api/createShareLink.d.ts +0 -22
- package/dist/types/data-sdk/src/api/deleteFleet.d.ts +0 -1
- package/dist/types/data-sdk/src/api/getAllEventTriggerGroup.d.ts +0 -2
- package/dist/types/data-sdk/src/api/getAnalyticsModules.d.ts +0 -2
- package/dist/types/data-sdk/src/api/getAnalyticsStreams.d.ts +0 -18
- package/dist/types/data-sdk/src/api/getCurrentGroup.d.ts +0 -2
- package/dist/types/data-sdk/src/api/getDevicesData.d.ts +0 -2
- package/dist/types/data-sdk/src/api/getEventTriggerGroup.d.ts +0 -2
- package/dist/types/data-sdk/src/api/getFileUrl.d.ts +0 -1
- package/dist/types/data-sdk/src/api/getFleet.d.ts +0 -2
- package/dist/types/data-sdk/src/api/getFleetDevices.d.ts +0 -1
- package/dist/types/data-sdk/src/api/getInterventions.d.ts +0 -2
- package/dist/types/data-sdk/src/api/getTaskReportRows.d.ts +0 -26
- package/dist/types/data-sdk/src/api/getTaskreportTables.d.ts +0 -23
- package/dist/types/data-sdk/src/api/listFleets.d.ts +0 -2
- package/dist/types/data-sdk/src/api/patchEventTriggerGroup.d.ts +0 -2
- package/dist/types/data-sdk/src/api/patchFleet.d.ts +0 -2
- package/dist/types/data-sdk/src/api/patchStreams.d.ts +0 -2
- package/dist/types/data-sdk/src/api/queryAnalytics.d.ts +0 -43
|
@@ -1,106 +1,39 @@
|
|
|
1
|
-
import { Device } from "./devices/Device";
|
|
2
|
-
import { PeerDevice } from "./devices/PeerDevice";
|
|
3
|
-
import { addDeviceToFleet } from "./api/addDeviceToFleet";
|
|
4
|
-
import { aggregateTelemetry } from "./api/aggregateTelemetry";
|
|
5
|
-
import { createShareLink } from "./api/createShareLink";
|
|
6
|
-
import { deleteFleet } from "./api/deleteFleet";
|
|
7
|
-
import { eventsCounter } from "./api/eventsCounter";
|
|
8
|
-
import { getAnalyticStreams } from "./api/getAnalyticsStreams";
|
|
9
|
-
import { getAnalyticsModules } from "./api/getAnalyticsModules";
|
|
10
1
|
import { getAnalyticsRows } from "./api/getAnalyticsRows";
|
|
11
|
-
import { getAnnotationCount } from "./api/getAnnotationCount";
|
|
12
|
-
import { getAnnotationCountByIntervals } from "./api/getAnnotationCountByIntervals";
|
|
13
|
-
import { getCurrentGroup } from "./api/getCurrentGroup";
|
|
14
2
|
import { getDevices } from "./api/getDevices";
|
|
15
3
|
import { getEvent } from "./api/getEvent";
|
|
16
|
-
import { getFileUrl } from "./api/getFileUrl";
|
|
17
|
-
import { getFleet } from "./api/getFleet";
|
|
18
|
-
import { getFleetDevices } from "./api/getFleetDevices";
|
|
19
|
-
import { getInterventions } from "./api/getInterventions";
|
|
20
4
|
import { getLatestTelemetry } from "./api/getLatestTelemetry";
|
|
21
5
|
import { getOnlineDevices } from "./api/getOnlineDevices";
|
|
22
|
-
import { getPeers } from "./api/getPeers";
|
|
23
|
-
import { getRealtimeSessions } from "./api/getRealtimeSessions";
|
|
24
6
|
import { getStreams } from "./api/getStreams";
|
|
25
|
-
import { getTaskReportRows } from "./api/getTaskReportRows";
|
|
26
|
-
import { getTaskReportTables } from "./api/getTaskreportTables";
|
|
27
|
-
import { getTelemetry } from "./api/getTelemetry";
|
|
28
7
|
import { getViews } from "./api/getViews";
|
|
29
|
-
import { listFleets } from "./api/listFleets";
|
|
30
|
-
import { patchFleet } from "./api/patchFleet";
|
|
31
|
-
import { patchStream } from "./api/patchStreams";
|
|
32
8
|
import { patchView } from "./api/patchView";
|
|
33
|
-
import { queryAnalytics } from "./api/queryAnalytics";
|
|
34
9
|
import { queryDevices } from "./api/queryDevices";
|
|
35
|
-
import { queryEvents } from "./api/queryEvents";
|
|
36
10
|
import { queryTelemetry } from "./api/queryTelemetry";
|
|
37
|
-
import { createFleet } from "./api/createFleet";
|
|
38
|
-
import { getAllEventTriggerGroup } from "./api/getAllEventTriggerGroup";
|
|
39
|
-
import { getEventTriggerGroup } from "./api/getEventTriggerGroup";
|
|
40
|
-
import { patchEventTriggerGroup } from "./api/patchEventTriggerGroup";
|
|
41
11
|
import { IDevice } from "./message-bus/listeners/EmbeddedAppMessage";
|
|
12
|
+
import { Device } from "./devices/Device";
|
|
13
|
+
import { PeerDevice } from "./devices/PeerDevice";
|
|
14
|
+
/**
|
|
15
|
+
* Device context and query helpers for embedded custom modules.
|
|
16
|
+
* Not related to the admin-api /fleets resource (removed).
|
|
17
|
+
*/
|
|
42
18
|
export declare class Fleet {
|
|
43
19
|
static defaultDeviceId: string | undefined;
|
|
44
20
|
static knownContext: WeakRef<Device>[];
|
|
45
21
|
static groupDevices: IDevice[] | undefined;
|
|
46
|
-
static createFleet: typeof createFleet;
|
|
47
|
-
static listFleets: typeof listFleets;
|
|
48
|
-
static getFleet: typeof getFleet;
|
|
49
|
-
static patchFleet: typeof patchFleet;
|
|
50
|
-
static deleteFleet: typeof deleteFleet;
|
|
51
|
-
static addDeviceToFleet: typeof addDeviceToFleet;
|
|
52
|
-
static getFleetDevices: typeof getFleetDevices;
|
|
53
22
|
static setDefaultDevice(deviceId: string): Promise<void>;
|
|
54
23
|
static getCurrentDevice(): Promise<Device>;
|
|
55
24
|
static getPeerDevice(url: string): Promise<PeerDevice>;
|
|
56
25
|
static getDevice(deviceId: string): Promise<Device>;
|
|
57
|
-
/**
|
|
58
|
-
* Sets the group devices for multi-device (coherence group) contexts.
|
|
59
|
-
* This is typically called automatically when overview_devices message is received.
|
|
60
|
-
* @param devices Array of device information from the host container
|
|
61
|
-
*/
|
|
62
26
|
static setGroupDevices(devices: IDevice[]): void;
|
|
63
|
-
/**
|
|
64
|
-
* Gets the group devices for multi-device contexts.
|
|
65
|
-
* Returns undefined if not in a group context (single device view).
|
|
66
|
-
* @returns Array of device information or undefined
|
|
67
|
-
*/
|
|
68
27
|
static getGroupDevices(): IDevice[] | undefined;
|
|
69
|
-
/**
|
|
70
|
-
* Gets all group devices as Device instances.
|
|
71
|
-
* Useful for modules that need full Device objects rather than just IDevice info.
|
|
72
|
-
* @returns Promise resolving to array of Device instances
|
|
73
|
-
*/
|
|
74
28
|
static getGroupDevicesAsDeviceInstances(): Promise<Device[]>;
|
|
75
|
-
static aggregateTelemetry: typeof aggregateTelemetry;
|
|
76
|
-
static createShareLink: typeof createShareLink;
|
|
77
|
-
static eventsCounter: typeof eventsCounter;
|
|
78
|
-
static getAnalyticStreams: typeof getAnalyticStreams;
|
|
79
|
-
static getAnalyticsModules: typeof getAnalyticsModules;
|
|
80
29
|
static getAnalyticsRows: typeof getAnalyticsRows;
|
|
81
|
-
static getAnnotationCount: typeof getAnnotationCount;
|
|
82
|
-
static getAnnotationCountByIntervals: typeof getAnnotationCountByIntervals;
|
|
83
|
-
static getCurrentGroup: typeof getCurrentGroup;
|
|
84
30
|
static getDevices: typeof getDevices;
|
|
85
31
|
static getEvent: typeof getEvent;
|
|
86
|
-
static getFileUrl: typeof getFileUrl;
|
|
87
|
-
static getInterventions: typeof getInterventions;
|
|
88
|
-
static getLatestTelemetry: typeof getLatestTelemetry;
|
|
89
32
|
static getOnlineDevices: typeof getOnlineDevices;
|
|
90
|
-
static getPeers: typeof getPeers;
|
|
91
|
-
static getRealtimeSessions: typeof getRealtimeSessions;
|
|
92
|
-
static getStreams: typeof getStreams;
|
|
93
|
-
static getTaskReportRows: typeof getTaskReportRows;
|
|
94
|
-
static getTaskReportTables: typeof getTaskReportTables;
|
|
95
|
-
static getTelemetry: typeof getTelemetry;
|
|
96
33
|
static getViews: typeof getViews;
|
|
97
|
-
static patchStream: typeof patchStream;
|
|
98
34
|
static patchView: typeof patchView;
|
|
99
|
-
static queryAnalytics: typeof queryAnalytics;
|
|
100
35
|
static queryDevices: typeof queryDevices;
|
|
101
|
-
static queryEvents: typeof queryEvents;
|
|
102
36
|
static queryTelemetry: typeof queryTelemetry;
|
|
103
|
-
static
|
|
104
|
-
static
|
|
105
|
-
static patchEventTriggergroup: typeof patchEventTriggerGroup;
|
|
37
|
+
static getLatestTelemetry: typeof getLatestTelemetry;
|
|
38
|
+
static getStreams: typeof getStreams;
|
|
106
39
|
}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fetchTeleopViews } from "./api/teleopViews";
|
|
2
2
|
export declare class Views {
|
|
3
|
-
constructor();
|
|
4
|
-
static createTeleopView: typeof createTeleopView;
|
|
5
|
-
static updateTeleopView: typeof updateTeleopView;
|
|
6
|
-
static deleteTeleopView: typeof deleteTeleopView;
|
|
7
|
-
static getTeleopView: typeof getTeleopView;
|
|
8
3
|
static fetchTeleopViews: typeof fetchTeleopViews;
|
|
9
4
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { RtcStreamType } from "../connector/model/IUniverseData";
|
|
2
2
|
import { IsoDate } from "../model/IsoDate";
|
|
3
3
|
import { ITags } from "../model/ITags";
|
|
4
|
-
export interface IDictionary<T = string> {
|
|
5
|
-
[key: string]: T;
|
|
6
|
-
}
|
|
7
4
|
export interface ITeleopViewModule {
|
|
8
5
|
id: string;
|
|
9
6
|
type: string;
|
|
@@ -61,13 +58,8 @@ export type ModuleConfigItem = {
|
|
|
61
58
|
type: "named-number";
|
|
62
59
|
defaultValue: number;
|
|
63
60
|
};
|
|
64
|
-
export type ConfigValue = string | number | boolean |
|
|
61
|
+
export type ConfigValue = string | number | boolean | unknown[];
|
|
65
62
|
export type ModuleConfig = {
|
|
66
63
|
[key: string]: ConfigValue;
|
|
67
64
|
};
|
|
68
|
-
export declare function request<T>(endpoint: string, options?: RequestInit): Promise<T>;
|
|
69
65
|
export declare function fetchTeleopViews(): Promise<ITeleopView[]>;
|
|
70
|
-
export declare function getTeleopView(id: string): Promise<ITeleopView>;
|
|
71
|
-
export declare function createTeleopView(view: Omit<ITeleopView, "id" | "organizationId" | "createdAt" | "updatedAt">): Promise<ITeleopView>;
|
|
72
|
-
export declare function updateTeleopView(id: string, view: Partial<ITeleopView>): Promise<ITeleopView>;
|
|
73
|
-
export declare function deleteTeleopView(id: string): Promise<void>;
|
|
@@ -39,7 +39,7 @@ export declare class BasicUniverseDataConnector {
|
|
|
39
39
|
sendRealtimePose(deviceId: string, streamName: string, pose: ITransform): Promise<void>;
|
|
40
40
|
sendRealtimeBoolean(deviceId: string, streamName: string, value: boolean): Promise<void>;
|
|
41
41
|
sendRealtimeBitset(deviceId: string, streamName: string, bitset: IBitset): Promise<void>;
|
|
42
|
-
getUrdfs(
|
|
42
|
+
getUrdfs(_deviceId: string): Promise<string[]>;
|
|
43
43
|
getTelemetryStreams(_deviceId: string): Promise<ITelemetryStream[]>;
|
|
44
44
|
getTeleopRosStreams(_deviceId: string): Promise<ITelemetryRosStream[]>;
|
|
45
45
|
getHardwareStreams(_deviceId: string): Promise<IRealtimeStream[]>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IRtcPeer } from "@formant/realtime-sdk";
|
|
2
2
|
import { createDevice } from "../api/createDevice";
|
|
3
3
|
import { disableDevice } from "../api/disableDevice";
|
|
4
|
-
import { getDevicesData } from "../api/getDevicesData";
|
|
5
4
|
import { patchDevice } from "../api/patchDevice";
|
|
6
5
|
import { queryDevicesData } from "../api/queryDevicesData";
|
|
7
6
|
import { CaptureStream } from "../CaptureStream";
|
|
@@ -12,7 +11,6 @@ import { IEventQuery } from "../model/IEventQuery";
|
|
|
12
11
|
import { IInterventionResponse } from "../model/IInterventionResponse";
|
|
13
12
|
import { IInterventionTypeMap } from "../model/IInterventionTypeMap";
|
|
14
13
|
import { InterventionType } from "../model/InterventionType";
|
|
15
|
-
import { IShare } from "../model/IShare";
|
|
16
14
|
import { ITags } from "../model/ITags";
|
|
17
15
|
import { SessionType } from "../model/SessionType";
|
|
18
16
|
import { TelemetryResult } from "../model/TelemetryResult";
|
|
@@ -38,7 +36,7 @@ export declare class Device extends BaseDevice {
|
|
|
38
36
|
private connectionMonitorConsecutiveFailures;
|
|
39
37
|
static createDevice: typeof createDevice;
|
|
40
38
|
static patchDevice: typeof patchDevice;
|
|
41
|
-
static getDevicesData: typeof
|
|
39
|
+
static getDevicesData: typeof queryDevicesData;
|
|
42
40
|
static queryDevicesData: typeof queryDevicesData;
|
|
43
41
|
static disableDevice: typeof disableDevice;
|
|
44
42
|
getLatestTelemetry(): Promise<any>;
|
|
@@ -59,7 +57,6 @@ export declare class Device extends BaseDevice {
|
|
|
59
57
|
* @throws {Error} Throws an error if the device info cannot be fetched
|
|
60
58
|
*/
|
|
61
59
|
getAgentVersion(): Promise<string | undefined | null>;
|
|
62
|
-
getFileUrl(fileId: string): Promise<string[]>;
|
|
63
60
|
/**
|
|
64
61
|
* Starts a real-time connection with the remote device using WebRTC.
|
|
65
62
|
* @param {number} [options] - Optional session type to be used for the connection.
|
|
@@ -98,5 +95,4 @@ export declare class Device extends BaseDevice {
|
|
|
98
95
|
date: string;
|
|
99
96
|
events: IEvent[];
|
|
100
97
|
}[]>;
|
|
101
|
-
createShareLink(share: IShare, view: string): Promise<string | null>;
|
|
102
98
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formant/data-sdk",
|
|
3
|
-
"version": "1.357.
|
|
3
|
+
"version": "1.357.9",
|
|
4
4
|
"description": "A library for getting data from Formant",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
|
+
"prepare": "lefthook install",
|
|
29
30
|
"preversion": "npm run verify",
|
|
30
31
|
"postversion": "make",
|
|
31
32
|
"dev": "vite --port 5173",
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@eslint/js": "^9.11.1",
|
|
51
|
+
"@evilmartians/lefthook": "^1.13.6",
|
|
50
52
|
"@formant/realtime-sdk": "^1.4.11",
|
|
51
53
|
"@types/base-64": "^1.0.0",
|
|
52
54
|
"@types/fast-json-stable-stringify": "=2.0.0",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IAccount } from "./model/IAccount";
|
|
2
|
-
import { IAccountTree } from "./model/IAccountTree";
|
|
3
|
-
export declare class Account {
|
|
4
|
-
static listAccounts(): Promise<IAccount[]>;
|
|
5
|
-
static createAccounts(account: IAccount): Promise<IAccount>;
|
|
6
|
-
static getAccount(id: string): Promise<IAccount>;
|
|
7
|
-
static patchAccount(id: string, account: Partial<Account>): Promise<IAccount>;
|
|
8
|
-
static deleteAccount(id: string): Promise<void>;
|
|
9
|
-
static getAccountTree(id: string): Promise<IAccountTree>;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function addDeviceToFleet(deviceId: string, fleetId: string): Promise<any>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IShare } from "../model/IShare";
|
|
2
|
-
/**
|
|
3
|
-
* @param scope is required
|
|
4
|
-
* @param time is required
|
|
5
|
-
* @param view View name
|
|
6
|
-
* @returns
|
|
7
|
-
* Share link
|
|
8
|
-
* @example
|
|
9
|
-
* // Body
|
|
10
|
-
* const link = await createShareLink({
|
|
11
|
-
* delegateTeleop: false
|
|
12
|
-
* message: "See bot in action",
|
|
13
|
-
* scope: {
|
|
14
|
-
* deviceIds: ["d64520a6-a308-4a59-9267-b7f8a7bfc7ab"],
|
|
15
|
-
* start: "2023-04-04T19:51:47.125Z",
|
|
16
|
-
* end: "2023-04-04T20:51:47.125Z"
|
|
17
|
-
* },
|
|
18
|
-
* time: "2023-04-04T20:21:47.125Z",
|
|
19
|
-
* userName: "User",
|
|
20
|
-
* });
|
|
21
|
-
*/
|
|
22
|
-
export declare function createShareLink(share: IShare, view: string): Promise<string | null>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function deleteFleet(id: string): Promise<void>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { IStreamColumn } from "../model/IStreamColumn";
|
|
2
|
-
/**
|
|
3
|
-
* retrieves a list of all available data streams that can be used for running analytics.
|
|
4
|
-
* This function takes no arguments and returns a list of stream names that can be used for analyzing data.
|
|
5
|
-
* @example
|
|
6
|
-
* // Returns
|
|
7
|
-
* [
|
|
8
|
-
* {
|
|
9
|
-
* streamName: "$.agent.health",
|
|
10
|
-
streamType : "health"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
* streamName: "up.hours",
|
|
14
|
-
streamType : "numeric"
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
*/
|
|
18
|
-
export declare function getAnalyticStreams(): Promise<IStreamColumn[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getFileUrl(uuid: string): Promise<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getFleetDevices(id: string): Promise<void>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ISqlQuery } from "../model/ISqlQuery";
|
|
2
|
-
/**
|
|
3
|
-
* @param taskColumns is required
|
|
4
|
-
* @returns
|
|
5
|
-
* All task reports
|
|
6
|
-
* @example
|
|
7
|
-
* // Body
|
|
8
|
-
* const tasks = await getTaskReports({
|
|
9
|
-
* taskColumns: [
|
|
10
|
-
* {
|
|
11
|
-
* columns: [
|
|
12
|
-
* {
|
|
13
|
-
* dataType: "string",
|
|
14
|
-
* isNullable: true,
|
|
15
|
-
* name: "TYPE",
|
|
16
|
-
* tableName: "custom",
|
|
17
|
-
* },
|
|
18
|
-
* ],
|
|
19
|
-
* name: "DURATION_SECONDS",
|
|
20
|
-
* tableName: "TASK_REPORTS_CLEANING_MODE",
|
|
21
|
-
* yAxis: "DURATION_SECONDS",
|
|
22
|
-
* },
|
|
23
|
-
* ],
|
|
24
|
-
* });
|
|
25
|
-
*/
|
|
26
|
-
export declare function getTaskReportRows(query: ISqlQuery): Promise<any>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ITaskReportColumn } from "../model/ITaskReportColumn";
|
|
2
|
-
/**
|
|
3
|
-
* retrieves a list of all available tables that can be used to create task reports.
|
|
4
|
-
* This function takes no arguments and returns a list of table names that can be used for creating task reports.
|
|
5
|
-
* @returns List all available tables
|
|
6
|
-
* @example
|
|
7
|
-
* // Returns
|
|
8
|
-
*[
|
|
9
|
-
* {
|
|
10
|
-
* name: "",
|
|
11
|
-
* tableName: "TASK_REPORTS_CLEANING_MODE",
|
|
12
|
-
* columns: [
|
|
13
|
-
* {
|
|
14
|
-
* name: "TYPE",
|
|
15
|
-
* isNullable: true,
|
|
16
|
-
* dataType: "string",
|
|
17
|
-
* tableName: "custom"
|
|
18
|
-
* }
|
|
19
|
-
* ]
|
|
20
|
-
* }
|
|
21
|
-
*]
|
|
22
|
-
*/
|
|
23
|
-
export declare function getTaskReportTables(): Promise<ITaskReportColumn[]>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ISqlQuery } from "../model/ISqlQuery";
|
|
2
|
-
import { ISqlResult } from "../model/ISqlResult";
|
|
3
|
-
/**
|
|
4
|
-
*Retrieves all stream rows
|
|
5
|
-
* @example
|
|
6
|
-
* // Body
|
|
7
|
-
* const analytics = await queryAnalytics({
|
|
8
|
-
* aggregateLevel: "day",
|
|
9
|
-
* orderByColumn: "TIMESTAMP",
|
|
10
|
-
* streamColumns: [
|
|
11
|
-
* {
|
|
12
|
-
* streamName: "consumables_residual_percentage",
|
|
13
|
-
* streamType: "numeric set",
|
|
14
|
-
* },
|
|
15
|
-
* ],
|
|
16
|
-
* });
|
|
17
|
-
* //Returns
|
|
18
|
-
* {
|
|
19
|
-
* aggregates: [],
|
|
20
|
-
* columns: [
|
|
21
|
-
* {
|
|
22
|
-
* name: 'TIMESTAMP',
|
|
23
|
-
* isNullable: true,
|
|
24
|
-
* dataType: 'string',
|
|
25
|
-
* tableName: 'NUMERIC_SET_MAIN'
|
|
26
|
-
* }
|
|
27
|
-
* ],
|
|
28
|
-
* items: [
|
|
29
|
-
* {
|
|
30
|
-
* axisLabel: "suction_blade",
|
|
31
|
-
* name: "consumables_residual_percentage",
|
|
32
|
-
* tableName: "NUMERIC_SET_TEST",
|
|
33
|
-
* time: "2020-04-20T08:00:00.000Z",
|
|
34
|
-
* type: "numeric set",
|
|
35
|
-
* unitLabel: "percent"
|
|
36
|
-
* }
|
|
37
|
-
* ],
|
|
38
|
-
* rowCount: 14,
|
|
39
|
-
* rows: []
|
|
40
|
-
* sqlText: "SELECT dateadd(day, dayofweek(TIMESTAMP), to_timestamp_tz('4/20/2020')) AS TIMESTAMP, SUM(VALUE)"
|
|
41
|
-
* }
|
|
42
|
-
*/
|
|
43
|
-
export declare function queryAnalytics(query: ISqlQuery): Promise<ISqlResult>;
|