@wandelbots/nova-js 3.1.0 → 3.2.0-pr.ci-simplify-build.137.87eeb8d

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.
Files changed (79) hide show
  1. package/dist/AutoReconnectingWebsocket-BI1ckzP8.d.ts +71 -0
  2. package/dist/AutoReconnectingWebsocket-BI1ckzP8.d.ts.map +1 -0
  3. package/dist/AutoReconnectingWebsocket-Cr7f9016.d.cts +71 -0
  4. package/dist/AutoReconnectingWebsocket-Cr7f9016.d.cts.map +1 -0
  5. package/dist/LoginWithAuth0-0g0wWRUC.js +217 -0
  6. package/dist/LoginWithAuth0-0g0wWRUC.js.map +1 -0
  7. package/dist/LoginWithAuth0-C82OCyDy.cjs +264 -0
  8. package/dist/LoginWithAuth0-C82OCyDy.cjs.map +1 -0
  9. package/dist/converters-DP2EIVv6.cjs +108 -0
  10. package/dist/converters-DP2EIVv6.cjs.map +1 -0
  11. package/dist/converters-DY6Lf7mb.js +66 -0
  12. package/dist/converters-DY6Lf7mb.js.map +1 -0
  13. package/dist/index.cjs +41 -386
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +70 -0
  16. package/dist/index.d.cts.map +1 -0
  17. package/dist/index.d.ts +69 -5
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +28 -52
  20. package/dist/index.js.map +1 -1
  21. package/dist/lib/v1/index.cjs +2146 -2917
  22. package/dist/lib/v1/index.cjs.map +1 -1
  23. package/dist/lib/v1/index.d.cts +397 -0
  24. package/dist/lib/v1/index.d.cts.map +1 -0
  25. package/dist/lib/v1/index.d.ts +395 -7
  26. package/dist/lib/v1/index.d.ts.map +1 -1
  27. package/dist/lib/v1/index.js +2127 -2623
  28. package/dist/lib/v1/index.js.map +1 -1
  29. package/dist/lib/v2/index.cjs +1356 -1472
  30. package/dist/lib/v2/index.cjs.map +1 -1
  31. package/dist/lib/v2/index.d.cts +115 -0
  32. package/dist/lib/v2/index.d.cts.map +1 -0
  33. package/dist/lib/v2/index.d.ts +113 -2
  34. package/dist/lib/v2/index.d.ts.map +1 -1
  35. package/dist/lib/v2/index.js +1346 -1189
  36. package/dist/lib/v2/index.js.map +1 -1
  37. package/package.json +14 -16
  38. package/src/LoginWithAuth0.ts +9 -9
  39. package/src/lib/v1/NovaCellAPIClient.ts +4 -2
  40. package/src/lib/v2/NovaCellAPIClient.ts +4 -2
  41. package/src/lib/v2/mock/MockNovaInstance.ts +9 -13
  42. package/dist/LoginWithAuth0.d.ts +0 -7
  43. package/dist/LoginWithAuth0.d.ts.map +0 -1
  44. package/dist/chunk-B2C22PTK.js +0 -53
  45. package/dist/chunk-B2C22PTK.js.map +0 -1
  46. package/dist/chunk-I3PUV6ZD.js +0 -286
  47. package/dist/chunk-I3PUV6ZD.js.map +0 -1
  48. package/dist/lib/AutoReconnectingWebsocket.d.ts +0 -43
  49. package/dist/lib/AutoReconnectingWebsocket.d.ts.map +0 -1
  50. package/dist/lib/availableStorage.d.ts +0 -15
  51. package/dist/lib/availableStorage.d.ts.map +0 -1
  52. package/dist/lib/converters.d.ts +0 -26
  53. package/dist/lib/converters.d.ts.map +0 -1
  54. package/dist/lib/errorHandling.d.ts +0 -15
  55. package/dist/lib/errorHandling.d.ts.map +0 -1
  56. package/dist/lib/v1/ConnectedMotionGroup.d.ts +0 -77
  57. package/dist/lib/v1/ConnectedMotionGroup.d.ts.map +0 -1
  58. package/dist/lib/v1/JoggerConnection.d.ts +0 -94
  59. package/dist/lib/v1/JoggerConnection.d.ts.map +0 -1
  60. package/dist/lib/v1/MotionStreamConnection.d.ts +0 -26
  61. package/dist/lib/v1/MotionStreamConnection.d.ts.map +0 -1
  62. package/dist/lib/v1/NovaCellAPIClient.d.ts +0 -68
  63. package/dist/lib/v1/NovaCellAPIClient.d.ts.map +0 -1
  64. package/dist/lib/v1/NovaClient.d.ts +0 -67
  65. package/dist/lib/v1/NovaClient.d.ts.map +0 -1
  66. package/dist/lib/v1/ProgramStateConnection.d.ts +0 -57
  67. package/dist/lib/v1/ProgramStateConnection.d.ts.map +0 -1
  68. package/dist/lib/v1/getLatestTrajectories.d.ts +0 -4
  69. package/dist/lib/v1/getLatestTrajectories.d.ts.map +0 -1
  70. package/dist/lib/v1/mock/MockNovaInstance.d.ts +0 -13
  71. package/dist/lib/v1/mock/MockNovaInstance.d.ts.map +0 -1
  72. package/dist/lib/v1/motionStateUpdate.d.ts +0 -4
  73. package/dist/lib/v1/motionStateUpdate.d.ts.map +0 -1
  74. package/dist/lib/v2/NovaCellAPIClient.d.ts +0 -62
  75. package/dist/lib/v2/NovaCellAPIClient.d.ts.map +0 -1
  76. package/dist/lib/v2/NovaClient.d.ts +0 -60
  77. package/dist/lib/v2/NovaClient.d.ts.map +0 -1
  78. package/dist/lib/v2/mock/MockNovaInstance.d.ts +0 -13
  79. package/dist/lib/v2/mock/MockNovaInstance.d.ts.map +0 -1
