@formant/data-sdk 0.0.35 → 0.0.39

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/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "require": "./dist/data-sdk.umd.js"
19
19
  }
20
20
  },
21
- "version": "0.0.35",
21
+ "version": "0.0.39",
22
22
  "scripts": {
23
23
  "dev": "vite --port 9146",
24
24
  "build": "tsc && vite build",
@@ -1,3 +0,0 @@
1
- export declare function defined<T>(value: T | undefined, errorMessage?: string): T;
2
- export declare function notNull<T>(value: T | null, errorMessage?: string): T;
3
- export declare function definedAndNotNull<T>(value: T | undefined | null, errorMessage?: string): T;
@@ -1 +0,0 @@
1
- export declare function delay(ms: number): Promise<unknown>;
@@ -1,18 +0,0 @@
1
- export interface User {
2
- firstName: string;
3
- lastName: string;
4
- email: string;
5
- organizationId: string;
6
- id: string;
7
- }
8
- export declare class Authentication {
9
- static token: string | undefined;
10
- static currentUser: User | undefined;
11
- static defaultDeviceId: string | undefined;
12
- static waitingForAuth: ((result: boolean) => void)[];
13
- static login(email: string, password: string): Promise<void>;
14
- static loginWithToken(token: string): Promise<void>;
15
- static isAuthenticated(): boolean;
16
- static getCurrentUser(): User | undefined;
17
- static waitTilAuthenticated(): Promise<boolean>;
18
- }
@@ -1,18 +0,0 @@
1
- export interface CaptureSession {
2
- deviceId: string;
3
- streamName: string;
4
- tags: {};
5
- expiration: string;
6
- organizationId: string;
7
- userId: string;
8
- code: string;
9
- id: string;
10
- createdAt: string;
11
- updatedAt: string;
12
- }
13
- export declare class CaptureStream {
14
- captureSession: CaptureSession;
15
- token: string | undefined;
16
- constructor(captureSession: CaptureSession);
17
- ingestJSON(value: {}): Promise<void>;
18
- }
@@ -1,13 +0,0 @@
1
- export declare type DataChannelListener = (message: any) => void;
2
- export declare class DataChannel {
3
- private dataChannel;
4
- ready: boolean;
5
- listeners: DataChannelListener[];
6
- error: string | undefined;
7
- decoder: TextDecoder;
8
- constructor(dataChannel: RTCDataChannel);
9
- waitTilReady(): Promise<boolean>;
10
- send(data: string): void;
11
- addListener(listener: DataChannelListener): void;
12
- removeListener(listener: DataChannelListener): void;
13
- }
@@ -1,79 +0,0 @@
1
- import { RtcClient } from "@formant/realtime-sdk";
2
- import { DataChannel } from "./DataChannel";
3
- import { CaptureStream } from "./CaptureStream";
4
- import { Manipulator } from "./Manipulator";
5
- export interface ConfigurationDocument {
6
- urdfFiles: string[];
7
- telemetry?: {
8
- streams?: {
9
- name: string;
10
- disabled?: boolean;
11
- onDemand?: boolean;
12
- }[];
13
- };
14
- }
15
- export interface Command {
16
- id: string;
17
- name: string;
18
- command: string;
19
- description: string;
20
- parameterEnabled: true;
21
- parameterValue: string | null;
22
- parameterMeta?: {
23
- topic?: string;
24
- };
25
- }
26
- export interface TelemetryStream {
27
- name: string;
28
- onDemand: boolean;
29
- }
30
- export declare type RealtimeListener = (peerId: string, message: {
31
- header: {
32
- created: number;
33
- stream: {
34
- entityId: string;
35
- streamName: string;
36
- streamType: string;
37
- };
38
- };
39
- payload: any;
40
- }) => void;
41
- export declare type RealtimeVideoStream = {
42
- name: string;
43
- };
44
- export declare type RealtimeDataStream = {
45
- name: string;
46
- };
47
- export declare class Device {
48
- id: string;
49
- name: string;
50
- private organizationId;
51
- rtcClient: RtcClient | undefined;
52
- realtimeListeners: RealtimeListener[];
53
- constructor(id: string, name: string, organizationId: string);
54
- getLatestTelemetry(): Promise<any>;
55
- getConfiguration(): Promise<ConfigurationDocument>;
56
- getFileUrl(fileId: string): Promise<string[]>;
57
- private handleMessage;
58
- startRealtimeConnection(): Promise<void>;
59
- addRealtimeListener(listener: RealtimeListener): void;
60
- removeRealtimeListener(listener: RealtimeListener): void;
61
- getRealtimeVideoStreams(): Promise<RealtimeVideoStream[]>;
62
- getRealtimeManipulators(): Promise<Manipulator[]>;
63
- startListeningToRealtimeVideo(stream: RealtimeVideoStream): Promise<void>;
64
- stopListeningToRealtimeVideo(stream: RealtimeVideoStream): Promise<void>;
65
- startListeningToRealtimeDataStream(stream: RealtimeDataStream): Promise<void>;
66
- stopListeningToRealtimeDataStream(stream: RealtimeDataStream): Promise<void>;
67
- enableRealtimeTelemetryPriorityIngestion(streamName: string): Promise<void>;
68
- disableRealtimeTelemetryPriorityIngestion(streamName: string): Promise<void>;
69
- getRemotePeer(): Promise<import("@formant/realtime-sdk/dist/model/IRtcPeer").IRtcPeer>;
70
- stopRealtimeConnection(): Promise<void>;
71
- getAvailableCommands(): Promise<Command[]>;
72
- sendCommand(name: string, data?: string, time?: Date, metadata?: {}): Promise<any>;
73
- createCustomDataChannel(channelName: string, rtcConfig?: RTCDataChannelInit): Promise<DataChannel>;
74
- createCaptureStream(streamName: string): Promise<CaptureStream>;
75
- getTelemetry(streamNameOrStreamNames: string | string[], start: Date, end: Date, tags?: {
76
- [key in string]: string[];
77
- }): Promise<import("./Fleet").TelemetryResult[]>;
78
- getTelemetryStreams(): Promise<TelemetryStream[]>;
79
- }
@@ -1,31 +0,0 @@
1
- import { Device } from "./Device";
2
- export interface User {
3
- firstName: string;
4
- lastName: string;
5
- email: string;
6
- organizationId: string;
7
- id: string;
8
- }
9
- export interface TelemetryResult {
10
- deviceId: string;
11
- name: string;
12
- points: [number, any][];
13
- tags: {
14
- [key in string]: string | number;
15
- };
16
- type: string;
17
- }
18
- export declare class Fleet {
19
- static defaultDeviceId: string | undefined;
20
- static knownContext: WeakRef<Device>[];
21
- static setDefaultDevice(deviceId: string): Promise<void>;
22
- static getCurrentDevice(): Promise<Device>;
23
- static getDevice(deviceId: string): Promise<Device>;
24
- static getDevices(): Promise<Device[]>;
25
- static getOnlineDevices(): Promise<Device[]>;
26
- static getRealtimeDevices(): Promise<Device[]>;
27
- static getLatestTelemetry(deviceIdOrDeviceIds?: string | string[]): Promise<any>;
28
- static getTelemetry(deviceIdOrDeviceIds: string | string[], streamNameOrStreamNames: string | string[], start: Date, end: Date, tags?: {
29
- [key in string]: string[];
30
- }): Promise<TelemetryResult[]>;
31
- }
@@ -1,16 +0,0 @@
1
- import { Device, RealtimeDataStream } from "./Device";
2
- export declare type RealtimeManipulatorConfig = {
3
- currentJointStateStream: RealtimeDataStream;
4
- plannedJointStateStream?: RealtimeDataStream;
5
- planValidStream?: RealtimeDataStream;
6
- endEffectorStream?: RealtimeDataStream;
7
- endEffectorLinkName?: string;
8
- baseReferenceFrame?: string;
9
- localFrame?: string;
10
- };
11
- export declare class Manipulator {
12
- private device;
13
- private config;
14
- constructor(device: Device, config: RealtimeManipulatorConfig);
15
- synchronize(): Promise<void>;
16
- }
@@ -1 +0,0 @@
1
- export declare let FORMANT_API_URL: string;
@@ -1,6 +0,0 @@
1
- export { Fleet } from "./Fleet";
2
- export * from "./Authentication";
3
- export * from "./Device";
4
- export * from "./DataChannel";
5
- export * from "./CaptureStream";
6
- export * from "./Manipulator";