@formant/data-sdk 0.0.55 → 0.0.59

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.
@@ -15,6 +15,8 @@ export declare class Authentication {
15
15
  static token: string | undefined;
16
16
  static refreshToken: string | undefined;
17
17
  static currentUser: User | undefined;
18
+ static currentOrganization: string | undefined;
19
+ static isShareToken: boolean;
18
20
  static defaultDeviceId: string | undefined;
19
21
  static waitingForAuth: ((result: boolean) => void)[];
20
22
  static login(email: string, password: string): Promise<IAuthentication | Error>;
@@ -24,11 +24,17 @@ export interface Command {
24
24
  topic?: string;
25
25
  };
26
26
  }
27
+ export interface IJointState {
28
+ name: string[];
29
+ position: number[];
30
+ velocity?: number[];
31
+ effort?: number[];
32
+ }
27
33
  export interface TelemetryStream {
28
34
  name: string;
29
35
  onDemand: boolean;
30
36
  }
31
- export declare type RealtimeListener = (peerId: string, message: {
37
+ export declare type RealtimeMessage = {
32
38
  header: {
33
39
  created: number;
34
40
  stream: {
@@ -38,7 +44,8 @@ export declare type RealtimeListener = (peerId: string, message: {
38
44
  };
39
45
  };
40
46
  payload: any;
41
- }) => void;
47
+ };
48
+ export declare type RealtimeListener = (peerId: string, message: RealtimeMessage) => void;
42
49
  export declare type RealtimeVideoStream = {
43
50
  name: string;
44
51
  };
@@ -1,4 +1,4 @@
1
- import { Device, RealtimeDataStream } from "./Device";
1
+ import { Device, RealtimeDataStream, IJointState, RealtimeMessage } from "./Device";
2
2
  export declare type RealtimeManipulatorConfig = {
3
3
  currentJointStateStream: RealtimeDataStream;
4
4
  plannedJointStateStream?: RealtimeDataStream;
@@ -11,6 +11,10 @@ export declare type RealtimeManipulatorConfig = {
11
11
  export declare class Manipulator {
12
12
  private device;
13
13
  private config;
14
+ currentListeners: ((js: IJointState) => void)[];
14
15
  constructor(device: Device, config: RealtimeManipulatorConfig);
15
16
  synchronize(): Promise<void>;
17
+ desynchronize(): Promise<void>;
18
+ onRealtimeMessage: (_peerId: string, message: RealtimeMessage) => void;
19
+ addCurrentJointStateListener(listener: (js: IJointState) => void): Promise<void>;
16
20
  }
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "require": "./dist/data-sdk.umd.js"
19
19
  }
20
20
  },
21
- "version": "0.0.55",
21
+ "version": "0.0.59",
22
22
  "scripts": {
23
23
  "dev": "vite --port 9146",
24
24
  "build": "tsc && vite build",
@@ -34,6 +34,6 @@
34
34
  "types": "./dist/types/data-sdk/src/main.d.ts",
35
35
  "dependencies": {
36
36
  "@types/google-protobuf": "^3.15.5",
37
- "@formant/realtime-sdk": "0.0.4"
37
+ "@formant/realtime-sdk": "0.0.5"
38
38
  }
39
39
  }