@@ -1,9 +1,397 @@
1
+ import { AutoReconnectingWebsocket, MockNovaInstance$1 as MockNovaInstance } from "../../AutoReconnectingWebsocket-BI1ckzP8.js";
2
+ import { AxiosInstance } from "axios";
3
+ import * as _wandelbots_nova_api_v10 from "@wandelbots/nova-api/v1";
4
+ import { ApplicationApi, CellApi, CollectionValue, Configuration, ControllerApi, ControllerIOsApi, ControllerInstance, CoordinateSystemsApi, DeviceConfigurationApi, GetTrajectoryResponse, Joints, LibraryProgramApi, LibraryProgramMetadataApi, LibraryRecipeApi, LibraryRecipeMetadataApi, MotionApi, MotionGroupApi, MotionGroupInfosApi, MotionGroupJoggingApi, MotionGroupKinematicApi, MotionGroupPhysical, MotionGroupSpecification, MotionGroupStateResponse, Mounting, ProgramApi, ProgramValuesApi, RobotControllerState, RobotTcp, SafetySetup, StoreCollisionComponentsApi, StoreCollisionScenesApi, StoreObjectApi, SystemApi, TcpPose, VirtualRobotApi, VirtualRobotBehaviorApi, VirtualRobotModeApi, VirtualRobotSetupApi } from "@wandelbots/nova-api/v1";
5
+ import * as THREE from "three";
1
6
  export * from "@wandelbots/nova-api/v1";
