@formant/data-sdk 0.0.133 → 0.0.135

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.
@@ -9,6 +9,7 @@ import { IInterventionResponse } from "./main";
9
9
  import { RtcStreamType } from "@formant/realtime-sdk/dist/model/RtcStreamType";
10
10
  import { IEventQuery } from "./main";
11
11
  import { AggregateLevel } from "./main";
12
+ import { EventType } from "./main";
12
13
  export interface ConfigurationDocument {
13
14
  urdfFiles: string[];
14
15
  telemetry?: {
@@ -133,13 +134,17 @@ export declare class Device implements IRealtimeDevice {
133
134
  [key in string]: string[];
134
135
  }): Promise<(id: string) => IInterventionTypeMap[T]["response"]>;
135
136
  addInterventionResponse<T extends InterventionType>(interventionId: string, interventionType: InterventionType, data: IInterventionTypeMap[T]["response"]): Promise<IInterventionResponse>;
136
- getAnnotationCount(query: IEventQuery, annotationName: string, tagKey: string): Promise<{
137
+ getAnnotationCount(query: IEventQuery, tagKey: string): Promise<{
137
138
  [key: string]: number;
138
139
  }>;
139
- getAnnotationCountByIntervals(query: IEventQuery, annotationName: string, tagKey: string, aggregate: AggregateLevel): Promise<{
140
+ getAnnotationCountByIntervals(query: IEventQuery, tagKey: string, aggregate: AggregateLevel): Promise<{
140
141
  date: string;
141
142
  annotations: {
142
143
  [key: string]: number;
143
144
  };
144
145
  }[]>;
146
+ eventsCounter(eventTypes: EventType[], timeFrame: AggregateLevel, range: number, time: number, query?: IEventQuery): Promise<{
147
+ date: string;
148
+ events: import("./main").IEvent[];
149
+ }[]>;
145
150
  }
@@ -8,7 +8,9 @@ import { IStreamData } from "./model/IStreamData";
8
8
  import { PeerDevice } from "./PeerDevice";
9
9
  import { IDeviceQuery } from "./model/IDeviceQuery";
10
10
  import { IStream } from "./model/IStream";
11
+ import { IView } from "./model/IView";
11
12
  import { AggregateLevel } from "./main";
13
+ import { EventType } from "./main";
12
14
  export interface TelemetryResult {
13
15
  deviceId: string;
14
16
  name: string;
@@ -44,10 +46,10 @@ export declare class Fleet {
44
46
  static getEvent(uuid: string): Promise<IEvent>;
45
47
  static getInterventions(): Promise<IEvent[]>;
46
48
  static getCurrentGroup(): Promise<Device[] | undefined>;
47
- static getAnnotationCount(query: IEventQuery, annotationName: string, tagKey: string): Promise<{
49
+ static getAnnotationCount(query: IEventQuery, tagKey: string): Promise<{
48
50
  [key: string]: number;
49
51
  }>;
50
- static getAnnotationCountByIntervals(query: IEventQuery, annotationName: string, tagKey: string, aggregate: AggregateLevel): Promise<{
52
+ static getAnnotationCountByIntervals(query: IEventQuery, tagKey: string, aggregate: AggregateLevel): Promise<{
51
53
  date: string;
52
54
  annotations: {
53
55
  [key: string]: number;
@@ -55,4 +57,10 @@ export declare class Fleet {
55
57
  }[]>;
56
58
  static getStreams(): Promise<IStream[]>;
57
59
  static patchStream(stream: IStream): Promise<IStream>;
60
+ static getViews(): Promise<IView[]>;
61
+ static patchView(view: IView): Promise<IView>;
62
+ static eventsCounter(eventTypes: EventType[], timeFrame: AggregateLevel, range: number, time: number, query?: IEventQuery): Promise<{
63
+ date: string;
64
+ events: IEvent[];
65
+ }[]>;
58
66
  }
@@ -113,5 +113,6 @@ export * from "./model/videoMimeTypes";
113
113
  export * from "./model/VideoMimeType";
114
114
  export * from "./model/IDeviceQuery";
115
115
  export * from "./model/IAnnotationQuery";
116
+ export * from "./model/IStream";
116
117
  export { IRtcSendConfiguration, IRtcStreamMessage, IRtcStreamPayload, } from "@formant/realtime-sdk";
117
118
  export * from "./model/JsonSchema";
@@ -1 +1 @@
1
- export type AggregateLevel = "year" | "month" | "week" | "day" | "hour" | "minute";
1
+ export type AggregateLevel = "year" | "month" | "week" | "day" | "hour" | "minute" | "quarter";
@@ -0,0 +1,15 @@
1
+ import { IsoDate } from "./IsoDate";
2
+ import { Uuid } from "./Uuid";
3
+ export interface IView {
4
+ id: Uuid;
5
+ createdAt: IsoDate;
6
+ updatedAt: IsoDate;
7
+ organizationId: Uuid;
8
+ name: string;
9
+ url: string;
10
+ showOnSingleDevice: boolean;
11
+ showOnMultiDevice: boolean;
12
+ showOnTeleop: boolean;
13
+ showOnAnalytics: boolean;
14
+ showTimeline: boolean;
15
+ }
@@ -1,11 +1,11 @@
1
1
  import { INumericAggregate } from "../model/INumericAggregate";
2
2
  import { AggregateLevel } from "../main";
3
- type IAggregateByDateFunctions = {
3
+ export type IAggregateByDateFunctions = {
4
4
  [key in AggregateLevel]: AggregateFunction;
5
5
  };
6
- declare const aggregateFunctions: readonly ["interval", "start", "end", "sub"];
7
- type AggregateFunctions = typeof aggregateFunctions[number];
8
- type AggregateFunction = {
6
+ export declare const aggregateFunctions: readonly ["interval", "start", "end", "sub", "get"];
7
+ export type AggregateFunctions = typeof aggregateFunctions[number];
8
+ export type AggregateFunction = {
9
9
  [key in AggregateFunctions]: any;
10
10
  };
11
11
  export declare function getVariance(a: INumericAggregate): number;
@@ -24,4 +24,4 @@ export declare const aggregateFunctionMap: {
24
24
  count: typeof getCount;
25
25
  };
26
26
  export declare const aggregateByDateFunctions: IAggregateByDateFunctions;
27
- export {};
27
+ export declare const formatTimeFrameText: (start: string, end: string) => string;
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "require": "./dist/data-sdk.umd.js"
19
19
  }
20
20
  },
21
- "version": "0.0.133",
21
+ "version": "0.0.135",
22
22
  "scripts": {
23
23
  "dev": "vite --port 9146",
24
24
  "build": "tsc && vite build",