@wandelbots/nova-js 3.2.0 → 3.3.0

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 (104) hide show
  1. package/README.md +32 -136
  2. package/dist/AutoReconnectingWebsocket-Qcrbm3Kb.d.cts +69 -0
  3. package/dist/AutoReconnectingWebsocket-Qcrbm3Kb.d.cts.map +1 -0
  4. package/dist/AutoReconnectingWebsocket-dHe-kceU.d.mts +69 -0
  5. package/dist/AutoReconnectingWebsocket-dHe-kceU.d.mts.map +1 -0
  6. package/dist/LoginWithAuth0-CBD9BXXz.cjs +264 -0
  7. package/dist/LoginWithAuth0-CBD9BXXz.cjs.map +1 -0
  8. package/dist/LoginWithAuth0-wQB-Sol1.mjs +217 -0
  9. package/dist/LoginWithAuth0-wQB-Sol1.mjs.map +1 -0
  10. package/dist/NovaClient-B8XM3OPO.mjs +2057 -0
  11. package/dist/NovaClient-B8XM3OPO.mjs.map +1 -0
  12. package/dist/NovaClient-CV7ooIkD.d.cts +349 -0
  13. package/dist/NovaClient-CV7ooIkD.d.cts.map +1 -0
  14. package/dist/NovaClient-D2EItmiH.cjs +2137 -0
  15. package/dist/NovaClient-D2EItmiH.cjs.map +1 -0
  16. package/dist/NovaClient-qJnHcx2s.d.mts +349 -0
  17. package/dist/NovaClient-qJnHcx2s.d.mts.map +1 -0
  18. package/dist/index.cjs +42 -386
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +73 -0
  21. package/dist/index.d.cts.map +1 -0
  22. package/dist/index.d.mts +73 -0
  23. package/dist/index.d.mts.map +1 -0
  24. package/dist/index.mjs +36 -0
  25. package/dist/index.mjs.map +1 -0
  26. package/dist/lib/v1/index.cjs +190 -2940
  27. package/dist/lib/v1/index.cjs.map +1 -1
  28. package/dist/lib/v1/index.d.cts +62 -0
  29. package/dist/lib/v1/index.d.cts.map +1 -0
  30. package/dist/lib/v1/index.d.mts +62 -0
  31. package/dist/lib/v1/index.d.mts.map +1 -0
  32. package/dist/lib/v1/index.mjs +182 -0
  33. package/dist/lib/v1/index.mjs.map +1 -0
  34. package/dist/lib/v2/index.cjs +1821 -1468
  35. package/dist/lib/v2/index.cjs.map +1 -1
  36. package/dist/lib/v2/index.d.cts +118 -0
  37. package/dist/lib/v2/index.d.cts.map +1 -0
  38. package/dist/lib/v2/index.d.mts +118 -0
  39. package/dist/lib/v2/index.d.mts.map +1 -0
  40. package/dist/lib/v2/index.mjs +1822 -0
  41. package/dist/lib/v2/index.mjs.map +1 -0
  42. package/package.json +21 -19
  43. package/src/LoginWithAuth0.ts +12 -12
  44. package/src/index.ts +2 -0
  45. package/src/lib/converters.ts +5 -23
  46. package/src/lib/v1/MotionStreamConnection.ts +0 -1
  47. package/src/lib/v1/NovaClient.ts +18 -0
  48. package/src/lib/v1/index.ts +6 -0
  49. package/src/lib/v1/mock/MockNovaInstance.ts +0 -1
  50. package/src/lib/v1/wandelscriptUtils.ts +22 -0
  51. package/src/lib/v2/NovaClient.ts +14 -7
  52. package/src/lib/v2/index.ts +1 -0
  53. package/src/lib/v2/mock/MockNovaInstance.ts +411 -21
  54. package/src/lib/v2/wandelscriptUtils.ts +27 -0
  55. package/dist/LoginWithAuth0.d.ts +0 -7
  56. package/dist/LoginWithAuth0.d.ts.map +0 -1
  57. package/dist/chunk-B2C22PTK.js +0 -53
  58. package/dist/chunk-B2C22PTK.js.map +0 -1
  59. package/dist/chunk-I3PUV6ZD.js +0 -286
  60. package/dist/chunk-I3PUV6ZD.js.map +0 -1
  61. package/dist/index.d.ts +0 -6
  62. package/dist/index.d.ts.map +0 -1
  63. package/dist/index.js +0 -60
  64. package/dist/index.js.map +0 -1
  65. package/dist/lib/AutoReconnectingWebsocket.d.ts +0 -43
  66. package/dist/lib/AutoReconnectingWebsocket.d.ts.map +0 -1
  67. package/dist/lib/availableStorage.d.ts +0 -15
  68. package/dist/lib/availableStorage.d.ts.map +0 -1
  69. package/dist/lib/converters.d.ts +0 -26
  70. package/dist/lib/converters.d.ts.map +0 -1
  71. package/dist/lib/errorHandling.d.ts +0 -15
  72. package/dist/lib/errorHandling.d.ts.map +0 -1
  73. package/dist/lib/v1/ConnectedMotionGroup.d.ts +0 -77
  74. package/dist/lib/v1/ConnectedMotionGroup.d.ts.map +0 -1
  75. package/dist/lib/v1/JoggerConnection.d.ts +0 -94
  76. package/dist/lib/v1/JoggerConnection.d.ts.map +0 -1
  77. package/dist/lib/v1/MotionStreamConnection.d.ts +0 -26
  78. package/dist/lib/v1/MotionStreamConnection.d.ts.map +0 -1
  79. package/dist/lib/v1/NovaCellAPIClient.d.ts +0 -68
  80. package/dist/lib/v1/NovaCellAPIClient.d.ts.map +0 -1
  81. package/dist/lib/v1/NovaClient.d.ts +0 -67
  82. package/dist/lib/v1/NovaClient.d.ts.map +0 -1
  83. package/dist/lib/v1/ProgramStateConnection.d.ts +0 -57
  84. package/dist/lib/v1/ProgramStateConnection.d.ts.map +0 -1
  85. package/dist/lib/v1/getLatestTrajectories.d.ts +0 -4
  86. package/dist/lib/v1/getLatestTrajectories.d.ts.map +0 -1
  87. package/dist/lib/v1/index.d.ts +0 -9
  88. package/dist/lib/v1/index.d.ts.map +0 -1
  89. package/dist/lib/v1/index.js +0 -2653
  90. package/dist/lib/v1/index.js.map +0 -1
  91. package/dist/lib/v1/mock/MockNovaInstance.d.ts +0 -13
  92. package/dist/lib/v1/mock/MockNovaInstance.d.ts.map +0 -1
  93. package/dist/lib/v1/motionStateUpdate.d.ts +0 -4
  94. package/dist/lib/v1/motionStateUpdate.d.ts.map +0 -1
  95. package/dist/lib/v2/NovaCellAPIClient.d.ts +0 -62
  96. package/dist/lib/v2/NovaCellAPIClient.d.ts.map +0 -1
  97. package/dist/lib/v2/NovaClient.d.ts +0 -60
  98. package/dist/lib/v2/NovaClient.d.ts.map +0 -1
  99. package/dist/lib/v2/index.d.ts +0 -4
  100. package/dist/lib/v2/index.d.ts.map +0 -1
  101. package/dist/lib/v2/index.js +0 -1196
  102. package/dist/lib/v2/index.js.map +0 -1
  103. package/dist/lib/v2/mock/MockNovaInstance.d.ts +0 -13
  104. package/dist/lib/v2/mock/MockNovaInstance.d.ts.map +0 -1
