@wandelbots/nova-js 3.3.0 → 3.3.1-pr.feature-add-program-client.114.5cf553e
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/dist/AutoReconnectingWebsocket-Qcrbm3Kb.d.cts.map +1 -1
- package/dist/AutoReconnectingWebsocket-dHe-kceU.d.mts.map +1 -1
- package/dist/lib/v2/index.cjs +172 -1147
- package/dist/lib/v2/index.cjs.map +1 -1
- package/dist/lib/v2/index.d.cts +82 -2
- package/dist/lib/v2/index.d.cts.map +1 -1
- package/dist/lib/v2/index.d.mts +82 -2
- package/dist/lib/v2/index.d.mts.map +1 -1
- package/dist/lib/v2/index.mjs +172 -1149
- package/dist/lib/v2/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/v2/NovaCellAPIClient.ts +13 -0
- package/src/lib/v2/ProgramsClient.ts +150 -0
- package/src/lib/v2/index.ts +1 -0
- package/src/lib/v2/mock/MockNovaInstance.ts +45 -858
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["cellId: string","opts: BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n }","SystemApi","CellApi","MotionGroupApi","MotionGroupModelsApi","ControllerApi","ControllerInputsOutputsApi","TrajectoryPlanningApi","TrajectoryExecutionApi","TrajectoryCachingApi","ApplicationApi","JoggingApi","KinematicsApi","BUSInputsOutputsApi","VirtualControllerApi","VirtualControllerBehaviorApi","VirtualControllerInputsOutputsApi","StoreObjectApi","StoreCollisionComponentsApi","StoreCollisionSetupsApi","pathToRegexp","AxiosError","availableStorage","config","loginWithAuth0","AutoReconnectingWebsocket"],"sources":["../../../src/lib/v2/NovaCellAPIClient.ts","../../../src/lib/v2/mock/MockNovaInstance.ts","../../../src/lib/v2/NovaClient.ts","../../../src/lib/v2/wandelscriptUtils.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: legacy code */\n/** biome-ignore-all lint/style/noNonNullAssertion: legacy code */\nimport type {\n BaseAPI,\n Configuration as BaseConfiguration,\n} from \"@wandelbots/nova-api/v2\"\nimport {\n ApplicationApi,\n BUSInputsOutputsApi,\n CellApi,\n ControllerApi,\n ControllerInputsOutputsApi,\n JoggingApi,\n KinematicsApi,\n MotionGroupApi,\n MotionGroupModelsApi,\n StoreCollisionComponentsApi,\n StoreCollisionSetupsApi,\n StoreObjectApi,\n SystemApi,\n TrajectoryCachingApi,\n TrajectoryExecutionApi,\n TrajectoryPlanningApi,\n VirtualControllerApi,\n VirtualControllerBehaviorApi,\n VirtualControllerInputsOutputsApi,\n} from \"@wandelbots/nova-api/v2\"\nimport type { AxiosInstance } from \"axios\"\nimport axios from \"axios\"\n\ntype OmitFirstArg<F> = F extends (x: any, ...args: infer P) => infer R\n ? (...args: P) => R\n : never\n\ntype UnwrapAxiosResponseReturn<T> = T extends (...a: any) => any\n ? (\n ...a: Parameters<T>\n ) => Promise<Awaited<ReturnType<T>> extends { data: infer D } ? D : never>\n : never\n\nexport type WithCellId<T> = {\n [P in keyof T]: UnwrapAxiosResponseReturn<OmitFirstArg<T[P]>>\n}\n\nexport type WithUnwrappedAxiosResponse<T> = {\n [P in keyof T]: UnwrapAxiosResponseReturn<T[P]>\n}\n\n/**\n * API client providing type-safe access to all the Nova API REST endpoints\n * associated with a specific cell id.\n */\nexport class NovaCellAPIClient {\n constructor(\n readonly cellId: string,\n readonly opts: BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n },\n ) {}\n\n /**\n * Some TypeScript sorcery which alters the API class methods so you don't\n * have to pass the cell id to every single one, and de-encapsulates the\n * response data\n */\n private withCellId<T extends BaseAPI>(\n ApiConstructor: new (\n config: BaseConfiguration,\n basePath: string,\n axios: AxiosInstance,\n ) => T,\n ) {\n const apiClient = new ApiConstructor(\n {\n ...this.opts,\n isJsonMime: (mime: string) => {\n return mime === \"application/json\"\n },\n },\n this.opts.basePath ?? \"\",\n this.opts.axiosInstance ?? axios.create(),\n ) as {\n [key: string | symbol]: any\n }\n\n for (const key of Reflect.ownKeys(Reflect.getPrototypeOf(apiClient)!)) {\n if (key !== \"constructor\" && typeof apiClient[key] === \"function\") {\n const originalFunction = apiClient[key]\n apiClient[key] = (...args: any[]) => {\n return originalFunction\n .apply(apiClient, [this.cellId, ...args])\n .then((res: any) => res.data)\n }\n }\n }\n\n return apiClient as WithCellId<T>\n }\n\n /**\n * As withCellId, but only does the response unwrapping\n */\n private withUnwrappedResponsesOnly<T extends BaseAPI>(\n ApiConstructor: new (\n config: BaseConfiguration,\n basePath: string,\n axios: AxiosInstance,\n ) => T,\n ) {\n const apiClient = new ApiConstructor(\n {\n ...this.opts,\n isJsonMime: (mime: string) => {\n return mime === \"application/json\"\n },\n },\n this.opts.basePath ?? \"\",\n this.opts.axiosInstance ?? axios.create(),\n ) as {\n [key: string | symbol]: any\n }\n\n for (const key of Reflect.ownKeys(Reflect.getPrototypeOf(apiClient)!)) {\n if (key !== \"constructor\" && typeof apiClient[key] === \"function\") {\n const originalFunction = apiClient[key]\n apiClient[key] = (...args: any[]) => {\n return originalFunction\n .apply(apiClient, args)\n .then((res: any) => res.data)\n }\n }\n }\n\n return apiClient as WithUnwrappedAxiosResponse<T>\n }\n\n readonly system = this.withUnwrappedResponsesOnly(SystemApi)\n readonly cell = this.withUnwrappedResponsesOnly(CellApi)\n\n readonly motionGroup = this.withCellId(MotionGroupApi)\n readonly motionGroupModels = this.withCellId(MotionGroupModelsApi)\n\n readonly controller = this.withCellId(ControllerApi)\n\n readonly controllerIOs = this.withCellId(ControllerInputsOutputsApi)\n\n readonly trajectoryPlanning = this.withCellId(TrajectoryPlanningApi)\n readonly trajectoryExecution = this.withCellId(TrajectoryExecutionApi)\n readonly trajectoryCaching = this.withCellId(TrajectoryCachingApi)\n\n readonly application = this.withCellId(ApplicationApi)\n readonly applicationGlobal = this.withUnwrappedResponsesOnly(ApplicationApi)\n\n readonly jogging = this.withCellId(JoggingApi)\n\n readonly kinematics = this.withCellId(KinematicsApi)\n\n readonly busInputsOutputs = this.withCellId(BUSInputsOutputsApi)\n\n readonly virtualController = this.withCellId(VirtualControllerApi)\n readonly virtualControllerBehavior = this.withCellId(\n VirtualControllerBehaviorApi,\n )\n readonly virtualControllerIOs = this.withCellId(\n VirtualControllerInputsOutputsApi,\n )\n\n readonly storeObject = this.withCellId(StoreObjectApi)\n readonly storeCollisionComponents = this.withCellId(\n StoreCollisionComponentsApi,\n )\n readonly storeCollisionSetups = this.withCellId(StoreCollisionSetupsApi)\n}\n","import type { MotionGroupState, RobotController } from \"@wandelbots/nova-api/v2\"\nimport type { AxiosResponse, InternalAxiosRequestConfig } from \"axios\"\nimport { AxiosError } from \"axios\"\nimport * as pathToRegexp from \"path-to-regexp\"\nimport type { AutoReconnectingWebsocket } from \"../../AutoReconnectingWebsocket\"\n\n/**\n * Ultra-simplified mock Nova server for testing stuff\n */\nexport class MockNovaInstance {\n readonly connections: AutoReconnectingWebsocket[] = []\n\n async handleAPIRequest(\n config: InternalAxiosRequestConfig,\n ): Promise<AxiosResponse> {\n const apiHandlers = [\n {\n method: \"GET\",\n path: \"/cells/:cellId/controllers/:controllerId/state\",\n handle() {\n return {\n mode: \"MODE_CONTROL\",\n last_error: [],\n timestamp: \"2025-10-16T09:19:26.634534092Z\",\n sequence_number: 1054764,\n controller: \"mock-ur5e\",\n operation_mode: \"OPERATION_MODE_AUTO\",\n safety_state: \"SAFETY_STATE_NORMAL\",\n velocity_override: 100,\n motion_groups: [\n {\n timestamp: \"2025-10-16T09:19:26.634534092Z\",\n sequence_number: 1054764,\n motion_group: \"0@mock-ur5e\",\n controller: \"mock-ur5e\",\n joint_position: [\n 1.487959623336792, -1.8501918315887451, 1.8003005981445312,\n 6.034560203552246, 1.4921919107437134, 1.593459963798523,\n ],\n joint_limit_reached: {\n limit_reached: [false, false, false, false, false, false],\n },\n joint_torque: [],\n joint_current: [0, 0, 0, 0, 0, 0],\n flange_pose: {\n position: [\n 107.6452433732927, -409.0402987746852, 524.2402132330305,\n ],\n orientation: [\n 0.9874434028353319, -0.986571714997442, 1.3336589451098142,\n ],\n },\n tcp: \"Flange\",\n tcp_pose: {\n position: [\n 107.6452433732927, -409.0402987746852, 524.2402132330305,\n ],\n orientation: [\n 0.9874434028353319, -0.986571714997442, 1.3336589451098142,\n ],\n },\n payload: \"\",\n coordinate_system: \"\",\n standstill: true,\n },\n ],\n }\n },\n },\n {\n method: \"GET\",\n path: \"/cells/:cellId/controllers/:controllerId/coordinate-systems\",\n handle() {\n return [\n {\n coordinate_system: \"\",\n name: \"world\",\n reference_coordinate_system: \"\",\n position: [0, 0, 0],\n orientation: [0, 0, 0],\n orientation_type: \"ROTATION_VECTOR\",\n },\n {\n coordinate_system: \"CS-0\",\n name: \"Default-CS\",\n reference_coordinate_system: \"\",\n position: [0, 0, 0],\n orientation: [0, 0, 0],\n orientation_type: \"ROTATION_VECTOR\",\n },\n ] //satisfies CoordinateSystems\n },\n },\n\n // As you need, add more mock requests here...\n // Below is mostly V1:\n {\n method: \"GET\",\n path: \"/cells/:cellId/controllers/:controllerId/motion-groups/:motionGroupId/description\",\n handle() {\n return {\n motion_group_model: \"UniversalRobots_UR5e\",\n mounting: {\n position: [0, 0, 0],\n orientation: [0, 0, 0],\n },\n tcps: {\n Flange: {\n name: \"Default-Flange\",\n pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0],\n },\n },\n \"complex-tcp-position\": {\n name: \"Complex TCP Position\",\n pose: {\n position: [-200, 300, 150],\n orientation: [\n -0.12139440409113832, -0.06356210998212003,\n -0.2023240068185639,\n ],\n },\n },\n \"offset-150mm-xy\": {\n name: \"-150mm XY Offset\",\n pose: {\n position: [-150, -150, 0],\n orientation: [0, 0, 0],\n },\n },\n \"rotated-90deg-z\": {\n name: \"90° Z Axis Rotation\",\n pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 1.5708],\n },\n },\n },\n payloads: {\n \"FPay-0\": {\n name: \"FPay-0\",\n payload: 0,\n center_of_mass: [0, 0, 0],\n moment_of_inertia: [0, 0, 0],\n },\n },\n cycle_time: 8,\n dh_parameters: [\n {\n alpha: 1.5707963267948966,\n d: 162.25,\n },\n {\n a: -425,\n },\n {\n a: -392.2,\n },\n {\n alpha: 1.5707963267948966,\n d: 133.3,\n },\n {\n alpha: -1.5707963267948966,\n d: 99.7,\n },\n {\n d: 99.6,\n },\n ],\n operation_limits: {\n auto_limits: {\n joints: [\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n ],\n tcp: {\n velocity: 5000,\n },\n elbow: {\n velocity: 5000,\n },\n flange: {\n velocity: 5000,\n },\n },\n manual_limits: {\n joints: [\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n ],\n tcp: {\n velocity: 5000,\n },\n },\n manual_t1_limits: {\n joints: [\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n ],\n tcp: {\n velocity: 5000,\n },\n },\n manual_t2_limits: {\n joints: [\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n ],\n tcp: {\n velocity: 5000,\n },\n },\n },\n serial_number: \"WBVirtualRobot\",\n }\n },\n },\n {\n method: \"GET\",\n path: \"/cells/:cellId/controllers\",\n handle() {\n return {\n controllers: [\n {\n controller: \"mock-ur5e\",\n model_name: \"UniversalRobots::Controller\",\n host: \"mock-ur5e\",\n allow_software_install_on_controller: true,\n motion_groups: [\n {\n motion_group: \"0@mock-ur5e\",\n name_from_controller: \"UR5e\",\n active: false,\n model_from_controller: \"UniversalRobots_UR5e\",\n },\n ],\n has_error: false,\n error_details: \"\",\n },\n ],\n }\n },\n },\n {\n method: \"GET\",\n path: \"/cells/:cellId/controllers/:controllerId\",\n handle() {\n return {\n configuration: {\n kind: \"VirtualController\",\n manufacturer: \"universalrobots\",\n type: \"universalrobots-ur5e\",\n },\n name: \"mock-ur5\",\n } satisfies RobotController\n },\n },\n {\n method: \"GET\",\n path: \"/cells/:cellId/motion-groups/:motionGroupId/specification\",\n handle() {\n return {\n dh_parameters: [\n {\n alpha: 1.5707963267948966,\n theta: 0,\n a: 0,\n d: 162.25,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0,\n theta: 0,\n a: -425,\n d: 0,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0,\n theta: 0,\n a: -392.2,\n d: 0,\n reverse_rotation_direction: false,\n },\n {\n alpha: 1.5707963267948966,\n theta: 0,\n a: 0,\n d: 133.3,\n reverse_rotation_direction: false,\n },\n {\n alpha: -1.5707963267948966,\n theta: 0,\n a: 0,\n d: 99.7,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0,\n theta: 0,\n a: 0,\n d: 99.6,\n reverse_rotation_direction: false,\n },\n ],\n mechanical_joint_limits: [\n {\n joint: \"JOINTNAME_AXIS_1\",\n lower_limit: -6.335545063018799,\n upper_limit: 6.335545063018799,\n unlimited: false,\n },\n {\n joint: \"JOINTNAME_AXIS_2\",\n lower_limit: -6.335545063018799,\n upper_limit: 6.335545063018799,\n unlimited: false,\n },\n {\n joint: \"JOINTNAME_AXIS_3\",\n lower_limit: -6.335545063018799,\n upper_limit: 6.335545063018799,\n unlimited: false,\n },\n {\n joint: \"JOINTNAME_AXIS_4\",\n lower_limit: -6.335545063018799,\n upper_limit: 6.335545063018799,\n unlimited: false,\n },\n {\n joint: \"JOINTNAME_AXIS_5\",\n lower_limit: -6.335545063018799,\n upper_limit: 6.335545063018799,\n unlimited: false,\n },\n {\n joint: \"JOINTNAME_AXIS_6\",\n lower_limit: -6.335545063018799,\n upper_limit: 6.335545063018799,\n unlimited: false,\n },\n ],\n } // Mock motion group specification\n },\n },\n {\n method: \"GET\",\n path: \"/cells/:cellId/motion-groups/:motionGroupId/safety-setup\",\n handle() {\n return {\n safety_settings: [\n {\n safety_state: \"SAFETY_NORMAL\",\n settings: {\n joint_position_limits: [\n {\n joint: \"JOINTNAME_AXIS_1\",\n lower_limit: -2.96705961227417,\n upper_limit: 2.96705961227417,\n unlimited: false,\n },\n {\n joint: \"JOINTNAME_AXIS_2\",\n lower_limit: -1.7453292608261108,\n upper_limit: 2.7925267219543457,\n unlimited: false,\n },\n {\n joint: \"JOINTNAME_AXIS_3\",\n lower_limit: -3.3161256313323975,\n upper_limit: 0.40142571926116943,\n unlimited: false,\n },\n {\n joint: \"JOINTNAME_AXIS_4\",\n lower_limit: -3.4906585216522217,\n upper_limit: 3.4906585216522217,\n unlimited: false,\n },\n {\n joint: \"JOINTNAME_AXIS_5\",\n lower_limit: -2.4434609413146973,\n upper_limit: 2.4434609413146973,\n unlimited: false,\n },\n {\n joint: \"JOINTNAME_AXIS_6\",\n lower_limit: -4.71238899230957,\n upper_limit: 4.71238899230957,\n unlimited: false,\n },\n ],\n joint_velocity_limits: [\n {\n joint: \"JOINTNAME_AXIS_1\",\n limit: 3.1415927410125732,\n },\n {\n joint: \"JOINTNAME_AXIS_2\",\n limit: 3.1415927410125732,\n },\n {\n joint: \"JOINTNAME_AXIS_3\",\n limit: 3.4906585216522217,\n },\n {\n joint: \"JOINTNAME_AXIS_4\",\n limit: 6.108652591705322,\n },\n {\n joint: \"JOINTNAME_AXIS_5\",\n limit: 6.108652591705322,\n },\n {\n joint: \"JOINTNAME_AXIS_6\",\n limit: 6.981317043304443,\n },\n ],\n joint_acceleration_limits: [],\n joint_torque_limits: [],\n tcp_velocity_limit: 1800,\n },\n },\n ],\n safety_zones: [\n {\n id: 1,\n priority: 0,\n geometry: {\n compound: {\n child_geometries: [\n {\n convex_hull: {\n vertices: [\n { vertex: [-800, -1330, -1820] },\n { vertex: [1650, -1330, -1820] },\n { vertex: [1650, 1330, -1820] },\n { vertex: [-800, 1330, -1820] },\n ],\n },\n init_pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0, 1],\n },\n id: \"box\",\n },\n {\n convex_hull: {\n vertices: [\n {\n vertex: [-800, -1330, -1820],\n },\n {\n vertex: [1650, -1330, -1820],\n },\n {\n vertex: [1650, -1330, 1500],\n },\n {\n vertex: [-800, -1330, 1500],\n },\n ],\n },\n init_pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0, 1],\n },\n id: \"box\",\n },\n {\n convex_hull: {\n vertices: [\n {\n vertex: [-800, -1330, -1820],\n },\n {\n vertex: [-800, 1330, -1820],\n },\n {\n vertex: [-800, 1330, 1500],\n },\n {\n vertex: [-800, -1330, 1500],\n },\n ],\n },\n init_pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0, 1],\n },\n id: \"box\",\n },\n {\n convex_hull: {\n vertices: [\n {\n vertex: [1650, 1330, 1500],\n },\n {\n vertex: [-800, 1330, 1500],\n },\n {\n vertex: [-800, -1330, 1500],\n },\n {\n vertex: [1650, -1330, 1500],\n },\n ],\n },\n init_pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0, 1],\n },\n id: \"box\",\n },\n {\n convex_hull: {\n vertices: [\n {\n vertex: [1650, 1330, 1500],\n },\n {\n vertex: [-800, 1330, 1500],\n },\n {\n vertex: [-800, 1330, -1820],\n },\n {\n vertex: [1650, 1330, -1820],\n },\n ],\n },\n init_pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0, 1],\n },\n id: \"box\",\n },\n {\n convex_hull: {\n vertices: [\n {\n vertex: [1650, 1330, 1500],\n },\n {\n vertex: [1650, -1330, 1500],\n },\n {\n vertex: [1650, -1330, -1820],\n },\n {\n vertex: [1650, 1330, -1820],\n },\n ],\n },\n init_pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0, 1],\n },\n id: \"box\",\n },\n ],\n },\n init_pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0, 1],\n },\n id: \"Cell workzone\",\n },\n motion_group_uid: 1,\n },\n {\n id: 2,\n priority: 0,\n geometry: {\n convex_hull: {\n vertices: [\n {\n vertex: [1650, 1330, -1850],\n },\n {\n vertex: [865, 1330, -1850],\n },\n {\n vertex: [865, -720, -1850],\n },\n {\n vertex: [1650, -720, -1850],\n },\n {\n vertex: [1650, 1330, -920],\n },\n {\n vertex: [865, 1330, -920],\n },\n {\n vertex: [865, -720, -920],\n },\n {\n vertex: [1650, -720, -920],\n },\n ],\n },\n init_pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0, 1],\n },\n id: \"Transport\",\n },\n motion_group_uid: 1,\n },\n {\n id: 3,\n priority: 0,\n geometry: {\n convex_hull: {\n vertices: [\n {\n vertex: [1650, 1330, -600],\n },\n {\n vertex: [865, 1330, -600],\n },\n {\n vertex: [865, 430, -600],\n },\n {\n vertex: [1650, 430, -600],\n },\n {\n vertex: [1650, 1330, -1250],\n },\n {\n vertex: [865, 1330, -1250],\n },\n {\n vertex: [865, 430, -1250],\n },\n {\n vertex: [1650, 430, -1250],\n },\n ],\n },\n init_pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0, 1],\n },\n id: \"Tunel\",\n },\n motion_group_uid: 1,\n },\n {\n id: 4,\n priority: 0,\n geometry: {\n convex_hull: {\n vertices: [\n {\n vertex: [1650, -760, -440],\n },\n {\n vertex: [900, -760, -440],\n },\n {\n vertex: [900, -1330, -440],\n },\n {\n vertex: [1650, -1330, -440],\n },\n {\n vertex: [1650, -760, -1800],\n },\n {\n vertex: [900, -760, -1800],\n },\n {\n vertex: [900, -1330, -1800],\n },\n {\n vertex: [1650, -1330, -1800],\n },\n ],\n },\n init_pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0, 1],\n },\n id: \"Fanuc controller\",\n },\n motion_group_uid: 1,\n },\n {\n id: 6,\n priority: 0,\n geometry: {\n convex_hull: {\n vertices: [\n {\n vertex: [-200, -200, -1900],\n },\n {\n vertex: [200, -200, -1900],\n },\n {\n vertex: [200, 200, -1900],\n },\n {\n vertex: [-200, 200, -1900],\n },\n {\n vertex: [-200, -200, -350],\n },\n {\n vertex: [200, -200, -350],\n },\n {\n vertex: [200, 200, -350],\n },\n {\n vertex: [-200, 200, -350],\n },\n ],\n },\n init_pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0, 1],\n },\n id: \"Robot base\",\n },\n motion_group_uid: 1,\n },\n ],\n robot_model_geometries: [\n {\n link_index: 1,\n geometry: {\n sphere: {\n radius: 270,\n },\n init_pose: {\n position: [-70, -70, -50],\n orientation: [0, 0, 0, 1],\n },\n id: \"link1_sphere\",\n },\n },\n {\n link_index: 2,\n geometry: {\n capsule: {\n radius: 160,\n cylinder_height: 800,\n },\n init_pose: {\n position: [-450, 40, 170],\n orientation: [0, -Math.SQRT1_2, 0, Math.SQRT1_2],\n },\n id: \"link2_capsule\",\n },\n },\n {\n link_index: 3,\n geometry: {\n sphere: {\n radius: 270,\n },\n init_pose: {\n position: [-110, 10, -100],\n orientation: [0, 0, 0, 1],\n },\n id: \"link3_sphere\",\n },\n },\n {\n link_index: 4,\n geometry: {\n capsule: {\n radius: 110,\n cylinder_height: 600,\n },\n init_pose: {\n position: [0, 300, 40],\n orientation: [-Math.SQRT1_2, 0, 0, Math.SQRT1_2],\n },\n id: \"link4_capsule\",\n },\n },\n {\n link_index: 5,\n geometry: {\n sphere: {\n radius: 75,\n },\n init_pose: {\n position: [0, 0, -50],\n orientation: [0, 0, 0, 1],\n },\n id: \"link5_sphere\",\n },\n },\n ],\n tool_geometries: [],\n } // Mock safety setup\n },\n },\n {\n method: \"GET\",\n path: \"/cells/:cellId/motion-groups/:motionGroupId/tcps\",\n handle() {\n return {\n tcps: [\n {\n id: \"Flange\",\n readable_name: \"Default-Flange\",\n position: [0, 0, 0],\n rotation: {\n angles: [0, 0, 0, 0],\n type: \"ROTATION_VECTOR\",\n },\n },\n {\n id: \"complex-tcp-position\",\n readable_name: \"Complex TCP Position\",\n position: [-200, 300, 150],\n rotation: {\n angles: [\n -0.12139440409113832, -0.06356210998212003,\n -0.2023240068185639, 0,\n ],\n type: \"ROTATION_VECTOR\",\n },\n },\n ],\n }\n },\n },\n ]\n\n const method = config.method?.toUpperCase() || \"GET\"\n const path = `/cells${config.url?.split(\"/cells\")[1]?.split(\"?\")[0]}`\n\n for (const handler of apiHandlers) {\n const match = pathToRegexp.match(handler.path)(path || \"\")\n if (method === handler.method && match) {\n const json = handler.handle()\n return {\n status: 200,\n statusText: \"Success\",\n data: JSON.stringify(json),\n headers: {},\n config,\n request: {\n responseURL: config.url,\n },\n }\n }\n }\n\n throw new AxiosError(\n `No mock handler matched this request: ${method} ${path}`,\n \"404\",\n config,\n )\n\n // return {\n // status: 404,\n // statusText: \"Not Found\",\n // data: \"\",\n // headers: {},\n // config,\n // request: {\n // responseURL: config.url,\n // },\n // }\n }\n\n handleWebsocketConnection(socket: AutoReconnectingWebsocket) {\n this.connections.push(socket)\n\n setTimeout(() => {\n socket.dispatchEvent(new Event(\"open\"))\n\n console.log(\"Websocket connection opened from\", socket.url)\n\n if (socket.url.includes(\"/state-stream\")) {\n socket.dispatchEvent(\n new MessageEvent(\"message\", {\n data: JSON.stringify(defaultMotionState),\n }),\n )\n }\n\n if (socket.url.includes(\"/move-joint\")) {\n socket.dispatchEvent(\n new MessageEvent(\"message\", {\n data: JSON.stringify({\n result: {\n motion_group: \"0@ur\",\n state: {\n controller: \"ur\",\n operation_mode: \"OPERATION_MODE_AUTO\",\n safety_state: \"SAFETY_STATE_NORMAL\",\n timestamp: \"2024-09-18T12:48:26.096266444Z\",\n velocity_override: 100,\n motion_groups: [\n {\n motion_group: \"0@ur\",\n controller: \"ur\",\n joint_position: [\n 1.3492152690887451, -1.5659207105636597,\n 1.6653711795806885, -1.0991662740707397,\n -1.829018235206604, 1.264623761177063,\n ],\n joint_velocity: {\n joints: [0, 0, 0, 0, 0, 0],\n },\n flange_pose: {\n position: [\n 6.437331889439328, -628.4123774830913,\n 577.0569957147832,\n ],\n orientation: {\n x: -1.683333649797158,\n y: -1.9783363827298732,\n z: -0.4928031860165713,\n },\n coordinate_system: \"\",\n },\n tcp_pose: {\n position: [\n 6.437331889439328, -628.4123774830913,\n 577.0569957147832,\n ],\n orientation: {\n x: -1.683333649797158,\n y: -1.9783363827298732,\n z: -0.4928031860165713,\n },\n coordinate_system: \"\",\n tcp: \"Flange\",\n },\n velocity: {\n linear: {\n x: 0,\n y: 0,\n z: 0,\n },\n angular: {\n x: -0,\n y: 0,\n z: 0,\n },\n coordinate_system: \"\",\n },\n force: {\n force: {\n x: 0,\n y: 0,\n z: 0,\n },\n moment: {\n x: 0,\n y: 0,\n z: 0,\n },\n coordinate_system: \"\",\n },\n joint_limit_reached: {\n limit_reached: [\n false,\n false,\n false,\n false,\n false,\n false,\n ],\n },\n joint_current: {\n joints: [0, 0, 0, 0, 0, 0],\n },\n sequence_number: \"671259\",\n },\n ],\n sequence_number: \"671259\",\n },\n movement_state: \"MOVEMENT_STATE_MOVING\",\n },\n }),\n }),\n )\n }\n\n if (socket.url.includes(\"/move-tcp\")) {\n socket.dispatchEvent(\n new MessageEvent(\"message\", {\n data: JSON.stringify({\n result: {\n motion_group: \"0@ur\",\n state: {\n controller: \"ur\",\n operation_mode: \"OPERATION_MODE_AUTO\",\n safety_state: \"SAFETY_STATE_NORMAL\",\n timestamp: \"2024-09-18T12:43:12.188335774Z\",\n velocity_override: 100,\n motion_groups: [\n {\n motion_group: \"0@ur\",\n controller: \"ur\",\n joint_position: {\n joints: [\n 1.3352527618408203, -1.5659207105636597,\n 1.6653711795806885, -1.110615611076355,\n -1.829018235206604, 1.264623761177063,\n ],\n },\n joint_velocity: {\n joints: [0, 0, 0, 0, 0, 0],\n },\n flange_pose: {\n position: [\n -2.763015284002938, -630.2151479701106,\n 577.524509114342,\n ],\n orientation: {\n x: -1.704794877102097,\n y: -1.9722372952861567,\n z: -0.4852079204210754,\n },\n coordinate_system: \"\",\n },\n tcp_pose: {\n position: [\n -2.763015284002938, -630.2151479701106,\n 577.524509114342,\n ],\n orientation: {\n x: -1.704794877102097,\n y: -1.9722372952861567,\n z: -0.4852079204210754,\n },\n coordinate_system: \"\",\n tcp: \"Flange\",\n },\n velocity: {\n linear: {\n x: 0,\n y: 0,\n z: 0,\n },\n angular: {\n x: -0,\n y: 0,\n z: 0,\n },\n coordinate_system: \"\",\n },\n force: {\n force: {\n x: 0,\n y: 0,\n z: 0,\n },\n moment: {\n x: 0,\n y: 0,\n z: 0,\n },\n coordinate_system: \"\",\n },\n joint_limit_reached: {\n limit_reached: [\n false,\n false,\n false,\n false,\n false,\n false,\n ],\n },\n joint_current: {\n joints: [0, 0, 0, 0, 0, 0],\n },\n sequence_number: \"627897\",\n },\n ],\n sequence_number: \"627897\",\n },\n movement_state: \"MOVEMENT_STATE_MOVING\",\n },\n }),\n }),\n )\n }\n }, 10)\n }\n\n handleWebsocketMessage(socket: AutoReconnectingWebsocket, message: string) {\n console.log(`Received message on ${socket.url}`, message)\n }\n}\n\nconst defaultMotionState = {\n result: {\n motion_group: \"0@universalrobots-ur5e\",\n controller: \"universalrobots-ur5e\",\n timestamp: new Date().toISOString(),\n sequence_number: 1,\n joint_position: [\n 1.1699999570846558, -1.5700000524520874, 1.3600000143051147,\n 1.0299999713897705, 1.2899999618530273, 1.2799999713897705,\n ],\n joint_limit_reached: {\n limit_reached: [false, false, false, false, false, false],\n },\n standstill: false,\n flange_pose: {\n position: [1.3300010259703043, -409.2680714682808, 531.0203477065281],\n orientation: [\n 1.7564919306270736, -1.7542521568325058, 0.7326972590614671,\n ],\n },\n tcp_pose: {\n position: [1.3300010259703043, -409.2680714682808, 531.0203477065281],\n orientation: [\n 1.7564919306270736, -1.7542521568325058, 0.7326972590614671,\n ],\n },\n } satisfies MotionGroupState,\n}\n","/** biome-ignore-all lint/style/noNonNullAssertion: legacy code */\nimport type { Configuration as BaseConfiguration } from \"@wandelbots/nova-api/v2\"\nimport type { AxiosRequestConfig } from \"axios\"\nimport axios, { isAxiosError } from \"axios\"\nimport urlJoin from \"url-join\"\nimport { loginWithAuth0 } from \"../../LoginWithAuth0\"\nimport { AutoReconnectingWebsocket } from \"../AutoReconnectingWebsocket\"\nimport { availableStorage } from \"../availableStorage\"\nimport { MockNovaInstance } from \"./mock/MockNovaInstance\"\nimport { NovaCellAPIClient } from \"./NovaCellAPIClient\"\n\nexport type NovaClientConfig = {\n /**\n * Url of the deployed Nova instance to connect to\n * e.g. https://saeattii.instance.wandelbots.io\n */\n instanceUrl: string | \"https://mock.example.com\"\n\n /**\n * Identifier of the cell on the Nova instance to connect this client to.\n * If omitted, the default identifier \"cell\" is used.\n **/\n cellId?: string\n\n /**\n * Username for basic auth to the Nova instance.\n * @deprecated use accessToken instead\n */\n username?: string\n\n /**\n * Password for basic auth to the Nova instance.\n * @deprecated use accessToken instead\n */\n password?: string\n\n /**\n * Access token for Bearer authentication.\n */\n accessToken?: string\n} & Omit<BaseConfiguration, \"isJsonMime\" | \"basePath\">\n\ntype NovaClientConfigWithDefaults = NovaClientConfig & { cellId: string }\n\nfunction permissiveInstanceUrlParse(url: string): string {\n if (!url.startsWith(\"http\")) {\n url = `http://${url}`\n }\n\n return new URL(url).toString()\n}\n\n/**\n *\n * Client for connecting to a Nova instance and controlling robots.\n */\nexport class NovaClient {\n readonly api: NovaCellAPIClient\n readonly config: NovaClientConfigWithDefaults\n readonly mock?: MockNovaInstance\n authPromise: Promise<string | null> | null = null\n accessToken: string | null = null\n\n constructor(config: NovaClientConfig) {\n const cellId = config.cellId ?? \"cell\"\n this.config = {\n cellId,\n ...config,\n }\n this.accessToken =\n config.accessToken ||\n availableStorage.getString(\"wbjs.access_token\") ||\n null\n\n if (this.config.instanceUrl === \"https://mock.example.com\") {\n this.mock = new MockNovaInstance()\n } else {\n this.config.instanceUrl = permissiveInstanceUrlParse(\n this.config.instanceUrl,\n )\n }\n\n // Set up Axios instance with interceptor for token fetching\n const axiosInstance = axios.create({\n baseURL: urlJoin(this.config.instanceUrl, \"/api/v2\"),\n // TODO - backend needs to set proper CORS headers for this\n headers:\n typeof window !== \"undefined\" &&\n window.location.origin.includes(\"localhost\")\n ? {}\n : {\n // Identify the client to the backend for logging purposes\n \"X-Wandelbots-Client\": \"Wandelbots-Nova-JS-SDK\",\n },\n })\n\n axiosInstance.interceptors.request.use(async (request) => {\n if (!request.headers.Authorization) {\n if (this.accessToken) {\n request.headers.Authorization = `Bearer ${this.accessToken}`\n } else if (this.config.username && this.config.password) {\n request.headers.Authorization = `Basic ${btoa(`${config.username}:${config.password}`)}`\n }\n }\n return request\n })\n\n if (typeof window !== \"undefined\") {\n axiosInstance.interceptors.response.use(\n (r) => r,\n async (error) => {\n if (isAxiosError(error)) {\n if (error.response?.status === 401) {\n // If we hit a 401, attempt to login the user and retry with\n // a new access token\n try {\n await this.renewAuthentication()\n\n if (error.config) {\n if (this.accessToken) {\n error.config.headers.Authorization = `Bearer ${this.accessToken}`\n } else {\n delete error.config.headers.Authorization\n }\n return axiosInstance.request(error.config)\n }\n } catch (err) {\n return Promise.reject(err)\n }\n } else if (error.response?.status === 503) {\n // Check if the server as a whole is down\n const res = await fetch(window.location.href)\n if (res.status === 503) {\n // Go to 503 page\n window.location.reload()\n }\n }\n }\n\n return Promise.reject(error)\n },\n )\n }\n\n this.api = new NovaCellAPIClient(cellId, {\n ...config,\n basePath: urlJoin(this.config.instanceUrl, \"/api/v2\"),\n isJsonMime: (mime: string) => {\n return mime === \"application/json\"\n },\n baseOptions: {\n ...(this.mock\n ? ({\n adapter: (config) => {\n return this.mock!.handleAPIRequest(config)\n },\n } satisfies AxiosRequestConfig)\n : {}),\n ...config.baseOptions,\n },\n axiosInstance,\n })\n }\n\n async renewAuthentication(): Promise<void> {\n if (this.authPromise) {\n // Don't double up\n return\n }\n\n this.authPromise = loginWithAuth0(this.config.instanceUrl)\n try {\n this.accessToken = await this.authPromise\n if (this.accessToken) {\n // Cache access token so we don't need to log in every refresh\n availableStorage.setString(\"wbjs.access_token\", this.accessToken)\n } else {\n availableStorage.delete(\"wbjs.access_token\")\n }\n } finally {\n this.authPromise = null\n }\n }\n\n makeWebsocketURL(path: string): string {\n const url = new URL(\n urlJoin(\n this.config.instanceUrl,\n `/api/v2/cells/${this.config.cellId}`,\n path,\n ),\n )\n url.protocol = url.protocol.replace(\"http\", \"ws\")\n url.protocol = url.protocol.replace(\"https\", \"wss\")\n\n // If provided, add basic auth credentials to the URL\n // NOTE - basic auth is deprecated on websockets and doesn't work in Safari\n // use tokens instead\n if (this.accessToken) {\n url.searchParams.append(\"token\", this.accessToken)\n } else if (this.config.username && this.config.password) {\n url.username = this.config.username\n url.password = this.config.password\n }\n\n return url.toString()\n }\n\n /**\n * Retrieve an AutoReconnectingWebsocket to the given path on the Nova instance.\n * If you explicitly want to reconnect an existing websocket, call `reconnect`\n * on the returned object.\n */\n openReconnectingWebsocket(path: string) {\n return new AutoReconnectingWebsocket(this.makeWebsocketURL(path), {\n mock: this.mock,\n })\n }\n}\n","import type { Pose } from \"@wandelbots/nova-api/v2\"\n\n/**\n * Convert a Pose object representing a motion group position\n * into a string which represents that pose in Wandelscript.\n */\nexport function poseToWandelscriptString(\n pose: Pick<Pose, \"position\" | \"orientation\">,\n) {\n const position = [\n pose.position?.[0] ?? 0,\n pose.position?.[1] ?? 0,\n pose.position?.[2] ?? 0,\n ]\n\n const orientation = [\n pose.orientation?.[0] ?? 0,\n pose.orientation?.[1] ?? 0,\n pose.orientation?.[2] ?? 0,\n ]\n\n const positionValues = position.map((v) => v.toFixed(1))\n // Rotation needs more precision since it's in radians\n const rotationValues = orientation.map((v) => v.toFixed(4))\n\n return `(${positionValues.concat(rotationValues).join(\", \")})`\n}\n"],"mappings":";;;;;;;;;;;;;;AAoDA,IAAa,oBAAb,MAA+B;CAC7B,YACE,AAASA,QACT,AAASC,MAIT;EALS;EACA;gBAkFO,KAAK,2BAA2BC,mCAAU;cAC5C,KAAK,2BAA2BC,iCAAQ;qBAEjC,KAAK,WAAWC,wCAAe;2BACzB,KAAK,WAAWC,8CAAqB;oBAE5C,KAAK,WAAWC,uCAAc;uBAE3B,KAAK,WAAWC,oDAA2B;4BAEtC,KAAK,WAAWC,+CAAsB;6BACrC,KAAK,WAAWC,gDAAuB;2BACzC,KAAK,WAAWC,8CAAqB;qBAE3C,KAAK,WAAWC,wCAAe;2BACzB,KAAK,2BAA2BA,wCAAe;iBAEzD,KAAK,WAAWC,oCAAW;oBAExB,KAAK,WAAWC,uCAAc;0BAExB,KAAK,WAAWC,6CAAoB;2BAEnC,KAAK,WAAWC,8CAAqB;mCAC7B,KAAK,WACxCC,sDACD;8BAC+B,KAAK,WACnCC,2DACD;qBAEsB,KAAK,WAAWC,wCAAe;kCAClB,KAAK,WACvCC,qDACD;8BAC+B,KAAK,WAAWC,iDAAwB;;;;;;;CA1GxE,AAAQ,WACN,gBAKA;EACA,MAAM,YAAY,IAAI,eACpB;GACE,GAAG,KAAK;GACR,aAAa,SAAiB;AA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B;QACjB,MAAM;QACN,MAAM;SACJ,UAAU;UAAC;UAAG;UAAG;UAAE;SACnB,aAAa;UAAC;UAAG;UAAG;UAAO;SAC5B;QACF;OACF;MACD,UAAU,EACR,UAAU;OACR,MAAM;OACN,SAAS;OACT,gBAAgB;QAAC;QAAG;QAAG;QAAE;OACzB,mBAAmB;QAAC;QAAG;QAAG;QAAE;OAC7B,EACF;MACD,YAAY;MACZ,eAAe;OACb;QACE,OAAO;QACP,GAAG;QACJ;OACD,EACE,GAAG,MACJ;OACD,EACE,GAAG,QACJ;OACD;QACE,OAAO;QACP,GAAG;QACJ;OACD;QACE,OAAO;QACP,GAAG;QACJ;OACD,EACE,GAAG,MACJ;OACF;MACD,kBAAkB;OAChB,aAAa;QACX,QAAQ;SACN;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACF;QACD,KAAK,EACH,UAAU,KACX;QACD,OAAO,EACL,UAAU,KACX;QACD,QAAQ,EACN,UAAU,KACX;QACF;OACD,eAAe;QACb,QAAQ;SACN;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACF;QACD,KAAK,EACH,UAAU,KACX;QACF;OACD,kBAAkB;QAChB,QAAQ;SACN;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACF;QACD,KAAK,EACH,UAAU,KACX;QACF;OACD,kBAAkB;QAChB,QAAQ;SACN;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACF;QACD,KAAK,EACH,UAAU,KACX;QACF;OACF;MACD,eAAe;MAChB;;IAEJ;GACD;IACE,QAAQ;IACR,MAAM;IACN,SAAS;AACP,YAAO,EACL,aAAa,CACX;MACE,YAAY;MACZ,YAAY;MACZ,MAAM;MACN,sCAAsC;MACtC,eAAe,CACb;OACE,cAAc;OACd,sBAAsB;OACtB,QAAQ;OACR,uBAAuB;OACxB,CACF;MACD,WAAW;MACX,eAAe;MAChB,CACF,EACF;;IAEJ;GACD;IACE,QAAQ;IACR,MAAM;IACN,SAAS;AACP,YAAO;MACL,eAAe;OACb,MAAM;OACN,cAAc;OACd,MAAM;OACP;MACD,MAAM;MACP;;IAEJ;GACD;IACE,QAAQ;IACR,MAAM;IACN,SAAS;AACP,YAAO;MACL,eAAe;OACb;QACE,OAAO;QACP,OAAO;QACP,GAAG;QACH,GAAG;QACH,4BAA4B;QAC7B;OACD;QACE,OAAO;QACP,OAAO;QACP,GAAG;QACH,GAAG;QACH,4BAA4B;QAC7B;OACD;QACE,OAAO;QACP,OAAO;QACP,GAAG;QACH,GAAG;QACH,4BAA4B;QAC7B;OACD;QACE,OAAO;QACP,OAAO;QACP,GAAG;QACH,GAAG;QACH,4BAA4B;QAC7B;OACD;QACE,OAAO;QACP,OAAO;QACP,GAAG;QACH,GAAG;QACH,4BAA4B;QAC7B;OACD;QACE,OAAO;QACP,OAAO;QACP,GAAG;QACH,GAAG;QACH,4BAA4B;QAC7B;OACF;MACD,yBAAyB;OACvB;QACE,OAAO;QACP,aAAa;QACb,aAAa;QACb,WAAW;QACZ;OACD;QACE,OAAO;QACP,aAAa;QACb,aAAa;QACb,WAAW;QACZ;OACD;QACE,OAAO;QACP,aAAa;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,IAAI,0BAEZ,KAAK,OAAO,aACZ,iBAAiB,KAAK,OAAO,UAC7B,KACD,CACF;AACD,MAAI,WAAW,IAAI,SAAS,QAAQ,QAAQ,KAAK;AACjD,MAAI,WAAW,IAAI,SAAS,QAAQ,SAAS,MAAM;AAKnD,MAAI,KAAK,YACP,KAAI,aAAa,OAAO,SAAS,KAAK,YAAY;WACzC,KAAK,OAAO,YAAY,KAAK,OAAO,UAAU;AACvD,OAAI,WAAW,KAAK,OAAO;AAC3B,OAAI,WAAW,KAAK,OAAO;;AAG7B,SAAO,IAAI,UAAU;;;;;;;CAQvB,0BAA0B,MAAc;AACtC,SAAO,IAAIC,iDAA0B,KAAK,iBAAiB,KAAK,EAAE,EAChE,MAAM,KAAK,MACZ,CAAC;;;;;;;;;;AClNN,SAAgB,yBACd,MACA;CACA,MAAM,WAAW;EACf,KAAK,WAAW,MAAM;EACtB,KAAK,WAAW,MAAM;EACtB,KAAK,WAAW,MAAM;EACvB;CAED,MAAM,cAAc;EAClB,KAAK,cAAc,MAAM;EACzB,KAAK,cAAc,MAAM;EACzB,KAAK,cAAc,MAAM;EAC1B;CAED,MAAM,iBAAiB,SAAS,KAAK,MAAM,EAAE,QAAQ,EAAE,CAAC;CAExD,MAAM,iBAAiB,YAAY,KAAK,MAAM,EAAE,QAAQ,EAAE,CAAC;AAE3D,QAAO,IAAI,eAAe,OAAO,eAAe,CAAC,KAAK,KAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["client: NovaCellAPIClient","startRequest: ProgramStartRequest","programs: ProgramsClient","programId: string","cellId: string","opts: BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n }","SystemApi","CellApi","MotionGroupApi","MotionGroupModelsApi","ControllerApi","ControllerInputsOutputsApi","TrajectoryPlanningApi","TrajectoryExecutionApi","TrajectoryCachingApi","ProgramApi","ApplicationApi","JoggingApi","KinematicsApi","BUSInputsOutputsApi","VirtualControllerApi","VirtualControllerBehaviorApi","VirtualControllerInputsOutputsApi","StoreObjectApi","StoreCollisionComponentsApi","StoreCollisionSetupsApi","pathToRegexp","AxiosError","availableStorage","config","loginWithAuth0","AutoReconnectingWebsocket"],"sources":["../../../src/lib/v2/ProgramsClient.ts","../../../src/lib/v2/NovaCellAPIClient.ts","../../../src/lib/v2/mock/MockNovaInstance.ts","../../../src/lib/v2/NovaClient.ts","../../../src/lib/v2/wandelscriptUtils.ts"],"sourcesContent":["import type {\n Program,\n ProgramRun,\n ProgramRunState,\n ProgramStartRequest,\n ProgramApi,\n} from \"@wandelbots/nova-api/v2\"\nimport type { NovaCellAPIClient, WithCellId } from \"./NovaCellAPIClient.js\"\n\n/**\n * Enhanced client for the Programs API providing intuitive program management\n */\nexport class ProgramsClient {\n constructor(private client: NovaCellAPIClient) {}\n\n /**\n * Get the underlying programs API for direct access\n */\n get api(): WithCellId<ProgramApi> {\n return this.client.programs\n }\n\n /**\n * List all programs available in the cell\n */\n async list(): Promise<Program[]> {\n return await this.api.listPrograms()\n }\n\n /**\n * Get details of a specific program\n */\n async get(programId: string): Promise<Program> {\n return await this.api.getProgram(programId)\n }\n\n /**\n * Start a program with the given arguments\n */\n async start(\n programId: string,\n args: object = {},\n ): Promise<ProgramRun> {\n const startRequest: ProgramStartRequest = {\n arguments: args,\n }\n return await this.api.startProgram(programId, startRequest)\n }\n\n /**\n * Stop a running program\n */\n async stop(programId: string): Promise<void> {\n return await this.api.stopProgram(programId)\n }\n\n /**\n * Execute a program and wait for it to complete\n * \n * Note: This method has limitations due to current API constraints.\n * Real-time program state tracking will be available via NATS messaging\n * in future versions. For now, this provides basic start functionality.\n * \n * @param programId - The program identifier\n * @param args - Arguments to pass to the program\n * @param options - Basic execution options\n */\n async execute(\n programId: string,\n args: object = {},\n options: {\n onStart?: (run: ProgramRun) => void\n } = {},\n ): Promise<ProgramRun> {\n const { onStart } = options\n\n // Start the program\n const run = await this.start(programId, args)\n \n if (onStart) {\n onStart(run)\n }\n\n // Note: Cannot wait for completion due to API limitations\n // Real-time state tracking will be available via NATS messaging\n return run\n }\n\n /**\n * Create a program runner helper for a specific program\n */\n forProgram(programId: string): ProgramRunner {\n return new ProgramRunner(this, programId)\n }\n}\n\n/**\n * Helper class for managing a specific program\n */\nexport class ProgramRunner {\n constructor(\n private programs: ProgramsClient,\n private programId: string,\n ) {}\n\n /**\n * Get program details\n */\n async getDetails(): Promise<Program> {\n return await this.programs.get(this.programId)\n }\n\n /**\n * Start this program\n */\n async start(args: object = {}): Promise<ProgramRun> {\n return await this.programs.start(this.programId, args)\n }\n\n /**\n * Stop this program\n */\n async stop(): Promise<void> {\n return await this.programs.stop(this.programId)\n }\n\n /**\n * Execute this program (start and get initial run information)\n * \n * Note: This method has limitations due to current API constraints.\n * Real-time program state tracking will be available via NATS messaging\n * in future versions.\n */\n async execute(\n args: object = {},\n options: {\n onStart?: (run: ProgramRun) => void\n } = {},\n ): Promise<ProgramRun> {\n return await this.programs.execute(this.programId, args, options)\n }\n}\n\n// Re-export types for convenience\nexport type {\n Program,\n ProgramRun,\n ProgramRunState,\n ProgramStartRequest,\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: legacy code */\n/** biome-ignore-all lint/style/noNonNullAssertion: legacy code */\nimport type {\n BaseAPI,\n Configuration as BaseConfiguration,\n} from \"@wandelbots/nova-api/v2\"\nimport {\n ApplicationApi,\n BUSInputsOutputsApi,\n CellApi,\n ControllerApi,\n ControllerInputsOutputsApi,\n JoggingApi,\n KinematicsApi,\n MotionGroupApi,\n MotionGroupModelsApi,\n ProgramApi,\n StoreCollisionComponentsApi,\n StoreCollisionSetupsApi,\n StoreObjectApi,\n SystemApi,\n TrajectoryCachingApi,\n TrajectoryExecutionApi,\n TrajectoryPlanningApi,\n VirtualControllerApi,\n VirtualControllerBehaviorApi,\n VirtualControllerInputsOutputsApi,\n} from \"@wandelbots/nova-api/v2\"\nimport type { AxiosInstance } from \"axios\"\nimport axios from \"axios\"\nimport { ProgramsClient } from \"./ProgramsClient.js\"\n\ntype OmitFirstArg<F> = F extends (x: any, ...args: infer P) => infer R\n ? (...args: P) => R\n : never\n\ntype UnwrapAxiosResponseReturn<T> = T extends (...a: any) => any\n ? (\n ...a: Parameters<T>\n ) => Promise<Awaited<ReturnType<T>> extends { data: infer D } ? D : never>\n : never\n\nexport type WithCellId<T> = {\n [P in keyof T]: UnwrapAxiosResponseReturn<OmitFirstArg<T[P]>>\n}\n\nexport type WithUnwrappedAxiosResponse<T> = {\n [P in keyof T]: UnwrapAxiosResponseReturn<T[P]>\n}\n\n/**\n * API client providing type-safe access to all the Nova API REST endpoints\n * associated with a specific cell id.\n */\nexport class NovaCellAPIClient {\n constructor(\n readonly cellId: string,\n readonly opts: BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n },\n ) {}\n\n /**\n * Some TypeScript sorcery which alters the API class methods so you don't\n * have to pass the cell id to every single one, and de-encapsulates the\n * response data\n */\n private withCellId<T extends BaseAPI>(\n ApiConstructor: new (\n config: BaseConfiguration,\n basePath: string,\n axios: AxiosInstance,\n ) => T,\n ) {\n const apiClient = new ApiConstructor(\n {\n ...this.opts,\n isJsonMime: (mime: string) => {\n return mime === \"application/json\"\n },\n },\n this.opts.basePath ?? \"\",\n this.opts.axiosInstance ?? axios.create(),\n ) as {\n [key: string | symbol]: any\n }\n\n for (const key of Reflect.ownKeys(Reflect.getPrototypeOf(apiClient)!)) {\n if (key !== \"constructor\" && typeof apiClient[key] === \"function\") {\n const originalFunction = apiClient[key]\n apiClient[key] = (...args: any[]) => {\n return originalFunction\n .apply(apiClient, [this.cellId, ...args])\n .then((res: any) => res.data)\n }\n }\n }\n\n return apiClient as WithCellId<T>\n }\n\n /**\n * As withCellId, but only does the response unwrapping\n */\n private withUnwrappedResponsesOnly<T extends BaseAPI>(\n ApiConstructor: new (\n config: BaseConfiguration,\n basePath: string,\n axios: AxiosInstance,\n ) => T,\n ) {\n const apiClient = new ApiConstructor(\n {\n ...this.opts,\n isJsonMime: (mime: string) => {\n return mime === \"application/json\"\n },\n },\n this.opts.basePath ?? \"\",\n this.opts.axiosInstance ?? axios.create(),\n ) as {\n [key: string | symbol]: any\n }\n\n for (const key of Reflect.ownKeys(Reflect.getPrototypeOf(apiClient)!)) {\n if (key !== \"constructor\" && typeof apiClient[key] === \"function\") {\n const originalFunction = apiClient[key]\n apiClient[key] = (...args: any[]) => {\n return originalFunction\n .apply(apiClient, args)\n .then((res: any) => res.data)\n }\n }\n }\n\n return apiClient as WithUnwrappedAxiosResponse<T>\n }\n\n readonly system = this.withUnwrappedResponsesOnly(SystemApi)\n readonly cell = this.withUnwrappedResponsesOnly(CellApi)\n\n readonly motionGroup = this.withCellId(MotionGroupApi)\n readonly motionGroupModels = this.withCellId(MotionGroupModelsApi)\n\n readonly controller = this.withCellId(ControllerApi)\n\n readonly controllerIOs = this.withCellId(ControllerInputsOutputsApi)\n\n readonly trajectoryPlanning = this.withCellId(TrajectoryPlanningApi)\n readonly trajectoryExecution = this.withCellId(TrajectoryExecutionApi)\n readonly trajectoryCaching = this.withCellId(TrajectoryCachingApi)\n\n readonly programs = this.withCellId(ProgramApi)\n\n readonly application = this.withCellId(ApplicationApi)\n readonly applicationGlobal = this.withUnwrappedResponsesOnly(ApplicationApi)\n\n readonly jogging = this.withCellId(JoggingApi)\n\n readonly kinematics = this.withCellId(KinematicsApi)\n\n readonly busInputsOutputs = this.withCellId(BUSInputsOutputsApi)\n\n readonly virtualController = this.withCellId(VirtualControllerApi)\n readonly virtualControllerBehavior = this.withCellId(\n VirtualControllerBehaviorApi,\n )\n readonly virtualControllerIOs = this.withCellId(\n VirtualControllerInputsOutputsApi,\n )\n\n readonly storeObject = this.withCellId(StoreObjectApi)\n readonly storeCollisionComponents = this.withCellId(\n StoreCollisionComponentsApi,\n )\n readonly storeCollisionSetups = this.withCellId(StoreCollisionSetupsApi)\n\n // Enhanced programs client with convenient methods\n private _programsClient?: ProgramsClient\n get programsClient(): ProgramsClient {\n if (!this._programsClient) {\n this._programsClient = new ProgramsClient(this)\n }\n return this._programsClient\n }\n}\n","/** biome-ignore-all lint/suspicious/noApproximativeNumericConstant: mock data contains approximative pi values from robot description */\nimport type { MotionGroupState, RobotController } from \"@wandelbots/nova-api/v2\"\nimport type { AxiosResponse, InternalAxiosRequestConfig } from \"axios\"\nimport { AxiosError } from \"axios\"\nimport * as pathToRegexp from \"path-to-regexp\"\nimport type { AutoReconnectingWebsocket } from \"../../AutoReconnectingWebsocket\"\n\n/**\n * Ultra-simplified mock Nova server for testing stuff\n */\nexport class MockNovaInstance {\n readonly connections: AutoReconnectingWebsocket[] = []\n\n async handleAPIRequest(\n config: InternalAxiosRequestConfig,\n ): Promise<AxiosResponse> {\n const apiHandlers = [\n {\n method: \"GET\",\n path: \"/cells/:cellId/controllers\",\n handle() {\n return [\"mock-ur5e\"]\n },\n },\n {\n method: \"GET\",\n path: \"/cells/:cellId/controllers/:controllerId\",\n handle() {\n return {\n configuration: {\n initial_joint_position: \"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]\",\n kind: \"VirtualController\",\n manufacturer: \"universalrobots\",\n type: \"universalrobots-ur5e\",\n },\n name: \"mock-ur5\",\n } satisfies RobotController\n },\n },\n {\n method: \"GET\",\n path: \"/cells/:cellId/controllers/:controllerId/state\",\n handle() {\n return {\n mode: \"MODE_CONTROL\",\n last_error: [],\n timestamp: \"2025-10-16T09:19:26.634534092Z\",\n sequence_number: 1054764,\n controller: \"mock-ur5e\",\n operation_mode: \"OPERATION_MODE_AUTO\",\n safety_state: \"SAFETY_STATE_NORMAL\",\n velocity_override: 100,\n motion_groups: [\n {\n timestamp: \"2025-10-16T09:19:26.634534092Z\",\n sequence_number: 1054764,\n motion_group: \"0@mock-ur5e\",\n controller: \"mock-ur5e\",\n joint_position: [\n 1.487959623336792, -1.8501918315887451, 1.8003005981445312,\n 6.034560203552246, 1.4921919107437134, 1.593459963798523,\n ],\n joint_limit_reached: {\n limit_reached: [false, false, false, false, false, false],\n },\n joint_torque: [],\n joint_current: [0, 0, 0, 0, 0, 0],\n flange_pose: {\n position: [\n 107.6452433732927, -409.0402987746852, 524.2402132330305,\n ],\n orientation: [\n 0.9874434028353319, -0.986571714997442, 1.3336589451098142,\n ],\n },\n tcp: \"Flange\",\n tcp_pose: {\n position: [\n 107.6452433732927, -409.0402987746852, 524.2402132330305,\n ],\n orientation: [\n 0.9874434028353319, -0.986571714997442, 1.3336589451098142,\n ],\n },\n payload: \"\",\n coordinate_system: \"\",\n standstill: true,\n },\n ],\n }\n },\n },\n {\n method: \"GET\",\n path: \"/cells/:cellId/controllers/:controllerId/motion-groups/:motionGroupId/description\",\n handle() {\n return {\n motion_group_model: \"UniversalRobots_UR5e\",\n mounting: {\n position: [0, 0, 0],\n orientation: [0, 0, 0],\n },\n tcps: {\n Flange: {\n name: \"Default-Flange\",\n pose: {\n position: [0, 0, 0],\n orientation: [0, 0, 0],\n },\n },\n },\n payloads: {\n \"FPay-0\": {\n name: \"FPay-0\",\n payload: 0,\n center_of_mass: [0, 0, 0],\n moment_of_inertia: [0, 0, 0],\n },\n },\n cycle_time: 8,\n dh_parameters: [\n {\n alpha: 1.5707963267948966,\n d: 162.25,\n },\n {\n a: -425,\n },\n {\n a: -392.2,\n },\n {\n alpha: 1.5707963267948966,\n d: 133.3,\n },\n {\n alpha: -1.5707963267948966,\n d: 99.7,\n },\n {\n d: 99.6,\n },\n ],\n operation_limits: {\n auto_limits: {\n joints: [\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n ],\n tcp: {\n velocity: 5000,\n },\n elbow: {\n velocity: 5000,\n },\n flange: {\n velocity: 5000,\n },\n },\n manual_limits: {\n joints: [\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n ],\n tcp: {\n velocity: 5000,\n },\n },\n manual_t1_limits: {\n joints: [\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n ],\n tcp: {\n velocity: 5000,\n },\n },\n manual_t2_limits: {\n joints: [\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 150,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n {\n position: {\n lower_limit: -6.283185307179586,\n upper_limit: 6.283185307179586,\n },\n velocity: 3.34159255027771,\n acceleration: 40,\n torque: 28,\n },\n ],\n tcp: {\n velocity: 5000,\n },\n },\n },\n serial_number: \"WBVirtualRobot\",\n }\n },\n },\n {\n method: \"GET\",\n path: \"/cells/:cellId/controllers/:controllerId/coordinate-systems\",\n handle() {\n return [\n {\n coordinate_system: \"\",\n name: \"world\",\n reference_coordinate_system: \"\",\n position: [0, 0, 0],\n orientation: [0, 0, 0],\n orientation_type: \"ROTATION_VECTOR\",\n },\n {\n coordinate_system: \"CS-0\",\n name: \"Default-CS\",\n reference_coordinate_system: \"\",\n position: [0, 0, 0],\n orientation: [0, 0, 0],\n orientation_type: \"ROTATION_VECTOR\",\n },\n ] //satisfies CoordinateSystems\n },\n },\n ]\n\n const method = config.method?.toUpperCase() || \"GET\"\n const path = `/cells${config.url?.split(\"/cells\")[1]?.split(\"?\")[0]}`\n\n for (const handler of apiHandlers) {\n const match = pathToRegexp.match(handler.path)(path || \"\")\n if (method === handler.method && match) {\n const json = handler.handle()\n return {\n status: 200,\n statusText: \"Success\",\n data: JSON.stringify(json),\n headers: {},\n config,\n request: {\n responseURL: config.url,\n },\n }\n }\n }\n\n throw new AxiosError(\n `No mock handler matched this request: ${method} ${path}`,\n \"404\",\n config,\n )\n\n // return {\n // status: 404,\n // statusText: \"Not Found\",\n // data: \"\",\n // headers: {},\n // config,\n // request: {\n // responseURL: config.url,\n // },\n // }\n }\n\n // Please note: Only very basic websocket mocking is done here, needs to be extended as needed\n handleWebsocketConnection(socket: AutoReconnectingWebsocket) {\n this.connections.push(socket)\n\n setTimeout(() => {\n socket.dispatchEvent(new Event(\"open\"))\n\n console.log(\"Websocket connection opened from\", socket.url)\n\n if (socket.url.includes(\"/state-stream\")) {\n socket.dispatchEvent(\n new MessageEvent(\"message\", {\n data: JSON.stringify(defaultMotionState),\n }),\n )\n }\n\n if (socket.url.includes(\"/execution/jogging\")) {\n socket.dispatchEvent(\n new MessageEvent(\"message\", {\n data: JSON.stringify({\n result: {\n message: \"string\",\n kind: \"INITIALIZE_RECEIVED\",\n },\n }),\n }),\n )\n }\n }, 10)\n }\n\n handleWebsocketMessage(socket: AutoReconnectingWebsocket, message: string) {\n console.log(`Received message on ${socket.url}`, message)\n }\n}\n\nconst defaultMotionState = {\n result: {\n motion_group: \"0@universalrobots-ur5e\",\n controller: \"universalrobots-ur5e\",\n timestamp: new Date().toISOString(),\n sequence_number: 1,\n joint_position: [\n 1.1699999570846558, -1.5700000524520874, 1.3600000143051147,\n 1.0299999713897705, 1.2899999618530273, 1.2799999713897705,\n ],\n joint_limit_reached: {\n limit_reached: [false, false, false, false, false, false],\n },\n standstill: false,\n flange_pose: {\n position: [1.3300010259703043, -409.2680714682808, 531.0203477065281],\n orientation: [\n 1.7564919306270736, -1.7542521568325058, 0.7326972590614671,\n ],\n },\n tcp_pose: {\n position: [1.3300010259703043, -409.2680714682808, 531.0203477065281],\n orientation: [\n 1.7564919306270736, -1.7542521568325058, 0.7326972590614671,\n ],\n },\n } satisfies MotionGroupState,\n}\n","/** biome-ignore-all lint/style/noNonNullAssertion: legacy code */\nimport type { Configuration as BaseConfiguration } from \"@wandelbots/nova-api/v2\"\nimport type { AxiosRequestConfig } from \"axios\"\nimport axios, { isAxiosError } from \"axios\"\nimport urlJoin from \"url-join\"\nimport { loginWithAuth0 } from \"../../LoginWithAuth0\"\nimport { AutoReconnectingWebsocket } from \"../AutoReconnectingWebsocket\"\nimport { availableStorage } from \"../availableStorage\"\nimport { MockNovaInstance } from \"./mock/MockNovaInstance\"\nimport { NovaCellAPIClient } from \"./NovaCellAPIClient\"\n\nexport type NovaClientConfig = {\n /**\n * Url of the deployed Nova instance to connect to\n * e.g. https://saeattii.instance.wandelbots.io\n */\n instanceUrl: string | \"https://mock.example.com\"\n\n /**\n * Identifier of the cell on the Nova instance to connect this client to.\n * If omitted, the default identifier \"cell\" is used.\n **/\n cellId?: string\n\n /**\n * Username for basic auth to the Nova instance.\n * @deprecated use accessToken instead\n */\n username?: string\n\n /**\n * Password for basic auth to the Nova instance.\n * @deprecated use accessToken instead\n */\n password?: string\n\n /**\n * Access token for Bearer authentication.\n */\n accessToken?: string\n} & Omit<BaseConfiguration, \"isJsonMime\" | \"basePath\">\n\ntype NovaClientConfigWithDefaults = NovaClientConfig & { cellId: string }\n\nfunction permissiveInstanceUrlParse(url: string): string {\n if (!url.startsWith(\"http\")) {\n url = `http://${url}`\n }\n\n return new URL(url).toString()\n}\n\n/**\n *\n * Client for connecting to a Nova instance and controlling robots.\n */\nexport class NovaClient {\n readonly api: NovaCellAPIClient\n readonly config: NovaClientConfigWithDefaults\n readonly mock?: MockNovaInstance\n authPromise: Promise<string | null> | null = null\n accessToken: string | null = null\n\n constructor(config: NovaClientConfig) {\n const cellId = config.cellId ?? \"cell\"\n this.config = {\n cellId,\n ...config,\n }\n this.accessToken =\n config.accessToken ||\n availableStorage.getString(\"wbjs.access_token\") ||\n null\n\n if (this.config.instanceUrl === \"https://mock.example.com\") {\n this.mock = new MockNovaInstance()\n } else {\n this.config.instanceUrl = permissiveInstanceUrlParse(\n this.config.instanceUrl,\n )\n }\n\n // Set up Axios instance with interceptor for token fetching\n const axiosInstance = axios.create({\n baseURL: urlJoin(this.config.instanceUrl, \"/api/v2\"),\n // TODO - backend needs to set proper CORS headers for this\n headers:\n typeof window !== \"undefined\" &&\n window.location.origin.includes(\"localhost\")\n ? {}\n : {\n // Identify the client to the backend for logging purposes\n \"X-Wandelbots-Client\": \"Wandelbots-Nova-JS-SDK\",\n },\n })\n\n axiosInstance.interceptors.request.use(async (request) => {\n if (!request.headers.Authorization) {\n if (this.accessToken) {\n request.headers.Authorization = `Bearer ${this.accessToken}`\n } else if (this.config.username && this.config.password) {\n request.headers.Authorization = `Basic ${btoa(`${config.username}:${config.password}`)}`\n }\n }\n return request\n })\n\n if (typeof window !== \"undefined\") {\n axiosInstance.interceptors.response.use(\n (r) => r,\n async (error) => {\n if (isAxiosError(error)) {\n if (error.response?.status === 401) {\n // If we hit a 401, attempt to login the user and retry with\n // a new access token\n try {\n await this.renewAuthentication()\n\n if (error.config) {\n if (this.accessToken) {\n error.config.headers.Authorization = `Bearer ${this.accessToken}`\n } else {\n delete error.config.headers.Authorization\n }\n return axiosInstance.request(error.config)\n }\n } catch (err) {\n return Promise.reject(err)\n }\n } else if (error.response?.status === 503) {\n // Check if the server as a whole is down\n const res = await fetch(window.location.href)\n if (res.status === 503) {\n // Go to 503 page\n window.location.reload()\n }\n }\n }\n\n return Promise.reject(error)\n },\n )\n }\n\n this.api = new NovaCellAPIClient(cellId, {\n ...config,\n basePath: urlJoin(this.config.instanceUrl, \"/api/v2\"),\n isJsonMime: (mime: string) => {\n return mime === \"application/json\"\n },\n baseOptions: {\n ...(this.mock\n ? ({\n adapter: (config) => {\n return this.mock!.handleAPIRequest(config)\n },\n } satisfies AxiosRequestConfig)\n : {}),\n ...config.baseOptions,\n },\n axiosInstance,\n })\n }\n\n async renewAuthentication(): Promise<void> {\n if (this.authPromise) {\n // Don't double up\n return\n }\n\n this.authPromise = loginWithAuth0(this.config.instanceUrl)\n try {\n this.accessToken = await this.authPromise\n if (this.accessToken) {\n // Cache access token so we don't need to log in every refresh\n availableStorage.setString(\"wbjs.access_token\", this.accessToken)\n } else {\n availableStorage.delete(\"wbjs.access_token\")\n }\n } finally {\n this.authPromise = null\n }\n }\n\n makeWebsocketURL(path: string): string {\n const url = new URL(\n urlJoin(\n this.config.instanceUrl,\n `/api/v2/cells/${this.config.cellId}`,\n path,\n ),\n )\n url.protocol = url.protocol.replace(\"http\", \"ws\")\n url.protocol = url.protocol.replace(\"https\", \"wss\")\n\n // If provided, add basic auth credentials to the URL\n // NOTE - basic auth is deprecated on websockets and doesn't work in Safari\n // use tokens instead\n if (this.accessToken) {\n url.searchParams.append(\"token\", this.accessToken)\n } else if (this.config.username && this.config.password) {\n url.username = this.config.username\n url.password = this.config.password\n }\n\n return url.toString()\n }\n\n /**\n * Retrieve an AutoReconnectingWebsocket to the given path on the Nova instance.\n * If you explicitly want to reconnect an existing websocket, call `reconnect`\n * on the returned object.\n */\n openReconnectingWebsocket(path: string) {\n return new AutoReconnectingWebsocket(this.makeWebsocketURL(path), {\n mock: this.mock,\n })\n }\n}\n","import type { Pose } from \"@wandelbots/nova-api/v2\"\n\n/**\n * Convert a Pose object representing a motion group position\n * into a string which represents that pose in Wandelscript.\n */\nexport function poseToWandelscriptString(\n pose: Pick<Pose, \"position\" | \"orientation\">,\n) {\n const position = [\n pose.position?.[0] ?? 0,\n pose.position?.[1] ?? 0,\n pose.position?.[2] ?? 0,\n ]\n\n const orientation = [\n pose.orientation?.[0] ?? 0,\n pose.orientation?.[1] ?? 0,\n pose.orientation?.[2] ?? 0,\n ]\n\n const positionValues = position.map((v) => v.toFixed(1))\n // Rotation needs more precision since it's in radians\n const rotationValues = orientation.map((v) => v.toFixed(4))\n\n return `(${positionValues.concat(rotationValues).join(\", \")})`\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,IAAa,iBAAb,MAA4B;CAC1B,YAAY,AAAQA,QAA2B;EAA3B;;;;;CAKpB,IAAI,MAA8B;AAChC,SAAO,KAAK,OAAO;;;;;CAMrB,MAAM,OAA2B;AAC/B,SAAO,MAAM,KAAK,IAAI,cAAc;;;;;CAMtC,MAAM,IAAI,WAAqC;AAC7C,SAAO,MAAM,KAAK,IAAI,WAAW,UAAU;;;;;CAM7C,MAAM,MACJ,WACA,OAAe,EAAE,EACI;EACrB,MAAMC,eAAoC,EACxC,WAAW,MACZ;AACD,SAAO,MAAM,KAAK,IAAI,aAAa,WAAW,aAAa;;;;;CAM7D,MAAM,KAAK,WAAkC;AAC3C,SAAO,MAAM,KAAK,IAAI,YAAY,UAAU;;;;;;;;;;;;;CAc9C,MAAM,QACJ,WACA,OAAe,EAAE,EACjB,UAEI,EAAE,EACe;EACrB,MAAM,EAAE,YAAY;EAGpB,MAAM,MAAM,MAAM,KAAK,MAAM,WAAW,KAAK;AAE7C,MAAI,QACF,SAAQ,IAAI;AAKd,SAAO;;;;;CAMT,WAAW,WAAkC;AAC3C,SAAO,IAAI,cAAc,MAAM,UAAU;;;;;;AAO7C,IAAa,gBAAb,MAA2B;CACzB,YACE,AAAQC,UACR,AAAQC,WACR;EAFQ;EACA;;;;;CAMV,MAAM,aAA+B;AACnC,SAAO,MAAM,KAAK,SAAS,IAAI,KAAK,UAAU;;;;;CAMhD,MAAM,MAAM,OAAe,EAAE,EAAuB;AAClD,SAAO,MAAM,KAAK,SAAS,MAAM,KAAK,WAAW,KAAK;;;;;CAMxD,MAAM,OAAsB;AAC1B,SAAO,MA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;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACF;QACD,KAAK,EACH,UAAU,KACX;QACD,OAAO,EACL,UAAU,KACX;QACD,QAAQ,EACN,UAAU,KACX;QACF;OACD,eAAe;QACb,QAAQ;SACN;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACF;QACD,KAAK,EACH,UAAU,KACX;QACF;OACD,kBAAkB;QAChB,QAAQ;SACN;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aAAa;WACd;UACD,UAAU;UACV,cAAc;UACd,QAAQ;UACT;SACD;UACE,UAAU;WACR,aAAa;WACb,aA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OAAO;;AAG7B,SAAO,IAAI,UAAU;;;;;;;CAQvB,0BAA0B,MAAc;AACtC,SAAO,IAAIC,iDAA0B,KAAK,iBAAiB,KAAK,EAAE,EAChE,MAAM,KAAK,MACZ,CAAC;;;;;;;;;;AClNN,SAAgB,yBACd,MACA;CACA,MAAM,WAAW;EACf,KAAK,WAAW,MAAM;EACtB,KAAK,WAAW,MAAM;EACtB,KAAK,WAAW,MAAM;EACvB;CAED,MAAM,cAAc;EAClB,KAAK,cAAc,MAAM;EACzB,KAAK,cAAc,MAAM;EACzB,KAAK,cAAc,MAAM;EAC1B;CAED,MAAM,iBAAiB,SAAS,KAAK,MAAM,EAAE,QAAQ,EAAE,CAAC;CAExD,MAAM,iBAAiB,YAAY,KAAK,MAAM,EAAE,QAAQ,EAAE,CAAC;AAE3D,QAAO,IAAI,eAAe,OAAO,eAAe,CAAC,KAAK,KAAK,CAAC"}
|
package/dist/lib/v2/index.d.cts
CHANGED
|
@@ -1,8 +1,85 @@
|
|
|
1
1
|
import { n as MockNovaInstance, t as AutoReconnectingWebsocket } from "../../AutoReconnectingWebsocket-Qcrbm3Kb.cjs";
|
|
2
2
|
import { AxiosInstance } from "axios";
|
|
3
|
-
import { ApplicationApi, BUSInputsOutputsApi, CellApi, Configuration, ControllerApi, ControllerInputsOutputsApi, JoggingApi, KinematicsApi, MotionGroupApi, MotionGroupModelsApi, Pose, StoreCollisionComponentsApi, StoreCollisionSetupsApi, StoreObjectApi, SystemApi, TrajectoryCachingApi, TrajectoryExecutionApi, TrajectoryPlanningApi, VirtualControllerApi, VirtualControllerBehaviorApi, VirtualControllerInputsOutputsApi } from "@wandelbots/nova-api/v2";
|
|
3
|
+
import { ApplicationApi, BUSInputsOutputsApi, CellApi, Configuration, ControllerApi, ControllerInputsOutputsApi, JoggingApi, KinematicsApi, MotionGroupApi, MotionGroupModelsApi, Pose, Program, ProgramApi, ProgramRun, ProgramRunState, ProgramStartRequest, StoreCollisionComponentsApi, StoreCollisionSetupsApi, StoreObjectApi, SystemApi, TrajectoryCachingApi, TrajectoryExecutionApi, TrajectoryPlanningApi, VirtualControllerApi, VirtualControllerBehaviorApi, VirtualControllerInputsOutputsApi } from "@wandelbots/nova-api/v2";
|
|
4
4
|
export * from "@wandelbots/nova-api/v2";
|
|
5
5
|
|
|
6
|
+
//#region src/lib/v2/ProgramsClient.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Enhanced client for the Programs API providing intuitive program management
|
|
9
|
+
*/
|
|
10
|
+
declare class ProgramsClient {
|
|
11
|
+
private client;
|
|
12
|
+
constructor(client: NovaCellAPIClient);
|
|
13
|
+
/**
|
|
14
|
+
* Get the underlying programs API for direct access
|
|
15
|
+
*/
|
|
16
|
+
get api(): WithCellId<ProgramApi>;
|
|
17
|
+
/**
|
|
18
|
+
* List all programs available in the cell
|
|
19
|
+
*/
|
|
20
|
+
list(): Promise<Program[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Get details of a specific program
|
|
23
|
+
*/
|
|
24
|
+
get(programId: string): Promise<Program>;
|
|
25
|
+
/**
|
|
26
|
+
* Start a program with the given arguments
|
|
27
|
+
*/
|
|
28
|
+
start(programId: string, args?: object): Promise<ProgramRun>;
|
|
29
|
+
/**
|
|
30
|
+
* Stop a running program
|
|
31
|
+
*/
|
|
32
|
+
stop(programId: string): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Execute a program and wait for it to complete
|
|
35
|
+
*
|
|
36
|
+
* Note: This method has limitations due to current API constraints.
|
|
37
|
+
* Real-time program state tracking will be available via NATS messaging
|
|
38
|
+
* in future versions. For now, this provides basic start functionality.
|
|
39
|
+
*
|
|
40
|
+
* @param programId - The program identifier
|
|
41
|
+
* @param args - Arguments to pass to the program
|
|
42
|
+
* @param options - Basic execution options
|
|
43
|
+
*/
|
|
44
|
+
execute(programId: string, args?: object, options?: {
|
|
45
|
+
onStart?: (run: ProgramRun) => void;
|
|
46
|
+
}): Promise<ProgramRun>;
|
|
47
|
+
/**
|
|
48
|
+
* Create a program runner helper for a specific program
|
|
49
|
+
*/
|
|
50
|
+
forProgram(programId: string): ProgramRunner;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Helper class for managing a specific program
|
|
54
|
+
*/
|
|
55
|
+
declare class ProgramRunner {
|
|
56
|
+
private programs;
|
|
57
|
+
private programId;
|
|
58
|
+
constructor(programs: ProgramsClient, programId: string);
|
|
59
|
+
/**
|
|
60
|
+
* Get program details
|
|
61
|
+
*/
|
|
62
|
+
getDetails(): Promise<Program>;
|
|
63
|
+
/**
|
|
64
|
+
* Start this program
|
|
65
|
+
*/
|
|
66
|
+
start(args?: object): Promise<ProgramRun>;
|
|
67
|
+
/**
|
|
68
|
+
* Stop this program
|
|
69
|
+
*/
|
|
70
|
+
stop(): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Execute this program (start and get initial run information)
|
|
73
|
+
*
|
|
74
|
+
* Note: This method has limitations due to current API constraints.
|
|
75
|
+
* Real-time program state tracking will be available via NATS messaging
|
|
76
|
+
* in future versions.
|
|
77
|
+
*/
|
|
78
|
+
execute(args?: object, options?: {
|
|
79
|
+
onStart?: (run: ProgramRun) => void;
|
|
80
|
+
}): Promise<ProgramRun>;
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
6
83
|
//#region src/lib/v2/NovaCellAPIClient.d.ts
|
|
7
84
|
type OmitFirstArg<F> = F extends ((x: any, ...args: infer P) => infer R) ? (...args: P) => R : never;
|
|
8
85
|
type UnwrapAxiosResponseReturn<T> = T extends ((...a: any) => any) ? (...a: Parameters<T>) => Promise<Awaited<ReturnType<T>> extends {
|
|
@@ -43,6 +120,7 @@ declare class NovaCellAPIClient {
|
|
|
43
120
|
readonly trajectoryPlanning: WithCellId<TrajectoryPlanningApi>;
|
|
44
121
|
readonly trajectoryExecution: WithCellId<TrajectoryExecutionApi>;
|
|
45
122
|
readonly trajectoryCaching: WithCellId<TrajectoryCachingApi>;
|
|
123
|
+
readonly programs: WithCellId<ProgramApi>;
|
|
46
124
|
readonly application: WithCellId<ApplicationApi>;
|
|
47
125
|
readonly applicationGlobal: WithUnwrappedAxiosResponse<ApplicationApi>;
|
|
48
126
|
readonly jogging: WithCellId<JoggingApi>;
|
|
@@ -54,6 +132,8 @@ declare class NovaCellAPIClient {
|
|
|
54
132
|
readonly storeObject: WithCellId<StoreObjectApi>;
|
|
55
133
|
readonly storeCollisionComponents: WithCellId<StoreCollisionComponentsApi>;
|
|
56
134
|
readonly storeCollisionSetups: WithCellId<StoreCollisionSetupsApi>;
|
|
135
|
+
private _programsClient?;
|
|
136
|
+
get programsClient(): ProgramsClient;
|
|
57
137
|
}
|
|
58
138
|
//#endregion
|
|
59
139
|
//#region src/lib/v2/NovaClient.d.ts
|
|
@@ -114,5 +194,5 @@ declare class NovaClient {
|
|
|
114
194
|
*/
|
|
115
195
|
declare function poseToWandelscriptString(pose: Pick<Pose, "position" | "orientation">): string;
|
|
116
196
|
//#endregion
|
|
117
|
-
export { NovaCellAPIClient, NovaClient, NovaClientConfig, WithCellId, WithUnwrappedAxiosResponse, poseToWandelscriptString };
|
|
197
|
+
export { NovaCellAPIClient, NovaClient, NovaClientConfig, type Program, type ProgramRun, type ProgramRunState, ProgramRunner, type ProgramStartRequest, ProgramsClient, WithCellId, WithUnwrappedAxiosResponse, poseToWandelscriptString };
|
|
118
198
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/lib/v2/NovaCellAPIClient.ts","../../../src/lib/v2/NovaClient.ts","../../../src/lib/v2/wandelscriptUtils.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/lib/v2/ProgramsClient.ts","../../../src/lib/v2/NovaCellAPIClient.ts","../../../src/lib/v2/NovaClient.ts","../../../src/lib/v2/wandelscriptUtils.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAYa,cAAA;;EAAA,WAAA,CA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X,MAAA,CAAA,EAAA,MAAA;EAAR;;;;EA+BA,QAAA,CAAA,EAAA,MAAA;EAkB4B;;AAQjC;;EAS8B,QAAA,CAAA,EAAA,MAAA;EAAR;;;EAcN,WAAA,CAAA,EAAA,MAAA;CAcM,GEhGlB,IFgGkB,CEhGb,aFgGa,EAAA,YAAA,GAAA,UAAA,CAAA;KE9FjB,4BAAA,GAA+B,gBFgGvB,GAAA;EAAR,MAAA,EAAA,MAAA;CAAO;;;;AC5GwC;AAE7B,cCwBV,UAAA,CDxBU;EACT,SAAA,GAAA,ECwBE,iBDxBF;EAAM,SAAA,MAAA,ECyBD,4BDzBC;EAAC,SAAA,IAAA,CAAA,EC0BH,gBD1BG;EAGhB,WAAA,ECwBU,ODxBV,CAAA,MAAA,GAAyB,IAAA,CAAA,GAAA,IAAA;EAAM,WAAA,EAAA,MAAA,GAAA,IAAA;EAEb,WAAA,CAAA,MAAA,ECyBD,gBDzBC;EAAX,mBAAA,CAAA,CAAA,EC8HmB,OD9HnB,CAAA,IAAA,CAAA;EACwB,gBAAA,CAAA,IAAA,EAAA,MAAA,CAAA,EAAA,MAAA;EAAX;;;;;EAGb,yBAAU,CAAA,IAAA,EAAA,MAAA,CAAA,EC2KkB,yBD3KlB;;;;;;;;iBEpCN,wBAAA,OACR,KAAK"}
|
package/dist/lib/v2/index.d.mts
CHANGED
|
@@ -1,8 +1,85 @@
|
|
|
1
1
|
import { n as MockNovaInstance, t as AutoReconnectingWebsocket } from "../../AutoReconnectingWebsocket-dHe-kceU.mjs";
|
|
2
2
|
import { AxiosInstance } from "axios";
|
|
3
|
-
import { ApplicationApi, BUSInputsOutputsApi, CellApi, Configuration, ControllerApi, ControllerInputsOutputsApi, JoggingApi, KinematicsApi, MotionGroupApi, MotionGroupModelsApi, Pose, StoreCollisionComponentsApi, StoreCollisionSetupsApi, StoreObjectApi, SystemApi, TrajectoryCachingApi, TrajectoryExecutionApi, TrajectoryPlanningApi, VirtualControllerApi, VirtualControllerBehaviorApi, VirtualControllerInputsOutputsApi } from "@wandelbots/nova-api/v2";
|
|
3
|
+
import { ApplicationApi, BUSInputsOutputsApi, CellApi, Configuration, ControllerApi, ControllerInputsOutputsApi, JoggingApi, KinematicsApi, MotionGroupApi, MotionGroupModelsApi, Pose, Program, ProgramApi, ProgramRun, ProgramRunState, ProgramStartRequest, StoreCollisionComponentsApi, StoreCollisionSetupsApi, StoreObjectApi, SystemApi, TrajectoryCachingApi, TrajectoryExecutionApi, TrajectoryPlanningApi, VirtualControllerApi, VirtualControllerBehaviorApi, VirtualControllerInputsOutputsApi } from "@wandelbots/nova-api/v2";
|
|
4
4
|
export * from "@wandelbots/nova-api/v2";
|
|
5
5
|
|
|
6
|
+
//#region src/lib/v2/ProgramsClient.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Enhanced client for the Programs API providing intuitive program management
|
|
9
|
+
*/
|
|
10
|
+
declare class ProgramsClient {
|
|
11
|
+
private client;
|
|
12
|
+
constructor(client: NovaCellAPIClient);
|
|
13
|
+
/**
|
|
14
|
+
* Get the underlying programs API for direct access
|
|
15
|
+
*/
|
|
16
|
+
get api(): WithCellId<ProgramApi>;
|
|
17
|
+
/**
|
|
18
|
+
* List all programs available in the cell
|
|
19
|
+
*/
|
|
20
|
+
list(): Promise<Program[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Get details of a specific program
|
|
23
|
+
*/
|
|
24
|
+
get(programId: string): Promise<Program>;
|
|
25
|
+
/**
|
|
26
|
+
* Start a program with the given arguments
|
|
27
|
+
*/
|
|
28
|
+
start(programId: string, args?: object): Promise<ProgramRun>;
|
|
29
|
+
/**
|
|
30
|
+
* Stop a running program
|
|
31
|
+
*/
|
|
32
|
+
stop(programId: string): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Execute a program and wait for it to complete
|
|
35
|
+
*
|
|
36
|
+
* Note: This method has limitations due to current API constraints.
|
|
37
|
+
* Real-time program state tracking will be available via NATS messaging
|
|
38
|
+
* in future versions. For now, this provides basic start functionality.
|
|
39
|
+
*
|
|
40
|
+
* @param programId - The program identifier
|
|
41
|
+
* @param args - Arguments to pass to the program
|
|
42
|
+
* @param options - Basic execution options
|
|
43
|
+
*/
|
|
44
|
+
execute(programId: string, args?: object, options?: {
|
|
45
|
+
onStart?: (run: ProgramRun) => void;
|
|
46
|
+
}): Promise<ProgramRun>;
|
|
47
|
+
/**
|
|
48
|
+
* Create a program runner helper for a specific program
|
|
49
|
+
*/
|
|
50
|
+
forProgram(programId: string): ProgramRunner;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Helper class for managing a specific program
|
|
54
|
+
*/
|
|
55
|
+
declare class ProgramRunner {
|
|
56
|
+
private programs;
|
|
57
|
+
private programId;
|
|
58
|
+
constructor(programs: ProgramsClient, programId: string);
|
|
59
|
+
/**
|
|
60
|
+
* Get program details
|
|
61
|
+
*/
|
|
62
|
+
getDetails(): Promise<Program>;
|
|
63
|
+
/**
|
|
64
|
+
* Start this program
|
|
65
|
+
*/
|
|
66
|
+
start(args?: object): Promise<ProgramRun>;
|
|
67
|
+
/**
|
|
68
|
+
* Stop this program
|
|
69
|
+
*/
|
|
70
|
+
stop(): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Execute this program (start and get initial run information)
|
|
73
|
+
*
|
|
74
|
+
* Note: This method has limitations due to current API constraints.
|
|
75
|
+
* Real-time program state tracking will be available via NATS messaging
|
|
76
|
+
* in future versions.
|
|
77
|
+
*/
|
|
78
|
+
execute(args?: object, options?: {
|
|
79
|
+
onStart?: (run: ProgramRun) => void;
|
|
80
|
+
}): Promise<ProgramRun>;
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
6
83
|
//#region src/lib/v2/NovaCellAPIClient.d.ts
|
|
7
84
|
type OmitFirstArg<F> = F extends ((x: any, ...args: infer P) => infer R) ? (...args: P) => R : never;
|
|
8
85
|
type UnwrapAxiosResponseReturn<T> = T extends ((...a: any) => any) ? (...a: Parameters<T>) => Promise<Awaited<ReturnType<T>> extends {
|
|
@@ -43,6 +120,7 @@ declare class NovaCellAPIClient {
|
|
|
43
120
|
readonly trajectoryPlanning: WithCellId<TrajectoryPlanningApi>;
|
|
44
121
|
readonly trajectoryExecution: WithCellId<TrajectoryExecutionApi>;
|
|
45
122
|
readonly trajectoryCaching: WithCellId<TrajectoryCachingApi>;
|
|
123
|
+
readonly programs: WithCellId<ProgramApi>;
|
|
46
124
|
readonly application: WithCellId<ApplicationApi>;
|
|
47
125
|
readonly applicationGlobal: WithUnwrappedAxiosResponse<ApplicationApi>;
|
|
48
126
|
readonly jogging: WithCellId<JoggingApi>;
|
|
@@ -54,6 +132,8 @@ declare class NovaCellAPIClient {
|
|
|
54
132
|
readonly storeObject: WithCellId<StoreObjectApi>;
|
|
55
133
|
readonly storeCollisionComponents: WithCellId<StoreCollisionComponentsApi>;
|
|
56
134
|
readonly storeCollisionSetups: WithCellId<StoreCollisionSetupsApi>;
|
|
135
|
+
private _programsClient?;
|
|
136
|
+
get programsClient(): ProgramsClient;
|
|
57
137
|
}
|
|
58
138
|
//#endregion
|
|
59
139
|
//#region src/lib/v2/NovaClient.d.ts
|
|
@@ -114,5 +194,5 @@ declare class NovaClient {
|
|
|
114
194
|
*/
|
|
115
195
|
declare function poseToWandelscriptString(pose: Pick<Pose, "position" | "orientation">): string;
|
|
116
196
|
//#endregion
|
|
117
|
-
export { NovaCellAPIClient, NovaClient, NovaClientConfig, WithCellId, WithUnwrappedAxiosResponse, poseToWandelscriptString };
|
|
197
|
+
export { NovaCellAPIClient, NovaClient, NovaClientConfig, type Program, type ProgramRun, type ProgramRunState, ProgramRunner, type ProgramStartRequest, ProgramsClient, WithCellId, WithUnwrappedAxiosResponse, poseToWandelscriptString };
|
|
118
198
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/lib/v2/NovaCellAPIClient.ts","../../../src/lib/v2/NovaClient.ts","../../../src/lib/v2/wandelscriptUtils.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/lib/v2/ProgramsClient.ts","../../../src/lib/v2/NovaCellAPIClient.ts","../../../src/lib/v2/NovaClient.ts","../../../src/lib/v2/wandelscriptUtils.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAYa,cAAA;;EAAA,WAAA,CAAA,MAAc,EACG,iBADH;EACG;;;EAYN,IAAA,GAAA,CAAA,CAAA,EAPX,UAOW,CAPA,UAOA,CAAA;EAAR;;;EAiBH,IAAA,CAAA,CAAA,EAjBG,OAiBH,CAjBW,OAiBX,EAAA,CAAA;EAAR;;;EA+BQ,GAAA,CAAA,SAAA,EAAA,MAAA,CAAA,EAzCmB,OAyCnB,CAzC2B,OAyC3B,CAAA;EAAR;;;EA0BQ,KAAA,CAAA,SAAA,EAAa,MAAA,EAAA,IAAA,CAAA,EAAA,MAAA,CAAA,EAzDrB,OAyDqB,CAzDb,UAyDa,CAAA;EAEJ;;;EAcoB,IAAA,CAAA,SAAA,EAAA,MAAA,CAAA,EA/DT,OA+DS,CAAA,IAAA,CAAA;EAAR;;;;;;;;;ACrFkB;;EAGtC,OAAA,CAAA,SAAA,EAAA,MAAA,EAAA,IAAA,CAAA,EAAA,MAAA,EAAA,OAAO,CAAP,EAAA;IAAM,OAAA,CAAA,EAAA,CAAA,GAAA,EDsCE,UCtCF,EAAA,GAAA,IAAA;EAAC,CAAA,CAAA,EDwChB,OCxCgB,CDwCR,UCxCQ,CAAA;EAGhB;;;EAEO,UAAA,CAAA,SAAA,EAAA,MAAA,CAAA,EDqDqB,aCrDrB;;;;;AACH,cD4DI,aAAA,CC5DJ;EAAO,QAAA,QAAA;EAGJ,QAAA,SAAU;EACR,WAAA,CAAA,QAAA,ED0DQ,cC1DR,EAAA,SAAA,EAAA,MAAA;EAA2C;;;EAAvC,UAAA,CAAA,CAAA,EDiEI,OCjEJ,CDiEY,OCjEZ,CAAA;EAAyB;AAG3C;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