Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async executeTest(tokenProps: IModelTokenProps, testName: string, params: any): Promise {
const iModelToken = IModelToken.fromJSON(tokenProps);
return JSON.parse(IModelDb.find(iModelToken).nativeDb.executeTest(testName, JSON.stringify(params)));
}
public async extractChangeSummaries(tokenProps: IModelTokenProps, options: any): Promise {
const requestContext = ClientRequestContext.current as AuthorizedClientRequestContext;
const iModelToken = IModelToken.fromJSON(tokenProps);
await ChangeSummaryManager.extractChangeSummaries(requestContext, IModelDb.find(iModelToken), options as ChangeSummaryExtractOptions);
}
public async moveRobot(tokenProps: IModelTokenProps, id: Id64String, location: XYZProps): Promise {
RobotWorldEngine.moveRobot(IModelDb.find(IModelToken.fromJSON(tokenProps)), id, Point3d.fromJSON(location));
}
public async insertBarrier(tokenProps: IModelTokenProps, modelId: Id64String, location: XYZProps, angle: AngleProps, length: number): Promise {
return RobotWorldEngine.insertBarrier(IModelDb.find(IModelToken.fromJSON(tokenProps)), modelId, Point3d.fromJSON(location), Angle.fromJSON(angle), length);
}
public async countRobotsInArray(tokenProps: IModelTokenProps, elemIds: Id64String[]): Promise {
const iModelDb: IModelDb = IModelDb.find(IModelToken.fromJSON(tokenProps));
return RobotWorldEngine.countRobotsInArray(iModelDb, elemIds);
}
public async countRobots(tokenProps: IModelTokenProps): Promise {
const iModelDb: IModelDb = IModelDb.find(IModelToken.fromJSON(tokenProps));
return RobotWorldEngine.countRobots(iModelDb);
}
public async insertRobot(tokenProps: IModelTokenProps, modelId: Id64String, name: string, location: XYZProps): Promise {
return RobotWorldEngine.insertRobot(IModelDb.find(IModelToken.fromJSON(tokenProps)), modelId, name, Point3d.fromJSON(location));
}
public async queryObstaclesHitByRobot(tokenProps: IModelTokenProps, rid: Id64String): Promise {
const iModelDb: IModelDb = IModelDb.find(IModelToken.fromJSON(tokenProps));
return RobotWorldEngine.queryObstaclesHitByRobot(iModelDb, rid);
}
}