@@ -1,94 +0,0 @@
1
- import type { Joints, TcpPose } from "@wandelbots/nova-api/v1";
2
- import type { AutoReconnectingWebsocket } from "../AutoReconnectingWebsocket";
3
- import type { MotionStreamConnection } from "./MotionStreamConnection";
4
- import type { NovaClient } from "./NovaClient";
5
- export type JoggerConnectionOpts = {
6
- /**
7
- * When an error message is received from the jogging websocket, it
8
- * will be passed here. If this handler is not provided, the error will
9
- * instead be thrown as an unhandled error.
10
- */
11
- onError?: (err: unknown) => void;
12
- };
13
- export declare class JoggerConnection {
14
- readonly motionStream: MotionStreamConnection;
15
- readonly opts: JoggerConnectionOpts;
16
- cartesianWebsocket: AutoReconnectingWebsocket | null;
17
- jointWebsocket: AutoReconnectingWebsocket | null;
18
- cartesianJoggingOpts: {
19
- tcpId?: string;
20
- coordSystemId?: string;
21
- };
22
- static open(nova: NovaClient, motionGroupId: string, opts?: JoggerConnectionOpts): Promise<JoggerConnection>;
23
- constructor(motionStream: MotionStreamConnection, opts?: JoggerConnectionOpts);
24
- get motionGroupId(): string;
25
- get nova(): NovaClient;
26
- get numJoints(): number;
27
- get activeJoggingMode(): "cartesian" | "joint" | "increment";
28
- get activeWebsocket(): AutoReconnectingWebsocket | null;
29
- stop(): Promise<void>;
30
- dispose(): void;
31
- setJoggingMode(mode: "cartesian" | "joint" | "increment", cartesianJoggingOpts?: {
32
- tcpId?: string;
33
- coordSystemId?: string;
34
- }): void;
35
- /**
36
- * Start rotation of a single robot joint at the specified velocity
37
- */
38
- startJointRotation({ joint, direction, velocityRadsPerSec, }: {
39
- /** Index of the joint to rotate */
40
- joint: number;
41
- /** Direction of rotation ("+" or "-") */
42
- direction: "+" | "-";
43
- /** Speed of the rotation in radians per second */
44
- velocityRadsPerSec: number;
45
- }): Promise<void>;
46
- /**
47
- * Start the TCP moving along a specified axis at a given velocity
48
- */
49
- startTCPTranslation({ axis, direction, velocityMmPerSec, }: {
50
- axis: "x" | "y" | "z";
51
- direction: "-" | "+";
52
- velocityMmPerSec: number;
53
- }): Promise<void>;
54
- /**
55
- * Start the TCP rotating around a specified axis at a given velocity
56
- */
57
- startTCPRotation({ axis, direction, velocityRadsPerSec, }: {
58
- axis: "x" | "y" | "z";
59
- direction: "-" | "+";
60
- velocityRadsPerSec: number;
61
- }): Promise<void>;
62
- /**
63
- * Move the robot by a fixed distance in a single cartesian
64
- * axis, either rotating or translating relative to the TCP.
65
- * Promise resolves only after the motion has completed.
66
- */
67
- runIncrementalCartesianMotion({ currentTcpPose, currentJoints, coordSystemId, velocityInRelevantUnits, axis, direction, motion, }: {
68
- currentTcpPose: TcpPose;
69
- currentJoints: Joints;
70
- coordSystemId: string;
71
- velocityInRelevantUnits: number;
72
- axis: "x" | "y" | "z";
73
- direction: "-" | "+";
74
- motion: {
75
- type: "rotate";
76
- distanceRads: number;
77
- } | {
78
- type: "translate";
79
- distanceMm: number;
80
- };
81
- }): Promise<void>;
82
- /**
83
- * Rotate a single robot joint by a fixed number of radians
84
- * Promise resolves only after the motion has completed.
85
- */
86
- runIncrementalJointRotation({ joint, currentJoints, velocityRadsPerSec, direction, distanceRads, }: {
87
- joint: number;
88
- currentJoints: Joints;
89
- velocityRadsPerSec: number;
90
- direction: "-" | "+";
91
- distanceRads: number;
92
- }): Promise<void>;
93
- }
94
- //# sourceMappingURL=JoggerConnection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JoggerConnection.d.ts","sourceRoot":"","sources":["../../../src/lib/v1/JoggerConnection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,MAAM,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEvE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAE7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACtE,OAAO,KAAK,EAAE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QACD,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;QACrB,SAAS,EAAE,GAAG,GAAG,GAAG,CAAA;QACpB,gBAAgB,EAAE,MAAM,CAAA;KACzB;IAsBD;;OAEG;IACG,gBAAgB,CAAC,EACrB,IAAI,EACJ,SAAS,EACT,kBAAkB,GACnB,EAAE;QACD,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;QACrB,SAAS,EAAE,GAAG,GAAG,GAAG,CAAA;QACpB,kBAAkB,EAAE,MAAM,CAAA;KAC3B;IAsBD;;;;OAIG;IACG,6BAA6B,CAAC,EAClC,cAAc,EACd,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,IAAI,EACJ,SAAS,EACT,MAAM,GACP,EAAE;QACD,cAAc,EAAE,OAAO,CAAA;QACvB,aAAa,EAAE,MAAM,CAAA;QACrB,aAAa,EAAE,MAAM,CAAA;QACrB,uBAAuB,EAAE,MAAM,CAAA;QAC/B,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;QACrB,SAAS,EAAE,GAAG,GAAG,GAAG,CAAA;QACpB,MAAM,EACF;YACE,IAAI,EAAE,QAAQ,CAAA;YACd,YAAY,EAAE,MAAM,CAAA;SACrB,GACD;YACE,IAAI,EAAE,WAAW,CAAA;YACjB,UAAU,EAAE,MAAM,CAAA;SACnB,CAAA;KACN;IA4HD;;;OAGG;IACG,2BAA2B,CAAC,EAChC,KAAK,EACL,aAAa,EACb,kBAAkB,EAClB,SAAS,EACT,YAAY,GACb,EAAE;QACD,KAAK,EAAE,MAAM,CAAA;QACb,aAAa,EAAE,MAAM,CAAA;QACrB,kBAAkB,EAAE,MAAM,CAAA;QAC1B,SAAS,EAAE,GAAG,GAAG,GAAG,CAAA;QACpB,YAAY,EAAE,MAAM,CAAA;KACrB;CA8CF"}
@@ -1,26 +0,0 @@
1
- /** biome-ignore-all lint/style/noNonNullAssertion: legacy code */
2
- import type { ControllerInstance, MotionGroupPhysical, MotionGroupStateResponse } from "@wandelbots/nova-api/v1";
3
- import type { AutoReconnectingWebsocket } from "../AutoReconnectingWebsocket";
4
- import type { NovaClient } from "./NovaClient";
5
- /**
6
- * Store representing the current state of a connected motion group.
7
- */
8
- export declare class MotionStreamConnection {
9
- readonly nova: NovaClient;
10
- readonly controller: ControllerInstance;
11
- readonly motionGroup: MotionGroupPhysical;
12
- readonly initialMotionState: MotionGroupStateResponse;
13
- readonly motionStateSocket: AutoReconnectingWebsocket;
14
- static open(nova: NovaClient, motionGroupId: string): Promise<MotionStreamConnection>;
15
- rapidlyChangingMotionState: MotionGroupStateResponse;
16
- constructor(nova: NovaClient, controller: ControllerInstance, motionGroup: MotionGroupPhysical, initialMotionState: MotionGroupStateResponse, motionStateSocket: AutoReconnectingWebsocket);
17
- get motionGroupId(): string;
18
- get controllerId(): string;
19
- get modelFromController(): string | undefined;
20
- get wandelscriptIdentifier(): string;
21
- get joints(): {
22
- index: number;
23
- }[];
24
- dispose(): void;
25
- }
26
- //# sourceMappingURL=MotionStreamConnection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MotionStreamConnection.d.ts","sourceRoot":"","sources":["../../../src/lib/v1/MotionStreamConnection.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EAEzB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAG7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AA2C9C;;GAEG;AACH,qBAAa,sBAAsB;IAsD/B,QAAQ,CAAC,IAAI,EAAE,UAAU;IACzB,QAAQ,CAAC,UAAU,EAAE,kBAAkB;IACvC,QAAQ,CAAC,WAAW,EAAE,mBAAmB;IACzC,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB;IACrD,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB;WAzD1C,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM;IAkDzD,0BAA0B,EAAE,wBAAwB,CAAA;gBAGzC,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,kBAAkB,EAC9B,WAAW,EAAE,mBAAmB,EAChC,kBAAkB,EAAE,wBAAwB,EAC5C,iBAAiB,EAAE,yBAAyB;IA0DvD,IAAI,aAAa,WAEhB;IAED,IAAI,YAAY,WAEf;IAED,IAAI,mBAAmB,uBAEtB;IAED,IAAI,sBAAsB,WAGzB;IAED,IAAI,MAAM;;QAMT;IAED,OAAO;CAGR"}
@@ -1,68 +0,0 @@
1
- /** biome-ignore-all lint/style/noNonNullAssertion: legacy code */
2
- /** biome-ignore-all lint/suspicious/noExplicitAny: legacy code */
3
- import type { Configuration as BaseConfiguration } from "@wandelbots/nova-api/v1";
4
- import { ApplicationApi, CellApi, ControllerApi, ControllerIOsApi, CoordinateSystemsApi, DeviceConfigurationApi, LibraryProgramApi, LibraryProgramMetadataApi, LibraryRecipeApi, LibraryRecipeMetadataApi, MotionApi, MotionGroupApi, MotionGroupInfosApi, MotionGroupJoggingApi, MotionGroupKinematicApi, ProgramApi, ProgramValuesApi, StoreCollisionComponentsApi, StoreCollisionScenesApi, StoreObjectApi, SystemApi, VirtualRobotApi, VirtualRobotBehaviorApi, VirtualRobotModeApi, VirtualRobotSetupApi } from "@wandelbots/nova-api/v1";
5
- import type { AxiosInstance } from "axios";
6
- type OmitFirstArg<F> = F extends (x: any, ...args: infer P) => infer R ? (...args: P) => R : never;
7
- type UnwrapAxiosResponseReturn<T> = T extends (...a: any) => any ? (...a: Parameters<T>) => Promise<Awaited<ReturnType<T>> extends {
8
- data: infer D;
9
- } ? D : never> : never;
10
- export type WithCellId<T> = {
11
- [P in keyof T]: UnwrapAxiosResponseReturn<OmitFirstArg<T[P]>>;
12
- };
13
- export type WithUnwrappedAxiosResponse<T> = {
14
- [P in keyof T]: UnwrapAxiosResponseReturn<T[P]>;
15
- };
16
- /**
17
- * API client providing type-safe access to all the Nova API REST endpoints
18
- * associated with a specific cell id.
19
- */
20
- export declare class NovaCellAPIClient {
21
- readonly cellId: string;
22
- readonly opts: BaseConfiguration & {
23
- axiosInstance?: AxiosInstance;
24
- mock?: boolean;
25
- };
26
- constructor(cellId: string, opts: BaseConfiguration & {
27
- axiosInstance?: AxiosInstance;
28
- mock?: boolean;
29
- });
30
- /**
31
- * Some TypeScript sorcery which alters the API class methods so you don't
32
- * have to pass the cell id to every single one, and de-encapsulates the
33
- * response data
34
- */
35
- private withCellId;
36
- /**
37
- * As withCellId, but only does the response unwrapping
38
- */
39
- private withUnwrappedResponsesOnly;
40
- readonly system: WithUnwrappedAxiosResponse<SystemApi>;
41
- readonly cell: WithUnwrappedAxiosResponse<CellApi>;
42
- readonly deviceConfig: WithCellId<DeviceConfigurationApi>;
43
- readonly motionGroup: WithCellId<MotionGroupApi>;
44
- readonly motionGroupInfos: WithCellId<MotionGroupInfosApi>;
45
- readonly controller: WithCellId<ControllerApi>;
46
- readonly program: WithCellId<ProgramApi>;
47
- readonly programValues: WithCellId<ProgramValuesApi>;
48
- readonly controllerIOs: WithCellId<ControllerIOsApi>;
49
- readonly motionGroupKinematic: WithCellId<MotionGroupKinematicApi>;
50
- readonly motion: WithCellId<MotionApi>;
51
- readonly coordinateSystems: WithCellId<CoordinateSystemsApi>;
52
- readonly application: WithCellId<ApplicationApi>;
53
- readonly applicationGlobal: WithUnwrappedAxiosResponse<ApplicationApi>;
54
- readonly motionGroupJogging: WithCellId<MotionGroupJoggingApi>;
55
- readonly virtualRobot: WithCellId<VirtualRobotApi>;
56
- readonly virtualRobotSetup: WithCellId<VirtualRobotSetupApi>;
57
- readonly virtualRobotMode: WithCellId<VirtualRobotModeApi>;
58
- readonly virtualRobotBehavior: WithCellId<VirtualRobotBehaviorApi>;
59
- readonly libraryProgramMetadata: WithCellId<LibraryProgramMetadataApi>;
60
- readonly libraryProgram: WithCellId<LibraryProgramApi>;
61
- readonly libraryRecipeMetadata: WithCellId<LibraryRecipeMetadataApi>;
62
- readonly libraryRecipe: WithCellId<LibraryRecipeApi>;
63
- readonly storeObject: WithCellId<StoreObjectApi>;
64
- readonly storeCollisionComponents: WithCellId<StoreCollisionComponentsApi>;
65
- readonly storeCollisionScenes: WithCellId<StoreCollisionScenesApi>;
66
- }
67
- export {};
68
- //# sourceMappingURL=NovaCellAPIClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NovaCellAPIClient.d.ts","sourceRoot":"","sources":["../../../src/lib/v1/NovaCellAPIClient.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAClE,OAAO,KAAK,EAEV,aAAa,IAAI,iBAAiB,EACnC,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,cAAc,EACd,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,wBAAwB,EACxB,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACV,gBAAgB,EAChB,2BAA2B,EAC3B,uBAAuB,EACvB,cAAc,EACd,SAAS,EACT,eAAe,EACf,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,KAAK,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,GAClE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GACjB,KAAK,CAAA;AAET,KAAK,yBAAyB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,GAAG,GAC5D,CACE,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,KA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BAA6B;IAE5C,QAAQ,CAAC,iBAAiB,mCAAwC;IAElE,QAAQ,CAAC,WAAW,6BAAkC;IACtD,QAAQ,CAAC,iBAAiB,6CAAkD;IAE5E,QAAQ,CAAC,kBAAkB,oCAAyC;IAEpE,QAAQ,CAAC,YAAY,8BAAmC;IACxD,QAAQ,CAAC,iBAAiB,mCAAwC;IAClE,QAAQ,CAAC,gBAAgB,kCAAuC;IAChE,QAAQ,CAAC,oBAAoB,sCAA2C;IAExE,QAAQ,CAAC,sBAAsB,wCAA6C;IAC5E,QAAQ,CAAC,cAAc,gCAAqC;IAC5D,QAAQ,CAAC,qBAAqB,uCAA4C;IAC1E,QAAQ,CAAC,aAAa,+BAAoC;IAE1D,QAAQ,CAAC,WAAW,6BAAkC;IACtD,QAAQ,CAAC,wBAAwB,0CAEhC;IACD,QAAQ,CAAC,oBAAoB,sCAA2C;CACzE"}
@@ -1,67 +0,0 @@
1
- import type { Configuration as BaseConfiguration } from "@wandelbots/nova-api/v1";
2
- import { AutoReconnectingWebsocket } from "../AutoReconnectingWebsocket.js";
3
- import { ConnectedMotionGroup } from "./ConnectedMotionGroup.js";
4
- import { JoggerConnection } from "./JoggerConnection.js";
5
- import { MotionStreamConnection } from "./MotionStreamConnection.js";
6
- import { NovaCellAPIClient } from "./NovaCellAPIClient.js";
7
- import { MockNovaInstance } from "./mock/MockNovaInstance.js";
8
- export type NovaClientConfig = {
9
- /**
10
- * Url of the deployed Nova instance to connect to
11
- * e.g. https://saeattii.instance.wandelbots.io
12
- */
13
- instanceUrl: string | "https://mock.example.com";
14
- /**
15
- * Identifier of the cell on the Nova instance to connect this client to.
16
- * If omitted, the default identifier "cell" is used.
17
- **/
18
- cellId?: string;
19
- /**
20
- * Username for basic auth to the Nova instance.
21
- * @deprecated use accessToken instead
22
- */
23
- username?: string;
24
- /**
25
- * Password for basic auth to the Nova instance.
26
- * @deprecated use accessToken instead
27
- */
28
- password?: string;
29
- /**
30
- * Access token for Bearer authentication.
31
- */
32
- accessToken?: string;
33
- } & Omit<BaseConfiguration, "isJsonMime" | "basePath">;
34
- type NovaClientConfigWithDefaults = NovaClientConfig & {
35
- cellId: string;
36
- };
37
- /**
38
- * Client for connecting to a Nova instance and controlling robots.
39
- */
40
- export declare class NovaClient {
41
- readonly api: NovaCellAPIClient;
42
- readonly config: NovaClientConfigWithDefaults;
43
- readonly mock?: MockNovaInstance;
44
- authPromise: Promise<string | null> | null;
45
- accessToken: string | null;
46
- constructor(config: NovaClientConfig);
47
- renewAuthentication(): Promise<void>;
48
- makeWebsocketURL(path: string): string;
49
- /**
50
- * Retrieve an AutoReconnectingWebsocket to the given path on the Nova instance.
51
- * If you explicitly want to reconnect an existing websocket, call `reconnect`
52
- * on the returned object.
53
- */
54
- openReconnectingWebsocket(path: string): AutoReconnectingWebsocket;
55
- /**
56
- * Connect to the motion state websocket(s) for a given motion group
57
- */
58
- connectMotionStream(motionGroupId: string): Promise<MotionStreamConnection>;
59
- /**
60
- * Connect to the jogging websocket(s) for a given motion group
61
- */
62
- connectJogger(motionGroupId: string): Promise<JoggerConnection>;
63
- connectMotionGroups(motionGroupIds: string[]): Promise<ConnectedMotionGroup[]>;
64
- connectMotionGroup(motionGroupId: string): Promise<ConnectedMotionGroup>;
65
- }
66
- export {};
67
- //# sourceMappingURL=NovaClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NovaClient.d.ts","sourceRoot":"","sources":["../../../src/lib/v1/NovaClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAKjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAE3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,iBAAiB,EAA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AAO,CAAC,oBAAoB,CAAC;CAKjC"}
@@ -1,57 +0,0 @@
1
- /** biome-ignore-all lint/style/noNonNullAssertion: legacy code */
2
- import type { CollectionValue } from "@wandelbots/nova-api/v1";
3
- import type { AutoReconnectingWebsocket } from "../AutoReconnectingWebsocket";
4
- import type { MotionStreamConnection } from "./MotionStreamConnection";
5
- import type { NovaClient } from "./NovaClient";
6
- export type ProgramRunnerLogEntry = {
7
- timestamp: number;
8
- message: string;
9
- level?: "warn" | "error";
10
- };
11
- export declare enum ProgramState {
12
- NotStarted = "not started",
13
- Running = "running",
14
- Stopped = "stopped",
15
- Failed = "failed",
16
- Completed = "completed"
17
- }
18
- export type CurrentProgram = {
19
- id?: string;
20
- wandelscript?: string;
21
- state?: ProgramState;
22
- };
23
- type ProgramStateMessage = {
24
- type: string;
25
- runner: {
26
- id: string;
27
- state: ProgramState;
28
- start_time?: number | null;
29
- execution_time?: number | null;
30
- };
31
- };
32
- /**
33
- * Interface for running Wandelscript programs on the Nova instance and
34
- * tracking their progress and output
35
- */
36
- export declare class ProgramStateConnection {
37
- readonly nova: NovaClient;
38
- currentProgram: CurrentProgram;
39
- logs: ProgramRunnerLogEntry[];
40
- executionState: "idle" | "starting" | "executing" | "stopping";
41
- currentlyExecutingProgramRunnerId: string | null;
42
- programStateSocket: AutoReconnectingWebsocket;
43
- constructor(nova: NovaClient);
44
- /** Handle a program state update from the backend */
45
- handleProgramStateMessage(msg: ProgramStateMessage): Promise<void>;
46
- /** Call when a program is no longer executing */
47
- gotoIdleState(): void;
48
- executeProgram(wandelscript: string, initial_state?: {
49
- [key: string]: CollectionValue;
50
- }, activeRobot?: MotionStreamConnection): Promise<void>;
51
- stopProgram(): Promise<void>;
52
- reset(): void;
53
- log(message: string): void;
54
- logError(message: string): void;
55
- }
56
- export {};
57
- //# sourceMappingURL=ProgramStateConnection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProgramStateConnection.d.ts","sourceRoot":"","sources":["../../../src/lib/v1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AA;gBAExB,IAAI,EAAE,UAAU;IAkBrC,qDAAqD;IAC/C,yBAAyB,CAAC,GAAG,EAAE,mBAAmB;IAsFxD,iDAAiD;IACjD,aAAa;IAOP,cAAc,CAClB,YAAY,EAAE,MAAM,EACpB,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAA;KAAE,EAClD,WAAW,CAAC,EAAE,sBAAsB;IA8DhC,WAAW;IAmBjB,KAAK;IAIL,GAAG,CAAC,OAAO,EAAE,MAAM;IAQnB,QAAQ,CAAC,OAAO,EAAE,MAAM;CAQzB"}
@@ -1,4 +0,0 @@
1
- import type { GetTrajectoryResponse } from "@wandelbots/nova-api/v1";
2
- import type { NovaCellAPIClient } from "./NovaCellAPIClient";
3
- export declare function getLatestTrajectories(apiClient: NovaCellAPIClient, sampleTime?: number, responsesCoordinateSystem?: string): Promise<GetTrajectoryResponse[]>;
4
- //# sourceMappingURL=getLatestTrajectories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getLatestTrajectories.d.ts","sourceRoot":"","sources":["../../../src/lib/v1/getLatestTrajectories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAI5D,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,iBAAiB,EAC5B,UAAU,GAAE,MAAW,EACvB,yBAAyB,CAAC,EAAE,MAAM,GACjC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CA0BlC"}
@@ -1,9 +0,0 @@
1
- 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";
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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"}