@wandelbots/nova-js 3.11.1 → 3.11.2-pr.303.fc42d9a
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/v2/index.cjs +17 -8
- package/dist/v2/index.cjs.map +1 -1
- package/dist/v2/index.d.cts.map +1 -1
- package/dist/v2/index.d.mts.map +1 -1
- package/dist/v2/index.mjs +17 -8
- package/dist/v2/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/Nova.ts +19 -9
package/dist/v2/index.cjs
CHANGED
|
@@ -953,14 +953,23 @@ var Nova = class {
|
|
|
953
953
|
} catch (err) {
|
|
954
954
|
return Promise.reject(err);
|
|
955
955
|
}
|
|
956
|
-
else if (error.response?.status === 403 && !error.config?.url?.split(/[?#]/)[0]?.endsWith("/session"))
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
956
|
+
else if (error.response?.status === 403 && !error.config?.url?.split(/[?#]/)[0]?.endsWith("/session")) {
|
|
957
|
+
let redirectToAccessDenied = false;
|
|
958
|
+
try {
|
|
959
|
+
const session = await this.api.session.getSession();
|
|
960
|
+
if (session.session_id !== "default" && session.capabilities.length === 0) redirectToAccessDenied = true;
|
|
961
|
+
} catch (sessionError) {
|
|
962
|
+
if ((0, axios.isAxiosError)(sessionError) && sessionError.response?.status === 403) redirectToAccessDenied = true;
|
|
963
|
+
}
|
|
964
|
+
if (redirectToAccessDenied) {
|
|
965
|
+
window.location.href = this.instanceUrl.href;
|
|
966
|
+
return new Promise(() => {});
|
|
967
|
+
}
|
|
968
|
+
} else if (error.response?.status === 503) {
|
|
969
|
+
if ((await fetch(window.location.href)).status === 503) {
|
|
970
|
+
window.location.reload();
|
|
971
|
+
return new Promise(() => {});
|
|
972
|
+
}
|
|
964
973
|
}
|
|
965
974
|
}
|
|
966
975
|
return Promise.reject(error);
|
package/dist/v2/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["SystemApi","CellApi","MotionGroupApi","MotionGroupModelsApi","ControllerApi","ControllerInputsOutputsApi","TrajectoryPlanningApi","TrajectoryExecutionApi","TrajectoryCachingApi","ApplicationApi","JoggingApi","KinematicsApi","BUSInputsOutputsApi","VirtualControllerApi","VirtualControllerBehaviorApi","VirtualControllerInputsOutputsApi","StoreObjectApi","StoreCollisionComponentsApi","StoreCollisionSetupsApi","ProgramApi","LicenseApi","NOVACloudApi","RobotConfigurationsApi","VersionApi","SessionApi","pathToRegexp","AxiosError","availableStorage","parseNovaInstanceUrl","isLocalhostDev","loginWithAuth0","AutoReconnectingWebsocket","ApplicationApi","BUSInputsOutputsApi","CellApi","ControllerApi","ControllerInputsOutputsApi","JoggingApi","KinematicsApi","LicenseApi","MotionGroupApi","MotionGroupModelsApi","NOVACloudApi","ProgramApi","RobotConfigurationsApi","SessionApi","StoreCollisionComponentsApi","StoreCollisionSetupsApi","StoreObjectApi","SystemApi","TrajectoryCachingApi","TrajectoryExecutionApi","TrajectoryPlanningApi","VersionApi","VirtualControllerApi","VirtualControllerBehaviorApi","VirtualControllerInputsOutputsApi","availableStorage","parseNovaInstanceUrl","isLocalhostDev","loginWithAuth0","AutoReconnectingWebsocket"],"sources":["../../src/lib/deprecated/v2/NovaCellAPIClient.ts","../../src/lib/mock/getCurrentRobotControllerState.ts","../../src/lib/mock/getMotionGroupDescription.ts","../../src/lib/mock/getMotionGroupKinematicModel.ts","../../src/lib/mock/getRobotController.ts","../../src/lib/mock/listCoordinateSystems.ts","../../src/lib/mock/listRobotControllers.ts","../../src/lib/mock/MockNovaInstance.ts","../../src/lib/deprecated/v2/NovaClient.ts","../../src/lib/deprecated/v2/wandelscriptUtils.ts","../../src/lib/NovaAPIClient.ts","../../src/lib/Nova.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 LicenseApi,\n MotionGroupApi,\n MotionGroupModelsApi,\n NOVACloudApi,\n ProgramApi,\n RobotConfigurationsApi,\n SessionApi,\n StoreCollisionComponentsApi,\n StoreCollisionSetupsApi,\n StoreObjectApi,\n SystemApi,\n TrajectoryCachingApi,\n TrajectoryExecutionApi,\n TrajectoryPlanningApi,\n VersionApi,\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\n/** @deprecated Use `NovaAPIClient` instead. */\nexport type WithCellId<T> = {\n [P in keyof T]: UnwrapAxiosResponseReturn<OmitFirstArg<T[P]>>\n}\n\n/** @deprecated Use `NovaAPIClient` instead. */\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 * @deprecated Use `NovaAPIClient` from `@wandelbots/nova-js/v2` instead.\n */\nexport class NovaCellAPIClient {\n readonly system: WithUnwrappedAxiosResponse<SystemApi>\n readonly cell: WithUnwrappedAxiosResponse<CellApi>\n readonly motionGroup: WithCellId<MotionGroupApi>\n readonly motionGroupModels: WithUnwrappedAxiosResponse<MotionGroupModelsApi>\n readonly controller: WithCellId<ControllerApi>\n readonly controllerIOs: WithCellId<ControllerInputsOutputsApi>\n readonly trajectoryPlanning: WithCellId<TrajectoryPlanningApi>\n readonly trajectoryExecution: WithCellId<TrajectoryExecutionApi>\n readonly trajectoryCaching: WithCellId<TrajectoryCachingApi>\n readonly application: WithCellId<ApplicationApi>\n readonly applicationGlobal: WithUnwrappedAxiosResponse<ApplicationApi>\n readonly jogging: WithCellId<JoggingApi>\n readonly kinematics: WithCellId<KinematicsApi>\n readonly busInputsOutputs: WithCellId<BUSInputsOutputsApi>\n readonly virtualController: WithCellId<VirtualControllerApi>\n readonly virtualControllerBehavior: WithCellId<VirtualControllerBehaviorApi>\n readonly virtualControllerIOs: WithCellId<VirtualControllerInputsOutputsApi>\n readonly storeObject: WithCellId<StoreObjectApi>\n readonly storeCollisionComponents: WithCellId<StoreCollisionComponentsApi>\n readonly storeCollisionSetups: WithCellId<StoreCollisionSetupsApi>\n readonly program: WithCellId<ProgramApi>\n readonly license: WithUnwrappedAxiosResponse<LicenseApi>\n readonly novaCloud: WithUnwrappedAxiosResponse<NOVACloudApi>\n readonly robotConfigurations: WithUnwrappedAxiosResponse<RobotConfigurationsApi>\n readonly version: WithUnwrappedAxiosResponse<VersionApi>\n readonly session: WithUnwrappedAxiosResponse<SessionApi>\n\n readonly cellId: string\n readonly opts: BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n }\n\n constructor(\n cellId: string,\n opts: BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n },\n ) {\n this.cellId = cellId\n this.opts = opts\n this.system = this.withUnwrappedResponsesOnly(SystemApi)\n this.cell = this.withUnwrappedResponsesOnly(CellApi)\n this.motionGroup = this.withCellId(MotionGroupApi)\n this.motionGroupModels =\n this.withUnwrappedResponsesOnly(MotionGroupModelsApi)\n this.controller = this.withCellId(ControllerApi)\n this.controllerIOs = this.withCellId(ControllerInputsOutputsApi)\n this.trajectoryPlanning = this.withCellId(TrajectoryPlanningApi)\n this.trajectoryExecution = this.withCellId(TrajectoryExecutionApi)\n this.trajectoryCaching = this.withCellId(TrajectoryCachingApi)\n this.application = this.withCellId(ApplicationApi)\n this.applicationGlobal = this.withUnwrappedResponsesOnly(ApplicationApi)\n this.jogging = this.withCellId(JoggingApi)\n this.kinematics = this.withCellId(KinematicsApi)\n this.busInputsOutputs = this.withCellId(BUSInputsOutputsApi)\n this.virtualController = this.withCellId(VirtualControllerApi)\n this.virtualControllerBehavior = this.withCellId(\n VirtualControllerBehaviorApi,\n )\n this.virtualControllerIOs = this.withCellId(\n VirtualControllerInputsOutputsApi,\n )\n this.storeObject = this.withCellId(StoreObjectApi)\n this.storeCollisionComponents = this.withCellId(StoreCollisionComponentsApi)\n this.storeCollisionSetups = this.withCellId(StoreCollisionSetupsApi)\n this.program = this.withCellId(ProgramApi)\n this.license = this.withUnwrappedResponsesOnly(LicenseApi)\n this.novaCloud = this.withUnwrappedResponsesOnly(NOVACloudApi)\n this.robotConfigurations = this.withUnwrappedResponsesOnly(\n RobotConfigurationsApi,\n )\n this.version = this.withUnwrappedResponsesOnly(VersionApi)\n this.session = this.withUnwrappedResponsesOnly(SessionApi)\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","export const getCurrentRobotControllerState = {\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","export const getMotionGroupDescription = {\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","export const getMotionGroupKinematicModel = {\n method: \"GET\",\n path: \"/motion-group-models/:motionGroupModel/kinematic\",\n handle() {\n return {\n dh_parameters: [\n {\n alpha: 1.5707963267948966,\n theta: 0.0,\n a: 0.0,\n d: 162.25,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0.0,\n theta: 0.0,\n a: -425.0,\n d: 0.0,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0.0,\n theta: 0.0,\n a: -392.2,\n d: 0.0,\n reverse_rotation_direction: false,\n },\n {\n alpha: 1.5707963267948966,\n theta: 0.0,\n a: 0.0,\n d: 133.3,\n reverse_rotation_direction: false,\n },\n {\n alpha: -1.5707963267948966,\n theta: 0.0,\n a: 0.0,\n d: 99.7,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0.0,\n theta: 0.0,\n a: 0.0,\n d: 99.6,\n reverse_rotation_direction: false,\n },\n ],\n inverse_solver: \"Universalrobots\",\n }\n },\n}\n","import type { RobotController } from \"@wandelbots/nova-api/v2\"\n\nexport const getRobotController = {\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","export const listCoordinateSystems = {\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 ]\n },\n}\n","export const listRobotControllers = {\n method: \"GET\",\n path: \"/cells/:cellId/controllers\",\n handle() {\n return [\"mock-ur5e\"]\n },\n}\n","import type { MotionGroupState } 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.ts\"\nimport { getCurrentRobotControllerState } from \"./getCurrentRobotControllerState.ts\"\nimport { getMotionGroupDescription } from \"./getMotionGroupDescription.ts\"\nimport { getMotionGroupKinematicModel } from \"./getMotionGroupKinematicModel.ts\"\nimport { getRobotController } from \"./getRobotController.ts\"\nimport { listCoordinateSystems } from \"./listCoordinateSystems.ts\"\nimport { listRobotControllers } from \"./listRobotControllers.ts\"\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 listRobotControllers,\n getRobotController,\n getMotionGroupDescription,\n getCurrentRobotControllerState,\n listCoordinateSystems,\n getMotionGroupKinematicModel,\n ]\n\n const method = config.method?.toUpperCase() || \"GET\"\n if (!config.url) {\n throw new Error(\"No url sent with request\")\n }\n const path = config.url.split(\"?\")[0] ?? config.url\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\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 description_revision: 0,\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 { AutoReconnectingWebsocket } from \"../../AutoReconnectingWebsocket.ts\"\nimport { availableStorage } from \"../../availableStorage.ts\"\nimport { parseNovaInstanceUrl } from \"../../converters.ts\"\nimport { loginWithAuth0 } from \"../../LoginWithAuth0.ts\"\n\nimport { isLocalhostDev } from \"../../context.ts\"\nimport { MockNovaInstance } from \"../../mock/MockNovaInstance.ts\"\nimport { NovaCellAPIClient } from \"./NovaCellAPIClient.ts\"\n\n/** @deprecated Use `NovaClientConfig` from `Nova` instead. */\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\n/**\n * Client for connecting to a Nova instance and controlling robots.\n * @deprecated Use `Nova` from `@wandelbots/nova-js/v2` instead.\n */\nexport class NovaClient {\n readonly api: NovaCellAPIClient\n readonly config: NovaClientConfigWithDefaults\n readonly mock?: MockNovaInstance\n readonly instanceUrl: URL\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 }\n this.instanceUrl = parseNovaInstanceUrl(this.config.instanceUrl)\n\n // Set up Axios instance with interceptor for token fetching\n const axiosInstance = axios.create({\n baseURL: new URL(\"/api/v2\", this.instanceUrl).href,\n // TODO - backend needs to set proper CORS headers for this\n headers: isLocalhostDev\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: new URL(\"/api/v2\", this.instanceUrl).href,\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 const storedToken = availableStorage.getString(\"wbjs.access_token\")\n if (storedToken && this.accessToken !== storedToken) {\n // Might be newer than the one we have\n this.accessToken = storedToken\n return\n }\n\n // Otherwise, perform login flow\n this.authPromise = loginWithAuth0(this.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 new URL(\n `/api/v2/cells/${this.config.cellId}/${path.replace(/^\\/+/, \"\")}`,\n this.instanceUrl,\n ).href,\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 * @deprecated Wandelscript usage is deprecated; switching to Python is recommended.\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","import 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 LicenseApi,\n MotionGroupApi,\n MotionGroupModelsApi,\n NOVACloudApi,\n ProgramApi,\n RobotConfigurationsApi,\n SessionApi,\n StoreCollisionComponentsApi,\n StoreCollisionSetupsApi,\n StoreObjectApi,\n SystemApi,\n TrajectoryCachingApi,\n TrajectoryExecutionApi,\n TrajectoryPlanningApi,\n VersionApi,\n VirtualControllerApi,\n VirtualControllerBehaviorApi,\n VirtualControllerInputsOutputsApi,\n} from \"@wandelbots/nova-api/v2\"\nimport type { AxiosInstance } from \"axios\"\nimport axios from \"axios\"\n\n// biome-ignore lint/suspicious/noExplicitAny: metamagic\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\ntype WithUnwrappedAxiosResponse<T> = {\n [P in keyof T]: UnwrapAxiosResponseReturn<T[P]>\n}\n\ntype NovaAPIClientOpts = BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n}\n\nfunction unwrap<T extends BaseAPI>(\n ApiConstructor: new (\n config: BaseConfiguration,\n basePath: string,\n axios: AxiosInstance,\n ) => T,\n opts: NovaAPIClientOpts,\n): WithUnwrappedAxiosResponse<T> {\n const apiClient = new ApiConstructor(\n {\n ...opts,\n isJsonMime: (mime: string) => mime === \"application/json\",\n },\n opts.basePath ?? \"\",\n opts.axiosInstance ?? axios.create(),\n ) as Record<string | symbol, unknown>\n\n for (const key of Reflect.ownKeys(\n Reflect.getPrototypeOf(apiClient) as object,\n )) {\n if (key !== \"constructor\" && typeof apiClient[key] === \"function\") {\n const originalFunction = apiClient[key] as (\n ...args: unknown[]\n ) => Promise<{ data: unknown }>\n apiClient[key] = (...args: unknown[]) =>\n originalFunction.apply(apiClient, args).then((res) => res.data)\n }\n }\n\n return apiClient as WithUnwrappedAxiosResponse<T>\n}\n\n/**\n * API client providing type-safe access to all the endpoints of a NOVA\n * instance.\n */\nexport class NovaAPIClient {\n readonly opts: NovaAPIClientOpts\n\n readonly application: WithUnwrappedAxiosResponse<ApplicationApi>\n readonly busIOs: WithUnwrappedAxiosResponse<BUSInputsOutputsApi>\n readonly cell: WithUnwrappedAxiosResponse<CellApi>\n readonly controller: WithUnwrappedAxiosResponse<ControllerApi>\n readonly controllerIOs: WithUnwrappedAxiosResponse<ControllerInputsOutputsApi>\n readonly jogging: WithUnwrappedAxiosResponse<JoggingApi>\n readonly kinematics: WithUnwrappedAxiosResponse<KinematicsApi>\n readonly license: WithUnwrappedAxiosResponse<LicenseApi>\n readonly motionGroup: WithUnwrappedAxiosResponse<MotionGroupApi>\n readonly motionGroupModels: WithUnwrappedAxiosResponse<MotionGroupModelsApi>\n readonly novaCloud: WithUnwrappedAxiosResponse<NOVACloudApi>\n readonly program: WithUnwrappedAxiosResponse<ProgramApi>\n readonly robotConfigurations: WithUnwrappedAxiosResponse<RobotConfigurationsApi>\n readonly session: WithUnwrappedAxiosResponse<SessionApi>\n readonly storeCollisionComponents: WithUnwrappedAxiosResponse<StoreCollisionComponentsApi>\n readonly storeCollisionSetups: WithUnwrappedAxiosResponse<StoreCollisionSetupsApi>\n readonly storeObject: WithUnwrappedAxiosResponse<StoreObjectApi>\n readonly system: WithUnwrappedAxiosResponse<SystemApi>\n readonly trajectoryCaching: WithUnwrappedAxiosResponse<TrajectoryCachingApi>\n readonly trajectoryExecution: WithUnwrappedAxiosResponse<TrajectoryExecutionApi>\n readonly trajectoryPlanning: WithUnwrappedAxiosResponse<TrajectoryPlanningApi>\n readonly version: WithUnwrappedAxiosResponse<VersionApi>\n readonly virtualController: WithUnwrappedAxiosResponse<VirtualControllerApi>\n readonly virtualControllerBehavior: WithUnwrappedAxiosResponse<VirtualControllerBehaviorApi>\n readonly virtualControllerIOs: WithUnwrappedAxiosResponse<VirtualControllerInputsOutputsApi>\n\n constructor(opts: NovaAPIClientOpts) {\n this.opts = opts\n\n this.application = unwrap(ApplicationApi, opts)\n this.busIOs = unwrap(BUSInputsOutputsApi, opts)\n this.cell = unwrap(CellApi, opts)\n this.controller = unwrap(ControllerApi, opts)\n this.controllerIOs = unwrap(ControllerInputsOutputsApi, opts)\n this.jogging = unwrap(JoggingApi, opts)\n this.kinematics = unwrap(KinematicsApi, opts)\n this.license = unwrap(LicenseApi, opts)\n this.motionGroup = unwrap(MotionGroupApi, opts)\n this.motionGroupModels = unwrap(MotionGroupModelsApi, opts)\n this.novaCloud = unwrap(NOVACloudApi, opts)\n this.program = unwrap(ProgramApi, opts)\n this.robotConfigurations = unwrap(RobotConfigurationsApi, opts)\n this.session = unwrap(SessionApi, opts)\n this.storeCollisionComponents = unwrap(StoreCollisionComponentsApi, opts)\n this.storeCollisionSetups = unwrap(StoreCollisionSetupsApi, opts)\n this.storeObject = unwrap(StoreObjectApi, opts)\n this.system = unwrap(SystemApi, opts)\n this.trajectoryCaching = unwrap(TrajectoryCachingApi, opts)\n this.trajectoryExecution = unwrap(TrajectoryExecutionApi, opts)\n this.trajectoryPlanning = unwrap(TrajectoryPlanningApi, opts)\n this.version = unwrap(VersionApi, opts)\n this.virtualController = unwrap(VirtualControllerApi, opts)\n this.virtualControllerBehavior = unwrap(VirtualControllerBehaviorApi, opts)\n this.virtualControllerIOs = unwrap(VirtualControllerInputsOutputsApi, opts)\n }\n}\n","import type { Configuration as BaseConfiguration } from \"@wandelbots/nova-api/v2\"\nimport type { AxiosRequestConfig } from \"axios\"\nimport axios, { isAxiosError } from \"axios\"\nimport { AutoReconnectingWebsocket } from \"./AutoReconnectingWebsocket.ts\"\nimport { availableStorage } from \"./availableStorage.ts\"\nimport { isLocalhostDev } from \"./context.ts\"\nimport { parseNovaInstanceUrl } from \"./converters.ts\"\nimport { loginWithAuth0 } from \"./LoginWithAuth0.ts\"\nimport { MockNovaInstance } from \"./mock/MockNovaInstance.ts\"\nimport { NovaAPIClient } from \"./NovaAPIClient.ts\"\n\nexport type NovaConfig = {\n /**\n * Url of the deployed NOVA instance to connect to\n * e.g. https://saeattii.instance.wandelbots.io\n */\n instanceUrl: string\n\n /**\n * Access token for Bearer authentication.\n * If running on a NOVA instance, this can be automatically retrieved from\n * the current session when omitted.\n */\n accessToken?: string\n} & Omit<BaseConfiguration, \"isJsonMime\" | \"basePath\">\n\n/**\n *\n * Client for connecting to a NOVA instance and controlling robots.\n */\nexport class Nova {\n readonly api: NovaAPIClient\n readonly config: NovaConfig\n readonly mock?: MockNovaInstance\n readonly instanceUrl: URL\n authPromise: Promise<string | null> | null = null\n accessToken: string | null = null\n\n constructor(config: NovaConfig) {\n this.config = config\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 }\n this.instanceUrl = parseNovaInstanceUrl(this.config.instanceUrl)\n\n // Set up Axios instance with interceptor for token fetching\n const axiosInstance = axios.create({\n baseURL: new URL(\"/api/v2\", this.instanceUrl).href,\n // TODO - backend needs to set proper CORS headers for this\n headers: isLocalhostDev\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 }\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 (\n error.response?.status === 403 &&\n !error.config?.url?.split(/[?#]/)[0]?.endsWith(\"/session\")\n ) {\n // If we hit a 403, the user is authenticated but may lack access\n // to the instance entirely. Check the session to find out.\n try {\n const session = await this.api.session.getSession()\n if (\n session.session_id !== \"default\" &&\n session.capabilities.length === 0\n ) {\n // An authenticated user with no capabilities has no access;\n // send them to the instance url, which renders the access\n // denied screen.\n window.location.href = this.instanceUrl.href\n }\n } catch (sessionError) {\n // The session endpoint itself returns a 403 when the user is\n // not assigned to a cell at all, which is equivalent to an\n // authenticated user with non-default empty capabilities ->\n // send them to the access denied screen.\n if (\n isAxiosError(sessionError) &&\n sessionError.response?.status === 403\n ) {\n window.location.href = this.instanceUrl.href\n }\n // Otherwise couldn't determine access; fall through to bubble\n // the original 403 error below.\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 NovaAPIClient({\n ...config,\n basePath: new URL(\"/api/v2\", this.instanceUrl).href,\n isJsonMime: (mime: string) => {\n return mime === \"application/json\"\n },\n baseOptions: {\n ...(this.mock\n ? ({\n adapter: (config) => {\n if (!this.mock) {\n throw new Error(\"Mock adapter used without a mock instance\")\n }\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 const storedToken = availableStorage.getString(\"wbjs.access_token\")\n if (storedToken && this.accessToken !== storedToken) {\n // Might be newer than the one we have\n this.accessToken = storedToken\n return\n }\n\n // Otherwise, perform login flow\n this.authPromise = loginWithAuth0(this.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(`/api/v2/${path.replace(/^\\/+/, \"\")}`, this.instanceUrl)\n url.protocol = url.protocol.replace(\"http\", \"ws\")\n url.protocol = url.protocol.replace(\"https\", \"wss\")\n\n if (this.accessToken) {\n url.searchParams.append(\"token\", this.accessToken)\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"],"mappings":";;;;;;;;;;;;;AA6DA,IAAa,oBAAb,MAA+B;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAKA,YACE,QACA,MAIA;EACA,KAAK,SAAS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AU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;KACA,OAAO,EACL,UAAU,IACZ;KACA,QAAQ,EACN,UAAU,IACZ;IACF;IACA,eAAe;KACb,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;IACF;IACA,kBAAkB;KAChB,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;IACF;IACA,kBAAkB;KAChB,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;IACF;GACF;GACA,eAAe;EACjB;CACF;AACF;;;AClTA,MAAa,+BAA+B;CAC1C,QAAQ;CACR,MAAM;CACN,SAAS;EACP,OAAO;GACL,eAAe;IACb;KACE,OAAO;KACP,OAAO;KACP,GAAG;KACH,GAAG;KACH,4BAA4B;IAC9B;IACA;KACE,OAAO;KACP,OAAO;KACP,GAAG;KACH,GAAG;KACH,4BAA4B;IAC9B;IACA;KACE,OAAO;KACP,OAAO;KACP,GAAG;KACH,GAAG;KACH,4BAA4B;IAC9B;IACA;KACE,OAAO;KACP,OA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,WAAW,IAAI,SAAS,QAAQ,SAAS,KAAK;EAElD,IAAI,KAAK,aACP,IAAI,aAAa,OAAO,SAAS,KAAK,WAAW;EAGnD,OAAO,IAAI,SAAS;CACtB;;;;;;CAOA,0BAA0B,MAAc;EACtC,OAAO,IAAIC,gBAAAA,0BAA0B,KAAK,iBAAiB,IAAI,GAAG,EAChE,MAAM,KAAK,KACb,CAAC;CACH;AACF"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["SystemApi","CellApi","MotionGroupApi","MotionGroupModelsApi","ControllerApi","ControllerInputsOutputsApi","TrajectoryPlanningApi","TrajectoryExecutionApi","TrajectoryCachingApi","ApplicationApi","JoggingApi","KinematicsApi","BUSInputsOutputsApi","VirtualControllerApi","VirtualControllerBehaviorApi","VirtualControllerInputsOutputsApi","StoreObjectApi","StoreCollisionComponentsApi","StoreCollisionSetupsApi","ProgramApi","LicenseApi","NOVACloudApi","RobotConfigurationsApi","VersionApi","SessionApi","pathToRegexp","AxiosError","availableStorage","parseNovaInstanceUrl","isLocalhostDev","loginWithAuth0","AutoReconnectingWebsocket","ApplicationApi","BUSInputsOutputsApi","CellApi","ControllerApi","ControllerInputsOutputsApi","JoggingApi","KinematicsApi","LicenseApi","MotionGroupApi","MotionGroupModelsApi","NOVACloudApi","ProgramApi","RobotConfigurationsApi","SessionApi","StoreCollisionComponentsApi","StoreCollisionSetupsApi","StoreObjectApi","SystemApi","TrajectoryCachingApi","TrajectoryExecutionApi","TrajectoryPlanningApi","VersionApi","VirtualControllerApi","VirtualControllerBehaviorApi","VirtualControllerInputsOutputsApi","availableStorage","parseNovaInstanceUrl","isLocalhostDev","loginWithAuth0","AutoReconnectingWebsocket"],"sources":["../../src/lib/deprecated/v2/NovaCellAPIClient.ts","../../src/lib/mock/getCurrentRobotControllerState.ts","../../src/lib/mock/getMotionGroupDescription.ts","../../src/lib/mock/getMotionGroupKinematicModel.ts","../../src/lib/mock/getRobotController.ts","../../src/lib/mock/listCoordinateSystems.ts","../../src/lib/mock/listRobotControllers.ts","../../src/lib/mock/MockNovaInstance.ts","../../src/lib/deprecated/v2/NovaClient.ts","../../src/lib/deprecated/v2/wandelscriptUtils.ts","../../src/lib/NovaAPIClient.ts","../../src/lib/Nova.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 LicenseApi,\n MotionGroupApi,\n MotionGroupModelsApi,\n NOVACloudApi,\n ProgramApi,\n RobotConfigurationsApi,\n SessionApi,\n StoreCollisionComponentsApi,\n StoreCollisionSetupsApi,\n StoreObjectApi,\n SystemApi,\n TrajectoryCachingApi,\n TrajectoryExecutionApi,\n TrajectoryPlanningApi,\n VersionApi,\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\n/** @deprecated Use `NovaAPIClient` instead. */\nexport type WithCellId<T> = {\n [P in keyof T]: UnwrapAxiosResponseReturn<OmitFirstArg<T[P]>>\n}\n\n/** @deprecated Use `NovaAPIClient` instead. */\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 * @deprecated Use `NovaAPIClient` from `@wandelbots/nova-js/v2` instead.\n */\nexport class NovaCellAPIClient {\n readonly system: WithUnwrappedAxiosResponse<SystemApi>\n readonly cell: WithUnwrappedAxiosResponse<CellApi>\n readonly motionGroup: WithCellId<MotionGroupApi>\n readonly motionGroupModels: WithUnwrappedAxiosResponse<MotionGroupModelsApi>\n readonly controller: WithCellId<ControllerApi>\n readonly controllerIOs: WithCellId<ControllerInputsOutputsApi>\n readonly trajectoryPlanning: WithCellId<TrajectoryPlanningApi>\n readonly trajectoryExecution: WithCellId<TrajectoryExecutionApi>\n readonly trajectoryCaching: WithCellId<TrajectoryCachingApi>\n readonly application: WithCellId<ApplicationApi>\n readonly applicationGlobal: WithUnwrappedAxiosResponse<ApplicationApi>\n readonly jogging: WithCellId<JoggingApi>\n readonly kinematics: WithCellId<KinematicsApi>\n readonly busInputsOutputs: WithCellId<BUSInputsOutputsApi>\n readonly virtualController: WithCellId<VirtualControllerApi>\n readonly virtualControllerBehavior: WithCellId<VirtualControllerBehaviorApi>\n readonly virtualControllerIOs: WithCellId<VirtualControllerInputsOutputsApi>\n readonly storeObject: WithCellId<StoreObjectApi>\n readonly storeCollisionComponents: WithCellId<StoreCollisionComponentsApi>\n readonly storeCollisionSetups: WithCellId<StoreCollisionSetupsApi>\n readonly program: WithCellId<ProgramApi>\n readonly license: WithUnwrappedAxiosResponse<LicenseApi>\n readonly novaCloud: WithUnwrappedAxiosResponse<NOVACloudApi>\n readonly robotConfigurations: WithUnwrappedAxiosResponse<RobotConfigurationsApi>\n readonly version: WithUnwrappedAxiosResponse<VersionApi>\n readonly session: WithUnwrappedAxiosResponse<SessionApi>\n\n readonly cellId: string\n readonly opts: BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n }\n\n constructor(\n cellId: string,\n opts: BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n },\n ) {\n this.cellId = cellId\n this.opts = opts\n this.system = this.withUnwrappedResponsesOnly(SystemApi)\n this.cell = this.withUnwrappedResponsesOnly(CellApi)\n this.motionGroup = this.withCellId(MotionGroupApi)\n this.motionGroupModels =\n this.withUnwrappedResponsesOnly(MotionGroupModelsApi)\n this.controller = this.withCellId(ControllerApi)\n this.controllerIOs = this.withCellId(ControllerInputsOutputsApi)\n this.trajectoryPlanning = this.withCellId(TrajectoryPlanningApi)\n this.trajectoryExecution = this.withCellId(TrajectoryExecutionApi)\n this.trajectoryCaching = this.withCellId(TrajectoryCachingApi)\n this.application = this.withCellId(ApplicationApi)\n this.applicationGlobal = this.withUnwrappedResponsesOnly(ApplicationApi)\n this.jogging = this.withCellId(JoggingApi)\n this.kinematics = this.withCellId(KinematicsApi)\n this.busInputsOutputs = this.withCellId(BUSInputsOutputsApi)\n this.virtualController = this.withCellId(VirtualControllerApi)\n this.virtualControllerBehavior = this.withCellId(\n VirtualControllerBehaviorApi,\n )\n this.virtualControllerIOs = this.withCellId(\n VirtualControllerInputsOutputsApi,\n )\n this.storeObject = this.withCellId(StoreObjectApi)\n this.storeCollisionComponents = this.withCellId(StoreCollisionComponentsApi)\n this.storeCollisionSetups = this.withCellId(StoreCollisionSetupsApi)\n this.program = this.withCellId(ProgramApi)\n this.license = this.withUnwrappedResponsesOnly(LicenseApi)\n this.novaCloud = this.withUnwrappedResponsesOnly(NOVACloudApi)\n this.robotConfigurations = this.withUnwrappedResponsesOnly(\n RobotConfigurationsApi,\n )\n this.version = this.withUnwrappedResponsesOnly(VersionApi)\n this.session = this.withUnwrappedResponsesOnly(SessionApi)\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","export const getCurrentRobotControllerState = {\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","export const getMotionGroupDescription = {\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","export const getMotionGroupKinematicModel = {\n method: \"GET\",\n path: \"/motion-group-models/:motionGroupModel/kinematic\",\n handle() {\n return {\n dh_parameters: [\n {\n alpha: 1.5707963267948966,\n theta: 0.0,\n a: 0.0,\n d: 162.25,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0.0,\n theta: 0.0,\n a: -425.0,\n d: 0.0,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0.0,\n theta: 0.0,\n a: -392.2,\n d: 0.0,\n reverse_rotation_direction: false,\n },\n {\n alpha: 1.5707963267948966,\n theta: 0.0,\n a: 0.0,\n d: 133.3,\n reverse_rotation_direction: false,\n },\n {\n alpha: -1.5707963267948966,\n theta: 0.0,\n a: 0.0,\n d: 99.7,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0.0,\n theta: 0.0,\n a: 0.0,\n d: 99.6,\n reverse_rotation_direction: false,\n },\n ],\n inverse_solver: \"Universalrobots\",\n }\n },\n}\n","import type { RobotController } from \"@wandelbots/nova-api/v2\"\n\nexport const getRobotController = {\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","export const listCoordinateSystems = {\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 ]\n },\n}\n","export const listRobotControllers = {\n method: \"GET\",\n path: \"/cells/:cellId/controllers\",\n handle() {\n return [\"mock-ur5e\"]\n },\n}\n","import type { MotionGroupState } 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.ts\"\nimport { getCurrentRobotControllerState } from \"./getCurrentRobotControllerState.ts\"\nimport { getMotionGroupDescription } from \"./getMotionGroupDescription.ts\"\nimport { getMotionGroupKinematicModel } from \"./getMotionGroupKinematicModel.ts\"\nimport { getRobotController } from \"./getRobotController.ts\"\nimport { listCoordinateSystems } from \"./listCoordinateSystems.ts\"\nimport { listRobotControllers } from \"./listRobotControllers.ts\"\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 listRobotControllers,\n getRobotController,\n getMotionGroupDescription,\n getCurrentRobotControllerState,\n listCoordinateSystems,\n getMotionGroupKinematicModel,\n ]\n\n const method = config.method?.toUpperCase() || \"GET\"\n if (!config.url) {\n throw new Error(\"No url sent with request\")\n }\n const path = config.url.split(\"?\")[0] ?? config.url\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\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 description_revision: 0,\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 { AutoReconnectingWebsocket } from \"../../AutoReconnectingWebsocket.ts\"\nimport { availableStorage } from \"../../availableStorage.ts\"\nimport { parseNovaInstanceUrl } from \"../../converters.ts\"\nimport { loginWithAuth0 } from \"../../LoginWithAuth0.ts\"\n\nimport { isLocalhostDev } from \"../../context.ts\"\nimport { MockNovaInstance } from \"../../mock/MockNovaInstance.ts\"\nimport { NovaCellAPIClient } from \"./NovaCellAPIClient.ts\"\n\n/** @deprecated Use `NovaClientConfig` from `Nova` instead. */\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\n/**\n * Client for connecting to a Nova instance and controlling robots.\n * @deprecated Use `Nova` from `@wandelbots/nova-js/v2` instead.\n */\nexport class NovaClient {\n readonly api: NovaCellAPIClient\n readonly config: NovaClientConfigWithDefaults\n readonly mock?: MockNovaInstance\n readonly instanceUrl: URL\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 }\n this.instanceUrl = parseNovaInstanceUrl(this.config.instanceUrl)\n\n // Set up Axios instance with interceptor for token fetching\n const axiosInstance = axios.create({\n baseURL: new URL(\"/api/v2\", this.instanceUrl).href,\n // TODO - backend needs to set proper CORS headers for this\n headers: isLocalhostDev\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: new URL(\"/api/v2\", this.instanceUrl).href,\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 const storedToken = availableStorage.getString(\"wbjs.access_token\")\n if (storedToken && this.accessToken !== storedToken) {\n // Might be newer than the one we have\n this.accessToken = storedToken\n return\n }\n\n // Otherwise, perform login flow\n this.authPromise = loginWithAuth0(this.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 new URL(\n `/api/v2/cells/${this.config.cellId}/${path.replace(/^\\/+/, \"\")}`,\n this.instanceUrl,\n ).href,\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 * @deprecated Wandelscript usage is deprecated; switching to Python is recommended.\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","import 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 LicenseApi,\n MotionGroupApi,\n MotionGroupModelsApi,\n NOVACloudApi,\n ProgramApi,\n RobotConfigurationsApi,\n SessionApi,\n StoreCollisionComponentsApi,\n StoreCollisionSetupsApi,\n StoreObjectApi,\n SystemApi,\n TrajectoryCachingApi,\n TrajectoryExecutionApi,\n TrajectoryPlanningApi,\n VersionApi,\n VirtualControllerApi,\n VirtualControllerBehaviorApi,\n VirtualControllerInputsOutputsApi,\n} from \"@wandelbots/nova-api/v2\"\nimport type { AxiosInstance } from \"axios\"\nimport axios from \"axios\"\n\n// biome-ignore lint/suspicious/noExplicitAny: metamagic\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\ntype WithUnwrappedAxiosResponse<T> = {\n [P in keyof T]: UnwrapAxiosResponseReturn<T[P]>\n}\n\ntype NovaAPIClientOpts = BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n}\n\nfunction unwrap<T extends BaseAPI>(\n ApiConstructor: new (\n config: BaseConfiguration,\n basePath: string,\n axios: AxiosInstance,\n ) => T,\n opts: NovaAPIClientOpts,\n): WithUnwrappedAxiosResponse<T> {\n const apiClient = new ApiConstructor(\n {\n ...opts,\n isJsonMime: (mime: string) => mime === \"application/json\",\n },\n opts.basePath ?? \"\",\n opts.axiosInstance ?? axios.create(),\n ) as Record<string | symbol, unknown>\n\n for (const key of Reflect.ownKeys(\n Reflect.getPrototypeOf(apiClient) as object,\n )) {\n if (key !== \"constructor\" && typeof apiClient[key] === \"function\") {\n const originalFunction = apiClient[key] as (\n ...args: unknown[]\n ) => Promise<{ data: unknown }>\n apiClient[key] = (...args: unknown[]) =>\n originalFunction.apply(apiClient, args).then((res) => res.data)\n }\n }\n\n return apiClient as WithUnwrappedAxiosResponse<T>\n}\n\n/**\n * API client providing type-safe access to all the endpoints of a NOVA\n * instance.\n */\nexport class NovaAPIClient {\n readonly opts: NovaAPIClientOpts\n\n readonly application: WithUnwrappedAxiosResponse<ApplicationApi>\n readonly busIOs: WithUnwrappedAxiosResponse<BUSInputsOutputsApi>\n readonly cell: WithUnwrappedAxiosResponse<CellApi>\n readonly controller: WithUnwrappedAxiosResponse<ControllerApi>\n readonly controllerIOs: WithUnwrappedAxiosResponse<ControllerInputsOutputsApi>\n readonly jogging: WithUnwrappedAxiosResponse<JoggingApi>\n readonly kinematics: WithUnwrappedAxiosResponse<KinematicsApi>\n readonly license: WithUnwrappedAxiosResponse<LicenseApi>\n readonly motionGroup: WithUnwrappedAxiosResponse<MotionGroupApi>\n readonly motionGroupModels: WithUnwrappedAxiosResponse<MotionGroupModelsApi>\n readonly novaCloud: WithUnwrappedAxiosResponse<NOVACloudApi>\n readonly program: WithUnwrappedAxiosResponse<ProgramApi>\n readonly robotConfigurations: WithUnwrappedAxiosResponse<RobotConfigurationsApi>\n readonly session: WithUnwrappedAxiosResponse<SessionApi>\n readonly storeCollisionComponents: WithUnwrappedAxiosResponse<StoreCollisionComponentsApi>\n readonly storeCollisionSetups: WithUnwrappedAxiosResponse<StoreCollisionSetupsApi>\n readonly storeObject: WithUnwrappedAxiosResponse<StoreObjectApi>\n readonly system: WithUnwrappedAxiosResponse<SystemApi>\n readonly trajectoryCaching: WithUnwrappedAxiosResponse<TrajectoryCachingApi>\n readonly trajectoryExecution: WithUnwrappedAxiosResponse<TrajectoryExecutionApi>\n readonly trajectoryPlanning: WithUnwrappedAxiosResponse<TrajectoryPlanningApi>\n readonly version: WithUnwrappedAxiosResponse<VersionApi>\n readonly virtualController: WithUnwrappedAxiosResponse<VirtualControllerApi>\n readonly virtualControllerBehavior: WithUnwrappedAxiosResponse<VirtualControllerBehaviorApi>\n readonly virtualControllerIOs: WithUnwrappedAxiosResponse<VirtualControllerInputsOutputsApi>\n\n constructor(opts: NovaAPIClientOpts) {\n this.opts = opts\n\n this.application = unwrap(ApplicationApi, opts)\n this.busIOs = unwrap(BUSInputsOutputsApi, opts)\n this.cell = unwrap(CellApi, opts)\n this.controller = unwrap(ControllerApi, opts)\n this.controllerIOs = unwrap(ControllerInputsOutputsApi, opts)\n this.jogging = unwrap(JoggingApi, opts)\n this.kinematics = unwrap(KinematicsApi, opts)\n this.license = unwrap(LicenseApi, opts)\n this.motionGroup = unwrap(MotionGroupApi, opts)\n this.motionGroupModels = unwrap(MotionGroupModelsApi, opts)\n this.novaCloud = unwrap(NOVACloudApi, opts)\n this.program = unwrap(ProgramApi, opts)\n this.robotConfigurations = unwrap(RobotConfigurationsApi, opts)\n this.session = unwrap(SessionApi, opts)\n this.storeCollisionComponents = unwrap(StoreCollisionComponentsApi, opts)\n this.storeCollisionSetups = unwrap(StoreCollisionSetupsApi, opts)\n this.storeObject = unwrap(StoreObjectApi, opts)\n this.system = unwrap(SystemApi, opts)\n this.trajectoryCaching = unwrap(TrajectoryCachingApi, opts)\n this.trajectoryExecution = unwrap(TrajectoryExecutionApi, opts)\n this.trajectoryPlanning = unwrap(TrajectoryPlanningApi, opts)\n this.version = unwrap(VersionApi, opts)\n this.virtualController = unwrap(VirtualControllerApi, opts)\n this.virtualControllerBehavior = unwrap(VirtualControllerBehaviorApi, opts)\n this.virtualControllerIOs = unwrap(VirtualControllerInputsOutputsApi, opts)\n }\n}\n","import type { Configuration as BaseConfiguration } from \"@wandelbots/nova-api/v2\"\nimport type { AxiosRequestConfig } from \"axios\"\nimport axios, { isAxiosError } from \"axios\"\nimport { AutoReconnectingWebsocket } from \"./AutoReconnectingWebsocket.ts\"\nimport { availableStorage } from \"./availableStorage.ts\"\nimport { isLocalhostDev } from \"./context.ts\"\nimport { parseNovaInstanceUrl } from \"./converters.ts\"\nimport { loginWithAuth0 } from \"./LoginWithAuth0.ts\"\nimport { MockNovaInstance } from \"./mock/MockNovaInstance.ts\"\nimport { NovaAPIClient } from \"./NovaAPIClient.ts\"\n\nexport type NovaConfig = {\n /**\n * Url of the deployed NOVA instance to connect to\n * e.g. https://saeattii.instance.wandelbots.io\n */\n instanceUrl: string\n\n /**\n * Access token for Bearer authentication.\n * If running on a NOVA instance, this can be automatically retrieved from\n * the current session when omitted.\n */\n accessToken?: string\n} & Omit<BaseConfiguration, \"isJsonMime\" | \"basePath\">\n\n/**\n *\n * Client for connecting to a NOVA instance and controlling robots.\n */\nexport class Nova {\n readonly api: NovaAPIClient\n readonly config: NovaConfig\n readonly mock?: MockNovaInstance\n readonly instanceUrl: URL\n authPromise: Promise<string | null> | null = null\n accessToken: string | null = null\n\n constructor(config: NovaConfig) {\n this.config = config\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 }\n this.instanceUrl = parseNovaInstanceUrl(this.config.instanceUrl)\n\n // Set up Axios instance with interceptor for token fetching\n const axiosInstance = axios.create({\n baseURL: new URL(\"/api/v2\", this.instanceUrl).href,\n // TODO - backend needs to set proper CORS headers for this\n headers: isLocalhostDev\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 }\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 (\n error.response?.status === 403 &&\n !error.config?.url?.split(/[?#]/)[0]?.endsWith(\"/session\")\n ) {\n // If we hit a 403, the user is authenticated but may lack access\n // to the instance entirely. Check the session to find out.\n let redirectToAccessDenied = false\n try {\n const session = await this.api.session.getSession()\n if (\n session.session_id !== \"default\" &&\n session.capabilities.length === 0\n ) {\n // An authenticated user with no capabilities has no access.\n redirectToAccessDenied = true\n }\n } catch (sessionError) {\n // The session endpoint itself returns a 403 when the user is\n // not assigned to an instance at all, which we treat as equivalent to\n // an authenticated user with empty capabilities.\n if (\n isAxiosError(sessionError) &&\n sessionError.response?.status === 403\n ) {\n redirectToAccessDenied = true\n }\n // Otherwise couldn't determine access; fall through to bubble\n // the original 403 error below.\n }\n\n if (redirectToAccessDenied) {\n // Send them to the instance url, which renders the access\n // denied screen. Return a promise that never settles so the\n // caller doesn't flash an error state before the navigation\n // takes effect.\n window.location.href = this.instanceUrl.href\n return new Promise(() => {})\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. Return a promise that never settles so the\n // caller doesn't flash an error state before the reload takes\n // effect.\n window.location.reload()\n return new Promise(() => {})\n }\n }\n }\n\n return Promise.reject(error)\n },\n )\n }\n\n this.api = new NovaAPIClient({\n ...config,\n basePath: new URL(\"/api/v2\", this.instanceUrl).href,\n isJsonMime: (mime: string) => {\n return mime === \"application/json\"\n },\n baseOptions: {\n ...(this.mock\n ? ({\n adapter: (config) => {\n if (!this.mock) {\n throw new Error(\"Mock adapter used without a mock instance\")\n }\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 const storedToken = availableStorage.getString(\"wbjs.access_token\")\n if (storedToken && this.accessToken !== storedToken) {\n // Might be newer than the one we have\n this.accessToken = storedToken\n return\n }\n\n // Otherwise, perform login flow\n this.authPromise = loginWithAuth0(this.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(`/api/v2/${path.replace(/^\\/+/, \"\")}`, this.instanceUrl)\n url.protocol = url.protocol.replace(\"http\", \"ws\")\n url.protocol = url.protocol.replace(\"https\", \"wss\")\n\n if (this.accessToken) {\n url.searchParams.append(\"token\", this.accessToken)\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"],"mappings":";;;;;;;;;;;;;AA6DA,IAAa,oBAAb,MAA+B;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAKA,YACE,QACA,MAIA;EACA,KAAK,SAAS;EACd,KAAK,OAAO;EACZ,KAAK,SAAS,KAAK,2BAA2BA,wBAAAA,SAAS;EACvD,KAAK,OAAO,KAAK,2BAA2BC,wBAAAA,OAAO;EACnD,KAAK,cAAc,KAAK,WAAWC,wBAAAA,cAAc;EACjD,KAAK,oBACH,KAAK,2BAA2BC,wBAAAA,oBAAoB;EACtD,KAAK,aAAa,KAAK,WAAWC,wBAAAA,aAAa;EAC/C,KAAK,gBAAgB,KAAK,WAAWC,wBAAAA,0BAA0B;EAC/D,KAAK,qBAAqB,KAAK,WAAWC,wBAAAA,qBAAqB;EAC/D,KAAK,sBAAsB,KAAK,WAAWC,wBAAAA,sBAAsB;EACjE,KAAK,oBAAoB,KAAK,WAAWC,wBAAAA,oBAAoB;EAC7D,KAAK,cAAc,KAAK,WAAWC,wBAAAA,cAAc;EACjD,KAAK,oBAAoB,KAAK,2BAA2BA,wBAAAA,cAAc;EACvE,KAAK,UAAU,KAAK,WAAWC,wBAAAA,UAAU;EACzC,KAAK,aAAa,KAAK,WAAWC,wBAAAA,aAAa;EAC/C,KAAK,mBAAmB,KAAK,WAAWC,wBAAAA,mBAAmB;EAC3D,KAAK,oBAAoB,KAAK,WAAWC,wBAAAA,oBAAoB;EAC7D,KAAK,4BAA4B,KAAK,WACpCC,wBAAAA,4BACF;EACA,KAAK,uBAAuB,KAAK,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S;IACT,gBAAgB;KAAC;KAAG;KAAG;IAAC;IACxB,mBAAmB;KAAC;KAAG;KAAG;IAAC;GAC7B,EACF;GACA,YAAY;GACZ,eAAe;IACb;KACE,OAAO;KACP,GAAG;IACL;IACA,EACE,GAAG,KACL;IACA,EACE,GAAG,OACL;IACA;KACE,OAAO;KACP,GAAG;IACL;IACA;KACE,OAAO;KACP,GAAG;IACL;IACA,EACE,GAAG,KACL;GACF;GACA,kBAAkB;IAChB,aAAa;KACX,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;KACA,OAAO,EACL,UAAU,IACZ;KACA,QAAQ,EACN,UAAU,IACZ;IACF;IACA,eAAe;KACb,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;IACF;IACA,kBAAkB;KAChB,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;IACF;IACA,kBAAkB;KAChB,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OAC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AI,KAAK,aAEP;EAGF,MAAM,cAAcF,gBAAAA,iBAAiB,UAAU,mBAAmB;EAClE,IAAI,eAAe,KAAK,gBAAgB,aAAa;GAEnD,KAAK,cAAc;GACnB;EACF;EAGA,KAAK,cAAcG,gBAAAA,eAAe,KAAK,WAAW;EAClD,IAAI;GACF,KAAK,cAAc,MAAM,KAAK;GAC9B,IAAI,KAAK,aAEP,gBAAA,iBAAiB,UAAU,qBAAqB,KAAK,WAAW;QAEhE,gBAAA,iBAAiB,OAAO,mBAAmB;EAE/C,UAAU;GACR,KAAK,cAAc;EACrB;CACF;CAEA,iBAAiB,MAAsB;EACrC,MAAM,MAAM,IAAI,IAAI,WAAW,KAAK,QAAQ,QAAQ,EAAE,KAAK,KAAK,WAAW;EAC3E,IAAI,WAAW,IAAI,SAAS,QAAQ,QAAQ,IAAI;EAChD,IAAI,WAAW,IAAI,SAAS,QAAQ,SAAS,KAAK;EAElD,IAAI,KAAK,aACP,IAAI,aAAa,OAAO,SAAS,KAAK,WAAW;EAGnD,OAAO,IAAI,SAAS;CACtB;;;;;;CAOA,0BAA0B,MAAc;EACtC,OAAO,IAAIC,gBAAAA,0BAA0B,KAAK,iBAAiB,IAAI,GAAG,EAChE,MAAM,KAAK,KACb,CAAC;CACH;AACF"}
|
package/dist/v2/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/lib/deprecated/v2/NovaCellAPIClient.ts","../../src/lib/deprecated/v2/NovaClient.ts","../../src/lib/deprecated/v2/wandelscriptUtils.ts","../../src/lib/NovaAPIClient.ts","../../src/lib/Nova.ts"],"mappings":";;;;;;KAoCK,YAAA,MAAkB,CAAA,WAAW,CAAA,UAAW,IAAA,6BACrC,IAAA,EAAM,CAAA,KAAM,CAAA;AAAA,KAGf,2BAAA,MAA+B,CAAA,cAAc,CAAA,qBAEzC,CAAA,EAAG,UAAA,CAAW,CAAA,MACd,OAAA,CAAQ,OAAA,CA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2B,4BAAA;EAAA,SACtD,oBAAA,EAAsB,4BAAA,CAA2B,iCAAA;cAE9C,IAAA,EAAM,iBAAA;AAAA;;;KCxGR,UAAA;;;AJsB8B;;EIjBxC,WAAA;EJoBqB;;;;;EIbrB,WAAA;AAAA,IACE,IAAI,CAAC,aAAA;;;;;cAMI,IAAA;EAAA,SACF,GAAA,EAAK,aAAA;EAAA,SACL,MAAA,EAAQ,UAAA;EAAA,SACR,IAAA,GAAO,gBAAA;EAAA,SACP,WAAA,EAAa,GAAA;EACtB,WAAA,EAAa,OAAA;EACb,WAAA;cAEY,MAAA,EAAQ,UAAA;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/lib/deprecated/v2/NovaCellAPIClient.ts","../../src/lib/deprecated/v2/NovaClient.ts","../../src/lib/deprecated/v2/wandelscriptUtils.ts","../../src/lib/NovaAPIClient.ts","../../src/lib/Nova.ts"],"mappings":";;;;;;KAoCK,YAAA,MAAkB,CAAA,WAAW,CAAA,UAAW,IAAA,6BACrC,IAAA,EAAM,CAAA,KAAM,CAAA;AAAA,KAGf,2BAAA,MAA+B,CAAA,cAAc,CAAA,qBAEzC,CAAA,EAAG,UAAA,CAAW,CAAA,MACd,OAAA,CAAQ,OAAA,CAAQ,UAAA,CAAW,CAAA;EAAc,IAAA;AAAA,IAAkB,CAAA;;KAIxD,UAAA,oBACE,CAAA,GAAI,2BAAA,CAA0B,YAAA,CAAa,CAAA,CAAE,CAAA;;KAI/C,0BAAA,oBACE,CAAA,GAAI,2BAAA,CAA0B,CAAA,CAAE,CAAA;;;;;;cAQjC,iBAAA;EAAA,SACF,MAAA,EAAQ,0BAAA,CAA2B,SAAA;EAAA,SACnC,IAAA,EAAM,0BAAA,CAA2B,OAAA;EAAA,SACjC,WAAA,EAAa,UAAA,CAAW,cAAA;EAAA,SACxB,iBAAA,EAAmB,0BAAA,CAA2B,oBAAA;EAAA,SAC9C,UAAA,EAAY,UAAA,CAAW,aAAA;EAAA,SACvB,aA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+KV,yBAAA,CAA0B,IAAA,WAAY,yBAAA;AAAA"}
|
package/dist/v2/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/lib/deprecated/v2/NovaCellAPIClient.ts","../../src/lib/deprecated/v2/NovaClient.ts","../../src/lib/deprecated/v2/wandelscriptUtils.ts","../../src/lib/NovaAPIClient.ts","../../src/lib/Nova.ts"],"mappings":";;;;;;KAoCK,YAAA,MAAkB,CAAA,WAAW,CAAA,UAAW,IAAA,6BACrC,IAAA,EAAM,CAAA,KAAM,CAAA;AAAA,KAGf,2BAAA,MAA+B,CAAA,cAAc,CAAA,qBAEzC,CAAA,EAAG,UAAA,CAAW,CAAA,MACd,OAAA,CAAQ,OAAA,CAAQ,UAAA,CAAW,CAAA;EAAc,IAAA;AAAA,IAAkB,CAAA;;KAIxD,UAAA,oBACE,CAAA,GAAI,2BAAA,CAA0B,YAAA,CAAa,CAAA,CAAE,CAAA;;KAI/C,0BAAA,oBACE,CAAA,GAAI,2BAAA,CAA0B,CAAA,CAAE,CAAA;;;;;;cAQjC,iBAAA;EAAA,SACF,MAAA,EAAQ,0BAAA,CAA2B,SAAA;EAAA,SACnC,IAAA,EAAM,0BAAA,CAA2B,OAAA;EAAA,SACjC,WAAA,EAAa,UAAA,CAAW,cAAA;EAAA,SACxB,iBAAA,EAAmB,0BAAA,CAA2B,oBAAA;EAAA,SAC9C,UAAA,EAAY,UAAA,CAAW,aAAA;EAAA,SACvB,aAAA,EAAe,UAAA,CAAW,0BAAA;EAAA,SAC1B,kBAAA,EAAoB,UAAA,CAAW,qBAAA;EAAA,SAC/B,mBAAA,EAAqB,UAAA,CAAW,sBAAA;EAAA,SAChC,iBAAA,EAAmB,UAAA,CAAW,oBAAA;EAAA,SAC9B,WAAA,EAAa,UAAA,CAAW,cAAA;EAAA,SACxB,iBAAA,EAAmB,0BAAA,CAA2B,cAAA;EAAA,SAC9C,OAAA,EAAS,UAAA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AS,4BAAA,CAA2B,UAAA;EAAA,SACpC,wBAAA,EAA0B,4BAAA,CAA2B,2BAAA;EAAA,SACrD,oBAAA,EAAsB,4BAAA,CAA2B,uBAAA;EAAA,SACjD,WAAA,EAAa,4BAAA,CAA2B,cAAA;EAAA,SACxC,MAAA,EAAQ,4BAAA,CAA2B,SAAA;EAAA,SACnC,iBAAA,EAAmB,4BAAA,CAA2B,oBAAA;EAAA,SAC9C,mBAAA,EAAqB,4BAAA,CAA2B,sBAAA;EAAA,SAChD,kBAAA,EAAoB,4BAAA,CAA2B,qBAAA;EAAA,SAC/C,OAAA,EAAS,4BAAA,CAA2B,UAAA;EAAA,SACpC,iBAAA,EAAmB,4BAAA,CAA2B,oBAAA;EAAA,SAC9C,yBAAA,EAA2B,4BAAA,CAA2B,4BAAA;EAAA,SACtD,oBAAA,EAAsB,4BAAA,CAA2B,iCAAA;cAE9C,IAAA,EAAM,iBAAA;AAAA;;;KCxGR,UAAA;;;AJsB8B;;EIjBxC,WAAA;EJoBqB;;;;;EIbrB,WAAA;AAAA,IACE,IAAI,CAAC,aAAA;;;;;cAMI,IAAA;EAAA,SACF,GAAA,EAAK,aAAA;EAAA,SACL,MAAA,EAAQ,UAAA;EAAA,SACR,IAAA,GAAO,gBAAA;EAAA,SACP,WAAA,EAAa,GAAA;EACtB,WAAA,EAAa,OAAA;EACb,WAAA;cAEY,MAAA,EAAQ,UAAA;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/lib/deprecated/v2/NovaCellAPIClient.ts","../../src/lib/deprecated/v2/NovaClient.ts","../../src/lib/deprecated/v2/wandelscriptUtils.ts","../../src/lib/NovaAPIClient.ts","../../src/lib/Nova.ts"],"mappings":";;;;;;KAoCK,YAAA,MAAkB,CAAA,WAAW,CAAA,UAAW,IAAA,6BACrC,IAAA,EAAM,CAAA,KAAM,CAAA;AAAA,KAGf,2BAAA,MAA+B,CAAA,cAAc,CAAA,qBAEzC,CAAA,EAAG,UAAA,CAAW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,SAC9C,yBAAA,EAA2B,4BAAA,CAA2B,4BAAA;EAAA,SACtD,oBAAA,EAAsB,4BAAA,CAA2B,iCAAA;cAE9C,IAAA,EAAM,iBAAA;AAAA;;;KCxGR,UAAA;;;AJsB8B;;EIjBxC,WAAA;EJoBqB;;;;;EIbrB,WAAA;AAAA,IACE,IAAI,CAAC,aAAA;;;;;cAMI,IAAA;EAAA,SACF,GAAA,EAAK,aAAA;EAAA,SACL,MAAA,EAAQ,UAAA;EAAA,SACR,IAAA,GAAO,gBAAA;EAAA,SACP,WAAA,EAAa,GAAA;EACtB,WAAA,EAAa,OAAA;EACb,WAAA;cAEY,MAAA,EAAQ,UAAA;EAsId,mBAAA,IAAuB,OAAA;EA4B7B,gBAAA,CAAiB,IAAA;EJ9JP;;;;;EI+KV,yBAAA,CAA0B,IAAA,WAAY,yBAAA;AAAA"}
|
package/dist/v2/index.mjs
CHANGED
|
@@ -951,14 +951,23 @@ var Nova = class {
|
|
|
951
951
|
} catch (err) {
|
|
952
952
|
return Promise.reject(err);
|
|
953
953
|
}
|
|
954
|
-
else if (error.response?.status === 403 && !error.config?.url?.split(/[?#]/)[0]?.endsWith("/session"))
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
954
|
+
else if (error.response?.status === 403 && !error.config?.url?.split(/[?#]/)[0]?.endsWith("/session")) {
|
|
955
|
+
let redirectToAccessDenied = false;
|
|
956
|
+
try {
|
|
957
|
+
const session = await this.api.session.getSession();
|
|
958
|
+
if (session.session_id !== "default" && session.capabilities.length === 0) redirectToAccessDenied = true;
|
|
959
|
+
} catch (sessionError) {
|
|
960
|
+
if (isAxiosError(sessionError) && sessionError.response?.status === 403) redirectToAccessDenied = true;
|
|
961
|
+
}
|
|
962
|
+
if (redirectToAccessDenied) {
|
|
963
|
+
window.location.href = this.instanceUrl.href;
|
|
964
|
+
return new Promise(() => {});
|
|
965
|
+
}
|
|
966
|
+
} else if (error.response?.status === 503) {
|
|
967
|
+
if ((await fetch(window.location.href)).status === 503) {
|
|
968
|
+
window.location.reload();
|
|
969
|
+
return new Promise(() => {});
|
|
970
|
+
}
|
|
962
971
|
}
|
|
963
972
|
}
|
|
964
973
|
return Promise.reject(error);
|
package/dist/v2/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/lib/deprecated/v2/NovaCellAPIClient.ts","../../src/lib/mock/getCurrentRobotControllerState.ts","../../src/lib/mock/getMotionGroupDescription.ts","../../src/lib/mock/getMotionGroupKinematicModel.ts","../../src/lib/mock/getRobotController.ts","../../src/lib/mock/listCoordinateSystems.ts","../../src/lib/mock/listRobotControllers.ts","../../src/lib/mock/MockNovaInstance.ts","../../src/lib/deprecated/v2/NovaClient.ts","../../src/lib/deprecated/v2/wandelscriptUtils.ts","../../src/lib/NovaAPIClient.ts","../../src/lib/Nova.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 LicenseApi,\n MotionGroupApi,\n MotionGroupModelsApi,\n NOVACloudApi,\n ProgramApi,\n RobotConfigurationsApi,\n SessionApi,\n StoreCollisionComponentsApi,\n StoreCollisionSetupsApi,\n StoreObjectApi,\n SystemApi,\n TrajectoryCachingApi,\n TrajectoryExecutionApi,\n TrajectoryPlanningApi,\n VersionApi,\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\n/** @deprecated Use `NovaAPIClient` instead. */\nexport type WithCellId<T> = {\n [P in keyof T]: UnwrapAxiosResponseReturn<OmitFirstArg<T[P]>>\n}\n\n/** @deprecated Use `NovaAPIClient` instead. */\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 * @deprecated Use `NovaAPIClient` from `@wandelbots/nova-js/v2` instead.\n */\nexport class NovaCellAPIClient {\n readonly system: WithUnwrappedAxiosResponse<SystemApi>\n readonly cell: WithUnwrappedAxiosResponse<CellApi>\n readonly motionGroup: WithCellId<MotionGroupApi>\n readonly motionGroupModels: WithUnwrappedAxiosResponse<MotionGroupModelsApi>\n readonly controller: WithCellId<ControllerApi>\n readonly controllerIOs: WithCellId<ControllerInputsOutputsApi>\n readonly trajectoryPlanning: WithCellId<TrajectoryPlanningApi>\n readonly trajectoryExecution: WithCellId<TrajectoryExecutionApi>\n readonly trajectoryCaching: WithCellId<TrajectoryCachingApi>\n readonly application: WithCellId<ApplicationApi>\n readonly applicationGlobal: WithUnwrappedAxiosResponse<ApplicationApi>\n readonly jogging: WithCellId<JoggingApi>\n readonly kinematics: WithCellId<KinematicsApi>\n readonly busInputsOutputs: WithCellId<BUSInputsOutputsApi>\n readonly virtualController: WithCellId<VirtualControllerApi>\n readonly virtualControllerBehavior: WithCellId<VirtualControllerBehaviorApi>\n readonly virtualControllerIOs: WithCellId<VirtualControllerInputsOutputsApi>\n readonly storeObject: WithCellId<StoreObjectApi>\n readonly storeCollisionComponents: WithCellId<StoreCollisionComponentsApi>\n readonly storeCollisionSetups: WithCellId<StoreCollisionSetupsApi>\n readonly program: WithCellId<ProgramApi>\n readonly license: WithUnwrappedAxiosResponse<LicenseApi>\n readonly novaCloud: WithUnwrappedAxiosResponse<NOVACloudApi>\n readonly robotConfigurations: WithUnwrappedAxiosResponse<RobotConfigurationsApi>\n readonly version: WithUnwrappedAxiosResponse<VersionApi>\n readonly session: WithUnwrappedAxiosResponse<SessionApi>\n\n readonly cellId: string\n readonly opts: BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n }\n\n constructor(\n cellId: string,\n opts: BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n },\n ) {\n this.cellId = cellId\n this.opts = opts\n this.system = this.withUnwrappedResponsesOnly(SystemApi)\n this.cell = this.withUnwrappedResponsesOnly(CellApi)\n this.motionGroup = this.withCellId(MotionGroupApi)\n this.motionGroupModels =\n this.withUnwrappedResponsesOnly(MotionGroupModelsApi)\n this.controller = this.withCellId(ControllerApi)\n this.controllerIOs = this.withCellId(ControllerInputsOutputsApi)\n this.trajectoryPlanning = this.withCellId(TrajectoryPlanningApi)\n this.trajectoryExecution = this.withCellId(TrajectoryExecutionApi)\n this.trajectoryCaching = this.withCellId(TrajectoryCachingApi)\n this.application = this.withCellId(ApplicationApi)\n this.applicationGlobal = this.withUnwrappedResponsesOnly(ApplicationApi)\n this.jogging = this.withCellId(JoggingApi)\n this.kinematics = this.withCellId(KinematicsApi)\n this.busInputsOutputs = this.withCellId(BUSInputsOutputsApi)\n this.virtualController = this.withCellId(VirtualControllerApi)\n this.virtualControllerBehavior = this.withCellId(\n VirtualControllerBehaviorApi,\n )\n this.virtualControllerIOs = this.withCellId(\n VirtualControllerInputsOutputsApi,\n )\n this.storeObject = this.withCellId(StoreObjectApi)\n this.storeCollisionComponents = this.withCellId(StoreCollisionComponentsApi)\n this.storeCollisionSetups = this.withCellId(StoreCollisionSetupsApi)\n this.program = this.withCellId(ProgramApi)\n this.license = this.withUnwrappedResponsesOnly(LicenseApi)\n this.novaCloud = this.withUnwrappedResponsesOnly(NOVACloudApi)\n this.robotConfigurations = this.withUnwrappedResponsesOnly(\n RobotConfigurationsApi,\n )\n this.version = this.withUnwrappedResponsesOnly(VersionApi)\n this.session = this.withUnwrappedResponsesOnly(SessionApi)\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","export const getCurrentRobotControllerState = {\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","export const getMotionGroupDescription = {\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","export const getMotionGroupKinematicModel = {\n method: \"GET\",\n path: \"/motion-group-models/:motionGroupModel/kinematic\",\n handle() {\n return {\n dh_parameters: [\n {\n alpha: 1.5707963267948966,\n theta: 0.0,\n a: 0.0,\n d: 162.25,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0.0,\n theta: 0.0,\n a: -425.0,\n d: 0.0,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0.0,\n theta: 0.0,\n a: -392.2,\n d: 0.0,\n reverse_rotation_direction: false,\n },\n {\n alpha: 1.5707963267948966,\n theta: 0.0,\n a: 0.0,\n d: 133.3,\n reverse_rotation_direction: false,\n },\n {\n alpha: -1.5707963267948966,\n theta: 0.0,\n a: 0.0,\n d: 99.7,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0.0,\n theta: 0.0,\n a: 0.0,\n d: 99.6,\n reverse_rotation_direction: false,\n },\n ],\n inverse_solver: \"Universalrobots\",\n }\n },\n}\n","import type { RobotController } from \"@wandelbots/nova-api/v2\"\n\nexport const getRobotController = {\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","export const listCoordinateSystems = {\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 ]\n },\n}\n","export const listRobotControllers = {\n method: \"GET\",\n path: \"/cells/:cellId/controllers\",\n handle() {\n return [\"mock-ur5e\"]\n },\n}\n","import type { MotionGroupState } 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.ts\"\nimport { getCurrentRobotControllerState } from \"./getCurrentRobotControllerState.ts\"\nimport { getMotionGroupDescription } from \"./getMotionGroupDescription.ts\"\nimport { getMotionGroupKinematicModel } from \"./getMotionGroupKinematicModel.ts\"\nimport { getRobotController } from \"./getRobotController.ts\"\nimport { listCoordinateSystems } from \"./listCoordinateSystems.ts\"\nimport { listRobotControllers } from \"./listRobotControllers.ts\"\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 listRobotControllers,\n getRobotController,\n getMotionGroupDescription,\n getCurrentRobotControllerState,\n listCoordinateSystems,\n getMotionGroupKinematicModel,\n ]\n\n const method = config.method?.toUpperCase() || \"GET\"\n if (!config.url) {\n throw new Error(\"No url sent with request\")\n }\n const path = config.url.split(\"?\")[0] ?? config.url\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\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 description_revision: 0,\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 { AutoReconnectingWebsocket } from \"../../AutoReconnectingWebsocket.ts\"\nimport { availableStorage } from \"../../availableStorage.ts\"\nimport { parseNovaInstanceUrl } from \"../../converters.ts\"\nimport { loginWithAuth0 } from \"../../LoginWithAuth0.ts\"\n\nimport { isLocalhostDev } from \"../../context.ts\"\nimport { MockNovaInstance } from \"../../mock/MockNovaInstance.ts\"\nimport { NovaCellAPIClient } from \"./NovaCellAPIClient.ts\"\n\n/** @deprecated Use `NovaClientConfig` from `Nova` instead. */\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\n/**\n * Client for connecting to a Nova instance and controlling robots.\n * @deprecated Use `Nova` from `@wandelbots/nova-js/v2` instead.\n */\nexport class NovaClient {\n readonly api: NovaCellAPIClient\n readonly config: NovaClientConfigWithDefaults\n readonly mock?: MockNovaInstance\n readonly instanceUrl: URL\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 }\n this.instanceUrl = parseNovaInstanceUrl(this.config.instanceUrl)\n\n // Set up Axios instance with interceptor for token fetching\n const axiosInstance = axios.create({\n baseURL: new URL(\"/api/v2\", this.instanceUrl).href,\n // TODO - backend needs to set proper CORS headers for this\n headers: isLocalhostDev\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: new URL(\"/api/v2\", this.instanceUrl).href,\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 const storedToken = availableStorage.getString(\"wbjs.access_token\")\n if (storedToken && this.accessToken !== storedToken) {\n // Might be newer than the one we have\n this.accessToken = storedToken\n return\n }\n\n // Otherwise, perform login flow\n this.authPromise = loginWithAuth0(this.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 new URL(\n `/api/v2/cells/${this.config.cellId}/${path.replace(/^\\/+/, \"\")}`,\n this.instanceUrl,\n ).href,\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 * @deprecated Wandelscript usage is deprecated; switching to Python is recommended.\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","import 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 LicenseApi,\n MotionGroupApi,\n MotionGroupModelsApi,\n NOVACloudApi,\n ProgramApi,\n RobotConfigurationsApi,\n SessionApi,\n StoreCollisionComponentsApi,\n StoreCollisionSetupsApi,\n StoreObjectApi,\n SystemApi,\n TrajectoryCachingApi,\n TrajectoryExecutionApi,\n TrajectoryPlanningApi,\n VersionApi,\n VirtualControllerApi,\n VirtualControllerBehaviorApi,\n VirtualControllerInputsOutputsApi,\n} from \"@wandelbots/nova-api/v2\"\nimport type { AxiosInstance } from \"axios\"\nimport axios from \"axios\"\n\n// biome-ignore lint/suspicious/noExplicitAny: metamagic\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\ntype WithUnwrappedAxiosResponse<T> = {\n [P in keyof T]: UnwrapAxiosResponseReturn<T[P]>\n}\n\ntype NovaAPIClientOpts = BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n}\n\nfunction unwrap<T extends BaseAPI>(\n ApiConstructor: new (\n config: BaseConfiguration,\n basePath: string,\n axios: AxiosInstance,\n ) => T,\n opts: NovaAPIClientOpts,\n): WithUnwrappedAxiosResponse<T> {\n const apiClient = new ApiConstructor(\n {\n ...opts,\n isJsonMime: (mime: string) => mime === \"application/json\",\n },\n opts.basePath ?? \"\",\n opts.axiosInstance ?? axios.create(),\n ) as Record<string | symbol, unknown>\n\n for (const key of Reflect.ownKeys(\n Reflect.getPrototypeOf(apiClient) as object,\n )) {\n if (key !== \"constructor\" && typeof apiClient[key] === \"function\") {\n const originalFunction = apiClient[key] as (\n ...args: unknown[]\n ) => Promise<{ data: unknown }>\n apiClient[key] = (...args: unknown[]) =>\n originalFunction.apply(apiClient, args).then((res) => res.data)\n }\n }\n\n return apiClient as WithUnwrappedAxiosResponse<T>\n}\n\n/**\n * API client providing type-safe access to all the endpoints of a NOVA\n * instance.\n */\nexport class NovaAPIClient {\n readonly opts: NovaAPIClientOpts\n\n readonly application: WithUnwrappedAxiosResponse<ApplicationApi>\n readonly busIOs: WithUnwrappedAxiosResponse<BUSInputsOutputsApi>\n readonly cell: WithUnwrappedAxiosResponse<CellApi>\n readonly controller: WithUnwrappedAxiosResponse<ControllerApi>\n readonly controllerIOs: WithUnwrappedAxiosResponse<ControllerInputsOutputsApi>\n readonly jogging: WithUnwrappedAxiosResponse<JoggingApi>\n readonly kinematics: WithUnwrappedAxiosResponse<KinematicsApi>\n readonly license: WithUnwrappedAxiosResponse<LicenseApi>\n readonly motionGroup: WithUnwrappedAxiosResponse<MotionGroupApi>\n readonly motionGroupModels: WithUnwrappedAxiosResponse<MotionGroupModelsApi>\n readonly novaCloud: WithUnwrappedAxiosResponse<NOVACloudApi>\n readonly program: WithUnwrappedAxiosResponse<ProgramApi>\n readonly robotConfigurations: WithUnwrappedAxiosResponse<RobotConfigurationsApi>\n readonly session: WithUnwrappedAxiosResponse<SessionApi>\n readonly storeCollisionComponents: WithUnwrappedAxiosResponse<StoreCollisionComponentsApi>\n readonly storeCollisionSetups: WithUnwrappedAxiosResponse<StoreCollisionSetupsApi>\n readonly storeObject: WithUnwrappedAxiosResponse<StoreObjectApi>\n readonly system: WithUnwrappedAxiosResponse<SystemApi>\n readonly trajectoryCaching: WithUnwrappedAxiosResponse<TrajectoryCachingApi>\n readonly trajectoryExecution: WithUnwrappedAxiosResponse<TrajectoryExecutionApi>\n readonly trajectoryPlanning: WithUnwrappedAxiosResponse<TrajectoryPlanningApi>\n readonly version: WithUnwrappedAxiosResponse<VersionApi>\n readonly virtualController: WithUnwrappedAxiosResponse<VirtualControllerApi>\n readonly virtualControllerBehavior: WithUnwrappedAxiosResponse<VirtualControllerBehaviorApi>\n readonly virtualControllerIOs: WithUnwrappedAxiosResponse<VirtualControllerInputsOutputsApi>\n\n constructor(opts: NovaAPIClientOpts) {\n this.opts = opts\n\n this.application = unwrap(ApplicationApi, opts)\n this.busIOs = unwrap(BUSInputsOutputsApi, opts)\n this.cell = unwrap(CellApi, opts)\n this.controller = unwrap(ControllerApi, opts)\n this.controllerIOs = unwrap(ControllerInputsOutputsApi, opts)\n this.jogging = unwrap(JoggingApi, opts)\n this.kinematics = unwrap(KinematicsApi, opts)\n this.license = unwrap(LicenseApi, opts)\n this.motionGroup = unwrap(MotionGroupApi, opts)\n this.motionGroupModels = unwrap(MotionGroupModelsApi, opts)\n this.novaCloud = unwrap(NOVACloudApi, opts)\n this.program = unwrap(ProgramApi, opts)\n this.robotConfigurations = unwrap(RobotConfigurationsApi, opts)\n this.session = unwrap(SessionApi, opts)\n this.storeCollisionComponents = unwrap(StoreCollisionComponentsApi, opts)\n this.storeCollisionSetups = unwrap(StoreCollisionSetupsApi, opts)\n this.storeObject = unwrap(StoreObjectApi, opts)\n this.system = unwrap(SystemApi, opts)\n this.trajectoryCaching = unwrap(TrajectoryCachingApi, opts)\n this.trajectoryExecution = unwrap(TrajectoryExecutionApi, opts)\n this.trajectoryPlanning = unwrap(TrajectoryPlanningApi, opts)\n this.version = unwrap(VersionApi, opts)\n this.virtualController = unwrap(VirtualControllerApi, opts)\n this.virtualControllerBehavior = unwrap(VirtualControllerBehaviorApi, opts)\n this.virtualControllerIOs = unwrap(VirtualControllerInputsOutputsApi, opts)\n }\n}\n","import type { Configuration as BaseConfiguration } from \"@wandelbots/nova-api/v2\"\nimport type { AxiosRequestConfig } from \"axios\"\nimport axios, { isAxiosError } from \"axios\"\nimport { AutoReconnectingWebsocket } from \"./AutoReconnectingWebsocket.ts\"\nimport { availableStorage } from \"./availableStorage.ts\"\nimport { isLocalhostDev } from \"./context.ts\"\nimport { parseNovaInstanceUrl } from \"./converters.ts\"\nimport { loginWithAuth0 } from \"./LoginWithAuth0.ts\"\nimport { MockNovaInstance } from \"./mock/MockNovaInstance.ts\"\nimport { NovaAPIClient } from \"./NovaAPIClient.ts\"\n\nexport type NovaConfig = {\n /**\n * Url of the deployed NOVA instance to connect to\n * e.g. https://saeattii.instance.wandelbots.io\n */\n instanceUrl: string\n\n /**\n * Access token for Bearer authentication.\n * If running on a NOVA instance, this can be automatically retrieved from\n * the current session when omitted.\n */\n accessToken?: string\n} & Omit<BaseConfiguration, \"isJsonMime\" | \"basePath\">\n\n/**\n *\n * Client for connecting to a NOVA instance and controlling robots.\n */\nexport class Nova {\n readonly api: NovaAPIClient\n readonly config: NovaConfig\n readonly mock?: MockNovaInstance\n readonly instanceUrl: URL\n authPromise: Promise<string | null> | null = null\n accessToken: string | null = null\n\n constructor(config: NovaConfig) {\n this.config = config\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 }\n this.instanceUrl = parseNovaInstanceUrl(this.config.instanceUrl)\n\n // Set up Axios instance with interceptor for token fetching\n const axiosInstance = axios.create({\n baseURL: new URL(\"/api/v2\", this.instanceUrl).href,\n // TODO - backend needs to set proper CORS headers for this\n headers: isLocalhostDev\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 }\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 (\n error.response?.status === 403 &&\n !error.config?.url?.split(/[?#]/)[0]?.endsWith(\"/session\")\n ) {\n // If we hit a 403, the user is authenticated but may lack access\n // to the instance entirely. Check the session to find out.\n try {\n const session = await this.api.session.getSession()\n if (\n session.session_id !== \"default\" &&\n session.capabilities.length === 0\n ) {\n // An authenticated user with no capabilities has no access;\n // send them to the instance url, which renders the access\n // denied screen.\n window.location.href = this.instanceUrl.href\n }\n } catch (sessionError) {\n // The session endpoint itself returns a 403 when the user is\n // not assigned to a cell at all, which is equivalent to an\n // authenticated user with non-default empty capabilities ->\n // send them to the access denied screen.\n if (\n isAxiosError(sessionError) &&\n sessionError.response?.status === 403\n ) {\n window.location.href = this.instanceUrl.href\n }\n // Otherwise couldn't determine access; fall through to bubble\n // the original 403 error below.\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 NovaAPIClient({\n ...config,\n basePath: new URL(\"/api/v2\", this.instanceUrl).href,\n isJsonMime: (mime: string) => {\n return mime === \"application/json\"\n },\n baseOptions: {\n ...(this.mock\n ? ({\n adapter: (config) => {\n if (!this.mock) {\n throw new Error(\"Mock adapter used without a mock instance\")\n }\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 const storedToken = availableStorage.getString(\"wbjs.access_token\")\n if (storedToken && this.accessToken !== storedToken) {\n // Might be newer than the one we have\n this.accessToken = storedToken\n return\n }\n\n // Otherwise, perform login flow\n this.authPromise = loginWithAuth0(this.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(`/api/v2/${path.replace(/^\\/+/, \"\")}`, this.instanceUrl)\n url.protocol = url.protocol.replace(\"http\", \"ws\")\n url.protocol = url.protocol.replace(\"https\", \"wss\")\n\n if (this.accessToken) {\n url.searchParams.append(\"token\", this.accessToken)\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"],"mappings":";;;;;;;;;;;AA6DA,IAAa,oBAAb,MAA+B;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAKA,YACE,QACA,MAIA;EACA,KAAK,SAAS;EACd,KAAK,OAAO;EACZ,KAAK,SAAS,KAAK,2BAA2B,SAAS;EACvD,KAAK,OAAO,KAAK,2BAA2B,OAAO;EACnD,KAAK,cAAc,KAAK,WAAW,cAAc;EACjD,KAAK,oBACH,KAAK,2BAA2B,oBAAoB;EACtD,KAAK,aAAa,KAAK,WAAW,aAAa;EAC/C,KAAK,gBAAgB,KAAK,WAAW,0BAA0B;EAC/D,KAAK,qBAAqB,KAAK,WAAW,qBAAqB;EAC/D,KAAK,sBAAsB,KAAK,WAAW,sBAAsB;EACjE,KAAK,oBAAoB,KAAK,WAAW,oBAAoB;EAC7D,KAAK,cAAc,KAAK,WAAW,cAAc;EACjD,KAAK,oBAAoB,KAAK,2BAA2B,cAAc;EACvE,KAAK,UAAU,KAAK,WAAW,UAAU;EACzC,KAAK,aAAa,KAAK,WAAW,aAAa;EAC/C,KAAK,mBAAm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U;IACR,MAAM;IACN,SAAS;IACT,gBAAgB;KAAC;KAAG;KAAG;IAAC;IACxB,mBAAmB;KAAC;KAAG;KAAG;IAAC;GAC7B,EACF;GACA,YAAY;GACZ,eAAe;IACb;KACE,OAAO;KACP,GAAG;IACL;IACA,EACE,GAAG,KACL;IACA,EACE,GAAG,OACL;IACA;KACE,OAAO;KACP,GAAG;IACL;IACA;KACE,OAAO;KACP,GAAG;IACL;IACA,EACE,GAAG,KACL;GACF;GACA,kBAAkB;IAChB,aAAa;KACX,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;KACA,OAAO,EACL,UAAU,IACZ;KACA,QAAQ,EACN,UAAU,IACZ;IACF;IACA,eAAe;KACb,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;IACF;IACA,kBAAkB;KAChB,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;IACF;IACA,kBAAkB;KAChB,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aA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SAAS,QAAQ,SAAS,KAAK;EAElD,IAAI,KAAK,aACP,IAAI,aAAa,OAAO,SAAS,KAAK,WAAW;EAGnD,OAAO,IAAI,SAAS;CACtB;;;;;;CAOA,0BAA0B,MAAc;EACtC,OAAO,IAAI,0BAA0B,KAAK,iBAAiB,IAAI,GAAG,EAChE,MAAM,KAAK,KACb,CAAC;CACH;AACF"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/lib/deprecated/v2/NovaCellAPIClient.ts","../../src/lib/mock/getCurrentRobotControllerState.ts","../../src/lib/mock/getMotionGroupDescription.ts","../../src/lib/mock/getMotionGroupKinematicModel.ts","../../src/lib/mock/getRobotController.ts","../../src/lib/mock/listCoordinateSystems.ts","../../src/lib/mock/listRobotControllers.ts","../../src/lib/mock/MockNovaInstance.ts","../../src/lib/deprecated/v2/NovaClient.ts","../../src/lib/deprecated/v2/wandelscriptUtils.ts","../../src/lib/NovaAPIClient.ts","../../src/lib/Nova.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 LicenseApi,\n MotionGroupApi,\n MotionGroupModelsApi,\n NOVACloudApi,\n ProgramApi,\n RobotConfigurationsApi,\n SessionApi,\n StoreCollisionComponentsApi,\n StoreCollisionSetupsApi,\n StoreObjectApi,\n SystemApi,\n TrajectoryCachingApi,\n TrajectoryExecutionApi,\n TrajectoryPlanningApi,\n VersionApi,\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\n/** @deprecated Use `NovaAPIClient` instead. */\nexport type WithCellId<T> = {\n [P in keyof T]: UnwrapAxiosResponseReturn<OmitFirstArg<T[P]>>\n}\n\n/** @deprecated Use `NovaAPIClient` instead. */\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 * @deprecated Use `NovaAPIClient` from `@wandelbots/nova-js/v2` instead.\n */\nexport class NovaCellAPIClient {\n readonly system: WithUnwrappedAxiosResponse<SystemApi>\n readonly cell: WithUnwrappedAxiosResponse<CellApi>\n readonly motionGroup: WithCellId<MotionGroupApi>\n readonly motionGroupModels: WithUnwrappedAxiosResponse<MotionGroupModelsApi>\n readonly controller: WithCellId<ControllerApi>\n readonly controllerIOs: WithCellId<ControllerInputsOutputsApi>\n readonly trajectoryPlanning: WithCellId<TrajectoryPlanningApi>\n readonly trajectoryExecution: WithCellId<TrajectoryExecutionApi>\n readonly trajectoryCaching: WithCellId<TrajectoryCachingApi>\n readonly application: WithCellId<ApplicationApi>\n readonly applicationGlobal: WithUnwrappedAxiosResponse<ApplicationApi>\n readonly jogging: WithCellId<JoggingApi>\n readonly kinematics: WithCellId<KinematicsApi>\n readonly busInputsOutputs: WithCellId<BUSInputsOutputsApi>\n readonly virtualController: WithCellId<VirtualControllerApi>\n readonly virtualControllerBehavior: WithCellId<VirtualControllerBehaviorApi>\n readonly virtualControllerIOs: WithCellId<VirtualControllerInputsOutputsApi>\n readonly storeObject: WithCellId<StoreObjectApi>\n readonly storeCollisionComponents: WithCellId<StoreCollisionComponentsApi>\n readonly storeCollisionSetups: WithCellId<StoreCollisionSetupsApi>\n readonly program: WithCellId<ProgramApi>\n readonly license: WithUnwrappedAxiosResponse<LicenseApi>\n readonly novaCloud: WithUnwrappedAxiosResponse<NOVACloudApi>\n readonly robotConfigurations: WithUnwrappedAxiosResponse<RobotConfigurationsApi>\n readonly version: WithUnwrappedAxiosResponse<VersionApi>\n readonly session: WithUnwrappedAxiosResponse<SessionApi>\n\n readonly cellId: string\n readonly opts: BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n }\n\n constructor(\n cellId: string,\n opts: BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n },\n ) {\n this.cellId = cellId\n this.opts = opts\n this.system = this.withUnwrappedResponsesOnly(SystemApi)\n this.cell = this.withUnwrappedResponsesOnly(CellApi)\n this.motionGroup = this.withCellId(MotionGroupApi)\n this.motionGroupModels =\n this.withUnwrappedResponsesOnly(MotionGroupModelsApi)\n this.controller = this.withCellId(ControllerApi)\n this.controllerIOs = this.withCellId(ControllerInputsOutputsApi)\n this.trajectoryPlanning = this.withCellId(TrajectoryPlanningApi)\n this.trajectoryExecution = this.withCellId(TrajectoryExecutionApi)\n this.trajectoryCaching = this.withCellId(TrajectoryCachingApi)\n this.application = this.withCellId(ApplicationApi)\n this.applicationGlobal = this.withUnwrappedResponsesOnly(ApplicationApi)\n this.jogging = this.withCellId(JoggingApi)\n this.kinematics = this.withCellId(KinematicsApi)\n this.busInputsOutputs = this.withCellId(BUSInputsOutputsApi)\n this.virtualController = this.withCellId(VirtualControllerApi)\n this.virtualControllerBehavior = this.withCellId(\n VirtualControllerBehaviorApi,\n )\n this.virtualControllerIOs = this.withCellId(\n VirtualControllerInputsOutputsApi,\n )\n this.storeObject = this.withCellId(StoreObjectApi)\n this.storeCollisionComponents = this.withCellId(StoreCollisionComponentsApi)\n this.storeCollisionSetups = this.withCellId(StoreCollisionSetupsApi)\n this.program = this.withCellId(ProgramApi)\n this.license = this.withUnwrappedResponsesOnly(LicenseApi)\n this.novaCloud = this.withUnwrappedResponsesOnly(NOVACloudApi)\n this.robotConfigurations = this.withUnwrappedResponsesOnly(\n RobotConfigurationsApi,\n )\n this.version = this.withUnwrappedResponsesOnly(VersionApi)\n this.session = this.withUnwrappedResponsesOnly(SessionApi)\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","export const getCurrentRobotControllerState = {\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","export const getMotionGroupDescription = {\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","export const getMotionGroupKinematicModel = {\n method: \"GET\",\n path: \"/motion-group-models/:motionGroupModel/kinematic\",\n handle() {\n return {\n dh_parameters: [\n {\n alpha: 1.5707963267948966,\n theta: 0.0,\n a: 0.0,\n d: 162.25,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0.0,\n theta: 0.0,\n a: -425.0,\n d: 0.0,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0.0,\n theta: 0.0,\n a: -392.2,\n d: 0.0,\n reverse_rotation_direction: false,\n },\n {\n alpha: 1.5707963267948966,\n theta: 0.0,\n a: 0.0,\n d: 133.3,\n reverse_rotation_direction: false,\n },\n {\n alpha: -1.5707963267948966,\n theta: 0.0,\n a: 0.0,\n d: 99.7,\n reverse_rotation_direction: false,\n },\n {\n alpha: 0.0,\n theta: 0.0,\n a: 0.0,\n d: 99.6,\n reverse_rotation_direction: false,\n },\n ],\n inverse_solver: \"Universalrobots\",\n }\n },\n}\n","import type { RobotController } from \"@wandelbots/nova-api/v2\"\n\nexport const getRobotController = {\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","export const listCoordinateSystems = {\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 ]\n },\n}\n","export const listRobotControllers = {\n method: \"GET\",\n path: \"/cells/:cellId/controllers\",\n handle() {\n return [\"mock-ur5e\"]\n },\n}\n","import type { MotionGroupState } 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.ts\"\nimport { getCurrentRobotControllerState } from \"./getCurrentRobotControllerState.ts\"\nimport { getMotionGroupDescription } from \"./getMotionGroupDescription.ts\"\nimport { getMotionGroupKinematicModel } from \"./getMotionGroupKinematicModel.ts\"\nimport { getRobotController } from \"./getRobotController.ts\"\nimport { listCoordinateSystems } from \"./listCoordinateSystems.ts\"\nimport { listRobotControllers } from \"./listRobotControllers.ts\"\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 listRobotControllers,\n getRobotController,\n getMotionGroupDescription,\n getCurrentRobotControllerState,\n listCoordinateSystems,\n getMotionGroupKinematicModel,\n ]\n\n const method = config.method?.toUpperCase() || \"GET\"\n if (!config.url) {\n throw new Error(\"No url sent with request\")\n }\n const path = config.url.split(\"?\")[0] ?? config.url\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\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 description_revision: 0,\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 { AutoReconnectingWebsocket } from \"../../AutoReconnectingWebsocket.ts\"\nimport { availableStorage } from \"../../availableStorage.ts\"\nimport { parseNovaInstanceUrl } from \"../../converters.ts\"\nimport { loginWithAuth0 } from \"../../LoginWithAuth0.ts\"\n\nimport { isLocalhostDev } from \"../../context.ts\"\nimport { MockNovaInstance } from \"../../mock/MockNovaInstance.ts\"\nimport { NovaCellAPIClient } from \"./NovaCellAPIClient.ts\"\n\n/** @deprecated Use `NovaClientConfig` from `Nova` instead. */\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\n/**\n * Client for connecting to a Nova instance and controlling robots.\n * @deprecated Use `Nova` from `@wandelbots/nova-js/v2` instead.\n */\nexport class NovaClient {\n readonly api: NovaCellAPIClient\n readonly config: NovaClientConfigWithDefaults\n readonly mock?: MockNovaInstance\n readonly instanceUrl: URL\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 }\n this.instanceUrl = parseNovaInstanceUrl(this.config.instanceUrl)\n\n // Set up Axios instance with interceptor for token fetching\n const axiosInstance = axios.create({\n baseURL: new URL(\"/api/v2\", this.instanceUrl).href,\n // TODO - backend needs to set proper CORS headers for this\n headers: isLocalhostDev\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: new URL(\"/api/v2\", this.instanceUrl).href,\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 const storedToken = availableStorage.getString(\"wbjs.access_token\")\n if (storedToken && this.accessToken !== storedToken) {\n // Might be newer than the one we have\n this.accessToken = storedToken\n return\n }\n\n // Otherwise, perform login flow\n this.authPromise = loginWithAuth0(this.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 new URL(\n `/api/v2/cells/${this.config.cellId}/${path.replace(/^\\/+/, \"\")}`,\n this.instanceUrl,\n ).href,\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 * @deprecated Wandelscript usage is deprecated; switching to Python is recommended.\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","import 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 LicenseApi,\n MotionGroupApi,\n MotionGroupModelsApi,\n NOVACloudApi,\n ProgramApi,\n RobotConfigurationsApi,\n SessionApi,\n StoreCollisionComponentsApi,\n StoreCollisionSetupsApi,\n StoreObjectApi,\n SystemApi,\n TrajectoryCachingApi,\n TrajectoryExecutionApi,\n TrajectoryPlanningApi,\n VersionApi,\n VirtualControllerApi,\n VirtualControllerBehaviorApi,\n VirtualControllerInputsOutputsApi,\n} from \"@wandelbots/nova-api/v2\"\nimport type { AxiosInstance } from \"axios\"\nimport axios from \"axios\"\n\n// biome-ignore lint/suspicious/noExplicitAny: metamagic\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\ntype WithUnwrappedAxiosResponse<T> = {\n [P in keyof T]: UnwrapAxiosResponseReturn<T[P]>\n}\n\ntype NovaAPIClientOpts = BaseConfiguration & {\n axiosInstance?: AxiosInstance\n mock?: boolean\n}\n\nfunction unwrap<T extends BaseAPI>(\n ApiConstructor: new (\n config: BaseConfiguration,\n basePath: string,\n axios: AxiosInstance,\n ) => T,\n opts: NovaAPIClientOpts,\n): WithUnwrappedAxiosResponse<T> {\n const apiClient = new ApiConstructor(\n {\n ...opts,\n isJsonMime: (mime: string) => mime === \"application/json\",\n },\n opts.basePath ?? \"\",\n opts.axiosInstance ?? axios.create(),\n ) as Record<string | symbol, unknown>\n\n for (const key of Reflect.ownKeys(\n Reflect.getPrototypeOf(apiClient) as object,\n )) {\n if (key !== \"constructor\" && typeof apiClient[key] === \"function\") {\n const originalFunction = apiClient[key] as (\n ...args: unknown[]\n ) => Promise<{ data: unknown }>\n apiClient[key] = (...args: unknown[]) =>\n originalFunction.apply(apiClient, args).then((res) => res.data)\n }\n }\n\n return apiClient as WithUnwrappedAxiosResponse<T>\n}\n\n/**\n * API client providing type-safe access to all the endpoints of a NOVA\n * instance.\n */\nexport class NovaAPIClient {\n readonly opts: NovaAPIClientOpts\n\n readonly application: WithUnwrappedAxiosResponse<ApplicationApi>\n readonly busIOs: WithUnwrappedAxiosResponse<BUSInputsOutputsApi>\n readonly cell: WithUnwrappedAxiosResponse<CellApi>\n readonly controller: WithUnwrappedAxiosResponse<ControllerApi>\n readonly controllerIOs: WithUnwrappedAxiosResponse<ControllerInputsOutputsApi>\n readonly jogging: WithUnwrappedAxiosResponse<JoggingApi>\n readonly kinematics: WithUnwrappedAxiosResponse<KinematicsApi>\n readonly license: WithUnwrappedAxiosResponse<LicenseApi>\n readonly motionGroup: WithUnwrappedAxiosResponse<MotionGroupApi>\n readonly motionGroupModels: WithUnwrappedAxiosResponse<MotionGroupModelsApi>\n readonly novaCloud: WithUnwrappedAxiosResponse<NOVACloudApi>\n readonly program: WithUnwrappedAxiosResponse<ProgramApi>\n readonly robotConfigurations: WithUnwrappedAxiosResponse<RobotConfigurationsApi>\n readonly session: WithUnwrappedAxiosResponse<SessionApi>\n readonly storeCollisionComponents: WithUnwrappedAxiosResponse<StoreCollisionComponentsApi>\n readonly storeCollisionSetups: WithUnwrappedAxiosResponse<StoreCollisionSetupsApi>\n readonly storeObject: WithUnwrappedAxiosResponse<StoreObjectApi>\n readonly system: WithUnwrappedAxiosResponse<SystemApi>\n readonly trajectoryCaching: WithUnwrappedAxiosResponse<TrajectoryCachingApi>\n readonly trajectoryExecution: WithUnwrappedAxiosResponse<TrajectoryExecutionApi>\n readonly trajectoryPlanning: WithUnwrappedAxiosResponse<TrajectoryPlanningApi>\n readonly version: WithUnwrappedAxiosResponse<VersionApi>\n readonly virtualController: WithUnwrappedAxiosResponse<VirtualControllerApi>\n readonly virtualControllerBehavior: WithUnwrappedAxiosResponse<VirtualControllerBehaviorApi>\n readonly virtualControllerIOs: WithUnwrappedAxiosResponse<VirtualControllerInputsOutputsApi>\n\n constructor(opts: NovaAPIClientOpts) {\n this.opts = opts\n\n this.application = unwrap(ApplicationApi, opts)\n this.busIOs = unwrap(BUSInputsOutputsApi, opts)\n this.cell = unwrap(CellApi, opts)\n this.controller = unwrap(ControllerApi, opts)\n this.controllerIOs = unwrap(ControllerInputsOutputsApi, opts)\n this.jogging = unwrap(JoggingApi, opts)\n this.kinematics = unwrap(KinematicsApi, opts)\n this.license = unwrap(LicenseApi, opts)\n this.motionGroup = unwrap(MotionGroupApi, opts)\n this.motionGroupModels = unwrap(MotionGroupModelsApi, opts)\n this.novaCloud = unwrap(NOVACloudApi, opts)\n this.program = unwrap(ProgramApi, opts)\n this.robotConfigurations = unwrap(RobotConfigurationsApi, opts)\n this.session = unwrap(SessionApi, opts)\n this.storeCollisionComponents = unwrap(StoreCollisionComponentsApi, opts)\n this.storeCollisionSetups = unwrap(StoreCollisionSetupsApi, opts)\n this.storeObject = unwrap(StoreObjectApi, opts)\n this.system = unwrap(SystemApi, opts)\n this.trajectoryCaching = unwrap(TrajectoryCachingApi, opts)\n this.trajectoryExecution = unwrap(TrajectoryExecutionApi, opts)\n this.trajectoryPlanning = unwrap(TrajectoryPlanningApi, opts)\n this.version = unwrap(VersionApi, opts)\n this.virtualController = unwrap(VirtualControllerApi, opts)\n this.virtualControllerBehavior = unwrap(VirtualControllerBehaviorApi, opts)\n this.virtualControllerIOs = unwrap(VirtualControllerInputsOutputsApi, opts)\n }\n}\n","import type { Configuration as BaseConfiguration } from \"@wandelbots/nova-api/v2\"\nimport type { AxiosRequestConfig } from \"axios\"\nimport axios, { isAxiosError } from \"axios\"\nimport { AutoReconnectingWebsocket } from \"./AutoReconnectingWebsocket.ts\"\nimport { availableStorage } from \"./availableStorage.ts\"\nimport { isLocalhostDev } from \"./context.ts\"\nimport { parseNovaInstanceUrl } from \"./converters.ts\"\nimport { loginWithAuth0 } from \"./LoginWithAuth0.ts\"\nimport { MockNovaInstance } from \"./mock/MockNovaInstance.ts\"\nimport { NovaAPIClient } from \"./NovaAPIClient.ts\"\n\nexport type NovaConfig = {\n /**\n * Url of the deployed NOVA instance to connect to\n * e.g. https://saeattii.instance.wandelbots.io\n */\n instanceUrl: string\n\n /**\n * Access token for Bearer authentication.\n * If running on a NOVA instance, this can be automatically retrieved from\n * the current session when omitted.\n */\n accessToken?: string\n} & Omit<BaseConfiguration, \"isJsonMime\" | \"basePath\">\n\n/**\n *\n * Client for connecting to a NOVA instance and controlling robots.\n */\nexport class Nova {\n readonly api: NovaAPIClient\n readonly config: NovaConfig\n readonly mock?: MockNovaInstance\n readonly instanceUrl: URL\n authPromise: Promise<string | null> | null = null\n accessToken: string | null = null\n\n constructor(config: NovaConfig) {\n this.config = config\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 }\n this.instanceUrl = parseNovaInstanceUrl(this.config.instanceUrl)\n\n // Set up Axios instance with interceptor for token fetching\n const axiosInstance = axios.create({\n baseURL: new URL(\"/api/v2\", this.instanceUrl).href,\n // TODO - backend needs to set proper CORS headers for this\n headers: isLocalhostDev\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 }\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 (\n error.response?.status === 403 &&\n !error.config?.url?.split(/[?#]/)[0]?.endsWith(\"/session\")\n ) {\n // If we hit a 403, the user is authenticated but may lack access\n // to the instance entirely. Check the session to find out.\n let redirectToAccessDenied = false\n try {\n const session = await this.api.session.getSession()\n if (\n session.session_id !== \"default\" &&\n session.capabilities.length === 0\n ) {\n // An authenticated user with no capabilities has no access.\n redirectToAccessDenied = true\n }\n } catch (sessionError) {\n // The session endpoint itself returns a 403 when the user is\n // not assigned to an instance at all, which we treat as equivalent to\n // an authenticated user with empty capabilities.\n if (\n isAxiosError(sessionError) &&\n sessionError.response?.status === 403\n ) {\n redirectToAccessDenied = true\n }\n // Otherwise couldn't determine access; fall through to bubble\n // the original 403 error below.\n }\n\n if (redirectToAccessDenied) {\n // Send them to the instance url, which renders the access\n // denied screen. Return a promise that never settles so the\n // caller doesn't flash an error state before the navigation\n // takes effect.\n window.location.href = this.instanceUrl.href\n return new Promise(() => {})\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. Return a promise that never settles so the\n // caller doesn't flash an error state before the reload takes\n // effect.\n window.location.reload()\n return new Promise(() => {})\n }\n }\n }\n\n return Promise.reject(error)\n },\n )\n }\n\n this.api = new NovaAPIClient({\n ...config,\n basePath: new URL(\"/api/v2\", this.instanceUrl).href,\n isJsonMime: (mime: string) => {\n return mime === \"application/json\"\n },\n baseOptions: {\n ...(this.mock\n ? ({\n adapter: (config) => {\n if (!this.mock) {\n throw new Error(\"Mock adapter used without a mock instance\")\n }\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 const storedToken = availableStorage.getString(\"wbjs.access_token\")\n if (storedToken && this.accessToken !== storedToken) {\n // Might be newer than the one we have\n this.accessToken = storedToken\n return\n }\n\n // Otherwise, perform login flow\n this.authPromise = loginWithAuth0(this.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(`/api/v2/${path.replace(/^\\/+/, \"\")}`, this.instanceUrl)\n url.protocol = url.protocol.replace(\"http\", \"ws\")\n url.protocol = url.protocol.replace(\"https\", \"wss\")\n\n if (this.accessToken) {\n url.searchParams.append(\"token\", this.accessToken)\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"],"mappings":";;;;;;;;;;;AA6DA,IAAa,oBAAb,MAA+B;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAKA,YACE,QACA,MAIA;EACA,KAAK,SAAS;EACd,KAAK,OAAO;EACZ,KAAK,SAAS,KAAK,2BAA2B,SAAS;EACvD,KAAK,OAAO,KAAK,2BAA2B,OAAO;EACnD,KAAK,cAAc,KAAK,WAAW,cAAc;EACjD,KAAK,oBACH,KAAK,2BAA2B,oBAAoB;EACtD,KAAK,aAAa,KAAK,WAAW,aAAa;EAC/C,KAAK,gBAAgB,KAAK,WAAW,0BAA0B;EAC/D,KAAK,qBAAqB,KAAK,WAAW,qBAAqB;EAC/D,KAAK,sBAAsB,KAAK,WAAW,sBAAsB;EACjE,KAAK,oBAAoB,KAAK,WAAW,oBA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AG;KAAG;IAAC;GACvB;GACA,MAAM,EACJ,QAAQ;IACN,MAAM;IACN,MAAM;KACJ,UAAU;MAAC;MAAG;MAAG;KAAC;KAClB,aAAa;MAAC;MAAG;MAAG;KAAC;IACvB;GACF,EACF;GACA,UAAU,EACR,UAAU;IACR,MAAM;IACN,SAAS;IACT,gBAAgB;KAAC;KAAG;KAAG;IAAC;IACxB,mBAAmB;KAAC;KAAG;KAAG;IAAC;GAC7B,EACF;GACA,YAAY;GACZ,eAAe;IACb;KACE,OAAO;KACP,GAAG;IACL;IACA,EACE,GAAG,KACL;IACA,EACE,GAAG,OACL;IACA;KACE,OAAO;KACP,GAAG;IACL;IACA;KACE,OAAO;KACP,GAAG;IACL;IACA,EACE,GAAG,KACL;GACF;GACA,kBAAkB;IAChB,aAAa;KACX,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;KACA,OAAO,EACL,UAAU,IACZ;KACA,QAAQ,EACN,UAAU,IACZ;IACF;IACA,eAAe;KACb,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;IACF;IACA,kBAAkB;KAChB,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;IACF;IACA,kBAAkB;KAChB,QAAQ;MACN;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;MACA;OACE,UAAU;QACR,aAAa;QACb,aAAa;OACf;OACA,UAAU;OACV,cAAc;OACd,QAAQ;MACV;KACF;KACA,KAAK,EACH,UAAU,IACZ;IACF;GACF;GACA,eAAe;EACjB;CACF;AACF;;;AClTA,MAAa,+BAA+B;CAC1C,QAAQ;CACR,MAAM;CACN,SAAS;EACP,OAAO;GACL,eAAe;IACb;KACE,OAAO;KACP,OAAO;KACP,GAAG;KACH,GAAG;KACH,4BAA4B;IAC9B;IACA;KACE,OAAO;KACP,OAAO;KACP,GAAG;KACH,GAAG;KACH,4BAA4B;IAC9B;IACA;KACE,OAAO;KACP,OAAO;KACP,GAAG;KACH,GAAG;KACH,4BAA4B;IAC9B;IACA;KACE,OAAO;KACP,OAAO;KACP,GAAG;KACH,GAAG;KACH,4BAA4B;IAC9B;IACA;KACE,OAAO;KACP,OAAO;KACP,GAAG;KACH,GAAG;KACH,4BAA4B;IAC9B;IACA;KACE,OAAO;KACP,OAAO;KACP,GAAG;KACH,GAAG;KACH,4BAA4B;IAC9B;GACF;GACA,gBAAgB;EAClB;CACF;AACF;;;AClDA,MAAa,qBAAqB;CAChC,QAAQ;CACR,MAAM;CACN,SAAS;EACP,OAAO;GACL,eAAe;IACb,wBAAwB;IACxB,MAAM;IACN,cAAc;IACd,MAAM;GACR;GACA,MAAM;EACR;CACF;AACF;;;AChBA,MAAa,wBAAwB;CACnC,QAAQ;CACR,MAAM;CACN,SAAS;EACP,OAAO,CACL;GACE,mBAAmB;GACnB,MAAM;GACN,6BAA6B;GAC7B,UAAU;IAAC;IAAG;IAAG;GAAC;GAClB,aAAa;IAAC;IAAG;IAAG;GAAC;GACrB,kBAAkB;EACpB,GACA;GACE,mBAAmB;GACnB,MAAM;GACN,6BAA6B;GAC7B,UAA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,IAAI,KAAK,aAEP,iBAAiB,UAAU,qBAAqB,KAAK,WAAW;QAEhE,iBAAiB,OAAO,mBAAmB;EAE/C,UAAU;GACR,KAAK,cAAc;EACrB;CACF;CAEA,iBAAiB,MAAsB;EACrC,MAAM,MAAM,IAAI,IAAI,WAAW,KAAK,QAAQ,QAAQ,EAAE,KAAK,KAAK,WAAW;EAC3E,IAAI,WAAW,IAAI,SAAS,QAAQ,QAAQ,IAAI;EAChD,IAAI,WAAW,IAAI,SAAS,QAAQ,SAAS,KAAK;EAElD,IAAI,KAAK,aACP,IAAI,aAAa,OAAO,SAAS,KAAK,WAAW;EAGnD,OAAO,IAAI,SAAS;CACtB;;;;;;CAOA,0BAA0B,MAAc;EACtC,OAAO,IAAI,0BAA0B,KAAK,iBAAiB,IAAI,GAAG,EAChE,MAAM,KAAK,KACb,CAAC;CACH;AACF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/nova-js",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.11.
|
|
4
|
+
"version": "3.11.2-pr.303.fc42d9a",
|
|
5
5
|
"description": "Official JS client for the Wandelbots API",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"packageManager": "pnpm@11.1.3+sha512.c85357fe17ca12dd23dd7071822666dfd7e3cb76fe214e3370b5ea2fb34f2a231185509b63e717f3cd0acb38dd3f8d82bcd5e8172400ae678b70ea4fbed0896d",
|
package/src/lib/Nova.ts
CHANGED
|
@@ -97,37 +97,47 @@ export class Nova {
|
|
|
97
97
|
) {
|
|
98
98
|
// If we hit a 403, the user is authenticated but may lack access
|
|
99
99
|
// to the instance entirely. Check the session to find out.
|
|
100
|
+
let redirectToAccessDenied = false
|
|
100
101
|
try {
|
|
101
102
|
const session = await this.api.session.getSession()
|
|
102
103
|
if (
|
|
103
104
|
session.session_id !== "default" &&
|
|
104
105
|
session.capabilities.length === 0
|
|
105
106
|
) {
|
|
106
|
-
// An authenticated user with no capabilities has no access
|
|
107
|
-
|
|
108
|
-
// denied screen.
|
|
109
|
-
window.location.href = this.instanceUrl.href
|
|
107
|
+
// An authenticated user with no capabilities has no access.
|
|
108
|
+
redirectToAccessDenied = true
|
|
110
109
|
}
|
|
111
110
|
} catch (sessionError) {
|
|
112
111
|
// The session endpoint itself returns a 403 when the user is
|
|
113
|
-
// not assigned to
|
|
114
|
-
// authenticated user with
|
|
115
|
-
// send them to the access denied screen.
|
|
112
|
+
// not assigned to an instance at all, which we treat as equivalent to
|
|
113
|
+
// an authenticated user with empty capabilities.
|
|
116
114
|
if (
|
|
117
115
|
isAxiosError(sessionError) &&
|
|
118
116
|
sessionError.response?.status === 403
|
|
119
117
|
) {
|
|
120
|
-
|
|
118
|
+
redirectToAccessDenied = true
|
|
121
119
|
}
|
|
122
120
|
// Otherwise couldn't determine access; fall through to bubble
|
|
123
121
|
// the original 403 error below.
|
|
124
122
|
}
|
|
123
|
+
|
|
124
|
+
if (redirectToAccessDenied) {
|
|
125
|
+
// Send them to the instance url, which renders the access
|
|
126
|
+
// denied screen. Return a promise that never settles so the
|
|
127
|
+
// caller doesn't flash an error state before the navigation
|
|
128
|
+
// takes effect.
|
|
129
|
+
window.location.href = this.instanceUrl.href
|
|
130
|
+
return new Promise(() => {})
|
|
131
|
+
}
|
|
125
132
|
} else if (error.response?.status === 503) {
|
|
126
133
|
// Check if the server as a whole is down
|
|
127
134
|
const res = await fetch(window.location.href)
|
|
128
135
|
if (res.status === 503) {
|
|
129
|
-
// Go to 503 page
|
|
136
|
+
// Go to 503 page. Return a promise that never settles so the
|
|
137
|
+
// caller doesn't flash an error state before the reload takes
|
|
138
|
+
// effect.
|
|
130
139
|
window.location.reload()
|
|
140
|
+
return new Promise(() => {})
|
|
131
141
|
}
|
|
132
142
|
}
|
|
133
143
|
}
|