/** * Default server client which loads content for a {@link BIMViewer} via HTTP from the file system. * A BIMViewer is instantiated with an instance of this class. * To load content from an alternative source, instantiate BIMViewer * with your own custom implementation of this class. * @class */ export default class Server { protected _dataDir: string; protected _filePath: string; /** * Constructs a Server. * * @param {*} [cfg] Server configuration. * @param {String} [cfg.dataDir] Base directory for content. * @param {String} [cfg.filePath] Base directory for content. */ constructor(cfg?: any); /** * Gets information on all available projects. * * @param {Function} done Callback through which the JSON result is returned. * @param {Function} error Callback through which an error message is returned on error. */ getProjects(done: Function, error: Function): void; /** * Gets information for a project. * @param {String} projectId ID of the project. * @param {Function} done Callback through which the JSON result is returned. * @param {Function} error Callback through which an error message is returned on error. */ getProject(projectId: string, done: Function, error: Function): void; /** * Gets metadata for a model within a project. * * @param {String} projectId ID of the project. * @param {String} modelId ID of the model. * @param {Function} done Callback through which the JSON result is returned. * @param {Function} error Callback through which an error message is returned on error. */ getMetadata(projectId: string, modelId: string, done: Function, error: Function): void; /** * Gets information for a project. * @param {String} projectId ID of the project. * @param {Function} done Callback through which the JSON result is returned. * @param {Function} error Callback through which an error message is returned on error. */ getModelProject(region_url: string, bucket_name: string, done: Function, error: Function): Promise; /** * Gets metadata for a model within a project. * * @param {String} projectId ID of the project. * @param {String} FileId path of the model. * @param {Function} done Callback through which the JSON result is returned. * @param {Function} error Callback through which an error message is returned on error. */ getModelMetadata(region_url: string, bucket_name: string, done: Function, error: Function): Promise; /** * Gets geometry for a model within a project. * * @param {String} projectId ID of the project. * @param {String} FileId ID of the model. * @param {Function} done Callback through which the JSON result is returned. * @param {Function} error Callback through which an error message is returned on error. */ getModelGeometry(region_url: string, bucket_name: string, done: Function, error: Function): Promise; /** * Gets geometry for a model within a project. * * @param {String} projectId ID of the project. * @param {String} modelId ID of the model. * @param {Function} done Callback through which the JSON result is returned. * @param {Function} error Callback through which an error message is returned on error. */ getGeometry(projectId: string, modelId: string, done: Function, error: Function): void; /** * Gets geometry for a model within a project. * * @param {String} projectId ID of the project. * @param {String} modelId ID of the model. * @param {Function} done Callback through which the JSON result is returned. * @param {Function} error Callback through which an error message is returned on error. */ getObjectInfo(projectId: string, modelId: string, objectId: string, done: Function, error: Function): void; /** * Gets existing issues for a model within a project. * * @param {String} projectId ID of the project. * @param {String} modelId ID of the model. * @param {Function} done Callback through which the JSON result is returned. * @param {Function} error Callback through which an error message is returned on error. */ getIssues(projectId: string, modelId: string, done: Function, error: Function): void; /** * Gets a JSON manifest file for a model that's split into multiple XTC files * (and maybe also JSON metadata files). * * The manifest can have an arbitrary name, and will list all the XTC * (and maybe separate JSON metada files) * that comprise the model. * * @param {String} projectId ID of the project. * @param {String} modelId ID of the model. * @param {String} manifestName Filename of the manifest. * @param {Function} done Callback through which the JSON result is returned. * @param {Function} error Callback through which an error message is returned on error. */ getSplitModelManifest(projectId: string, modelId: string, manifestName: string, done: Function, error: Function): void; /** * Gets one of the metadata files within a split model within a project. * * @param {String} projectId ID of the project. * @param {String} modelId ID of the model. * @param {String} metadataFileName Filename of the metadata file. * @param {Function} done Callback through which the JSON result is returned. * @param {Function} error Callback through which an error message is returned on error. */ getSplitModelMetadata(projectId: string, modelId: string, metadataFileName: string, done: Function, error: Function): void; /** * Gets one of the XTC geometry files within a split model within a project. * * @param {String} projectId ID of the project. * @param {String} modelId ID of the model. * @param {String} geometryFileName Filename of the XTC geometry file. * @param {Function} done Callback through which the JSON result is returned. * @param {Function} error Callback through which an error message is returned on error. */ getSplitModelGeometry(projectId: string, modelId: string, geometryFileName: string, done: Function, error: Function): void; }