2
- export * from "./ConnectedMotionGroup";
3
- export * from "./getLatestTrajectories";
4
- export * from "./JoggerConnection";
5
- export * from "./MotionStreamConnection";
6
- export * from "./NovaCellAPIClient";
7
- export * from "./NovaClient";
8
- export * from "./ProgramStateConnection";
7
+
8
+ //#region src/lib/v1/MotionStreamConnection.d.ts
9
+ /**
10
+ * Store representing the current state of a connected motion group.
11
+ */
12
+ declare class MotionStreamConnection {
13
+ readonly nova: NovaClient;
14
+ readonly controller: ControllerInstance;
15
+ readonly motionGroup: MotionGroupPhysical;
16
+ readonly initialMotionState: MotionGroupStateResponse;
17
+ readonly motionStateSocket: AutoReconnectingWebsocket;
18
+ static open(nova: NovaClient, motionGroupId: string): Promise<MotionStreamConnection>;
19
+ rapidlyChangingMotionState: MotionGroupStateResponse;
20
+ constructor(nova: NovaClient, controller: ControllerInstance, motionGroup: MotionGroupPhysical, initialMotionState: MotionGroupStateResponse, motionStateSocket: AutoReconnectingWebsocket);
21
+ get motionGroupId(): string;
22
+ get controllerId(): string;
23
+ get modelFromController(): string | undefined;
24
+ get wandelscriptIdentifier(): string;
25
+ get joints(): {
26
+ index: number;
27
+ }[];
28
+ dispose(): void;
29
+ }
30
+ //#endregion
31
+ //#region src/lib/v1/JoggerConnection.d.ts
32
+ type JoggerConnectionOpts = {
33
+ /**
34
+ * When an error message is received from the jogging websocket, it
35
+ * will be passed here. If this handler is not provided, the error will
36
+ * instead be thrown as an unhandled error.
37
+ */
38
+ onError?: (err: unknown) => void;
39
+ };
40
+ declare class JoggerConnection {
41
+ readonly motionStream: MotionStreamConnection;
42
+ readonly opts: JoggerConnectionOpts;
43
+ cartesianWebsocket: AutoReconnectingWebsocket | null;
44
+ jointWebsocket: AutoReconnectingWebsocket | null;
45
+ cartesianJoggingOpts: {
46
+ tcpId?: string;
47
+ coordSystemId?: string;
48
+ };
49
+ static open(nova: NovaClient, motionGroupId: string, opts?: JoggerConnectionOpts): Promise<JoggerConnection>;
50
+ constructor(motionStream: MotionStreamConnection, opts?: JoggerConnectionOpts);
51
+ get motionGroupId(): string;
52
+ get nova(): NovaClient;
53
+ get numJoints(): number;
54
+ get activeJoggingMode(): "cartesian" | "joint" | "increment";
55
+ get activeWebsocket(): AutoReconnectingWebsocket | null;
56
+ stop(): Promise<void>;
57
+ dispose(): void;
58
+ setJoggingMode(mode: "cartesian" | "joint" | "increment", cartesianJoggingOpts?: {
59
+ tcpId?: string;
60
+ coordSystemId?: string;
61
+ }): void;
62
+ /**
63
+ * Start rotation of a single robot joint at the specified velocity
64
+ */
65
+ startJointRotation({
66
+ joint,
67
+ direction,
68
+ velocityRadsPerSec
69
+ }: {
70
+ /** Index of the joint to rotate */
71
+ joint: number;
72
+ /** Direction of rotation ("+" or "-") */
73
+ direction: "+" | "-";
74
+ /** Speed of the rotation in radians per second */
75
+ velocityRadsPerSec: number;
76
+ }): Promise<void>;
77
+ /**
78
+ * Start the TCP moving along a specified axis at a given velocity
79
+ */
80
+ startTCPTranslation({
81
+ axis,
82
+ direction,
83
+ velocityMmPerSec
84
+ }: {
85
+ axis: "x" | "y" | "z";
86
+ direction: "-" | "+";
87
+ velocityMmPerSec: number;
88
+ }): Promise<void>;
89
+ /**
90
+ * Start the TCP rotating around a specified axis at a given velocity
91
+ */
92
+ startTCPRotation({
93
+ axis,
94
+ direction,
95
+ velocityRadsPerSec
96
+ }: {
97
+ axis: "x" | "y" | "z";
98
+ direction: "-" | "+";
99
+ velocityRadsPerSec: number;
100
+ }): Promise<void>;
101
+ /**
102
+ * Move the robot by a fixed distance in a single cartesian
103
+ * axis, either rotating or translating relative to the TCP.
104
+ * Promise resolves only after the motion has completed.
105
+ */
106
+ runIncrementalCartesianMotion({
107
+ currentTcpPose,
108
+ currentJoints,
109
+ coordSystemId,
110
+ velocityInRelevantUnits,
111
+ axis,
112
+ direction,
113
+ motion
114
+ }: {
115
+ currentTcpPose: TcpPose;
116
+ currentJoints: Joints;
117
+ coordSystemId: string;
118
+ velocityInRelevantUnits: number;
119
+ axis: "x" | "y" | "z";
120
+ direction: "-" | "+";
121
+ motion: {
122
+ type: "rotate";
123
+ distanceRads: number;
124
+ } | {
125
+ type: "translate";
126
+ distanceMm: number;
127
+ };
128
+ }): Promise<void>;
129
+ /**
130
+ * Rotate a single robot joint by a fixed number of radians
131
+ * Promise resolves only after the motion has completed.
132
+ */
133
+ runIncrementalJointRotation({
134
+ joint,
135
+ currentJoints,
136
+ velocityRadsPerSec,
137
+ direction,
138
+ distanceRads
139
+ }: {
140
+ joint: number;
141
+ currentJoints: Joints;
142
+ velocityRadsPerSec: number;
143
+ direction: "-" | "+";
144
+ distanceRads: number;
145
+ }): Promise<void>;
146
+ }
147
+ //#endregion
148
+ //#region src/lib/v1/NovaCellAPIClient.d.ts
149
+ type OmitFirstArg<F> = F extends ((x: any, ...args: infer P) => infer R) ? (...args: P) => R : never;
150
+ type UnwrapAxiosResponseReturn<T> = T extends ((...a: any) => any) ? (...a: Parameters<T>) => Promise<Awaited<ReturnType<T>> extends {
151
+ data: infer D;
152
+ } ? D : never> : never;
153
+ type WithCellId<T> = { [P in keyof T]: UnwrapAxiosResponseReturn<OmitFirstArg<T[P]>> };
154
+ type WithUnwrappedAxiosResponse<T> = { [P in keyof T]: UnwrapAxiosResponseReturn<T[P]> };
155
+ /**
156
+ * API client providing type-safe access to all the Nova API REST endpoints
157
+ * associated with a specific cell id.
158
+ */
159
+ declare class NovaCellAPIClient {
160
+ readonly cellId: string;
161
+ readonly opts: Configuration & {
162
+ axiosInstance?: AxiosInstance;
163
+ mock?: boolean;
164
+ };
165
+ constructor(cellId: string, opts: Configuration & {
166
+ axiosInstance?: AxiosInstance;
167
+ mock?: boolean;
168
+ });
169
+ /**
170
+ * Some TypeScript sorcery which alters the API class methods so you don't
171
+ * have to pass the cell id to every single one, and de-encapsulates the
172
+ * response data
173
+ */
174
+ private withCellId;
175
+ /**
176
+ * As withCellId, but only does the response unwrapping
177
+ */
178
+ private withUnwrappedResponsesOnly;
179
+ readonly system: WithUnwrappedAxiosResponse<SystemApi>;
180
+ readonly cell: WithUnwrappedAxiosResponse<CellApi>;
181
+ readonly deviceConfig: WithCellId<DeviceConfigurationApi>;
182
+ readonly motionGroup: WithCellId<MotionGroupApi>;
183
+ readonly motionGroupInfos: WithCellId<MotionGroupInfosApi>;
184
+ readonly controller: WithCellId<ControllerApi>;
185
+ readonly program: WithCellId<ProgramApi>;
186
+ readonly programValues: WithCellId<ProgramValuesApi>;
187
+ readonly controllerIOs: WithCellId<ControllerIOsApi>;
188
+ readonly motionGroupKinematic: WithCellId<MotionGroupKinematicApi>;
189
+ readonly motion: WithCellId<MotionApi>;
190
+ readonly coordinateSystems: WithCellId<CoordinateSystemsApi>;
191
+ readonly application: WithCellId<ApplicationApi>;
192
+ readonly applicationGlobal: WithUnwrappedAxiosResponse<ApplicationApi>;
193
+ readonly motionGroupJogging: WithCellId<MotionGroupJoggingApi>;
194
+ readonly virtualRobot: WithCellId<VirtualRobotApi>;
195
+ readonly virtualRobotSetup: WithCellId<VirtualRobotSetupApi>;
196
+ readonly virtualRobotMode: WithCellId<VirtualRobotModeApi>;
197
+ readonly virtualRobotBehavior: WithCellId<VirtualRobotBehaviorApi>;
198
+ readonly libraryProgramMetadata: WithCellId<LibraryProgramMetadataApi>;
199
+ readonly libraryProgram: WithCellId<LibraryProgramApi>;
200
+ readonly libraryRecipeMetadata: WithCellId<LibraryRecipeMetadataApi>;
201
+ readonly libraryRecipe: WithCellId<LibraryRecipeApi>;
202
+ readonly storeObject: WithCellId<StoreObjectApi>;
203
+ readonly storeCollisionComponents: WithCellId<StoreCollisionComponentsApi>;
204
+ readonly storeCollisionScenes: WithCellId<StoreCollisionScenesApi>;
205
+ }
206
+ //#endregion
207
+ //#region src/lib/v1/NovaClient.d.ts
208
+ type NovaClientConfig = {
209
+ /**
210
+ * Url of the deployed Nova instance to connect to
211
+ * e.g. https://saeattii.instance.wandelbots.io
212
+ */
213
+ instanceUrl: string | "https://mock.example.com";
214
+ /**
215
+ * Identifier of the cell on the Nova instance to connect this client to.
216
+ * If omitted, the default identifier "cell" is used.
217
+ **/
218
+ cellId?: string;
219
+ /**
220
+ * Username for basic auth to the Nova instance.
221
+ * @deprecated use accessToken instead
222
+ */
223
+ username?: string;
224
+ /**
225
+ * Password for basic auth to the Nova instance.
226
+ * @deprecated use accessToken instead
227
+ */
228
+ password?: string;
229
+ /**
230
+ * Access token for Bearer authentication.
231
+ */
232
+ accessToken?: string;
233
+ } & Omit<Configuration, "isJsonMime" | "basePath">;
234
+ type NovaClientConfigWithDefaults = NovaClientConfig & {
235
+ cellId: string;
236
+ };
237
+ /**
238
+ * Client for connecting to a Nova instance and controlling robots.
239
+ */
240
+ declare class NovaClient {
241
+ readonly api: NovaCellAPIClient;
242
+ readonly config: NovaClientConfigWithDefaults;
243
+ readonly mock?: MockNovaInstance;
244
+ authPromise: Promise<string | null> | null;
245
+ accessToken: string | null;
246
+ constructor(config: NovaClientConfig);
247
+ renewAuthentication(): Promise<void>;
248
+ makeWebsocketURL(path: string): string;
249
+ /**
250
+ * Retrieve an AutoReconnectingWebsocket to the given path on the Nova instance.
251
+ * If you explicitly want to reconnect an existing websocket, call `reconnect`
252
+ * on the returned object.
253
+ */
254
+ openReconnectingWebsocket(path: string): AutoReconnectingWebsocket;
255
+ /**
256
+ * Connect to the motion state websocket(s) for a given motion group
257
+ */
258
+ connectMotionStream(motionGroupId: string): Promise<MotionStreamConnection>;
259
+ /**
260
+ * Connect to the jogging websocket(s) for a given motion group
261
+ */
262
+ connectJogger(motionGroupId: string): Promise<JoggerConnection>;
263
+ connectMotionGroups(motionGroupIds: string[]): Promise<ConnectedMotionGroup[]>;
264
+ connectMotionGroup(motionGroupId: string): Promise<ConnectedMotionGroup>;
265
+ }
266
+ //#endregion
267
+ //#region src/lib/v1/ConnectedMotionGroup.d.ts
268
+ type MotionGroupOption = {
269
+ selectionId: string;
270
+ } & MotionGroupPhysical;
271
+ /**
272
+ * Store representing the current state of a connected motion group.
273
+ */
274
+ declare class ConnectedMotionGroup {
275
+ readonly nova: NovaClient;
276
+ readonly controller: ControllerInstance;
277
+ readonly motionGroup: MotionGroupPhysical;
278
+ readonly initialMotionState: MotionGroupStateResponse;
279
+ readonly motionStateSocket: AutoReconnectingWebsocket;
280
+ readonly isVirtual: boolean;
281
+ readonly tcps: RobotTcp[];
282
+ readonly motionGroupSpecification: MotionGroupSpecification;
283
+ readonly safetySetup: SafetySetup;
284
+ readonly mounting: Mounting | null;
285
+ readonly initialControllerState: RobotControllerState;
286
+ readonly controllerStateSocket: AutoReconnectingWebsocket;
287
+ static connect(nova: NovaClient, motionGroupId: string, controllers: ControllerInstance[]): Promise<ConnectedMotionGroup>;
288
+ connectedJoggingCartesianSocket: WebSocket | null;
289
+ connectedJoggingJointsSocket: WebSocket | null;
290
+ planData: any | null;
291
+ joggingVelocity: number;
292
+ rapidlyChangingMotionState: MotionGroupStateResponse;
293
+ controllerState: RobotControllerState;
294
+ /**
295
+ * Reflects activation state of the motion group / robot servos. The
296
+ * movement controls in the UI should only be enabled in the "active" state
297
+ */
298
+ activationState: "inactive" | "activating" | "deactivating" | "active";
299
+ constructor(nova: NovaClient, controller: ControllerInstance, motionGroup: MotionGroupPhysical, initialMotionState: MotionGroupStateResponse, motionStateSocket: AutoReconnectingWebsocket, isVirtual: boolean, tcps: RobotTcp[], motionGroupSpecification: MotionGroupSpecification, safetySetup: SafetySetup, mounting: Mounting | null, initialControllerState: RobotControllerState, controllerStateSocket: AutoReconnectingWebsocket);
300
+ get motionGroupId(): string;
301
+ get controllerId(): string;
302
+ get modelFromController(): string | undefined;
303
+ get wandelscriptIdentifier(): string;
304
+ /** Jogging velocity in radians for rotation and joint movement */
305
+ get joggingVelocityRads(): number;
306
+ get joints(): {
307
+ index: number;
308
+ }[];
309
+ get dhParameters(): _wandelbots_nova_api_v10.DHParameter[] | undefined;
310
+ get safetyZones(): _wandelbots_nova_api_v10.SafetySetupSafetyZone[] | undefined;
311
+ /** Gets the robot mounting position offset in 3D viz coordinates */
312
+ get mountingPosition(): [number, number, number];
313
+ /** Gets the robot mounting position rotation in 3D viz coordinates */
314
+ get mountingQuaternion(): THREE.Quaternion;
315
+ /**
316
+ * Whether the controller is currently in a safety state
317
+ * corresponding to an emergency stop
318
+ */
319
+ get isEstopActive(): boolean;
320
+ /**
321
+ * Whether the controller is in a safety state
322
+ * that may be non-functional for robot pad purposes
323
+ */
324
+ get isMoveableSafetyState(): boolean;
325
+ /**
326
+ * Whether the controller is in an operation mode that allows movement
327
+ */
328
+ get isMoveableOperationMode(): boolean;
329
+ /**
330
+ * Whether the robot is currently active and can be moved, based on the
331
+ * safety state, operation mode and servo toggle activation state.
332
+ */
333
+ get canBeMoved(): boolean;
334
+ deactivate(): Promise<void>;
335
+ activate(): Promise<void>;
336
+ toggleActivation(): void;
337
+ dispose(): void;
338
+ setJoggingVelocity(velocity: number): void;
339
+ }
340
+ //#endregion
341
+ //#region src/lib/v1/getLatestTrajectories.d.ts
342
+ declare function getLatestTrajectories(apiClient: NovaCellAPIClient, sampleTime?: number, responsesCoordinateSystem?: string): Promise<GetTrajectoryResponse[]>;
343
+ //#endregion
344
+ //#region src/lib/v1/ProgramStateConnection.d.ts
345
+ type ProgramRunnerLogEntry = {
346
+ timestamp: number;
347
+ message: string;
348
+ level?: "warn" | "error";
349
+ };
350
+ declare enum ProgramState {
351
+ NotStarted = "not started",
352
+ Running = "running",
353
+ Stopped = "stopped",
354
+ Failed = "failed",
355
+ Completed = "completed",
356
+ }
357
+ type CurrentProgram = {
358
+ id?: string;
359
+ wandelscript?: string;
360
+ state?: ProgramState;
361
+ };
362
+ type ProgramStateMessage = {
363
+ type: string;
364
+ runner: {
365
+ id: string;
366
+ state: ProgramState;
367
+ start_time?: number | null;
368
+ execution_time?: number | null;
369
+ };
370
+ };
371
+ /**
372
+ * Interface for running Wandelscript programs on the Nova instance and
373
+ * tracking their progress and output
374
+ */
375
+ declare class ProgramStateConnection {
376
+ readonly nova: NovaClient;
377
+ currentProgram: CurrentProgram;
378
+ logs: ProgramRunnerLogEntry[];
379
+ executionState: "idle" | "starting" | "executing" | "stopping";
380
+ currentlyExecutingProgramRunnerId: string | null;
381
+ programStateSocket: AutoReconnectingWebsocket;
382
+ constructor(nova: NovaClient);
383
+ /** Handle a program state update from the backend */
384
+ handleProgramStateMessage(msg: ProgramStateMessage): Promise<void>;
385
+ /** Call when a program is no longer executing */
386
+ gotoIdleState(): void;
387
+ executeProgram(wandelscript: string, initial_state?: {
388
+ [key: string]: CollectionValue;
389
+ }, activeRobot?: MotionStreamConnection): Promise<void>;
390
+ stopProgram(): Promise<void>;
391
+ reset(): void;
392
+ log(message: string): void;
393
+ logError(message: string): void;
394
+ }
395
+ //#endregion
396
+ export { ConnectedMotionGroup, CurrentProgram, JoggerConnection, JoggerConnectionOpts, MotionGroupOption, MotionStreamConnection, NovaCellAPIClient, NovaClient, NovaClientConfig, ProgramRunnerLogEntry, ProgramState, ProgramStateConnection, WithCellId, WithUnwrappedAxiosResponse, getLatestTrajectories };
9
397
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/v1/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/lib/v1/MotionStreamConnection.ts","../../../src/lib/v1/JoggerConnection.ts","../../../src/lib/v1/NovaCellAPIClient.ts","../../../src/lib/v1/NovaClient.ts","../../../src/lib/v1/ConnectedMotionGroup.ts","../../../src/lib/v1/getLatestTrajectories.ts","../../../src/lib/v1/ProgramStateConnection.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;cA0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