@inweb/client 26.12.7 → 27.1.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"client.module.js","sources":["../src/Api/Endpoint.ts","../src/Api/FetchError.ts","../src/Api/Model.ts","../src/Api/Utils.ts","../src/Api/ClashTest.ts","../src/Api/Assembly.ts","../src/Api/Fetch.ts","../src/Api/XMLHttp.ts","../src/Api/HttpClient.ts","../src/Api/Permission.ts","../src/Api/Job.ts","../src/Api/SharedLink.ts","../src/Api/File.ts","../src/Api/Role.ts","../src/Api/Member.ts","../src/Api/Project.ts","../src/Api/User.ts","../src/Api/OAuthClient.ts","../src/Api/SharedFile.ts","../src/Api/Plugin.ts","../src/Api/Client.ts","../src/index.ts"],"sourcesContent":["///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\n\n/**\n * Base class for the REST API endpoints.\n */\nexport class Endpoint {\n /**\n * Endpoint API path relative to the REST API server URL.\n */\n public path: string;\n\n /**\n * Endpoint-specific HTTP headers for the `GET`, `POST`, `PUT` and `DELETE` requests. You can add\n * custom headers at any time.\n */\n public headers: HeadersInit;\n\n public httpClient: IHttpClient;\n private _useVersion: number | undefined;\n\n /**\n * @ignore\n * @param path - The API path of the endpoint relative to the REST API server URL of the specified HTTP\n * client.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n * @param headers - Endpoint-specific HTTP headers.\n */\n constructor(path: string, httpClient: IHttpClient, headers = {}) {\n this.path = path;\n this.httpClient = httpClient;\n this.headers = headers;\n }\n\n // Internal: append the `?version=` search param to the specified relative path.\n\n appendVersionParam(relativePath: string): string {\n if (this._useVersion === undefined) return relativePath;\n const delimiter = relativePath.includes(\"?\") ? \"&\" : \"?\";\n return `${relativePath}${delimiter}version=${this._useVersion}`;\n }\n\n /**\n * Returns the endpoint API path.\n *\n * @ignore\n * @param relativePath - Nested endpoint relative path.\n */\n getEndpointPath(relativePath: string): string {\n return this.appendVersionParam(`${this.path}${relativePath}`);\n }\n\n /**\n * Sends the `GET` request to the endpoint.\n *\n * @ignore\n * @param relativePath - Nested endpoint relative path.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n get(relativePath: string, signal?: AbortSignal): Promise<Response> {\n return this.httpClient.get(this.getEndpointPath(relativePath), { signal, headers: this.headers });\n }\n\n /**\n * Sends the `POST` request to the endpoint.\n *\n * @ignore\n * @param relativePath - Nested endpoint relative path.\n * @param body - Request body. Can be\n * {@link https://developer.mozilla.org/docs/Web/API/FormData | FormData},\n * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},\n * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob}, JSON object or plain text.\n */\n post(relativePath: string, body?: BodyInit | object): Promise<Response> {\n return this.httpClient.post(this.getEndpointPath(relativePath), body, { headers: this.headers });\n }\n\n /**\n * Sends the `PUT` request to the endpoint.\n *\n * @ignore\n * @param relativePath - Nested endpoint relative path.\n * @param body - Request body. Can be\n * {@link https://developer.mozilla.org/docs/Web/API/FormData | FormData},\n * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},\n * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob}, JSON object or plain text.\n */\n put(relativePath: string, body?: BodyInit | object): Promise<Response> {\n return this.httpClient.put(this.getEndpointPath(relativePath), body, { headers: this.headers });\n }\n\n /**\n * Sends the `DELETE` request to the endpoint.\n *\n * @ignore\n * @param relativePath - Nested endpoint relative path.\n */\n delete(relativePath: string): Promise<Response> {\n return this.httpClient.delete(this.getEndpointPath(relativePath), { headers: this.headers });\n }\n\n // Internal: append the `version` param to the endpoint requests.\n\n useVersion(version?: number): this {\n this._useVersion = version;\n return this;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nconst STATUS_CODES = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 102: \"Processing\",\n 103: \"Early Hints\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 207: \"Multi-Status\",\n 208: \"Already Reported\",\n 226: \"IM Used\",\n 300: \"Multiple Choices\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 307: \"Temporary Redirect\",\n 308: \"Permanent Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Time-out\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Payload Too Large\",\n 414: \"URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 418: \"I'm a teapot\",\n 421: \"Misdirected Request\",\n 422: \"Unprocessable Entity\",\n 423: \"Locked\",\n 424: \"Failed Dependency\",\n 425: \"Too Early\",\n 426: \"Upgrade Required\",\n 428: \"Precondition Required\",\n 429: \"Too Many Requests\",\n 431: \"Header Fields Too Large\",\n 451: \"Unavailable For Legal Reasons\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\",\n 506: \"Variant Also Negotiates\",\n 507: \"Insufficient Storage\",\n 508: \"Loop Detected\",\n 509: \"Bandwidth Limit Exceeded\",\n 510: \"Not Extended\",\n 511: \"Network Authentication Required\",\n};\n\nexport function statusText(status: number): string {\n return STATUS_CODES[status] || `Error ${status}`;\n}\n\nexport function error400(text: string, _default = \"400\"): string {\n try {\n return JSON.parse(text).description;\n } catch {\n return _default;\n }\n}\n\n/**\n * The `FetchError` object indicates an error when request to Open Cloud Server could not be performed. A\n * `FetchError` is typically (but not exclusively) thrown when a network error occurs, access denied, or\n * object not found.\n */\n\nexport class FetchError extends Error {\n /**\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Status | HTTP status code} of the response.\n */\n public status: number;\n\n /**\n * Status message corresponding to the {@link status | status code}.\n */\n public statusText: string;\n\n /**\n * @property status - The {@link https://developer.mozilla.org/docs/Web/HTTP/Status | HTTP status code}\n * of the response.\n * @property message - Error message.\n */\n constructor(status: number, message?: string) {\n super(message || statusText(status));\n this.name = \"FetchError\";\n this.status = status;\n this.statusText = statusText(status);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Endpoint } from \"./Endpoint\";\nimport type { File } from \"./File\";\nimport type { Assembly } from \"./Assembly\";\nimport type { IFileReferences } from \"./IFile\";\nimport type { IModelTransformMatrix } from \"./IAssembly\";\n\n/**\n * Provides properties and methods for working with view of the {@link File | file} or\n * {@link Assembly| assembly}. For example, for `dwg` it is a `Model` space or layout, and for `rvt` files\n * it is a `3D` view.\n */\nexport class Model extends Endpoint {\n private _data: any;\n private _file: File | Assembly;\n\n /**\n * @param data - Raw model data received from the server.\n * @param file - The file/assembly instance that owns the model.\n */\n constructor(data: any, file: File | Assembly) {\n super(`${file.path}/downloads`, file.httpClient);\n this._data = data;\n this._file = file;\n }\n\n /**\n * The `Assembly` instance that owns the model.\n *\n * @readonly\n */\n get assembly(): Assembly {\n return this._file as Assembly;\n }\n\n /**\n * Raw model data received from the server.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n }\n\n /**\n * Scene description resource file name. Use {@link downloadResource | downloadResource()} to download\n * scene description file.\n *\n * @readonly\n */\n get database(): string {\n return this.data.database;\n }\n\n /**\n * `true` if this is default model.\n *\n * @readonly\n */\n get default(): boolean {\n return this.data.default;\n }\n\n /**\n * The `File` instance that owns the model.\n *\n * @readonly\n */\n get file(): File {\n return this._file as File;\n }\n\n /**\n * The ID of the file that owns the model.\n *\n * @readonly\n */\n get fileId(): string {\n return this.data.fileId;\n }\n\n /**\n * The list of geometry data resource files. Use {@link downloadResource | downloadResource()} to\n * download geometry data files.\n *\n * @readonly\n */\n get geometry(): string[] {\n return this.data.geometry;\n }\n\n /**\n * Unique model ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * Model name.\n *\n * @readonly\n */\n get name(): string {\n return this.data.name;\n }\n\n /**\n * Model owner type, matches the file extension this is model of the file, or `assembly` for\n * assemblies.\n *\n * @readonly\n */\n get type(): string {\n return this.file.type;\n }\n\n // Reserved for future use.\n get version(): string {\n return this.data.version;\n }\n\n /**\n * Returns model list with one item `self`.\n */\n getModels(): Promise<Model[]> {\n return Promise.resolve([this]);\n }\n\n /**\n * Returns a model transformation.\n *\n * @param handle - Model handle.\n */\n getModelTransformMatrix(handle: string): IModelTransformMatrix {\n return this.file.getModelTransformMatrix(handle);\n }\n\n /**\n * Sets or removes a model transformation.\n *\n * @param handle - Model handle.\n * @param transform - Transformation matrix. Specify `undefined` to remove transformation.\n */\n setModelTransformMatrix(handle: string, transform?: IModelTransformMatrix): Promise<this> {\n return this.file.setModelTransformMatrix(handle, transform).then(() => this);\n }\n\n /**\n * Returns a list of viewpoints of the owner file/assembly.\n */\n getViewpoints(): Promise<any[]> {\n return this._file\n .getViewpoints()\n .then((array) =>\n array.filter(\n ({ custom_fields = {} }) => custom_fields.modelId === this.id || custom_fields.modelName === this.name\n )\n );\n }\n\n /**\n * Saves a new model owner file/assembly viewpoint to the server. To create a new viewpoint use\n * `Viewer.createViewpoint()`.\n *\n * @param viewpoint - Viewpoint object.\n */\n saveViewpoint(viewpoint: any): Promise<any> {\n return this._file.saveViewpoint({\n ...viewpoint,\n custom_fields: { ...viewpoint.custom_fields, modelId: this.id, modelName: this.name },\n });\n }\n\n /**\n * Deletes the specified viewpoint from the owner file/assembly.\n *\n * @param guid - Viewpoint GUID.\n * @returns Returns the raw data of a deleted viewpoint.\n */\n deleteViewpoint(guid: string): Promise<any> {\n return this._file.deleteViewpoint(guid);\n }\n\n /**\n * Returns viewpoint snapshot as base64-encoded\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.\n *\n * @param guid - Viewpoint GUID.\n */\n getSnapshot(guid: string): Promise<string> {\n return this._file.getSnapshot(guid);\n }\n\n /**\n * Returns viewpoint snapshot data.\n *\n * @param guid - Viewpoint GUID.\n * @param bitmapGuid - Bitmap GUID.\n */\n getSnapshotData(guid: string, bitmapGuid: string): Promise<string> {\n return this._file.getSnapshotData(guid, bitmapGuid);\n }\n\n /**\n * Downloads a resource file. Resource files are files that contain model scene descriptions, or\n * geometry data.\n *\n * @param dataId - Resource file name.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadResource(\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this._file.downloadResource(dataId, onProgress, signal);\n }\n\n /**\n * Downloads a part of resource file. Resource files are files that contain model scene descriptions,\n * or geometry data.\n *\n * @param dataId - Resource file name.\n * @param requestId - Specify a non-empty `requestId` to append the `?requestId=` search parameter to\n * the server request. If specified, server-side caching may not work.\n * @param ranges - Ranges of resource file contents to download. See\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Guides/Range_requests | HTTP range requests} for\n * more details.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadResourceRange(\n dataId: string,\n requestId: number,\n ranges: Array<{ begin: number; end: number; requestId: number }>,\n onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this._file.downloadResourceRange(dataId, requestId, ranges, onProgress, signal);\n }\n\n /**\n * Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.\n *\n * @deprecated\n */\n partialDownloadResource(\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n console.warn(\n \"Model.partialDownloadResource() has been deprecated since 25.3 and will be removed in a future release, use Model.downloadResource() instead.\"\n );\n return this.downloadResource(dataId, onProgress, signal);\n }\n\n /**\n * Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.\n *\n * @deprecated\n */\n async downloadFileRange(\n requestId: number,\n records: any | null,\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void,\n signal?: AbortSignal\n ): Promise<void> {\n if (!records) return;\n\n let ranges = [];\n if (records.length) {\n ranges = records.map((record) => ({\n begin: Number(record.begin),\n end: Number(record.end),\n requestId: record.reqId,\n }));\n } else {\n for (let i = 0; i < records.size(); i++) {\n const record = records.get(i);\n ranges.push({ begin: Number(record.begin), end: Number(record.end), requestId });\n record.delete();\n }\n }\n\n await this.downloadResourceRange(dataId, requestId, ranges, onProgress, signal);\n }\n\n /**\n * Returns a list of references of the owner file/assembly.\n *\n * References are images, fonts, or any other files to correct rendering of the file.\n *\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n */\n getReferences(signal?: AbortSignal): Promise<IFileReferences> {\n return this._file.getReferences(signal);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nexport function normalizeParam(param: any, separator: string = \"|\"): string {\n if (typeof param === \"string\") param = param.split(\",\");\n if (Array.isArray(param)) param = param.filter((x) => x).join(separator);\n if (typeof param === \"string\") param = param.trim();\n return param.toString();\n}\n\nexport function delay(ms: number, signal: AbortSignal): Promise<boolean> {\n return new Promise((resolve) => {\n let timeoutId = 0;\n\n const abortHandler = () => {\n clearTimeout(timeoutId);\n resolve(true);\n };\n\n timeoutId = window.setTimeout(() => {\n signal.removeEventListener(\"abort\", abortHandler);\n resolve(false);\n }, ms || 0);\n\n signal.addEventListener(\"abort\", abortHandler, { once: true });\n });\n}\n\nexport async function waitFor(\n func: (params: any) => Promise<boolean>,\n params: {\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n abortError?: DOMException;\n timeoutError?: DOMException;\n result?: any;\n } = {}\n): Promise<any> {\n const timeout = params.timeout || 600000;\n const interval = params.interval || 3000;\n const signal = params.signal ?? new AbortController().signal;\n const abortError = params.abortError ?? new DOMException(\"Aborted\", \"AbortError\");\n const timeoutError = params.timeoutError ?? new DOMException(\"Timeout\", \"TimeoutError\");\n\n const end = performance.now() + timeout;\n let count = timeout / interval;\n\n do {\n if (await func(params)) return Promise.resolve(params.result);\n if ((await delay(interval, signal)) || signal.aborted) return Promise.reject(abortError);\n } while (performance.now() < end && --count > 0);\n\n return Promise.reject(timeoutError);\n}\n\nexport function parseArgs(args?: string | object): object {\n if (typeof args === \"string\") {\n const firstArg = args.indexOf(\"--\");\n if (firstArg !== -1) args = args.slice(firstArg);\n const argArray = args\n .split(\"--\")\n .map((x) =>\n x\n .split(\"=\")\n .map((y) => y.split(\" \"))\n .flat()\n )\n .filter((x) => x[0])\n .map((x) => x.concat([\"\"]));\n return Object.fromEntries(argArray);\n }\n return args || {};\n}\n\nexport function userFullName(firstName: string | any, lastName = \"\", userName = \"\"): string {\n if (firstName && typeof firstName !== \"string\") {\n return userFullName(firstName.firstName ?? firstName.name, firstName.lastName, firstName.userName);\n }\n return `${firstName ?? \"\"} ${lastName ?? \"\"}`.trim() || userName;\n}\n\nexport function userInitials(fullName = \"\"): string {\n const names = fullName.split(\" \").filter((x) => x);\n return names\n .reduce((initials, name, index) => {\n if (index === 0 || index === names.length - 1) initials += name.charAt(0);\n return initials;\n }, \"\")\n .toUpperCase();\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { IClashItem } from \"./IAssembly\";\nimport { IShortUserDesc } from \"./IUser\";\nimport { waitFor, userFullName, userInitials } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about a file/assembly clash detection test.\n */\nexport class ClashTest extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw test data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n * @param path - The clash test API path of the file/assembly that owns the test.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, path: string, httpClient: IHttpClient) {\n super(`${path}/clashes/${data.id}`, httpClient);\n this.data = data;\n }\n\n /**\n * The type of the clashes that the test detects:\n *\n * - `true` - Clearance clash. A clash in which the object A may or may not intersect with object B, but\n * comes within a distance of less than the {@link tolerance}.\n * - `false` - Hard clash. A clash in which the object A intersects with object B by a distance of more\n * than the {@link tolerance}.\n *\n * @readonly\n */\n get clearance(): boolean {\n return this.data.clearance;\n }\n\n /**\n * Test creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get createdAt(): string {\n return this.data.createdAt;\n }\n\n /**\n * Raw test data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;\n this._data.owner.fullName = userFullName(this._data.owner);\n this._data.owner.initials = userInitials(this._data.owner.fullName);\n }\n\n /**\n * Unique test ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * Test last update (UTC) time in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get lastModifiedAt(): string {\n return this.data.lastModifiedAt;\n }\n\n /**\n * Test name.\n */\n get name(): string {\n return this.data.name;\n }\n\n set name(value: string) {\n this.data.name = value;\n }\n\n /**\n * Test owner information.\n *\n * @readonly\n */\n get owner(): IShortUserDesc {\n return this.data.owner;\n }\n\n /**\n * First selection set for clash detection. Objects from `selectionSetA` will be tested against each\n * others by objects from the `selectionSetB` during the test.\n *\n * @readonly\n */\n get selectionSetA(): string[] {\n return this.data.selectionSetA;\n }\n\n /**\n * The type of first selection set for clash detection. Can be one of:\n *\n * - `all` - All file/assembly objects.\n * - `handle` - Objects with original handles specified in the `selectionSetA`.\n * - `models` - All objects of the models with original handles specified in the `selectionSetA`.\n * - `searchquery` - Objects retrieved by the search queries specified in `selectionSetA`.\n *\n * @readonly\n */\n get selectionTypeA(): string {\n return this.data.selectionTypeA;\n }\n\n /**\n * Second selection set for clash detection. Objects from `selectionSetB` will be tested against each\n * others by objects from the `selectionSetA` during the test.\n *\n * @readonly\n */\n get selectionSetB(): string[] {\n return this.data.selectionSetB;\n }\n\n /**\n * The type of second selection set for clash detection. Can be one of:\n *\n * - `all` - All file/assembly objects.\n * - `handle` - Objects with original handles specified in the `selectionSetB`.\n * - `models` - All objects of the models with original handles specified in the `selectionSetB`.\n * - `searchquery` - Objects retrieved by the search queries specified in `selectionSetB`.\n *\n * @readonly\n */\n get selectionTypeB(): string {\n return this.data.selectionTypeB;\n }\n\n /**\n * Test status. Can be `none`, `waiting`, `inprogress`, `done` or `failed`.\n *\n * @readonly\n */\n get status(): string {\n return this.data.status;\n }\n\n /**\n * The distance of separation between objects at which test begins detecting clashes.\n *\n * @readonly\n */\n get tolerance(): number {\n return this.data.tolerance;\n }\n\n /**\n * Reloads test data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates test data on the server.\n *\n * @param data - Raw test data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a test and its results report from the server.\n *\n * @returns Returns the raw data of a deleted test. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves test properties changes to the server. Call this method to update test data on the server\n * after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n\n /**\n * Waits for test to complete. Test is done when it changes to `done` or `failed` status.\n *\n * @param params - An object containing waiting parameters.\n * @param params.timeout - The time, in milliseconds that the function should wait test. If test is not\n * complete during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * test status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.\n */\n waitForDone(params?: {\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onCheckout?: (test: ClashTest, ready: boolean) => boolean;\n }): Promise<this> {\n const checkDone = () =>\n this.checkout().then((test) => {\n const ready = [\"done\", \"failed\"].includes(test.status);\n const cancel = params?.onCheckout?.(test, ready);\n return cancel || ready;\n });\n return waitFor(checkDone, params).then(() => this);\n }\n\n /**\n * Returns a list of detected clashes for this test.\n */\n getReport(): Promise<IClashItem[]> {\n return this.get(\"/report\").then((response) => response.json());\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { FetchError } from \"./FetchError\";\nimport { ICdaNode, IFileReferences } from \"./IFile\";\nimport { IAssociatedFileData, IAssemblyVersionInfo, IModelTransformMatrix } from \"./IAssembly\";\nimport { IShortUserDesc } from \"./IUser\";\nimport { Model } from \"./Model\";\nimport { ClashTest } from \"./ClashTest\";\nimport { ISharedLinkPermissions } from \"./ISharedLink\";\nimport { SharedLink } from \"./SharedLink\";\nimport { normalizeParam, waitFor, userFullName, userInitials } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about an assembly on the Open Cloud Server\n * and managing its data.\n */\nexport class Assembly extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw assembly data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/assemblies/${data.id}`, httpClient);\n this.data = data;\n }\n\n // Reserved for future use\n\n get activeVersion(): number {\n return this.data.activeVersion;\n }\n\n /**\n * List of unique files from which the assembly was created.\n *\n * @readonly\n */\n get associatedFiles(): IAssociatedFileData[] {\n return this.data.associatedFiles;\n }\n\n /**\n * Assembly creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get created(): string {\n return this.data.created;\n }\n\n /**\n * Returns the raw assembly data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;\n this._data.owner.fullName = userFullName(this._data.owner);\n this._data.owner.initials = userInitials(this._data.owner.fullName);\n // associatedFiles since 23.12\n this._data.associatedFiles ??= [];\n this._data.associatedFiles.forEach((file) => (file.link = `${this.httpClient.serverUrl}/files/${file.fileId}`));\n }\n\n /**\n * List of file IDs from which the assembly was created.\n *\n * @readonly\n */\n get files(): string[] {\n return this.data.files;\n }\n\n /**\n * Assembly geometry data type:\n *\n * - `vsfx` - `VSFX` format, assembly can be opened in `VisualizeJS` 3D viewer.\n *\n * Returns an empty string if the geometry data is not yet ready.\n */\n get geometryType(): string {\n return this.status === \"done\" ? \"vsfx\" : \"\";\n }\n\n /**\n * Unique assembly ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * Assembly name.\n */\n get name(): string {\n return this.data.name;\n }\n\n set name(value: string) {\n this.data.name = value;\n }\n\n // Reserved for future use\n\n get originalAssemblyId(): string {\n return this.data.originalAssemblyId;\n }\n\n /**\n * Assembly owner information.\n *\n * @readonly\n */\n get owner(): IShortUserDesc {\n return this.data.owner;\n }\n\n // Reserved for future use\n\n get previewUrl(): string {\n return this.data.previewUrl || \"\";\n }\n\n /**\n * List of assembly related job IDs.\n *\n * @readonly\n */\n get relatedJobs(): string[] {\n return this.data.relatedJobs;\n }\n\n /**\n * Assembly geometry data and properties status. Can be `waiting`, `inprogress`, `done` or `failed`.\n *\n * An assemblies without geometry data cannot be opened in viewer.\n *\n * @readonly\n */\n get status(): string {\n return this.data.status;\n }\n\n /**\n * Assembly type. Returns an `assembly` string.\n *\n * @readonly\n */\n get type(): string {\n return \"assembly\";\n }\n\n // Reserved for future use\n\n get version(): number {\n return this.data.version;\n }\n\n get versions(): IAssemblyVersionInfo[] {\n return this.data.versions;\n }\n\n /**\n * Reloads assembly data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates assembly data on the server.\n *\n * @param data - Raw assembly data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes an assembly from the server.\n *\n * @returns Returns the raw data of a deleted assembly. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves assembly properties changes to the server. Call this method to update assembly data on the\n * server after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n\n // Reserved for future use\n\n setPreview(image?: BodyInit | null): Promise<this> {\n console.warn(\"Assembly does not support preview\");\n return Promise.resolve(this);\n }\n\n deletePreview(): Promise<this> {\n console.warn(\"Assembly does not support preview\");\n return Promise.resolve(this);\n }\n\n /**\n * Returns list of assembly models.\n */\n getModels(): Promise<Model[]> {\n return this.get(\"/geometry\")\n .then((response) => response.json())\n .then((array) => array.map((data: any) => new Model(data, this)));\n }\n\n /**\n * Returns a model transformation.\n *\n * @param handle - Model original handle.\n */\n getModelTransformMatrix(handle: string): IModelTransformMatrix {\n return this.data.transform[handle];\n }\n\n /**\n * Sets or removes a model transformation.\n *\n * @param handle - Model original handle.\n * @param transform - Transformation matrix. Specify `undefined` to remove transformation.\n */\n setModelTransformMatrix(handle: string, transform?: IModelTransformMatrix): Promise<this> {\n const obj = { ...this.data.transform };\n obj[handle] = transform;\n return this.update({ transform: obj });\n }\n\n /**\n * Object properties.\n *\n * @typedef {any} Properties\n * @property {string} handle - Object original handle.\n * @property {string | any} * - Object property. Can be `any` for nested group properties.\n */\n\n /**\n * Returns the properties for objects in the assembly.\n *\n * @param handles - Object original handle or handles array. Specify `undefined` to get properties for\n * all objects in the assembly.\n * @param group - If the `group` parameter is `true`, properties are returned grouped by category. By\n * default, or if `group` is set to `false`, properties are returned ungrouped.\n *\n * To get grouped properties, the `--properties_group` command line argument must be specified for the\n * `properties` File Converter job when {@link Client.createAssembly | creating the assembly}.\n *\n * ```javascript\n * await client.createAssembly([file1.id, file2.id], \"AssemblyName\", {\n * jobParameters: { properties: \"--properties_group\" },\n * waitForDone: true,\n * });\n * ```\n *\n * Otherwise, the properties will be returned ungrouped, even if the `group` is `true`.\n */\n getProperties(handles?: string | string[], group = false): Promise<any[]> {\n const searchParams = new URLSearchParams();\n if (handles) {\n if (Array.isArray(handles)) handles = handles.join(\",\");\n if (typeof handles === \"string\") handles = handles.trim();\n if (handles) searchParams.set(\"handles\", handles);\n }\n if (group) searchParams.set(\"group\", \"true\");\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.get(`/properties${queryString}`).then((response) => response.json());\n }\n\n /**\n * Returns the list of original handles for objects in the file that match the specified patterns.\n * Search patterns may be combined using query operators.\n *\n * @example Simple search pattern.\n *\n * ```javascript\n * searchPattern = {\n * key: \"Category\",\n * value: \"OST_Stairs\",\n * };\n * ```\n *\n * @example Search patterns combination.\n *\n * ```javascript\n * searchPattern = {\n * $or: [\n * {\n * $and: [\n * { key: \"Category\", value: \"OST_GenericModel\" },\n * { key: \"Level\", value: \"03 - Floor\" },\n * ],\n * },\n * { key: \"Category\", value: \"OST_Stairs\" },\n * ],\n * };\n * ```\n *\n * @param searchPattern - Search pattern or combination of the patterns, see example below.\n */\n searchProperties(searchPattern: any): Promise<any[]> {\n return this.post(\"/properties/search\", searchPattern).then((response) => response.json());\n }\n\n /**\n * Returns the CDA tree for an assembly.\n */\n getCdaTree(): Promise<ICdaNode[]> {\n return this.get(`/properties/tree`).then((response) => response.json());\n }\n\n /**\n * Returns a list of assembly viewpoints. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#AssemblyViewpoints | Open Cloud Assembly Viewpoints API}.\n */\n getViewpoints(): Promise<any[]> {\n return this.get(\"/viewpoints\")\n .then((response) => response.json())\n .then((viewpoints) => viewpoints.result);\n }\n\n /**\n * Saves a new assembly viewpoint to the server. To create a viewpoint use `Viewer.createViewpoint()`.\n *\n * @param viewpoint - Viewpoint object. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#AssemblyViewpoints | Open Cloud Assembly Viewpoints API}.\n */\n saveViewpoint(viewpoint: any): Promise<any> {\n return this.post(\"/viewpoints\", viewpoint).then((response) => response.json());\n }\n\n /**\n * Deletes the specified assembly viewpoint.\n *\n * @param guid - Viewpoint GUID.\n * @returns Returns a deleted viewpoint. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#AssemblyViewpoints | Open Cloud Assembly Viewpoints API}.\n */\n deleteViewpoint(guid: string): Promise<any> {\n return super.delete(`/viewpoints/${guid}`).then((response) => response.json());\n }\n\n /**\n * Returns the viewpoint snapshot as base64-encoded\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.\n *\n * @param guid - Viewpoint GUID.\n */\n getSnapshot(guid: string): Promise<string> {\n return this.get(`/viewpoints/${guid}/snapshot`).then((response) => response.text());\n }\n\n /**\n * Returns the viewpoint snapshot data.\n *\n * @param guid - Viewpoint GUID.\n * @param bitmapGuid - Bitmap GUID.\n */\n getSnapshotData(guid: string, bitmapGuid: string): Promise<string> {\n return this.get(`/viewpoints/${guid}/bitmaps/${bitmapGuid}`).then((response) => response.text());\n }\n\n /**\n * Downloads an assembly resource file. Resource files are files that contain model scene descriptions,\n * or geometry data.\n *\n * @param dataId - Resource file name.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadResource(\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFile(this.getEndpointPath(`/downloads/${dataId}`), onProgress, { signal, headers: this.headers })\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Downloads a part of assembly resource file. Resource files are files that contain model scene\n * descriptions, or geometry data.\n *\n * @param dataId - Resource file name.\n * @param requestId - Specify a non-empty `requestId` to append the `?requestId=` search parameter to\n * the server request. If specified, server-side caching may not work.\n * @param ranges - Ranges of resource file contents to download. See\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Guides/Range_requests | HTTP range requests} for\n * more details.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadResourceRange(\n dataId: string,\n requestId: number | string,\n ranges: Array<{ begin: number; end: number; requestId: number }>,\n onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFileRange(\n this.getEndpointPath(`/downloads/${dataId}${requestId ? \"?requestId=\" + requestId : \"\"}`),\n requestId,\n ranges,\n onProgress,\n { signal, headers: this.headers }\n )\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.\n *\n * @deprecated\n */\n partialDownloadResource(\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n console.warn(\n \"Assembly.partialDownloadResource() has been deprecated since 25.3 and will be removed in a future release, use Assembly.downloadResource() instead.\"\n );\n return this.downloadResource(dataId, onProgress, signal);\n }\n\n /**\n * Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.\n */\n async downloadFileRange(\n requestId: number,\n records: any | null,\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void,\n signal?: AbortSignal\n ): Promise<void> {\n await this.downloadResourceRange(dataId, requestId, records, onProgress, signal);\n }\n\n /**\n * Returns a list of assembly references containing references from all the files from which the\n * assembly was created.\n *\n * References are images, fonts, or any other files to correct rendering of the assembly.\n *\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n */\n async getReferences(signal?: AbortSignal): Promise<IFileReferences> {\n const files = new Endpoint(\"/files\", this.httpClient, this.headers);\n const references = await Promise.all(\n this.associatedFiles\n .map((file) => `/${file.fileId}/references`)\n .map((link) => files.get(link, signal).then((response) => response.json()))\n )\n .then((references) => references.map((x) => x.references))\n .then((references) => references.reduce((x, v) => [...v, ...x], []))\n .then((references) => [...new Set(references.map(JSON.stringify))].map((x: string) => JSON.parse(x)));\n return { id: \"\", references };\n }\n\n /**\n * Waits for assembly to be created. Assembly is created when it changes to `done` or `failed` status.\n *\n * @param params - An object containing waiting parameters.\n * @param params.timeout - The time, in milliseconds that the function should wait assembly. If\n * assembly is not created during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * assembly status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.\n */\n waitForDone(params?: {\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onCheckout?: (assembly: Assembly, ready: boolean) => boolean;\n }): Promise<this> {\n const checkDone = () =>\n this.checkout().then((assembly) => {\n const ready = [\"done\", \"failed\"].includes(assembly.status);\n const cancel = params?.onCheckout?.(assembly, ready);\n return cancel || ready;\n });\n\n return waitFor(checkDone, params).then(() => this);\n }\n\n /**\n * Returns a list of assembly clash tests.\n *\n * @param start - The starting index in the test list. Used for paging.\n * @param limit - The maximum number of tests that should be returned per request. Used for paging.\n * @param name - Filter the tests by part of the name. Case sensitive.\n * @param ids - List of tests IDs to return.\n * @param sortByDesc - Allows to specify the descending order of the result. By default tests are\n * sorted by name in ascending order.\n * @param sortField - Allows to specify sort field.\n */\n getClashTests(\n start?: number,\n limit?: number,\n name?: string,\n ids?: string | string[],\n sortByDesc?: boolean,\n sortField?: string\n ): Promise<{ allSize: number; start: number; limit: number; result: ClashTest[]; size: number }> {\n const searchParams = new URLSearchParams();\n if (start > 0) searchParams.set(\"start\", start.toString());\n if (limit > 0) searchParams.set(\"limit\", limit.toString());\n if (name) searchParams.set(\"name\", name);\n if (ids) {\n ids = normalizeParam(ids);\n if (ids) searchParams.set(\"id\", ids);\n }\n if (sortByDesc !== undefined) searchParams.set(\"sortBy\", sortByDesc ? \"desc\" : \"asc\");\n if (sortField) searchParams.set(\"sortField\", sortField);\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.get(`/clashes${queryString}`)\n .then((response) => response.json())\n .then((tests) => {\n return {\n ...tests,\n result: tests.result.map((data) => new ClashTest(data, this.path, this.httpClient)),\n };\n });\n }\n\n /**\n * Returns information about the specified assembly clash test.\n *\n * @param testId - Test ID.\n */\n getClashTest(testId: string): Promise<ClashTest> {\n return this.get(`/clashes/${testId}`)\n .then((response) => response.json())\n .then((data) => new ClashTest(data, this.path, this.httpClient));\n }\n\n /**\n * Creates an assembly clash test. Assembly must be in a `done` state, otherwise the test will fail.\n *\n * @param name - Test name.\n * @param selectionTypeA - The type of first selection set for clash detection. Can be one of:\n *\n * - `all` - All file/assembly objects.\n * - `handle` - Objects with original handles specified in the `selectionSetA`.\n * - `models` - All objects of the models with original handles specified in the `selectionSetA`.\n * - `searchquery` - Objects retrieved by the search queries specified in `selectionSetA`.\n *\n * @param selectionTypeB - The type of second selection set for clash detection. Can be one of:\n *\n * - `all` - All file/assembly objects.\n * - `handle` - Objects with original handles specified in the `selectionSetB`.\n * - `models` - All objects of the models with original handles specified in the `selectionSetB`.\n * - `searchquery` - Objects retrieved by the search queries specified in `selectionSetB`.\n *\n * @param selectionSetA - First selection set for clash detection. Objects from `selectionSetA` will be\n * tested against each others by objects from the `selectionSetB` during the test.\n * @param selectionSetB - Second selection set for clash detection. Objects from `selectionSetB` will\n * be tested against each others by objects from the `selectionSetA` during the test.\n * @param params - An object containing test parameters.\n * @param params.tolerance - The distance of separation between objects at which test begins detecting\n * clashes.\n * @param params.clearance - The type of the clashes that the test detects:\n *\n * - `true` - Clearance clash. A clash in which the object A may or may not intersect with object B, but\n * comes within a distance of less than the `tolerance`.\n * - `false` - Hard clash. A clash in which the object A intersects with object B by a distance of more\n * than the `tolerance`.\n *\n * @param params.waitForDone - Wait for test to complete.\n * @param params.timeout - The time, in milliseconds that the function should wait test. If test is not\n * complete during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * test status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n */\n createClashTest(\n name: string,\n selectionTypeA: string,\n selectionTypeB: string,\n selectionSetA?: string | string[],\n selectionSetB?: string | string[],\n params?: {\n tolerance?: number | string;\n clearance?: boolean;\n waitForDone?: boolean;\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n }\n ): Promise<ClashTest> {\n const { tolerance, clearance, waitForDone } = params ?? {};\n if (!Array.isArray(selectionSetA)) selectionSetA = [selectionSetA];\n if (!Array.isArray(selectionSetB)) selectionSetB = [selectionSetB];\n\n return this.post(\"/clashes\", {\n name,\n selectionTypeA,\n selectionTypeB,\n selectionSetA,\n selectionSetB,\n tolerance,\n clearance,\n })\n .then((response) => response.json())\n .then((data) => new ClashTest(data, this.path, this.httpClient))\n .then((result) => (waitForDone ? result.waitForDone(params) : result));\n }\n\n /**\n * Deletes the specified assembly clash test.\n *\n * @param testId - Test ID.\n * @returns Returns the raw data of a deleted test. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n */\n deleteClashTest(testId: string): Promise<any> {\n return super.delete(`/clashes/${testId}`).then((response) => response.json());\n }\n\n // Reserved for future use\n\n updateVersion(\n files?: string[],\n params: {\n waitForDone?: boolean;\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onProgress?: (progress: number, file: globalThis.File) => void;\n } = {\n waitForDone: false,\n }\n ): Promise<Assembly> {\n return Promise.reject(new Error(\"Assembly version support will be implemeted in a future release\"));\n }\n\n getVersions(): Promise<Assembly[] | undefined> {\n return Promise.resolve(undefined);\n }\n\n getVersion(version: number): Promise<Assembly> {\n return Promise.reject(new FetchError(404));\n }\n\n deleteVersion(version: number): Promise<any> {\n return Promise.reject(new FetchError(404));\n }\n\n setActiveVersion(version: number): Promise<this> {\n return this.update({ activeVersion: version });\n }\n\n // Reserved for future use\n\n createSharedLink(permissions?: ISharedLinkPermissions): Promise<SharedLink> {\n return Promise.reject(new Error(\"Assembly shared link will be implemeted in a future release\"));\n }\n\n getSharedLink(): Promise<SharedLink> {\n return Promise.resolve(undefined);\n }\n\n deleteSharedLink(): Promise<any> {\n return Promise.reject(new FetchError(404));\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { FetchError, error400 } from \"./FetchError\";\n\nfunction handleFetchError(response: Response): Promise<Response> {\n if (!response.ok) {\n switch (response.status) {\n case 400: {\n return response.text().then((text) => {\n console.error(text);\n return Promise.reject(new FetchError(400, error400(text)));\n });\n }\n case 500: {\n return response.text().then((text) => {\n console.error(error400(text, text));\n return Promise.reject(new FetchError(500));\n });\n }\n default:\n return Promise.reject(new FetchError(response.status));\n }\n }\n return Promise.resolve(response);\n}\n\nexport function $fetch(\n url: string,\n init: {\n method?: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"HEAD\";\n headers?: HeadersInit;\n body?: BodyInit | object | null;\n signal?: AbortSignal;\n } = { method: \"GET\" }\n): Promise<Response> {\n const headers = { ...init.headers };\n delete headers[\"Content-Type\"];\n\n Object.keys(headers)\n .filter((x) => headers[x] === undefined)\n .forEach((x) => delete headers[x]);\n\n let body: FormData | string | undefined = undefined;\n if (init.method === \"POST\" || init.method === \"PUT\") {\n if (init.body instanceof FormData) {\n body = init.body;\n } else if (init.body instanceof Blob) {\n body = new FormData();\n body.append(\"file\", init.body);\n } else if (init.body instanceof ArrayBuffer) {\n body = new FormData();\n body.append(\"file\", new Blob([init.body]));\n } else if (typeof init.body === \"object\") {\n body = JSON.stringify(init.body);\n headers[\"Content-Type\"] = \"application/json\";\n } else if (typeof init.body === \"string\") {\n body = init.body;\n headers[\"Content-Type\"] = \"text/plain\";\n }\n }\n\n return fetch(url, { ...init, headers, body }).then(handleFetchError);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { FetchError, error400 } from \"./FetchError\";\n\nfunction handleXMLHttpError(xhr: XMLHttpRequest): Promise<XMLHttpRequest> {\n if (xhr.status === 0) {\n return Promise.reject(new FetchError(0, \"Network error\"));\n }\n if (xhr.status < 200 || xhr.status > 299) {\n switch (xhr.status) {\n case 400: {\n console.error(xhr.responseText);\n return Promise.reject(new FetchError(400, error400(xhr.responseText)));\n }\n case 500: {\n console.error(error400(xhr.responseText, xhr.responseText));\n return Promise.reject(new FetchError(500));\n }\n default: {\n return Promise.reject(new FetchError(xhr.status));\n }\n }\n }\n return Promise.resolve(xhr);\n}\n\nexport function $xmlhttp(\n url: string,\n params: {\n method: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"HEAD\";\n headers?: HeadersInit;\n body?: XMLHttpRequestBodyInit;\n uploadProgress?: (progress: number) => void;\n downloadProgress?: (progress: number) => void;\n } = { method: \"GET\" }\n): Promise<XMLHttpRequest> {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open(params.method, url, true);\n for (const key in params.headers) {\n xhr.setRequestHeader(key, params.headers[key]);\n }\n function calcProgress(event: ProgressEvent): number {\n return event.lengthComputable ? event.loaded / event.total : 1;\n }\n xhr.upload.onprogress = (event) => params.uploadProgress && params.uploadProgress(calcProgress(event));\n xhr.onprogress = (event) => params.downloadProgress && params.downloadProgress(calcProgress(event));\n xhr.onloadend = (event) => handleXMLHttpError(event.target as XMLHttpRequest).then(resolve, reject);\n xhr.send(params.body);\n });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { $fetch } from \"./Fetch\";\nimport { $xmlhttp } from \"./XMLHttp\";\n\nexport class HttpClient implements IHttpClient {\n public serverUrl: string;\n public headers: HeadersInit = {};\n public signInUserId = \"\";\n public signInUserIsAdmin = false;\n\n constructor(serverUrl: string) {\n this.serverUrl = serverUrl;\n }\n\n get(relativePath: string, init: RequestInit = {}): Promise<Response> {\n return $fetch(`${this.serverUrl}${relativePath}`, {\n ...init,\n method: \"GET\",\n headers: { ...this.headers, ...init.headers },\n });\n }\n\n post(relativePath: string, body?: BodyInit | object, init: RequestInit = {}): Promise<Response> {\n return $fetch(`${this.serverUrl}${relativePath}`, {\n ...init,\n method: \"POST\",\n headers: { ...this.headers, ...init.headers },\n body,\n });\n }\n\n put(relativePath: string, body?: BodyInit | object, init: RequestInit = {}): Promise<Response> {\n return $fetch(`${this.serverUrl}${relativePath}`, {\n ...init,\n method: \"PUT\",\n headers: { ...this.headers, ...init.headers },\n body,\n });\n }\n\n delete(relativePath: string, init: RequestInit = {}): Promise<Response> {\n return $fetch(`${this.serverUrl}${relativePath}`, {\n ...init,\n method: \"DELETE\",\n headers: { ...this.headers, ...init.headers },\n });\n }\n\n uploadFile(\n relativePath: string,\n file: File,\n onProgress?: (progress: number) => void,\n init: RequestInit = {}\n ): Promise<XMLHttpRequest> {\n const data = new FormData();\n data.append(\"file\", file);\n return $xmlhttp(`${this.serverUrl}${relativePath}`, {\n method: \"POST\",\n headers: { ...this.headers, ...init.headers },\n body: data,\n uploadProgress: onProgress,\n });\n }\n\n async downloadFile(\n relativePath: string,\n onProgress?: (progress: number, chunk: Uint8Array) => void,\n init: RequestInit = {}\n ): Promise<Response> {\n const response = await this.get(relativePath, init);\n if (!onProgress) return response;\n\n const contentLength = response.headers.get(\"Content-Length\");\n const total = parseInt(contentLength || \"\", 10) || 1;\n\n const stream = new ReadableStream({\n async start(controller) {\n const reader = response.body.getReader();\n let loaded = 0;\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n controller.enqueue(value);\n loaded += value.length;\n onProgress(loaded / total, value);\n }\n controller.close();\n },\n });\n\n return new Response(stream);\n }\n\n async downloadFileRange(\n relativePath: string,\n reserved: number | string,\n ranges: Array<{ begin: number; end: number; requestId: number }>,\n onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void,\n init: RequestInit = {}\n ): Promise<Response> {\n const headers = {\n ...init.headers,\n Range: \"bytes=\" + ranges.map((x) => `${x.begin}-${x.end}`).join(\",\"),\n };\n const response = await this.get(relativePath, { ...init, headers });\n if (!onProgress) return response;\n\n const contentLength = response.headers.get(\"content-length\");\n const total = parseInt(contentLength || \"\", 10) || 1;\n\n const stream = new ReadableStream({\n async start(controller) {\n const reader = response.body.getReader();\n let loaded = 0;\n let rangedIndex = 0;\n let rangePos = 0;\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n controller.enqueue(value);\n loaded += value.length;\n let chunkLeft = value.length;\n let chunkPos = 0;\n while (chunkLeft > 0) {\n const range = ranges[rangedIndex];\n const rangeLeft = range.end - range.begin + 1 - rangePos;\n if (chunkLeft < rangeLeft) {\n const chunk = value.subarray(chunkPos, chunkPos + chunkLeft);\n onProgress(loaded / total, chunk, range.requestId);\n rangePos += chunkLeft;\n chunkLeft = 0;\n } else {\n const chunk = value.subarray(chunkPos, chunkPos + rangeLeft);\n onProgress(loaded / total, chunk, range.requestId);\n chunkPos += rangeLeft;\n chunkLeft -= rangeLeft;\n rangedIndex++;\n rangePos = 0;\n }\n }\n }\n controller.close();\n },\n });\n\n return new Response(stream);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { IGrantedTo } from \"./IFile\";\n\n/**\n * Provides properties and methods for obtaining information about {@link File | file} actions granted to\n * a specific user, project, or group.\n */\nexport class Permission extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw permission data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud Permissions API}.\n * @param fileId - Owner file ID.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, fileId: string, httpClient: IHttpClient) {\n super(`/files/${fileId}/permissions/${data.id}`, httpClient);\n this.data = data;\n }\n\n /**\n * Defines what actions are allowed to be performed on a file with this permission:\n *\n * - `read` - The ability to read file description, geometry data and properties.\n * - `readSourceFile` - The ability to download source file.\n * - `write` - The ability to modify file name, description and references.\n * - `readViewpoint` - The ability to read file viewpoints.\n * - `createViewpoint` - The ability to create file viewpoints.\n *\n * @example Change file permissions for the the specified project.\n *\n * ```javascript\n * const myFile = client.getFile(myFileId);\n * const permissions = await myFile.getPermissions();\n * const projectPermissions = permissions.filter((permission) =>\n * permission.grantedTo.some((x) => x.project?.id === myProjectId)\n * );\n * const newActions = [\"read\", \"readSourceFile\", \"update\"];\n * await Promise.all(\n * projectPermissions.map((permission) => {\n * permission.actions = newActions;\n * return permission.save();\n * })\n * );\n * ```\n */\n get actions(): string[] {\n return this.data.actions;\n }\n\n set actions(value: string[]) {\n this._data.actions = value;\n }\n\n /**\n * Raw permission data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud Permissions API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n }\n\n /**\n * Unique permission ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * A list of users, projects, or groups that will get access to the file.\n */\n get grantedTo(): IGrantedTo[] {\n return this.data.grantedTo;\n }\n\n set grantedTo(value: IGrantedTo[]) {\n this.data.grantedTo = value;\n }\n\n /**\n * Specifies whether all users have access to the file or not.\n */\n get public(): boolean {\n return this.data.public;\n }\n\n set public(value: boolean) {\n this.data.public = value;\n }\n\n /**\n * Reloads permission data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates permission data on the server.\n *\n * @param data - Raw permission data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud Permissions API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Removes a permission from the file.\n *\n * @returns Returns the raw data of a deleted permission. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud Permissions API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves permission properties changes to the server. Call this method to update permission data on the\n * server after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { waitFor } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about a job on the Open Cloud Server.\n */\nexport class Job extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw job data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/jobs/${data.id}`, httpClient);\n this.data = data;\n }\n\n /**\n * The ID of the assembly the job is working on (internal).\n *\n * @readonly\n */\n get assemblyId(): string {\n return this.data.assemblyId;\n }\n\n /**\n * Job creator ID. Use {@link Client.getUser | Client.getUser()} to obtain detailed creator information.\n *\n * @readonly\n */\n get authorId(): string {\n return this.data.authorId;\n }\n\n /**\n * Job creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get createdAt(): string {\n return this.data.createdAt;\n }\n\n /**\n * Raw job data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n }\n\n /**\n * `true` if job is `done` or `failed`. See {@link status} for more details.\n *\n * @readonly\n */\n get done(): boolean {\n return this.data.status === \"done\" || this.data.status === \"failed\";\n }\n\n /**\n * The ID of the file the job is working on.\n *\n * @readonly\n */\n get fileId(): string {\n return this.data.fileId;\n }\n\n /**\n * Unique job ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * Job last update (UTC) time in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get lastUpdate(): string {\n return this.data.lastUpdate;\n }\n\n /**\n * Job type. Can be one of:\n *\n * - `geometry` - Convert file geometry data to `VSFX` format.\n * - `geometryGltf` - Convert file geometry data to `glTF` format.\n * - `properties` - Extract file properties.\n * - `validation` - Validate the IFC file.\n * - `clash` - Create the clash detection report.\n * - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the specified format.\n * - Other custom job name.\n *\n * @readonly\n */\n get outputFormat(): string {\n return this.data.outputFormat;\n }\n\n /**\n * Parameters with which the job was started. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.\n *\n * @readonly\n */\n get parameters(): any {\n return this.data.parameters;\n }\n\n /**\n * Job status. Can be `waiting`, `inprogress`, `done` or `failed`.\n *\n * @readonly\n */\n get status(): string {\n return this.data.status;\n }\n\n /**\n * Job status description message.\n *\n * @readonly\n */\n get statusMessage(): string {\n return this.data.statusMessage;\n }\n\n /**\n * Job starting time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get startedAt(): string {\n return this.data.startedAt;\n }\n\n /**\n * Reloads job data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates job data on the server.\n *\n * Only administrators can update job data. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * @param data - Raw job data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a job from the server job list. Jobs that are in progress or have already been completed\n * cannot be deleted.\n *\n * @returns Returns the raw data of a deleted job. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n // /**\n // * Save job properties changes to the server. Call this method to update job data on the server\n // * after any property changes.\n // */\n // save() {\n // return this.update(this.data);\n // }\n\n /**\n * Waits for job to be done. Job is done when it changes to `done` or `failed` status.\n *\n * @param params - An object containing waiting parameters.\n * @param params.timeout - The time, in milliseconds that the function should wait job. If jobs is not\n * done during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * job status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.\n */\n waitForDone(params?: {\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onCheckout?: (job: Job, ready: boolean) => boolean;\n }): Promise<this> {\n const checkDone = () =>\n this.checkout().then((job) => {\n const ready = [\"done\", \"failed\"].includes(job.status);\n const cancel = params?.onCheckout?.(job, ready);\n return cancel || ready;\n });\n\n return waitFor(checkDone, params).then(() => this);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { ISharedLinkPermissions } from \"./ISharedLink\";\n\n/**\n * Provides properties and methods for obtaining information about a file shared link.\n */\nexport class SharedLink extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw shared link data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#ShareLinks | Open Cloud SharedLinks API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/shares/${data.token}`, httpClient);\n this.data = data;\n }\n\n /**\n * Shared link creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get createdAt(): string {\n return this.data.createdAt;\n }\n\n /**\n * Raw shared link data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#ShareLinks | Open Cloud SharedLinks API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n }\n\n /**\n * Share permissions.\n */\n get permissions(): ISharedLinkPermissions {\n return this.data.permissions;\n }\n\n set permissions(value: ISharedLinkPermissions) {\n this.data.permissions = { ...this.data.permissions, ...value };\n }\n\n /**\n * Unique shared link token.\n *\n * @readonly\n */\n get token(): string {\n return this.data.token;\n }\n\n /**\n * URL to open shared file in the viewer.\n *\n * @readonly\n */\n get url(): string {\n return this.data.url;\n }\n\n /**\n * Reloads shared link data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates shared link data on the server.\n *\n * @param data - Raw shared link data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#ShareLinks | Open Cloud SharedLinks API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a shared link from the server.\n *\n * @returns Returns the raw data of a deleted shared link. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#SharedLinks | Open Cloud SharedLinks API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves shared link properties changes to the server. Call this method to update shared link data on\n * the server after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { ICdaNode, IFileStatus, IFileReferences, IFileVersionInfo, IGrantedTo } from \"./IFile\";\nimport { IShortUserDesc } from \"./IUser\";\nimport { Model } from \"./Model\";\nimport { Permission } from \"./Permission\";\nimport { Job } from \"./Job\";\nimport { SharedLink } from \"./SharedLink\";\nimport { ISharedLinkPermissions } from \"./ISharedLink\";\nimport { waitFor, parseArgs, userFullName, userInitials } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about a file on the Open Cloud Server and\n * managing its data and versions.\n */\nexport class File extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw file data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/files/${data.id}`, httpClient);\n this.data = data;\n }\n\n /**\n * Active version number of the file.\n *\n * @readonly\n */\n get activeVersion(): number {\n return this.data.activeVersion;\n }\n\n /**\n * File creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get created(): string {\n return this.data.created;\n }\n\n /**\n * File custom fields object, to store custom data.\n */\n get customFields(): any {\n return this.data.customFields;\n }\n\n set customFields(value: any) {\n this.data.customFields = value;\n }\n\n /**\n * Raw file data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n set data(value: any) {\n this._data = value;\n this._data.previewUrl = value.preview\n ? `${this.httpClient.serverUrl}${this.path}/preview?updated=${value.updatedAt}`\n : \"\";\n // owner since 24.8\n if (typeof this._data.owner === \"string\") this._data.owner = { userId: this._data.owner };\n this._data.owner ??= {};\n this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;\n this._data.owner.fullName = userFullName(this._data.owner);\n this._data.owner.initials = userInitials(this._data.owner.fullName);\n // status since 24.9\n this._data.status ??= {};\n this._data.status.geometry ??= { state: this._data.geometryStatus ?? \"none\" };\n this._data.status.properties ??= { state: this._data.propertiesStatus ?? \"none\" };\n this._data.status.validation ??= { state: this._data.validationStatus ?? \"none\" };\n // updatedBy since 24.10\n this._data.updatedBy ??= {};\n this._data.updatedBy.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.updatedBy.userId}/avatar`;\n this._data.updatedBy.fullName = userFullName(this._data.updatedBy);\n this._data.updatedBy.initials = userInitials(this._data.updatedBy.fullName);\n // versions since 24.10\n this._data.versions ??= [{ ...value }];\n // geometryGltf status since 24.12\n this._data.status.geometryGltf ??= { state: \"none\" };\n // isFileDeleted since 25.7\n this._data.isFileDeleted ??= false;\n // sharedLinkToken since 26.0\n this._data.sharedLinkToken ??= null;\n }\n\n /**\n * Returns a list of file formats in which the active version of the file was exported.\n *\n * To export file to one of the supported formats run the File Converter job using\n * {@link createJob | createJob()}. For an example, see the {@link downloadResource} help.\n *\n * @readonly\n */\n get exports(): string[] {\n return this.data.exports;\n }\n\n /**\n * Geometry data type of the active file version. Can be one of:\n *\n * - `vsfx` - `VSFX` format, file can be opened in `VisualizeJS` 3D viewer.\n * - `gltf` - `glTF` format, file can be opened in `Three.js` 3D viewer.\n *\n * Returns an empty string if geometry data has not yet been converted. A files without geometry data\n * can be exported to other formats, but cannot be opened in viewer.\n */\n get geometryType(): string {\n if (this.status.geometryGltf.state === \"done\") return \"gltf\";\n else if (this.status.geometry.state === \"done\") return \"vsfx\";\n else return \"\";\n }\n\n /**\n * Unique file ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * Returns `true` if the source file of the active file version has been deleted.\n *\n * A files with deleted source file can be opened in the viewer, but cannot be exported to other\n * formats.\n *\n * @readonly\n */\n get isFileDeleted(): boolean {\n return this.data.isFileDeleted;\n }\n\n /**\n * File name, including the extension.\n */\n get name(): string {\n return this.data.name;\n }\n\n set name(value: string) {\n this.data.name = value;\n }\n\n /**\n * If the file is a version, then returns the ID of the original file. Otherwise, returns the file ID.\n *\n * @readonly\n */\n get originalFileId(): string {\n return this.data.originalFileId;\n }\n\n /**\n * File owner information.\n *\n * @readonly\n */\n get owner(): IShortUserDesc {\n return this.data.owner;\n }\n\n /**\n * File preview image URL or empty string if the file does not have a preview. Use\n * {@link setPreview | setPreview()} to change preview image.\n *\n * @readonly\n */\n get previewUrl(): string {\n return this.data.previewUrl;\n }\n\n /**\n * The size of the active version of the file in bytes.\n *\n * @readonly\n */\n get size(): number {\n return this.data.size;\n }\n\n /**\n * Total size of all versions of the file in bytes.\n *\n * @readonly\n */\n get sizeTotal(): number {\n return this.data.sizeTotal;\n }\n\n /**\n * File shared link token or `null` if file is not shared yet.\n *\n * @readonly\n */\n get sharedLinkToken(): string {\n return this.data.sharedLinkToken;\n }\n\n /**\n * Data status of the active version of the file. Contains:\n *\n * - `geometry` - status of geometry data of `vsfx` type.\n * - `geometryGltf` - status of geometry data of `gltf` type.\n * - `properties` - status of properties.\n * - `validation` - status of validation.\n *\n * Each status entity is a record with properties:\n *\n * - `state` - Data state. Can be `none`, `waiting`, `inprogress`, `done` or `failed`.\n * - `jobId` - Unique ID of the data job.\n *\n * @readonly\n */\n get status(): IFileStatus {\n return this.data.status;\n }\n\n /**\n * File type, matches the file extension (includes dot).\n *\n * @readonly\n */\n get type(): string {\n return this.data.type;\n }\n\n /**\n * File last update time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get updatedAt(): string {\n return this.data.updatedAt;\n }\n\n /**\n * Information about the user who made the last update.\n *\n * @readonly\n */\n get updatedBy(): IShortUserDesc {\n return this.data.updatedBy;\n }\n\n /**\n * Zero-based file version number for version files. The original file has version `0`.\n */\n\n get version(): number {\n return this.data.version;\n }\n\n /**\n * List of the file versions.\n *\n * @readonly\n */\n get versions(): IFileVersionInfo[] {\n return this.data.versions;\n }\n\n /**\n * Reloads file data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates file data on the server.\n *\n * @param data - Raw file data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a file and all its versions from the server.\n *\n * You cannot delete a version file using `delete()`, only the original file. To delete a version file\n * use {@link deleteVersion | deleteVersion()}.\n *\n * @returns Returns the raw data of a deleted file. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves file properties changes to the server. Call this method to update file data on the server\n * after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n\n /**\n * Sets or removes the file preview.\n *\n * @param image - Preview image. Can be a\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string,\n * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},\n * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or\n * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting the `image`\n * to `null` will remove the preview.\n */\n async setPreview(image?: BodyInit | null): Promise<this> {\n if (!image) {\n await this.deletePreview();\n } else {\n const response = await this.post(\"/preview\", image);\n this.data = await response.json();\n }\n return this;\n }\n\n /**\n * Removes the file preview.\n */\n async deletePreview(): Promise<this> {\n const response = await super.delete(\"/preview\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Returns a list of models of the active version of the file.\n */\n getModels(): Promise<Model[]> {\n return this.get(\"/geometry\")\n .then((response) => response.json())\n .then((array) => array.map((data) => new Model(data, this)));\n }\n\n // File does not support model transformation.\n\n getModelTransformMatrix(handle: string): any {\n return undefined;\n }\n\n setModelTransformMatrix(handle: string, transform?: any): Promise<this> {\n console.warn(\"File does not support model transformation\");\n return Promise.resolve(this);\n }\n\n /**\n * Object properties.\n *\n * @typedef {any} Properties\n * @property {string} handle - Object original handle.\n * @property {string | any} * - Object property. Can be `any` for nested group properties.\n */\n\n /**\n * Returns the properties for objects in the active version of the file.\n *\n * @param handles - Object original handle or handles array. Specify `undefined` to get properties for\n * all objects in the file.\n * @param group - If the `group` parameter is `true`, properties are returned grouped by category. By\n * default, or if `group` is set to `false`, properties are returned ungrouped.\n *\n * To get grouped properties, the `--properties_group` command line argument must be specified for the\n * `properties` File Converter job when {@link Client.uploadFile | uploading the file}:\n *\n * ```javascript\n * await client.uploadFile(file, {\n * geometry: true,\n * properties: true,\n * jobParameters: { properties: \"--properties_group\" },\n * waitForDone: true,\n * });\n * ```\n *\n * or when running the {@link extractProperties | extract file properties} job:\n *\n * ```javascript\n * await file.extractProperties(\"--properties_group\");\n * ```\n *\n * Otherwise, the properties will be returned ungrouped, even if the `group` is `true`.\n */\n getProperties(handles?: string | string[], group = false): Promise<any[]> {\n const searchParams = new URLSearchParams();\n if (handles) {\n if (Array.isArray(handles)) handles = handles.join(\",\");\n if (typeof handles === \"string\") handles = handles.trim();\n if (handles) searchParams.set(\"handles\", handles);\n }\n if (group) searchParams.set(\"group\", \"true\");\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.get(`/properties${queryString}`).then((response) => response.json());\n }\n\n /**\n * Search pattern.\n *\n * @typedef {any} SearchPattern\n * @property {string} key - Property name.\n * @property {string} value - Property value.\n */\n\n /**\n * Query operator. Operator name can be `$and`, `$or`, `$not`, `$eq`, `$regex`.\n *\n * @typedef {any} QueryOperator\n * @property {string | SearchPattern[] | QueryOperator[]} * - Array of the query values or patterns for\n * operator.\n */\n\n /**\n * Returns the list of original handles for objects in the active version of the file that match the\n * specified patterns. Search patterns may be combined using query operators.\n *\n * @example Simple search pattern.\n *\n * ```javascript\n * searchPattern = {\n * key: \"Category\",\n * value: \"OST_Stairs\",\n * };\n * ```\n *\n * @example Search patterns combination.\n *\n * ```javascript\n * searchPattern = {\n * $or: [\n * {\n * $and: [\n * { key: \"Category\", value: \"OST_GenericModel\" },\n * { key: \"Level\", value: \"03 - Floor\" },\n * ],\n * },\n * { key: \"Category\", value: \"OST_Stairs\" },\n * ],\n * };\n * ```\n *\n * @param {SearchPattern | QueryOperator} searchPattern - Search pattern or combination of the\n * patterns, see example below.\n * @returns {Promise<Properties[]>}\n */\n\n searchProperties(searchPattern: any): Promise<any[]> {\n return this.post(\"/properties/search\", searchPattern).then((response) => response.json());\n }\n\n /**\n * Returns the CDA tree for an active version of the file.\n */\n getCdaTree(): Promise<ICdaNode[]> {\n return this.get(`/properties/tree`).then((response) => response.json());\n }\n\n /**\n * Returns a list of file viewpoints. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#FileViewpoints | Open Cloud File Viewpoints API}.\n */\n getViewpoints(): Promise<any[]> {\n return this.get(\"/viewpoints\")\n .then((response) => response.json())\n .then((viewpoints) => viewpoints.result);\n }\n\n /**\n * Saves a new file viewpoint to the server. To create a viewpoint use `Viewer.createViewpoint()`.\n *\n * @param viewpoint - Viewpoint object. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#FileViewpoints | Open Cloud File Viewpoints API}.\n */\n saveViewpoint(viewpoint: any): Promise<any> {\n return this.post(\"/viewpoints\", viewpoint).then((response) => response.json());\n }\n\n /**\n * Deletes the specified file viewpoint.\n *\n * @param guid - Viewpoint GUID.\n * @returns Returns the raw data of a deleted viewpoint. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#FileViewpoints | Open Cloud File Viewpoints API}.\n */\n deleteViewpoint(guid: string): Promise<any> {\n return super.delete(`/viewpoints/${guid}`).then((response) => response.json());\n }\n\n /**\n * Returns viewpoint snapshot as base64-encoded\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.\n *\n * @param guid - Viewpoint GUID.\n */\n getSnapshot(guid: string): Promise<string> {\n return this.get(`/viewpoints/${guid}/snapshot`).then((response) => response.text());\n }\n\n /**\n * Returns viewpoint snapshot data.\n *\n * @param guid - Viewpoint GUID.\n * @param bitmapGuid - Bitmap GUID.\n */\n getSnapshotData(guid: string, bitmapGuid: string): Promise<string> {\n return this.get(`/viewpoints/${guid}/bitmaps/${bitmapGuid}`).then((response) => response.text());\n }\n\n /**\n * Downloads the source file of active version of the file from the server.\n *\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n download(onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFile(this.getEndpointPath(\"/downloads\"), onProgress, { signal, headers: this.headers })\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Downloads a resource file of the active version of the file. Resource files are files that contain\n * model scene descriptions, or geometry data, or exported files.\n *\n * @example Export file to PDF.\n *\n * ```javascript\n * const job = await file.createJob(\"pdf\");\n * await job.waitForDone();\n * const pdfResourceName = file.exports.find((x) => x.endsWith(\".pdf\"));\n * const arrayBuffer = await file.downloadResource(pdfResourceName);\n * const fileName = file.name + \".pdf\";\n * FileSaver.saveAs(new Blob([arrayBuffer]), fileName);\n * ```\n *\n * @param dataId - Resource file name.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadResource(\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFile(this.getEndpointPath(`/downloads/${dataId}`), onProgress, { signal, headers: this.headers })\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Downloads a part of resource file of the active version of the file. Resource files are files that\n * contain model scene descriptions, or geometry data, or exported files.\n *\n * @param dataId - Resource file name.\n * @param requestId - Specify a non-empty `requestId` to append the `?requestId=` search parameter to\n * the server request. If specified, server-side caching may not work.\n * @param ranges - Ranges of resource file contents to download. See\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Guides/Range_requests | HTTP range requests} for\n * more details.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadResourceRange(\n dataId: string,\n requestId: number | string,\n ranges: Array<{ begin: number; end: number; requestId: number }>,\n onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFileRange(\n this.getEndpointPath(`/downloads/${dataId}${requestId ? \"?requestId=\" + requestId : \"\"}`),\n requestId,\n ranges,\n onProgress,\n { signal, headers: this.headers }\n )\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.\n *\n * @deprecated\n */\n partialDownloadResource(\n dataId: string,\n onProgress?: (progress: number, downloaded: Uint8Array) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n console.warn(\n \"File.partialDownloadResource() has been deprecated since 25.3 and will be removed in a future release, use File.downloadResource() instead.\"\n );\n return this.downloadResource(dataId, onProgress, signal);\n }\n\n /**\n * Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.\n *\n * @deprecated\n */\n async downloadFileRange(\n requestId: number,\n records: any | null,\n dataId: string,\n onProgress?: (progress: number, downloaded: Uint8Array, requestId: number) => void,\n signal?: AbortSignal\n ): Promise<void> {\n await this.downloadResourceRange(dataId, requestId, records, onProgress, signal);\n }\n\n /**\n * Returns a list of file references.\n *\n * References are images, fonts, or any other files to correct rendering of the file.\n *\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n */\n getReferences(signal?: AbortSignal): Promise<IFileReferences> {\n return this.get(\"/references\", signal).then((response) => response.json());\n }\n\n /**\n * Sets the file references.\n *\n * References are images, fonts, or any other files to correct rendering of the file. Reference files\n * must be uploaded to the server before they can be assigned to the current file.\n *\n * @param references - File references.\n */\n setReferences(references: IFileReferences): Promise<IFileReferences> {\n return this.put(\"/references\", references).then((response) => response.json());\n }\n\n /**\n * Runs a new job on the server for the active version of the file.\n *\n * @param outputFormat - The job type. Can be one of:\n *\n * - `geometry` - Convert file geometry data to `VSFX` format for opening in `VisualizeJS` 3D viewer.\n * - `geometryGltf` - Convert file geometry data to `glTF` format for opening in `Three.js` 3D viewer.\n * - `properties` - Extract file properties.\n * - `validation` - Validate the IFC file.\n * - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the specified format. Use\n * {@link exports} to get the list of completed file exports. Use\n * {@link downloadResource | downloadResource()} to download the exported file.\n * - Other custom job name. Custom job must be registered in the job templates before running.\n *\n * @param parameters - Parameters for the File Converter jobs or custom job. Can be given as JSON\n * object or command line arguments in form `--arg=value`.\n */\n createJob(outputFormat: string, parameters?: string | object): Promise<Job> {\n const jobs = new Endpoint(\"/jobs\", this.httpClient, this.headers);\n return jobs\n .post(this.appendVersionParam(\"\"), {\n fileId: this.id,\n outputFormat,\n parameters: parseArgs(parameters),\n })\n .then((response) => response.json())\n .then((data) => new Job(data, this.httpClient));\n }\n\n /**\n * Runs a File Converter job to convert geometry data of active version of the file to the specified\n * format. This is alias to {@link createJob | createJob(\"geometry\")}.\n *\n * @param type - Geometry data type. Can be one of:\n *\n * - `vsfx` - `VSFX` format (default), for opening a file in `VisualizeJS` 3D viewer.\n * - `gltf` - `glTF` format, for opening a file in `Three.js` 3D viewer.\n *\n * @param parameters - Parameters for the File Converter job. Can be given as command line arguments in\n * form `--arg=value`.\n */\n extractGeometry(type?: string, parameters?: string | object): Promise<Job> {\n return this.createJob(type === \"gltf\" ? \"geometryGltf\" : \"geometry\", parameters);\n }\n\n /**\n * Runs a File Converter job to extract properties of the active version of the file. This is alias to\n * {@link createJob | createJob(\"properties\")}.\n *\n * @param parameters - Parameters for the File Converter job. Can be given as command line arguments in\n * form `--arg=value`.\n */\n extractProperties(parameters?: string | object): Promise<Job> {\n return this.createJob(\"properties\", parameters);\n }\n\n /**\n * Runs an IFC validator job to validate the active version of the file. This is alias to\n * {@link createJob | createJob(\"validation\")}.\n *\n * To get validation report use {@link downloadResource | downloadResource(\"validation_report.json\")}.\n *\n * @param parameters - Parameters for the IFC validator tool. Can be given as command line arguments in\n * form `--arg=value`.\n */\n validate(parameters?: string | object): Promise<Job> {\n return this.createJob(\"validation\", parameters);\n }\n\n /**\n * Waits for jobs of the active version of the file to be done. Job is done when it changes to `none`,\n * `done` or `failed` status.\n *\n * @param jobs - Job name or array of job names to wait on. Can be `geometry`, `geometryGltf`,\n * `properties`, `validation`, `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom job\n * name.\n * @param waitAll - If this parameter is `true`, the function returns when all the specified jobs have\n * done. If `false`, the function returns when any one of the jobs are done.\n * @param params - An object containing waiting parameters.\n * @param params.timeout - The time, in milliseconds that the function should wait jobs. If no one jobs\n * are done during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * jobs status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.\n */\n waitForDone(\n jobs: string | string[],\n waitAll?: boolean,\n params?: {\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onCheckout?: (file: File, ready: boolean) => boolean;\n }\n ): Promise<this> {\n const waitJobs = Array.isArray(jobs) ? jobs : [jobs];\n if (waitAll === undefined) waitAll = true;\n\n const checkDone = () =>\n this.checkout().then((file) => {\n const readyJobs = waitJobs.filter((job: string) => {\n const jobStatus = file.status[job] || {};\n return [\"none\", \"done\", \"failed\"].includes(jobStatus.state || \"none\");\n });\n const ready = waitAll ? readyJobs.length === waitJobs.length : readyJobs.length > 0;\n const cancel = params?.onCheckout?.(file, ready);\n return cancel || ready;\n });\n\n return waitFor(checkDone, params).then(() => this);\n }\n\n /**\n * Returns a list of file permissions.\n */\n getPermissions(): Promise<Permission[]> {\n return this.get(\"/permissions\")\n .then((response) => response.json())\n .then((array) => array.map((data) => new Permission(data, this.id, this.httpClient)));\n }\n\n /**\n * Returns information about specified file permission.\n *\n * @param permissionId - Permission ID.\n */\n getPermission(permissionId: string): Promise<Permission> {\n return this.get(`/permissions/${permissionId}`)\n .then((response) => response.json())\n .then((data) => new Permission(data, this.id, this.httpClient));\n }\n\n /**\n * Creates a new file permission for a user, project, or group.\n *\n * @example Grant the specified user permission to \"update\" the file.\n *\n * ```javascript\n * const action = \"update\";\n * const grantedTo = [{ user: { id: myUser.id, email: myUser.email } }];\n * await file.createPermission(action, grantedTo);\n * ```\n *\n * @example Add a file to the specified project in \"read-only\" mode.\n *\n * ```javascript\n * const actions = [\"read\", \"readSourceFile\"];\n * const grantedTo = [{ project: { id: myProject.id, name: myProject.name } }];\n * await file.createPermission(actions, grantedTo);\n * ```\n *\n * @param actions - Actions are allowed to be performed on a file with this permission:\n *\n * - `read` - The ability to read file description, geometry data and properties.\n * - `readSourceFile` - The ability to download source file.\n * - `write` - The ability to modify file name, description and references.\n * - `readViewpoint` - The ability to read file viewpoints.\n * - `createViewpoint` - The ability to create file viewpoints.\n *\n * @param grantedTo - A list of entities that will get access to the file.\n * @param _public - Specifies whether all users have access to the file or not.\n */\n createPermission(actions: string | string[], grantedTo: IGrantedTo[], _public: boolean): Promise<Permission> {\n return this.post(\"/permissions\", {\n actions: Array.isArray(actions) ? actions : [actions],\n grantedTo,\n public: _public,\n })\n .then((response) => response.json())\n .then((data) => new Permission(data, this.id, this.httpClient));\n }\n\n /**\n * Removes the specified permission from the file.\n *\n * @param permissionId - Permission ID.\n * @returns Returns the raw data of a deleted permission. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud File Permissions API}.\n */\n deletePermission(permissionId: string): Promise<any> {\n return super.delete(`/permissions/${permissionId}`).then((response) => response.json());\n }\n\n /**\n * Uploads the new version of the file to the server, convert the geometry data and extract properties\n * as needed.\n *\n * @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object are\n * generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}\n * object returned as a result of a user selecting files using the HTML `<input>` element.\n * @param params - An object containing upload parameters.\n * @param params.geometry - Create job to convert file geometry data. The geometry data type is the\n * same as the original file.\n * @param params.properties - Create job to extract file properties.\n * @param params.waitForDone - Wait for geometry and properties jobs to complete.\n * @param params.timeout - The time, in milliseconds that the function should wait jobs. If no one jobs\n * are done during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * jobs status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onProgress - Upload progress callback.\n */\n\n async uploadVersion(\n file: globalThis.File,\n params: {\n geometry?: boolean;\n properties?: boolean;\n waitForDone?: boolean;\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onProgress?: (progress: number, file: globalThis.File) => void;\n } = {\n waitForDone: false,\n }\n ): Promise<File> {\n const result = await this.httpClient\n .uploadFile(this.getEndpointPath(\"/versions\"), file, (progress) => params.onProgress?.(progress, file), {\n headers: this.headers,\n })\n .then((xhr: XMLHttpRequest) => JSON.parse(xhr.responseText))\n .then((data) => new File(data, this.httpClient));\n\n let geometryType = \"\";\n if (this.versions[0].status.geometryGltf.state !== \"none\") geometryType = \"gltf\";\n if (this.versions[0].status.geometry.state !== \"none\") geometryType = \"vsfx\";\n\n params = { ...params };\n if (params.geometry === undefined) params.geometry = geometryType !== \"\";\n if (params.properties === undefined) params.properties = this.versions[0].status.properties.state !== \"none\";\n\n const jobs: string[] = [];\n if (params.geometry) jobs.push((await result.extractGeometry(geometryType)).outputFormat);\n if (params.properties) jobs.push((await result.extractProperties()).outputFormat);\n if (jobs.length > 0)\n if (params.waitForDone) await result.waitForDone(jobs, true, params);\n else await result.checkout();\n\n await this.checkout();\n\n return result;\n }\n\n /**\n * Returns a list of version files.\n */\n getVersions(): Promise<File[]> {\n return this.get(\"/versions\")\n .then((response) => response.json())\n .then((files) => files.map((data) => new File(data, this.httpClient)))\n .then((files) => files.map((file) => (file.id == file.originalFileId ? file.useVersion(0) : file)));\n }\n\n /**\n * Returns information about the specified version file.\n *\n * @param version - Desired version.\n */\n getVersion(version: number): Promise<File> {\n return this.get(`/versions/${version}`)\n .then((response) => response.json())\n .then((data) => new File(data, this.httpClient))\n .then((file) => (file.id == file.originalFileId ? file.useVersion(0) : file));\n }\n\n /**\n * Deletes the specified version file.\n *\n * @param version - Version to delete.\n * @returns Returns the raw data of a deleted version file. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.\n */\n async deleteVersion(version: number): Promise<any> {\n const response = await super.delete(`/versions/${version}`);\n const data = await response.json();\n await this.checkout();\n return data;\n }\n\n /**\n * Replaces the active version of the file with the selected version.\n *\n * @param version - Desired active version.\n */\n\n setActiveVersion(version: number): Promise<this> {\n return this.update({ activeVersion: version });\n }\n\n /**\n * Makes the given version active on client side. Does not change the active file version on the\n * server.\n *\n * This version change will affect the result:\n *\n * - {@link getModels | getModels()}\n * - {@link getProperties | getProperties()}\n * - {@link searchProperties | searchProperties()}\n * - {@link getCdaTree | getCdaTree()}\n * - {@link download | download()}\n * - {@link downloadResource | downloadResource()}\n * - {@link createJob | createJob()}\n * - {@link extractGeometry | extractGeometry()}\n * - {@link extractProperties | extractProperties()}\n * - {@link validate | validate()}\n * - {@link waitForDone | waitForDone()}\n * - Viewer.open()\n *\n * Other clients will still continue to use the current active version of the file. Use `undefined` to\n * revert back to the active version.\n *\n * You need to reload the file data using {@link checkout | checkout()} to match the size and status\n * fields to the version you selected.\n */\n override useVersion(version?: number): this {\n return super.useVersion(version);\n }\n\n /**\n * Deletes the source file of the active file version from the server.\n */\n async deleteSource(): Promise<this> {\n const response = await super.delete(\"/source\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Creates a file shared link.\n *\n * @param permissions - Share permissions.\n */\n async createSharedLink(permissions?: ISharedLinkPermissions): Promise<SharedLink> {\n const shares = new Endpoint(\"/shares\", this.httpClient, this.headers);\n const response = await shares.post(\"\", { fileId: this.id, permissions });\n const data = await response.json();\n await this.checkout();\n return new SharedLink(data, this.httpClient);\n }\n\n /**\n * Returns information about the file shared link or `undefined` if file is not shared.\n */\n async getSharedLink(): Promise<SharedLink> {\n if (!this.sharedLinkToken) return Promise.resolve(undefined);\n const shares = new Endpoint(\"/shares\", this.httpClient, this.headers);\n const response = await shares.get(`/${this.sharedLinkToken}`);\n const data = await response.json();\n return new SharedLink(data, this.httpClient);\n }\n\n /**\n * Deletes the file shared link.\n *\n * @returns Returns the raw data of a deleted shared link. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#ShareLinks | Open Cloud SharedLinks API}.\n */\n async deleteSharedLink(): Promise<any> {\n const shares = new Endpoint(\"/shares\", this.httpClient, this.headers);\n const response = await shares.delete(`/${this.sharedLinkToken}`);\n const data = await response.json();\n await this.checkout();\n return data;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { IRoleActions } from \"./IRole\";\n\n/**\n * A role determines what actions allowed to be performed by {@link User | users} on a\n * {@link Project | project}.\n */\nexport class Role extends Endpoint {\n private _data: any;\n public projectId: string;\n\n /**\n * @param data - Raw role data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n * @param projectId - Owner project ID.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, projectId: string, httpClient: IHttpClient) {\n super(\"\", httpClient);\n this.projectId = projectId;\n this.data = data;\n }\n\n /**\n * Role description.\n */\n get description(): string {\n return this.data.description;\n }\n\n set description(value: string) {\n this._data.description = value;\n }\n\n /**\n * Raw role data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n set data(value: any) {\n this._data = value;\n this.path = `/projects/${this.projectId}/roles/${value.name}`;\n }\n\n /**\n * Role name.\n */\n get name(): string {\n return this.data.name;\n }\n\n set name(value: string) {\n this._data.name = value;\n }\n\n /**\n * Role actions are allowed to be performed.\n */\n get permissions(): IRoleActions {\n return this.data.permissions;\n }\n\n set permissions(value: IRoleActions) {\n this.data.permissions = value || {};\n }\n\n /**\n * Reloads role data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates role data on the server.\n *\n * @param data - Raw role data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a role from the project.\n *\n * @returns Returns the raw data of a deleted role. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves role properties changes to the server. Call this method to update role data on the server\n * after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { IShortUserDesc } from \"./IUser\";\nimport { userFullName, userInitials } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about a {@link User | user} who has access to\n * the {@link Project | project}.\n */\nexport class Member extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw member data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n * @param projectId - Owner project ID.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, projectId: string, httpClient: IHttpClient) {\n super(`/projects/${projectId}/members/${data.id}`, httpClient);\n this.data = data;\n }\n\n /**\n * Raw member data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n this._data.user.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.user.userId}/avatar`;\n this._data.user.fullName = userFullName(this._data.user);\n this._data.user.initials = userInitials(this._data.user.fullName);\n }\n\n /**\n * Unique member ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * Member role name in the project. See {@link Project.getRoles | Project.getRoles()} for list of\n * project roles.\n */\n get role(): string {\n return this.data.role;\n }\n\n set role(value: string) {\n this.data.role = value;\n }\n\n /**\n * Member type. Can be `owner` or `user`.\n *\n * @readonly\n */\n get type(): string {\n return this.data.type;\n }\n\n /**\n * User information.\n *\n * @readonly\n */\n get user(): IShortUserDesc {\n return this.data.user;\n }\n\n /**\n * Reloads member data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates member data on the server.\n *\n * @param data - Raw member data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Removes a member from the project.\n *\n * @returns Returns the raw data of a deleted member. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves member properties changes to the server. Call this method to update member data on the server\n * after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { IShortUserDesc } from \"./IUser\";\nimport { Role } from \"./Role\";\nimport { IRoleActions } from \"./IRole\";\nimport { Member } from \"./Member\";\nimport { File } from \"./File\";\nimport { normalizeParam, userFullName, userInitials } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about a project on the Open Cloud Server and\n * managing its {@link Role | roles}, {@link Member | members} and models.\n */\nexport class Project extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw project data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/projects/${data.id}`, httpClient);\n this.data = data;\n }\n\n /**\n * Project features the user has access to.\n *\n * @readonly\n */\n get authorization(): {\n /**\n * Actions are allowed to be performed:\n *\n * - `update` - The ability to update the project details.\n * - `createTopic` - The ability to create a new topic.\n * - `createDocument` - The ability to create a new document.\n */\n project_actions: string[];\n } {\n return this.data.authorization;\n }\n\n /**\n * Project creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get createdAt(): string {\n return this.data.createdAt;\n }\n\n /**\n * Project custom fields object, to store custom data.\n */\n get customFields(): any {\n return this.data.customFields;\n }\n\n set customFields(value: any) {\n this.data.customFields = value;\n }\n\n /**\n * Raw project data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n this._data.previewUrl = value.avatarUrl\n ? `${this.httpClient.serverUrl}/projects/${this._data.id}/preview?updated=${value.updatedAt}`\n : \"\";\n this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;\n this._data.owner.fullName = userFullName(this._data.owner);\n this._data.owner.initials = userInitials(this._data.owner.fullName);\n }\n\n /**\n * Project description.\n */\n get description(): string {\n return this.data.description;\n }\n\n set description(value: string) {\n this.data.description = value;\n }\n\n /**\n * Project end date in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n */\n get endDate(): string {\n return this.data.endDate;\n }\n\n set endDate(value: string | Date) {\n this.data.endDate = value instanceof Date ? value.toISOString() : value;\n }\n\n /**\n * Unique project ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * The number of members in the project.\n *\n * @readonly\n */\n get memberCount(): number {\n return this.data.memberCount;\n }\n\n /**\n * The number of models in the project.\n *\n * @readonly\n */\n get modelCount(): number {\n return this.data.modelCount;\n }\n\n /**\n * Project name.\n */\n get name(): string {\n return this.data.name;\n }\n\n set name(value: string) {\n this.data.name = value;\n }\n\n /**\n * Project owner information.\n *\n * @readonly\n */\n get owner(): IShortUserDesc {\n return this.data.owner;\n }\n\n /**\n * Project preview image URL or empty string if the project does not have a preview. Use\n * {@link Project.setPreview | setPreview()} to change preview image.\n *\n * @readonly\n */\n get previewUrl(): string {\n return this._data.previewUrl;\n }\n\n /**\n * `true` if project is shared project.\n */\n get public(): boolean {\n return this.data.public;\n }\n\n set public(value: boolean) {\n this.data.public = value;\n }\n\n /**\n * Project start date in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n */\n get startDate(): string {\n return this.data.startDate;\n }\n\n set startDate(value: string | Date) {\n this.data.startDate = value instanceof Date ? value.toISOString() : value;\n }\n\n /**\n * The number of topics in the project.\n *\n * @readonly\n */\n get topicCount(): number {\n return this.data.topicCount;\n }\n\n /**\n * Project last update time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get updatedAt(): string {\n return this.data.updatedAt;\n }\n\n /**\n * Reloads project data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates project data on the server.\n *\n * @param data - Raw project data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a project from the server.\n *\n * @returns Returns the raw data of a deleted project. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n override delete(): Promise<any> {\n return super\n .delete(\"\")\n .then((response) => response.text())\n .then((text) => {\n // TODO fix for server 23.5 and below\n try {\n return JSON.parse(text);\n } catch {\n return { id: this.id };\n }\n });\n }\n\n /**\n * Saves project properties changes to the server. Call this method to update project data on the\n * server after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n\n /**\n * Sets or removes the project preview.\n *\n * @param image - Preview image. Can be a\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string,\n * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},\n * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or\n * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting the `image`\n * to `null` will remove the preview.\n */\n\n async setPreview(image?: BodyInit | null): Promise<this> {\n if (!image) {\n await this.deletePreview();\n } else {\n const response = await this.post(\"/preview\", image);\n this.data = await response.json();\n }\n return this;\n }\n\n /**\n * Removes the project preview.\n */\n async deletePreview(): Promise<this> {\n const response = await super.delete(\"/preview\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Returns a list of project roles. Project members have different abilities depending on the role they\n * have in a project.\n */\n getRoles(): Promise<Role[]> {\n return this.get(\"/roles\")\n .then((response) => response.json())\n .then((array) => array.map((data) => new Role(data, this.id, this.httpClient)));\n }\n\n /**\n * Returns information about the specified project role.\n *\n * @param name - Role name.\n */\n getRole(name: string): Promise<Role> {\n return this.get(`/roles/${name}`)\n .then((response) => response.json())\n .then((data) => new Role(data, this.id, this.httpClient));\n }\n\n /**\n * Creates a new project role.\n *\n * @param name - Role name.\n * @param description - Role description.\n * @param permissions - Actions are allowed to be performed for the role.\n */\n createRole(name: string, description: string, permissions: IRoleActions): Promise<Role> {\n return this.post(\"/roles\", {\n name,\n description,\n permissions: permissions || {},\n })\n .then((response) => response.json())\n .then((data) => new Role(data, this.id, this.httpClient));\n }\n\n /**\n * Deletes the specified project role.\n *\n * @param name - Role name.\n * @returns Returns the raw data of a deleted role. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n deleteRole(name: string): Promise<any> {\n return super.delete(`/roles/${name}`).then((response) => response.json());\n }\n\n /**\n * Returns a list of project members.\n */\n getMembers(): Promise<Member[]> {\n return this.get(\"/members\")\n .then((response) => response.json())\n .then((array) => array.map((data) => new Member(data, this.id, this.httpClient)));\n }\n\n /**\n * Returns information about the specified project member.\n *\n * @param memberId - Member ID.\n */\n getMember(memberId: string): Promise<Member> {\n return this.get(`/members/${memberId}`)\n .then((response) => response.json())\n .then((data) => new Member(data, this.id, this.httpClient));\n }\n\n /**\n * Adds a user to the project to become a member and have permission to perform actions.\n *\n * @param userId - User ID.\n * @param role - Role name from the list of project {@link getRoles | roles}.\n */\n addMember(userId: string, role: string): Promise<Member> {\n return this.post(\"/members\", { userId, role })\n .then((response) => response.json())\n .then((data) => new Member(data, this.id, this.httpClient));\n }\n\n /**\n * Removes the specified member from a project.\n *\n * @param memberId - Member ID.\n * @returns Returns the raw data of a deleted member. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n removeMember(memberId: string): Promise<any> {\n return super.delete(`/members/${memberId}`).then((response) => response.json());\n }\n\n /**\n * Information about the file (model) that can be reference in the project topics.\n *\n * @typedef {any} FileInformation\n * @property {any[]} display_information - The list of fields to allow users to associate the file with\n * a server model.\n * @property {string} display_information.field_display_name - Field display name.\n * @property {string} display_information.field_value - Field value.\n * @property {any} file - The file reference object.\n * @property {string} file.file_name - File name.\n * @property {string} file.reference - File ID.\n */\n\n /**\n * Returns a list of project files. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/bcf3.html#ProjectFilesInformation | Open Cloud BCF3 API}.\n *\n * This list contains all files that the project has access to. To add a file to this list, create a\n * {@link IGrantedTo.project | project} permission on the file using\n * {@link File.createPermission | File.createPermission()}.\n */\n getFilesInformation(): Promise<any[]> {\n const bcfProjects = new Endpoint(\"/bcf/3.0/projects\", this.httpClient, this.headers);\n return bcfProjects\n .get(`/${this.id}/files_information`)\n .then((response) => response.json())\n .then((items) => {\n items.forEach((item) => {\n const getFieldValue = (displayName: string) => {\n return (item.display_information.find((x) => x.field_display_name === displayName) || {}).field_value;\n };\n\n const previewUrl = `${this.httpClient.serverUrl}/files/${item.file.reference}/preview`;\n const ownerAvatarUrl = `${this.httpClient.serverUrl}/users/${getFieldValue(\"Owner\")}/avatar`;\n\n const ownerFirstName = getFieldValue(\"Owner First Name\");\n const ownerLastName = getFieldValue(\"Owner Last Name\");\n const ownerUserName = getFieldValue(\"Owner User Name\");\n const ownerFullName = userFullName(ownerFirstName, ownerLastName, ownerUserName);\n const ownerInitials = userInitials(ownerFullName);\n\n item.display_information.push({ field_display_name: \"Preview URL\", field_value: previewUrl });\n item.display_information.push({ field_display_name: \"Owner Avatar URL\", field_value: ownerAvatarUrl });\n item.display_information.push({ field_display_name: \"Owner Full Name\", field_value: ownerFullName });\n item.display_information.push({ field_display_name: \"Owner Initials\", field_value: ownerInitials });\n\n // updatedBy since 24.10\n\n const updatedByAvatarUrl = `${this.httpClient.serverUrl}/users/${getFieldValue(\"Updated By\")}/avatar`;\n\n const updatedByFirstName = getFieldValue(\"Updated By First Name\");\n const updatedByLastName = getFieldValue(\"Updated By Last Name\");\n const updatedByUserName = getFieldValue(\"Updated By User Name\");\n const updatedByFullName = userFullName(updatedByFirstName, updatedByLastName, updatedByUserName);\n const updatedByInitials = userInitials(updatedByFullName);\n\n item.display_information.push({\n field_display_name: \"Updated By Avatar URL\",\n field_value: updatedByAvatarUrl,\n });\n item.display_information.push({ field_display_name: \"Updated By Full Name\", field_value: updatedByFullName });\n item.display_information.push({ field_display_name: \"Updated By Initials\", field_value: updatedByInitials });\n\n // geometryType since 24.12\n\n const geometry = getFieldValue(\"Geometry Status\");\n const geometryGltf = getFieldValue(\"GeometryGltf Status\");\n const geometryType = geometry === \"done\" ? \"vsfx\" : geometryGltf === \"done\" ? \"gltf\" : \"\";\n\n item.display_information.push({ field_display_name: \"Geometry Type\", field_value: geometryType });\n });\n return items;\n });\n }\n\n /**\n * Returns a list of project files.\n */\n getModels(): Promise<File[]> {\n return this.getFilesInformation()\n .then((filesInformation) => filesInformation.map((item) => item.file.reference))\n .then((ids) => {\n const files = new Endpoint(\"/files\", this.httpClient, this.headers);\n return files.get(`?id=${normalizeParam(ids)}`);\n })\n .then((response) => response.json())\n .then((files) => files.result.map((data) => new File(data, this.httpClient)));\n }\n\n /**\n * Adds a file to the project with specified permissions.\n *\n * To change file permissions for the project use {@link Permission.actions}.\n *\n * @param fileId - File ID.\n * @param actions - Actions are allowed to be performed on a file:\n *\n * - `read` - The ability to read file description, geometry data and properties.\n * - `readSourceFile` - The ability to download source file.\n * - `write` - The ability to modify file name, description and references.\n * - `readViewpoint` - The ability to read file viewpoints.\n * - `createViewpoint` - The ability to create file viewpoints.\n *\n * @param _public - Specifies whether all users have access to the file or not.\n * @returns Returns a file instance added to the project.\n */\n async addModel(fileId: string, actions: string | string[], _public: boolean): Promise<File> {\n const files = new Endpoint(\"/files\", this.httpClient, this.headers);\n const file = await files\n .get(`/${fileId}`)\n .then((response) => response.json())\n .then((data) => new File(data, this.httpClient));\n\n const grantedTo = [{ project: { id: this.id, name: this.name } }];\n await file.createPermission(actions, grantedTo, _public);\n\n return file;\n }\n\n /**\n * Removes the specified file from a project.\n *\n * @param fileId - File ID.\n * @returns Returns a file instance removed from the project.\n */\n async removeModel(fileId: string): Promise<File> {\n const files = new Endpoint(\"/files\", this.httpClient, this.headers);\n const file = await files\n .get(`/${fileId}`)\n .then((response) => response.json())\n .then((data) => new File(data, this.httpClient));\n\n const permissions = await file.getPermissions();\n await Promise.allSettled(\n permissions\n .filter((permission) => permission.grantedTo.some((x) => x.project?.id === this.id))\n .map((permission) => permission.delete())\n );\n\n return file;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { FetchError } from \"./FetchError\";\nimport { userFullName, userInitials } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about a Open Cloud Server user and manage\n * its data.\n */\nexport class User extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw user data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(\"\", httpClient);\n this.data = data;\n }\n\n /**\n * User avatar image URL or empty string if the user does not have an avatar. Use\n * {@link setAvatar | setAvatar()} to change avatar image.\n *\n * @readonly\n */\n get avatarUrl(): string {\n return this._data.avatarUrl;\n }\n\n /**\n * `true` if user is allowed to create a projects.\n *\n * Only administrators can change create project permission.\n */\n get canCreateProject(): boolean {\n return this.data.canCreateProject;\n }\n\n set canCreateProject(value: boolean) {\n this._data.canCreateProject = value;\n }\n\n /**\n * Account registration time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get createAt(): string {\n return this.data.createAt;\n }\n\n /**\n * User custom fields object, to store custom data.\n */\n get customFields(): any {\n return this.data.customFields;\n }\n\n set customFields(value: any) {\n this._data.customFields = value;\n }\n\n /**\n * Raw user data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.\n *\n * @readonly\n */\n\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n this._data.avatarUrl = value.avatarImage\n ? `${this.httpClient.serverUrl}/users/${this._data.id}/avatar?updated=${value.lastModified}`\n : \"\";\n this._data.fullName = userFullName(this._data);\n this._data.initials = userInitials(this._data.fullName);\n }\n\n /**\n * User email.\n */\n get email(): string {\n return this.data.email;\n }\n\n set email(value: string) {\n this._data.email = value;\n }\n\n /**\n * The user's email confirmation code, or an empty string if the email has already been confirmed.\n *\n * To send the confirmation code to the server, use\n * {@link Client.confirmUserEmail | Client.confirmUserEmail()}.\n *\n * @readonly\n */\n get emailConfirmationId(): string {\n return this.data.emailConfirmationId;\n }\n\n /**\n * First name.\n */\n get firstName(): string {\n return this.data.firstName;\n }\n\n set firstName(value: string) {\n this._data.firstName = value;\n }\n\n /**\n * Full name. Returns the user's first and last name. If first name and last names are empty, returns\n * the user name.\n *\n * @readonly\n */\n get fullName(): string {\n return this.data.fullName;\n }\n\n /**\n * Unique user ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * User initials. Returns a first letters of the user's first and last names. If first name and last\n * names are empty, returns the first letter of the user name.\n *\n * @readonly\n */\n get initials(): string {\n return this.data.initials;\n }\n\n /**\n * `true` if user is an administrator.\n *\n * Only administrators can change user type.\n */\n get isAdmin(): boolean {\n return this.data.isAdmin;\n }\n\n set isAdmin(value: boolean) {\n this._data.isAdmin = value;\n }\n\n /**\n * `false` if the user has not yet confirmed his email address.\n *\n * @readonly\n */\n get isEmailConfirmed(): boolean {\n return this.data.isEmailConfirmed;\n }\n\n /**\n * User last update time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n */\n get lastModified(): string {\n return this.data.lastModified;\n }\n\n /**\n * Last name.\n */\n get lastName(): string {\n return this.data.lastName;\n }\n\n set lastName(value: string) {\n this._data.lastName = value;\n }\n\n /**\n * User last sign in time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n */\n get lastSignIn(): string {\n return this.data.lastSignIn;\n }\n\n /**\n * The maximum number of projects that a user can create.\n *\n * Only administrators can change projects limit.\n */\n get projectsLimit(): number {\n return this.data.projectsLimit;\n }\n\n set projectsLimit(value: number) {\n this._data.projectsLimit = value;\n }\n\n /**\n * The identity provider used to create the account. Can be `ldap`, `oauth`, `saml` or empty for local\n * accounts.\n *\n * @readonly\n */\n get providerType(): string {\n return this.data.providerType;\n }\n\n /**\n * User storage size on the server for uploading files.\n *\n * Only administrators can change storage size.\n */\n get storageLimit(): number {\n return this.data.storageLimit;\n }\n\n set storageLimit(value: number) {\n this._data.storageLimit = value;\n }\n\n /**\n * The total size of the user's files in the storage.\n *\n * @readonly\n */\n get storageUsed(): number {\n return this.data.storageUsed;\n }\n\n /**\n * The user's access token (API key). Use {@link Client.signInWithToken | Client.signInWithToken()} to\n * sign in to the server using this token.\n *\n * @readonly\n */\n get token(): string {\n return this.data.tokenInfo.token;\n }\n\n /**\n * User name.\n */\n get userName(): string {\n return this.data.userName;\n }\n\n set userName(value: string) {\n this._data.userName = value;\n }\n\n /**\n * Reloads user data from the server.\n *\n * Only administrators can checkout other users. If the current logged in user is not an administrator,\n * they can only checkout themselves, otherwise an exception will be thrown.\n */\n async checkout(): Promise<this> {\n if (this.httpClient.signInUserIsAdmin) {\n const response = await this.get(`/users/${this.id}`);\n const data = await response.json();\n this.data = { id: data.id, ...data.userBrief };\n } else if (this.id === this.httpClient.signInUserId) {\n const response = await this.get(\"/user\");\n const data = await response.json();\n this.data = { id: this.id, ...data };\n } else {\n return Promise.reject(new FetchError(403));\n }\n return this;\n }\n\n /**\n * Updates user data on the server.\n *\n * Only administrators can update other users. If the current logged in user is not an administrator,\n * they can only update themselves, otherwise an exception will be thrown.\n *\n * @param data - Raw user data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.\n */\n async update(data: any): Promise<this> {\n if (this.httpClient.signInUserIsAdmin) {\n const response = await this.put(`/users/${this.id}`, { isAdmin: data.isAdmin, userBrief: data });\n const newData = await response.json();\n this.data = { id: newData.id, ...newData.userBrief };\n } else if (this.id === this.httpClient.signInUserId) {\n const response = await this.put(\"/user\", data);\n const newData = await response.json();\n this.data = { id: this.id, ...newData };\n } else {\n return Promise.reject(new FetchError(403));\n }\n return this;\n }\n\n /**\n * Deletes a user from the server.\n *\n * Only administrators can delete users. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * Administrators can delete themselves or other administrators. An administrator can only delete\n * themselves if they are not the last administrator.\n *\n * You need to re-login after deleting the current logged in user.\n *\n * @returns Returns the raw data of a deleted user. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.\n */\n override delete(): Promise<any> {\n if (this.httpClient.signInUserIsAdmin) {\n return super\n .delete(`/users/${this.id}`)\n .then((response) => response.json())\n .then((data) => {\n if (this.id === this.httpClient.signInUserId) {\n delete this.httpClient.headers[\"Authorization\"];\n this.httpClient.signInUserId = \"\";\n this.httpClient.signInUserIsAdmin = false;\n }\n return data;\n });\n } else {\n return Promise.reject(new FetchError(403));\n }\n }\n\n /**\n * Saves user properties changes to the server. Call this method to update user data on the server\n * after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n\n /**\n * Sets or removes the user avatar.\n *\n * Only administrators can set the avatar of other users. If the current logged in user is not an\n * administrator, they can only set their avatar, otherwise an exception will be thrown.\n *\n * @param image - Avatar image. Can be a\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string,\n * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},\n * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or\n * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting the `image`\n * to `null` will remove the avatar.\n */\n async setAvatar(image?: BodyInit | null): Promise<this> {\n if (!image) {\n await this.deleteAvatar();\n } else if (this.httpClient.signInUserIsAdmin) {\n const response = await this.post(`/users/${this.id}/avatar`, image);\n const data = await response.json();\n this.data = { id: data.id, ...data.userBrief };\n } else if (this.id === this.httpClient.signInUserId) {\n const response = await this.post(\"/user/avatar\", image);\n const data = await response.json();\n this.data = { id: this.id, ...data };\n } else {\n return Promise.reject(new FetchError(403));\n }\n return this;\n }\n\n /**\n * Removes the user avatar.\n *\n * Only administrators can remove the avatar of other users. If the current logged in user is not an\n * administrator, they can only remove their avatar, otherwise an exception will be thrown.\n */\n async deleteAvatar(): Promise<this> {\n if (this.httpClient.signInUserIsAdmin) {\n const response = await super.delete(`/users/${this.id}/avatar`);\n const data = await response.json();\n this.data = { id: data.id, ...data.userBrief };\n } else if (this.id === this.httpClient.signInUserId) {\n const response = await super.delete(\"/user/avatar\");\n const data = await response.json();\n this.data = { id: this.id, ...data };\n } else {\n return Promise.reject(new FetchError(403));\n }\n return this;\n }\n\n /**\n * Changes the user password.\n *\n * Only administrators can change the passwords of other users. If the current logged in user is not an\n * administrator, they can only change their password, otherwise an exception will be thrown.\n *\n * To change their password, non-administrator users must specify their old password.\n *\n * @param newPassword - New user password.\n * @param oldPassword - Old user password. Only required for non-administrator users to change their\n * password.\n */\n async changePassword(newPassword: string, oldPassword?: string): Promise<this> {\n if (this.httpClient.signInUserIsAdmin) {\n const response = await this.put(`/users/${this.id}/password`, { new: newPassword });\n const data = await response.json();\n this.data = { id: data.id, ...data.userBrief };\n } else if (this.id === this.httpClient.signInUserId) {\n const response = await this.put(\"/user/password\", { old: oldPassword, new: newPassword });\n const data = await response.json();\n this.data = { id: this.id, ...data };\n } else {\n return Promise.reject(new FetchError(403));\n }\n return this;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\n\n/**\n * Provides properties and methods for obtaining information about a OAuth 2.0 client that have access\n * the Open Cloud Server API.\n */\nexport class OAuthClient extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw client data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#OAuthClient | Open Cloud OAuth Clients API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/oauth/clients/${data.clientId}`, httpClient);\n this.data = data;\n }\n\n /**\n * OAuth 2.0 server authorization endpoint.\n */\n get authUrl(): string {\n return this.data.authUrl;\n }\n\n /**\n * OAuth 2.0 server token endpoint.\n */\n get accessTokenUrl(): string {\n return this.data.accessTokenUrl;\n }\n\n /**\n * Unique client ID.\n *\n * @readonly\n */\n get clientId(): string {\n return this.data.clientId;\n }\n\n /**\n * Client creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n */\n get createdAt(): string {\n return this.data.createdAt;\n }\n\n /**\n * Client application description.\n */\n get description(): string {\n return this.data.description;\n }\n\n set description(value: string) {\n this._data.description = value;\n }\n\n /**\n * Client data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#OAuthClient | Open Cloud OAuth Clients API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n set data(value: any) {\n this._data = value;\n }\n\n /**\n * Client application name.\n */\n get name(): string {\n return this.data.name;\n }\n\n set name(value: string) {\n this._data.name = value;\n }\n\n /**\n * The endpoint to which the OAuth 2.0 server sends the response.\n */\n get redirectUrl(): string {\n return this.data.redirectUrl;\n }\n\n set redirectUrl(value: string) {\n this.data.redirectUrl = value;\n }\n\n /**\n * Client secret.\n *\n * @readonly\n */\n get secret(): string {\n return this.data.secret;\n }\n\n /**\n * Client last update time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n */\n get updatedAt(): string {\n return this.data.updatedAt;\n }\n\n /**\n * Reloads clien data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates client data on the server.\n *\n * Only administrators can update OAuth clients. If the current logged in user is not an administrator,\n * an exception will be thrown.\n *\n * @param data - Raw client data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#OAuthClient | Open Cloud OAuth Clients API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a client from the server.\n *\n * Only administrators can delete OAuth clients. If the current logged in user is not an administrator,\n * an exception will be thrown.\n *\n * @returns Returns the raw data of a deleted client. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#OAuthClient | Open Cloud OAuth Clients API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves client properties changes to the server. Call this method to update client data on the server\n * after any property changes.\n *\n * Only administrators can update OAuth clients. If the current logged in user is not an administrator,\n * an exception will be thrown.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n\n /**\n * Revokes the access tokens for all users of the client application.\n */\n async revoke(): Promise<this> {\n await this.post(\"/revoke\");\n return this;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { File } from \"./File\";\n\nexport class SharedFile extends File {\n constructor(data: any, password: string, httpClient: IHttpClient) {\n super(data.file, httpClient);\n this.path = `/shares/${data.file.sharedLinkToken}`;\n this.headers = { \"InWeb-Password\": password };\n }\n\n override async checkout(): Promise<this> {\n const response = await this.get(\"/info\");\n const data = await response.json();\n this.data = data.file;\n return this;\n }\n\n override async update(data: any): Promise<this> {\n const response = await this.put(\"/info\", data);\n this.data = await response.json();\n return this;\n }\n\n override getVersions(): Promise<File[]> {\n return Promise.resolve(undefined);\n }\n\n override useVersion(version?: number): this {\n return this;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\n\n/**\n * Provides properties and methods for obtaining information about a server plugin on the Open Cloud\n * Server and managing its data.\n */\nexport class Plugin extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw plugin data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Plugin | Open Cloud Plugins API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/plugins/${data.name}/${data.version}`, httpClient);\n this.data = data;\n }\n\n /**\n * Plugin author information. The `author` is an object with a `name` field and optionally `url` and\n * `email`. Or it can be shorten that all into a single string.\n *\n * @readonly\n */\n get author(): any {\n return this.data.author;\n }\n\n /**\n * Raw plugin data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Plugin | Open Cloud Plugins API}.\n */\n get data(): any {\n return this._data;\n }\n\n set data(value: any) {\n this._data = value;\n }\n\n /**\n * Short description of the plugin.\n *\n * @readonly\n */\n get description(): string {\n return this.data.description;\n }\n\n /**\n * Plugin state.\n *\n * @readonly\n */\n get enabled(): boolean {\n return this.data.enabled;\n }\n\n /**\n * The URL to the plugin homepage.\n *\n * @readonly\n */\n get homepage(): string {\n return this.data.homepage;\n }\n\n /**\n * Unique plugin ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * A license for the plugin.\n *\n * @readonly\n */\n get license(): string {\n return this.data.license;\n }\n\n /**\n * Plugin name.\n *\n * @readonly\n */\n get name(): string {\n return this.data.name;\n }\n\n /**\n * API permissions required.\n *\n * @readonly\n */\n get permissions(): string[] {\n return this.data.permissions;\n }\n\n /**\n * Plugin type. Can be set of:\n *\n * - `app` - Viewer plugin, the client‑side web app that the server hosts and serves as static content.\n * - `server` - Binary dll that extends server functionality.\n * - `jobrunner` - Binary dll that adds a new Job Runner on the server.\n *\n * @readonly\n */\n get pluginType(): string[] {\n return this.data.pluginType;\n }\n\n /**\n * {@link https://semver.org/ | SemVer} compatible version of the plugin.\n *\n * @readonly\n */\n get version(): number {\n return this.data.version;\n }\n\n /**\n * Reloads plugin data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Uninstalls and deletes a plugin from the server.\n *\n * @returns Returns the raw data of a deleted plugin. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Plugin | Open Cloud Plugins API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Enables a plugin.\n */\n async enable(): Promise<this> {\n const response = await this.put(\"/enable\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Disables a plugin.\n */\n async disable(): Promise<this> {\n const response = await this.put(\"/disable\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Downloads the plugins package from the server.\n *\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n download(onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFile(this.getEndpointPath(\"/download\"), onProgress, { signal, headers: this.headers })\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Returns a plugin manfest.\n */\n getManifest(): Promise<any> {\n return this.get(\"/manifest\").then((response) => response.json());\n }\n\n /**\n * Returns the plugin settings.\n *\n * @returns Returns an object with plugin settings.\n */\n getSettings(): Promise<any> {\n return this.get(\"/settings\").then((response) => response.json());\n }\n\n /**\n * Changes the plugin settings.\n *\n * @param settings - An object with the new plugin settings or part of the settings.\n * @returns Returns an object with updated plugin settings.\n */\n updateSettings(settings: any): Promise<any> {\n return this.post(\"/settings\", settings).then((response) => response.json());\n }\n\n /**\n * Executes a plugin command.\n *\n * This method executes the command for the current version of the plugin. To execute a command for the\n * latest installed version of the plugin, use the {@link Client.executePluginCommand}.\n *\n * @param command - Command to execute.\n * @param parameters - Command parameters. Command-dependent.\n */\n executeCommand(command: string, parameters?: BodyInit | object): Promise<any> {\n const commands = new Endpoint(`/plugins/${this.name}/commands`, this.httpClient, this.headers);\n return commands.post(`/${command}?version=${this.version}`, parameters).then((response) => response.json());\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { EventEmitter2 } from \"@inweb/eventemitter2\";\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { HttpClient } from \"./HttpClient\";\nimport { FetchError } from \"./FetchError\";\nimport { ClientEventMap } from \"./ClientEvents\";\nimport { Assembly } from \"./Assembly\";\nimport { File } from \"./File\";\nimport { Job } from \"./Job\";\nimport { Project } from \"./Project\";\nimport { User } from \"./User\";\nimport { OAuthClient } from \"./OAuthClient\";\nimport { ISharedLinkPermissions } from \"./ISharedLink\";\nimport { SharedLink } from \"./SharedLink\";\nimport { SharedFile } from \"./SharedFile\";\nimport { Plugin } from \"./Plugin\";\nimport { normalizeParam, parseArgs } from \"./Utils\";\n\n/**\n * Provides methods for managing Open Cloud Server resources such as users, files, assemblies, jobs,\n * projects, etc.\n */\nexport class Client extends EventEmitter2<ClientEventMap> {\n private _serverUrl = \"\";\n private _httpClient: IHttpClient = new HttpClient(\"\");\n private _user: User | null = null;\n public eventEmitter: EventEmitter2 = this;\n\n /**\n * @param params - An object containing client configuration parameters.\n * @param params.serverUrl - Open Cloud REST API server URL.\n * @param params.url - Deprecated since `25.8`. Use `serverUrl` instead.\n */\n constructor(params: { serverUrl?: string; url?: string } = {}) {\n super();\n this.configure(params);\n }\n\n /**\n * Open Cloud REST API server URL. Use {@link configure | configure()} to change server URL.\n *\n * @readonly\n */\n get serverUrl(): string {\n return this._serverUrl;\n }\n\n /**\n * HTTP client instance used to send requests to the REST API server.\n *\n * @readonly\n */\n get httpClient(): IHttpClient {\n return this._httpClient;\n }\n\n /**\n * Deprecated since `25.3`. Use `Viewer.options()` instead to change `Viewer` parameters.\n *\n * @deprecated\n */\n get options(): any {\n console.warn(\n \"Client.options has been deprecated since 25.3 and will be removed in a future release, use Viewer.options instead.\"\n );\n const data = {\n showWCS: true,\n cameraAnimation: true,\n antialiasing: true,\n groundShadow: false,\n shadows: false,\n cameraAxisXSpeed: 4,\n cameraAxisYSpeed: 1,\n ambientOcclusion: false,\n enableStreamingMode: true,\n enablePartialMode: false,\n memoryLimit: 3294967296,\n cuttingPlaneFillColor: { red: 0xff, green: 0x98, blue: 0x00 },\n edgesColor: { r: 0xff, g: 0x98, b: 0x00 },\n facesColor: { r: 0xff, g: 0x98, b: 0x00 },\n edgesVisibility: true,\n edgesOverlap: true,\n facesOverlap: false,\n facesTransparancy: 200,\n enableCustomHighlight: true,\n sceneGraph: false,\n edgeModel: true,\n reverseZoomWheel: false,\n enableZoomWheel: true,\n enableGestures: true,\n geometryType: \"vsfx\",\n rulerUnit: \"Default\",\n cameraMode: \"perspective\",\n };\n return {\n ...data,\n data,\n defaults: () => data,\n resetToDefaults: () => {},\n saveToStorage: () => {},\n loadFromStorage: () => {},\n };\n }\n\n /**\n * Changes the client parameters.\n *\n * After changing the parameters, you must re-login.\n *\n * @param params - An object containing new parameters.\n * @param params.serverUrl - Open Cloud REST API server URL.\n */\n configure(params: { serverUrl?: string }): this {\n this._serverUrl = (params.serverUrl || \"\").replace(/\\/+$/, \"\");\n this._httpClient.serverUrl = this.serverUrl;\n this.clearCurrentUser();\n return this;\n }\n\n /**\n * Returns client and server versions.\n *\n * No login is required to obtain the version.\n */\n version(): Promise<{ server: string; client: string; hash: string }> {\n return this.httpClient\n .get(\"/version\")\n .then((response) => response.json())\n .then((data) => ({\n ...data,\n server: data.version,\n client: \"CLIENT_JS_VERSION\",\n }));\n }\n\n /**\n * Registers a new user on the server. No authorization is required to register a new user.\n *\n * @param email - User email. Cannot be empty. Must be unique within the server.\n * @param password - User password. Cannot be empty. Password can only contain letters (a-z, A-Z),\n * numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'\":;.,?).\n * @param userName - User name. Cannot be empty or blank if defined. this to `undefined` to use\n * `username` from email.\n */\n registerUser(email: string, password: string, userName?: string): Promise<any> {\n return this.httpClient\n .post(\"/register\", {\n email,\n password,\n userName: userName ?? (email + \"\").split(\"@\").shift(),\n })\n .then((response) => response.json());\n }\n\n /**\n * Resends a Confirmation Email to the new user. If the user's email is already confirmed, an exception\n * will be thrown.\n *\n * @param email - User email.\n * @param password - User password.\n */\n resendConfirmationEmail(email: string, password: string): Promise<any> {\n return this.httpClient\n .post(\"/register/email-confirmation\", { email, password })\n .then((response) => response.json());\n }\n\n /**\n * Marks the user's email address as confirmed. If the user's email is already confirmed, an exception\n * will be thrown.\n *\n * @param emailConfirmationId - Confirmation code from the Confirmation Email.\n */\n confirmUserEmail(emailConfirmationId: string): Promise<any> {\n return this.httpClient\n .get(`/register/email-confirmation/${emailConfirmationId}`)\n .then((response) => response.json());\n }\n\n /**\n * Log in an existing user using email or user name.\n *\n * @param email - An email or user name for authentication request.\n * @param password - Password for authentication request.\n */\n async signInWithEmail(email: string, password: string): Promise<User> {\n const credentials = btoa(unescape(encodeURIComponent(email + \":\" + password)));\n this.httpClient.headers[\"Authorization\"] = \"Basic \" + credentials;\n const response = await this.httpClient.get(\"/token\");\n const data = await response.json();\n return this.setCurrentUser(data);\n }\n\n /**\n * Log in an existing user using access token (API Key).\n *\n * @param token - An access token for authentication request. See {@link User.token} for more details.\n */\n async signInWithToken(token: string): Promise<User> {\n this.httpClient.headers[\"Authorization\"] = token;\n const response = await this.httpClient.get(\"/user\");\n const data = await response.json();\n return this.setCurrentUser(data);\n }\n\n /**\n * Log out.\n *\n * You must log in again using {@link signInWithEmail} or {@link signInWithToken} to continue making\n * requests to the server\n */\n signOut(): void {\n this.clearCurrentUser();\n }\n\n // Save the current logged in user information for internal use.\n\n private setCurrentUser(data: any): User {\n this._user = new User(data, this.httpClient);\n this.httpClient.headers[\"Authorization\"] = data.tokenInfo.token;\n this.httpClient.signInUserId = this._user.id;\n this.httpClient.signInUserIsAdmin = this._user.isAdmin;\n return this._user;\n }\n\n private clearCurrentUser(): void {\n this._user = null;\n delete this.httpClient.headers[\"Authorization\"];\n this.httpClient.signInUserId = \"\";\n this.httpClient.signInUserIsAdmin = false;\n }\n\n /**\n * Returns the current logged in user. Returns `null` if the user is not logged in or the logged in\n * user has deleted themselves.\n */\n getCurrentUser(): User | null {\n if (this._user && !this.httpClient.signInUserId) this._user = null;\n return this._user;\n }\n\n /**\n * Returns the list of server enabled identity providers. No authorization is required to obtain a list\n * of providers.\n */\n getIdentityProviders(): Promise<{ name: string; url: string }[]> {\n return this.httpClient.get(\"/identity\").then((response) => response.json());\n }\n\n /**\n * Returns the current server settings.\n *\n * @returns Returns an object with server settings. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Settings | Open Cloud Settings API}.\n */\n getServerSettings(): Promise<any> {\n return this.httpClient.get(\"/settings\").then((response) => response.json());\n }\n\n /**\n * Changes the server settings.\n *\n * Only administrators can change server settings. If the current logged in user is not an\n * administrator, an exception will be thrown.\n *\n * @param settings - An object with the new server settings or part of the settings. For more\n * information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Settings | Open Cloud Settings API}.\n * @returns Returns an object with updated server settings.\n */\n updateServerSettings(settings: any): Promise<any> {\n return this.httpClient.put(\"/settings\", settings).then((response) => response.json());\n }\n\n /**\n * Result for OAuth client list.\n *\n * @typedef {any} OAuthClientsResult\n * @property {OAuthClient[]} result - Result client list.\n * @property {number} start - The starting index in the client list in the request.\n * @property {number} limit - The maximum number of requested clients.\n * @property {number} allSize - Total number of OAuth clients on the server.\n * @property {number} size - The number of clients in the result list.\n */\n\n /**\n * Returns a list of OAuth clients of the server.\n *\n * Only administrators can get a list of OAuth clients. If the current logged in user is not an\n * administrator, an exception will be thrown.\n *\n * @param start - The starting index in the client list. Used for paging.\n * @param limit - The maximum number of clients that should be returned per request. Used for paging.\n */\n getOAuthClients(\n start?: number,\n limit?: number\n ): Promise<{\n result: OAuthClient[];\n start: number;\n limit: number;\n allSize: number;\n size: number;\n }> {\n const searchParams = new URLSearchParams();\n if (start > 0) searchParams.set(\"start\", start.toString());\n if (limit > 0) searchParams.set(\"limit\", limit.toString());\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.httpClient\n .get(`/oauth/clients${queryString}`)\n .then((response) => response.json())\n .then((clients) => {\n return {\n ...clients,\n result: clients.result.map((data) => new OAuthClient(data, this.httpClient)),\n };\n });\n }\n\n /**\n * Returns information about the specified OAuth client.\n *\n * Only administrators can get OAuth clients. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * @param clientId - Client ID.\n */\n getOAuthClient(clientId: string): Promise<OAuthClient> {\n return this.httpClient\n .get(`/oauth/clients/${clientId}`)\n .then((response) => response.json())\n .then((data) => new OAuthClient(data, this.httpClient));\n }\n\n /**\n * Creates a new OAuth client on the server.\n *\n * Only administrators can create OAuth clients. If the current logged in user is not an administrator,\n * an exception will be thrown.\n *\n * @param name - Client name.\n * @param redirectUrl - Endpoint to which the OAuth 2.0 server sends the response.\n * @param description - Client description.\n */\n createOAuthClient(name: string, redirectUrl: string, description?: string): Promise<OAuthClient> {\n return this.httpClient\n .post(\"/oauth/clients\", {\n name,\n redirectUrl,\n description,\n })\n .then((response) => response.json())\n .then((data) => new OAuthClient(data, this.httpClient));\n }\n\n /**\n * Deletes the specified OAuth client from the server.\n *\n * Only administrators can delete OAuth clients. If the current logged in user is not an administrator,\n * an exception will be thrown.\n *\n * @param clientId - Client ID.\n * @returns Returns the raw data of a deleted client. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#OAuthClient | Open Cloud OAuth Clients API}.\n */\n deleteOAuthClient(clientId: string): Promise<any> {\n return this.httpClient.delete(`/oauth/clients/${clientId}`).then((response) => response.json());\n }\n\n /**\n * Returns the list of server users.\n *\n * Only administrators can get a list of users. If the current logged in user is not an administrator,\n * an exception will be thrown.\n */\n getUsers(): Promise<User[]> {\n return this.httpClient\n .get(\"/users\")\n .then((response) => response.json())\n .then((array) => array.map((data) => ({ id: data.id, ...data.userBrief })))\n .then((array) => array.map((data) => new User(data, this.httpClient)));\n }\n\n /**\n * Returns information about the specified user.\n *\n * Only administrators can get other users. If the current logged in user is not an administrator, they\n * can only get themselves, otherwise an exception will be thrown.\n *\n * @param userId - User ID.\n */\n getUser(userId: string): Promise<User> {\n if (this.httpClient.signInUserIsAdmin) {\n return this.httpClient\n .get(`/users/${userId}`)\n .then((response) => response.json())\n .then((data) => ({ id: data.id, ...data.userBrief }))\n .then((data) => new User(data, this.httpClient));\n } else if (userId === this.httpClient.signInUserId) {\n return this.httpClient\n .get(\"/user\")\n .then((response) => response.json())\n .then((data) => ({ id: userId, ...data }))\n .then((data) => new User(data, this.httpClient));\n } else {\n return Promise.reject(new FetchError(403));\n }\n }\n\n /**\n * Creates a new user on the server.\n *\n * Only administrators can create users. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * @param email - User email. Cannot be empty. Must be unique within the server.\n * @param password - User password. Cannot be empty. Password can only contain latin letters (a-z,\n * A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'\":;.,?).\n * @param params - Additional user data.\n * @param params.isAdmin - `true` if user is an administrator.\n * @param params.userName - User name. Cannot be empty or blank if defined. Specify `undefined` to use\n * `username` from email.\n * @param params.firstName - First name.\n * @param params.lastName - Last name.\n * @param params.canCreateProject - `true` if user is allowed to create a project.\n * @param params.projectsLimit - The maximum number of projects that the user can create.\n * @param params.storageLimit - The size of the file storage available to the user in bytes.\n */\n createUser(\n email: string,\n password: string,\n params: {\n isAdmin?: boolean;\n userName?: string;\n firstName?: string;\n lastName?: string;\n canCreateProject?: boolean;\n projectsLimit?: number;\n storageLimit?: number;\n } = {}\n ): Promise<User> {\n const { isAdmin, userName, ...rest } = params;\n return this.httpClient\n .post(\"/users\", {\n isAdmin,\n userBrief: {\n ...rest,\n email,\n userName: userName ?? (email + \"\").split(\"@\").shift(),\n },\n password,\n })\n .then((response) => response.json())\n .then((data) => ({ id: data.id, ...data.userBrief }))\n .then((data) => new User(data, this.httpClient));\n }\n\n /**\n * Deletes the specified user from the server.\n *\n * Only administrators can delete users. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * Administrators can delete themselves or other administrators. An administrator can only delete\n * themselves if they are not the last administrator.\n *\n * You need to re-login after deleting the current logged in user.\n *\n * @param userId - User ID.\n * @returns Returns the raw data of a deleted user. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.\n */\n deleteUser(userId: string): Promise<any> {\n if (this.httpClient.signInUserIsAdmin) {\n return this.httpClient\n .delete(`/users/${userId}`)\n .then((response) => response.json())\n .then((data) => {\n if (userId === this.httpClient.signInUserId) {\n this.clearCurrentUser();\n }\n return data;\n });\n } else {\n return Promise.reject(new FetchError(403));\n }\n }\n\n /**\n * Result for file list.\n *\n * @typedef {any} FilesResult\n * @property {File[]} result - Result file list.\n * @property {number} start - The starting index in the file list in the request.\n * @property {number} limit - The maximum number of requested files.\n * @property {number} allSize - Total number of files the user has access to.\n * @property {number} size - The number of files in the result list.\n */\n\n /**\n * Returns a list of files that the current logged in user has uploaded to the server or has access to\n * through a project.\n *\n * @param start - The starting index in the file list. Used for paging.\n * @param limit - The maximum number of files that should be returned per request. Used for paging.\n * @param name - Filter the files by part of the name. Case sensitive.\n * @param ext - Filter the files by extension. Extension can be `dgn`, `dwf`, `dwg`, `dxf`, `ifc`,\n * `ifczip`, `nwc`, `nwd`, `obj`, `rcs`, `rfa`, `rvt`, `step`, `stl`, `stp`, `vsf`, or any other file\n * type extension.\n * @param ids - List of file IDs to return. The list can include files that the user has access to\n * through a project. If not specified, only files uploaded by the current user are returned.\n * @param sortByDesc - Allows to specify the descending order of the result. By default, files are\n * sorted by name in ascending order.\n * @param sortField - Allows to specify sort field.\n * @param shared - Returns shared files only.\n */\n getFiles(\n start?: number,\n limit?: number,\n name?: string,\n ext?: string | string[],\n ids?: string | string[],\n sortByDesc?: boolean,\n sortField?: string,\n shared?: boolean\n ): Promise<{\n result: File[];\n start: number;\n limit: number;\n allSize: number;\n size: number;\n }> {\n const searchParams = new URLSearchParams();\n if (start > 0) searchParams.set(\"start\", start.toString());\n if (limit > 0) searchParams.set(\"limit\", limit.toString());\n if (name) searchParams.set(\"name\", name);\n if (ext) {\n ext = normalizeParam(ext);\n if (ext) searchParams.set(\"ext\", ext.toLowerCase());\n }\n if (ids) {\n ids = normalizeParam(ids);\n if (ids) searchParams.set(\"id\", ids);\n }\n if (sortByDesc !== undefined) searchParams.set(\"sortBy\", sortByDesc ? \"desc\" : \"asc\");\n if (sortField) searchParams.set(\"sortField\", sortField);\n if (shared) searchParams.set(\"shared\", \"true\");\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.httpClient\n .get(`/files${queryString}`)\n .then((response) => response.json())\n .then((files) => {\n return {\n ...files,\n result: files.result.map((data) => new File(data, this.httpClient)),\n };\n });\n }\n\n /**\n * Returns information about the specified file that the current logged in user has uploaded or has\n * access to through a project.\n *\n * @param fileId - File ID.\n */\n getFile(fileId: string): Promise<File> {\n return this.httpClient\n .get(`/files/${fileId}`)\n .then((response) => response.json())\n .then((data) => new File(data, this.httpClient));\n }\n\n /**\n * Upload a drawing or reference file to the server.\n *\n * Fires:\n *\n * - {@link UploadProgressEvent | uploadprogress}\n *\n * @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object are\n * generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}\n * object returned as a result of a user selecting files using the HTML `<input>` element.\n * @param params - An object containing upload parameters.\n * @param params.geometry - Run File Converter job to convert geometry data after uploading the file.\n * Can be one of:\n *\n * - `true` - Convert file geometry data to `VSFX` format for opening in `VisualizeJS` 3D viewer.\n * - `vsfx` - Convert file geometry data to `VSFX` format for opening in `VisualizeJS` 3D viewer.\n * - `gltf` - Convert file geometry data to `glTF` format for opening in `Three.js` 3D viewer.\n *\n * @param params.properties - Run File Converter job to extract properties after uploading the file.\n * @param params.jobParameters - Parameters for the File Converter jobs. Use this to specify additional\n * parameters for retrieving the geometry and properties of uploaded file. Can be given as command\n * line arguments in form `--arg=value`.\n * @param params.waitForDone - Wait for geometry and properties jobs to complete.\n * @param params.timeout - The time, in milliseconds that the function should wait jobs. If no one jobs\n * are done during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * jobs status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onProgress - Upload progress callback.\n */\n async uploadFile(\n file: globalThis.File,\n params: {\n geometry?: boolean | string;\n properties?: boolean;\n jobParameters?: {\n geometry?: string | object;\n properties?: string | object;\n };\n waitForDone?: boolean;\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onProgress?: (progress: number, file: globalThis.File) => void;\n } = {\n geometry: true,\n properties: false,\n waitForDone: false,\n }\n ): Promise<File> {\n const result = await this.httpClient\n .uploadFile(\"/files\", file, (progress) => {\n this.emitEvent({ type: \"uploadprogress\", data: progress, file });\n params.onProgress?.(progress, file);\n })\n .then((xhr: XMLHttpRequest) => JSON.parse(xhr.responseText))\n .then((data) => new File(data, this.httpClient));\n\n const geometryType = typeof params.geometry === \"string\" ? params.geometry : \"vsfx\";\n const jobParameters = params.jobParameters || {};\n\n const jobs: string[] = [];\n if (params.geometry) jobs.push((await result.extractGeometry(geometryType, jobParameters.geometry)).outputFormat);\n if (params.properties) jobs.push((await result.extractProperties(jobParameters.properties)).outputFormat);\n if (jobs.length > 0)\n if (params.waitForDone) await result.waitForDone(jobs, true, params);\n else await result.checkout();\n\n return result;\n }\n\n /**\n * Deletes the specified file and all its versions from the server.\n *\n * You cannot delete a version file using `deleteFile()`, only the original file. To delete a version\n * file use {@link File.deleteVersion | File.deleteVersion()}.\n *\n * @param fileId - File ID.\n * @returns Returns the raw data of a deleted file. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.\n */\n deleteFile(fileId: string): Promise<any> {\n return this.httpClient.delete(`/files/${fileId}`).then((response) => response.json());\n }\n\n /**\n * Downloads the specified file from the server.\n *\n * @param fileId - File ID.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadFile(fileId: string, onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFile(`/files/${fileId}/downloads`, onProgress, { signal })\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Result for job list.\n *\n * @typedef {any} JobsResult\n * @property {Job[]} result - Result job list.\n * @property {number} start - The starting index in the job list in the request.\n * @property {number} limit - The maximum number of requested jobs.\n * @property {number} allSize - Total number of jobs created by the user.\n * @property {number} size - The number of jobs in the result list.\n */\n\n /**\n * Returns a list of jobs started by the current logged in user.\n *\n * @param status - Filter the jobs by status. Status can be `waiting`, `inpogress`, `done` or `failed`.\n * @param limit - The maximum number of jobs that should be returned per request. Used for paging.\n * @param start - The starting index in the job list. Used for paging.\n * @param sortByDesc - Allows to specify the descending order of the result. By default, jobs are\n * sorted by creation time in ascending order.\n * @param {boolean} sortField - Allows to specify sort field.\n */\n getJobs(\n status?: string | string[],\n limit?: number,\n start?: number,\n sortByDesc?: boolean,\n sortField?: string\n ): Promise<{\n result: Job[];\n start: number;\n limit: number;\n allSize: number;\n size: number;\n }> {\n const searchParams = new URLSearchParams();\n if (start > 0) searchParams.set(\"start\", start.toString());\n if (limit > 0) searchParams.set(\"limit\", limit.toString());\n if (status) {\n status = normalizeParam(status);\n if (status) searchParams.set(\"status\", status.toLowerCase());\n }\n if (sortByDesc !== undefined) searchParams.set(\"sortBy\", sortByDesc ? \"desc\" : \"asc\");\n if (sortField) searchParams.set(\"sortField\", sortField);\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.httpClient\n .get(`/jobs${queryString}`)\n .then((response) => response.json())\n .then((jobs) => ({\n ...jobs,\n result: jobs.result.map((data) => new Job(data, this.httpClient)),\n }));\n }\n\n /**\n * Returns information about the specified job.\n *\n * @param jobId - Job ID.\n */\n getJob(jobId: string): Promise<Job> {\n return this.httpClient\n .get(`/jobs/${jobId}`)\n .then((response) => response.json())\n .then((data) => new Job(data, this.httpClient));\n }\n\n /**\n * Runs a new job on the server for the specified file.\n *\n * @param fileId - File ID.\n * @param outputFormat - The job type. Can be one of:\n *\n * - `geometry` - Convert file geometry data to `VSFX` format for opening in `VisualizeJS` 3D viewer.\n * - `geometryGltf` - Convert file geometry data to `glTF` format for opening in `Three.js` 3D viewer.\n * - `properties` - Extract file properties.\n * - `validation` - Validate the IFC file.\n * - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the specified format.\n * - Other custom job name. Custom job must be registered in the job templates before running.\n *\n * @param parameters - Parameters for the File Converter jobs or custom job. Can be given as JSON\n * object or command line arguments in form `--arg=value`.\n */\n createJob(fileId: string, outputFormat: string, parameters?: string | object): Promise<Job> {\n return this.httpClient\n .post(\"/jobs\", {\n fileId,\n outputFormat,\n parameters: parseArgs(parameters),\n })\n .then((response) => response.json())\n .then((data) => new Job(data, this.httpClient));\n }\n\n /**\n * Deletes the specified job from the server job list. Jobs that are in progress or have already been\n * completed cannot be deleted.\n *\n * @param jobId - Job ID.\n * @returns Returns the raw data of a deleted job. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.\n */\n deleteJob(jobId: string): Promise<any> {\n return this.httpClient.delete(`/jobs/${jobId}`).then((response) => response.json());\n }\n\n /**\n * Result for assembly list.\n *\n * @typedef {any} AssembliesResult\n * @property {Assembly[]} result - Result assembly list.\n * @property {number} start - The starting index in the assembly list in the request.\n * @property {number} limit - The maximum number of requested assemblies.\n * @property {number} allSize - Total number of assemblies the user has access to.\n * @property {number} size - The number of assemblies in the result list.\n */\n\n /**\n * Returns a list of assemblies created by the current logged in user.\n *\n * @param start - The starting index in the assembly list. Used for paging.\n * @param limit - The maximum number of assemblies that should be returned per request. Used for\n * paging.\n * @param name - Filter the assemblies by part of the name. Case sensitive.\n * @param ids - List of assembly IDs to return.\n * @param sortByDesc - Allows to specify the descending order of the result. By default assemblies are\n * sorted by name in ascending order.\n * @param sortField - Allows to specify sort field.\n */\n getAssemblies(\n start?: number,\n limit?: number,\n name?: string,\n ids?: string | string[],\n sortByDesc?: boolean,\n sortField?: string\n ): Promise<{\n result: Assembly[];\n start: number;\n limit: number;\n allSize: number;\n size: number;\n }> {\n const searchParams = new URLSearchParams();\n if (start > 0) searchParams.set(\"start\", start.toString());\n if (limit > 0) searchParams.set(\"limit\", limit.toString());\n if (name) searchParams.set(\"name\", name);\n if (ids) {\n ids = normalizeParam(ids);\n if (ids) searchParams.set(\"id\", ids);\n }\n if (sortByDesc !== undefined) searchParams.set(\"sortBy\", sortByDesc ? \"desc\" : \"asc\");\n if (sortField) searchParams.set(\"sortField\", sortField);\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.httpClient\n .get(`/assemblies${queryString}`)\n .then((response) => response.json())\n .then((assemblies) => {\n return {\n ...assemblies,\n result: assemblies.result.map((data) => new Assembly(data, this.httpClient)),\n };\n });\n }\n\n /**\n * Returns information about the specified assembly.\n *\n * @param assemblyId - Assembly ID.\n */\n getAssembly(assemblyId: string): Promise<Assembly> {\n return this.httpClient\n .get(`/assemblies/${assemblyId}`)\n .then((response) => response.json())\n .then((data) => new Assembly(data, this.httpClient));\n }\n\n /**\n * Creates a new assembly on the server.\n *\n * @param files - List of file IDs.\n * @param name - Assembly name.\n * @param params - Additional assembly creating parameters.\n * @param params.jobParameters - Parameters for the File Converter jobs. Use this to specify additional\n * parameters for generating the geometry and properties of the new assembly. Can be given as JSON\n * object or command line arguments in form `--arg=value`.\n * @param params.waitForDone - Wait for assembly to be created.\n * @param params.timeout - The time, in milliseconds, that the function should wait for the assembly to\n * be created. If the assembly is not created within this time, a TimeoutError exception will be\n * thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * assembly status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.\n */\n createAssembly(\n files: string[],\n name: string,\n params: {\n jobParameters?: {\n geometry?: string | object;\n properties?: string | object;\n };\n waitForDone?: boolean;\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onCheckout?: (assembly: Assembly, ready: boolean) => boolean;\n } = {}\n ): Promise<Assembly> {\n const jobParameters = params.jobParameters || {};\n return this.httpClient\n .post(\"/assemblies\", {\n name,\n files,\n jobParameters: {\n geometry: parseArgs(jobParameters.geometry),\n properties: parseArgs(jobParameters.properties),\n },\n })\n .then((response) => response.json())\n .then((data) => new Assembly(data, this.httpClient))\n .then((result) => (params.waitForDone ? result.waitForDone(params) : result));\n }\n\n /**\n * Deletes the specified assembly from the server.\n *\n * @param assemblyId - Assembly ID.\n * @returns Returns the raw data of a deleted assembly. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud API}.\n */\n deleteAssembly(assemblyId: string): Promise<any> {\n return this.httpClient.delete(`/assemblies/${assemblyId}`).then((response) => response.json());\n }\n\n /**\n * Result for project list.\n *\n * @typedef {any} ProjectsResult\n * @property {Project[]} result - Result project list.\n * @property {number} start - The starting index in the project list in the request.\n * @property {number} limit - The maximum number of requested projects.\n * @property {number} allSize - Total number of projects the user has access to.\n * @property {number} size - The number of projects in the result list.\n */\n\n /**\n * Returns a list of projects that the currently logged in user has created or has access to.\n *\n * @param start - The starting index in the project list. Used for paging.\n * @param limit - The maximum number of projects that should be returned per request. Used for paging.\n * @param name - Filter the projects by part of the name. Case sensitive.\n * @param ids - List of project IDs to return.\n * @param sortByDesc - Allows to specify the descending order of the result. By default projects are\n * sorted by name in ascending order.\n */\n getProjects(\n start?: number,\n limit?: number,\n name?: string,\n ids?: string | string[],\n sortByDesc?: boolean\n ): Promise<{\n result: Project[];\n start: number;\n limit: number;\n allSize: number;\n size: number;\n }> {\n const searchParams = new URLSearchParams();\n if (start > 0) searchParams.set(\"start\", start.toString());\n if (limit > 0) searchParams.set(\"limit\", limit.toString());\n if (name) searchParams.set(\"name\", name);\n if (ids) {\n ids = normalizeParam(ids);\n if (ids) searchParams.set(\"id\", ids);\n }\n if (sortByDesc !== undefined) searchParams.set(\"sortBy\", sortByDesc ? \"desc\" : \"asc\");\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n return this.httpClient\n .get(`/projects${queryString}`)\n .then((response) => response.json())\n .then((projects) => {\n // fix for server 23.5 and below\n if (Array.isArray(projects)) {\n let result = projects;\n if (ids) result = result.filter((x) => ids.includes(x.id));\n if (name) result = result.filter((x) => x.name.includes(name));\n if (limit > 0) {\n const begin = start > 0 ? start : 0;\n result = result.slice(begin, begin + limit);\n }\n return {\n allSize: projects.length,\n start,\n limit,\n result,\n size: result.length,\n };\n }\n return projects;\n })\n .then((projects) => {\n return {\n ...projects,\n result: projects.result.map((data) => new Project(data, this.httpClient)),\n };\n });\n }\n\n /**\n * Returns information about the specified project.\n *\n * @param projectId - Project ID.\n */\n getProject(projectId: string): Promise<Project> {\n return this.httpClient\n .get(`/projects/${projectId}`)\n .then((response) => response.json())\n .then((data) => new Project(data, this.httpClient));\n }\n\n /**\n * Creates a new project on the server.\n *\n * @param name - Project name.\n * @param description - Project description.\n * @param startDate - Project start date.\n * @param endDate - Project end date.\n */\n createProject(\n name: string,\n description?: string,\n startDate?: Date | string,\n endDate?: Date | string\n ): Promise<Project> {\n return this.httpClient\n .post(\"/projects\", {\n name,\n description,\n startDate: startDate instanceof Date ? startDate.toISOString() : startDate,\n endDate: endDate instanceof Date ? endDate.toISOString() : endDate,\n })\n .then((response) => response.json())\n .then((data) => new Project(data, this.httpClient));\n }\n\n /**\n * Deletes the specified project from the server.\n *\n * @param projectId - Project ID.\n * @returns Returns the raw data of a deleted project. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n deleteProject(projectId: string): Promise<any> {\n return this.httpClient\n .delete(`/projects/${projectId}`)\n .then((response) => response.text())\n .then((text) => {\n // fix for server 23.5 and below\n try {\n return JSON.parse(text);\n } catch {\n return { id: projectId };\n }\n });\n }\n\n /**\n * Returns information about the specified file shared link.\n *\n * @param token - Shared link token.\n */\n getSharedLink(token: string): Promise<SharedLink> {\n return this.httpClient\n .get(`/shares/${token}`)\n .then((response) => response.json())\n .then((data) => new SharedLink(data, this.httpClient));\n }\n\n /**\n * Creates a shared link for the specified file.\n *\n * @param fileId - File ID.\n * @param permissions - Share permissions.\n */\n createSharedLink(fileId: string, permissions?: ISharedLinkPermissions): Promise<SharedLink> {\n return this.httpClient\n .post(\"/shares\", {\n fileId,\n permissions,\n })\n .then((response) => response.json())\n .then((data) => new SharedLink(data, this.httpClient));\n }\n\n /**\n * Deletes the specified shared link.\n *\n * Only file owner can delete shared link. If the current logged in user is not a file owner, an\n * exception will be thrown.\n *\n * @param token - Shared link token.\n * @returns Returns the raw data of a deleted shared link. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#ShareLinks | Open Cloud SharedLinks API}.\n */\n deleteSharedLink(token: string): Promise<any> {\n return this.httpClient.delete(`/shares/${token}`).then((response) => response.json());\n }\n\n /**\n * Returns information about a file from a shared link.\n *\n * Some file features are not available via shared link:\n *\n * - Updating file properties, preview, and viewpoints\n * - Running file jobs\n * - Managing file permissions\n * - Managing file versions\n * - Deleting file\n *\n * @param token - Shared link token.\n * @param password - Password to get access to the file.\n */\n getSharedFile(token: string, password?: string): Promise<File> {\n return this.httpClient\n .get(`/shares/${token}/info`, { headers: { \"InWeb-Password\": password } })\n .then((response) => response.json())\n .then((data) => new SharedFile(data, password, this.httpClient));\n }\n\n /**\n * Returns the list of installed plugins.\n *\n * Only administrators can get a list of plugins. If the current logged in user is not an\n * administrator, an exception will be thrown.\n */\n getPlugins(): Promise<Plugin[]> {\n return this.httpClient\n .get(\"/plugins\")\n .then((response) => response.json())\n .then((array) => array.map((data) => new Plugin(data, this.httpClient)));\n }\n\n /**\n * Returns information about the specified plugin.\n *\n * Only administrators can get plugins. If the current logged in user is not an administrator, they can\n * only get themselves, otherwise an exception will be thrown.\n *\n * @param name - Plugin name.\n * @param version - Plugin version.\n */\n getPlugin(name: string, version: string): Promise<Plugin> {\n return this.httpClient\n .get(`/plugins/${name}/${version}`)\n .then((response) => response.json())\n .then((data) => new Plugin(data, this.httpClient));\n }\n\n /**\n * Uploads and install a plugin package to the server. The package must be a ZIP file and undergoes\n * verification, scanning, and health checks during installation.\n *\n * Only administrators can upload plugins. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object are\n * generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}\n * object returned as a result of a user selecting files using the HTML `<input>` element.\n * @param onProgress - Upload progress callback.\n */\n async uploadPlugin(\n file: globalThis.File,\n onProgress?: (progress: number, file: globalThis.File) => void\n ): Promise<Plugin> {\n return await this.httpClient\n .uploadFile(\"/plugins\", file, (progress) => {\n this.emitEvent({ type: \"uploadprogress\", data: progress, file });\n if (onProgress) onProgress(progress, file);\n })\n .then((xhr: XMLHttpRequest) => JSON.parse(xhr.responseText))\n .then((data) => new Plugin(data, this.httpClient));\n }\n\n /**\n * Uninstalls and deletes the specified plugin from the server.\n *\n * Only administrators can delete plugins. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * @param name - Plugin name.\n * @param version - Plugin version.\n */\n deletePlugin(name: string, version: string): Promise<Plugin> {\n return this.httpClient.delete(`/plugins/${name}/${version}`).then((response) => response.json());\n }\n\n /**\n * Downloads the specified plugin package from the server.\n *\n * Only administrators can download plugins. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * @param name - Plugin name.\n * @param version - Plugin version.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadPlugin(\n name: string,\n version: string,\n onProgress?: (progress: number) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFile(`/plugins/${name}/${version}/download`, onProgress, { signal })\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Executes a plugin command.\n *\n * If you have multiple versions of a plugin installed and want to run the command for the latest\n * version of the plugin, specify `undefined` or empty string for the `version` parameter.\n *\n * @param name - Plugin name.\n * @param version - Plugin version. Specify `undefined` or empty string to run the command for the\n * latest version of the plugin.\n * @param command - Command to execute.\n * @param parameters - Command parameters. Command-dependent.\n */\n executePluginCommand(name: string, version: string, command: string, parameters?: BodyInit | object): Promise<any> {\n const searchParams = new URLSearchParams();\n if (version) searchParams.set(\"version\", version);\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n return this.httpClient\n .post(`/plugins/${name}/commands/${command}${queryString}`, parameters)\n .then((response) => response.json());\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nexport { Assembly } from \"./Api/Assembly\";\nexport { Client } from \"./Api/Client\";\nexport { ClashTest } from \"./Api/ClashTest\";\nexport * from \"./Api/ClientEvents\";\nexport { File } from \"./Api/File\";\nexport { FetchError, statusText } from \"./Api/FetchError\";\nexport { Job } from \"./Api/Job\";\nexport { IHttpClient } from \"./Api/IHttpClient\";\nexport { IAssociatedFileData, IClashItem, IModelTransformMatrix } from \"./Api/IAssembly\";\nexport * from \"./Api/IFile\";\nexport { IRoleActions } from \"./Api/IRole\";\nexport * from \"./Api/ISharedLink\";\nexport { IShortUserDesc } from \"./Api/IUser\";\nexport { Member } from \"./Api/Member\";\nexport { Model } from \"./Api/Model\";\nexport { OAuthClient } from \"./Api/OAuthClient\";\nexport { Permission } from \"./Api/Permission\";\nexport { Project } from \"./Api/Project\";\nexport * from \"./Api/Endpoint\";\nexport { Role } from \"./Api/Role\";\nexport * from \"./Api/Plugin\";\nexport * from \"./Api/SharedLink\";\nexport * from \"./Api/SharedFile\";\nexport { User } from \"./Api/User\";\nexport * from \"./Api/Utils\";\n\nexport const version = \"CLIENT_JS_VERSION\";\n"],"names":[],"mappings":";;;;;;;;;;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AE,CAAC;IAClG;AAeA,IAAA,cAAc,CACZ,IAAY,EACZ,OAAe,EACf,UAAuC,EACvC,MAAoB,EAAA;QAEpB,OAAO,IAAI,CAAC;AACT,aAAA,YAAY,CAAC,CAAA,SAAA,EAAY,IAAI,CAAA,CAAA,EAAI,OAAO,CAAA,SAAA,CAAW,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE;aAC3E,IAAI,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,WAAW,EAAE,CAAC;IAC/C;AAcA,IAAA,oBAAoB,CAAC,IAAY,EAAE,OAAe,EAAE,OAAe,EAAE,UAA8B,EAAA;AACjG,QAAA,MAAM,YAAY,GAAG,IAAI,eAAe,EAAE;AAC1C,QAAA,IAAI,OAAO;AAAE,YAAA,YAAY,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC;AAEjD,QAAA,IAAI,WAAW,GAAG,YAAY,CAAC,QAAQ,EAAE;AACzC,QAAA,IAAI,WAAW;AAAE,YAAA,WAAW,GAAG,GAAG,GAAG,WAAW;QAChD,OAAO,IAAI,CAAC;aACT,IAAI,CAAC,CAAA,SAAA,EAAY,IAAI,CAAA,UAAA,EAAa,OAAO,GAAG,WAAW,CAAA,CAAE,EAAE,UAAU;aACrE,IAAI,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,IAAI,EAAE,CAAC;IACxC;AACD;;ACvrCM,MAAM,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"client.module.js","sources":["../src/Api/Endpoint.ts","../src/Api/FetchError.ts","../src/Api/Model.ts","../src/Api/Utils.ts","../src/Api/ClashTest.ts","../src/Api/Assembly.ts","../src/Api/Fetch.ts","../src/Api/XMLHttp.ts","../src/Api/HttpClient.ts","../src/Api/Permission.ts","../src/Api/Job.ts","../src/Api/SharedLink.ts","../src/Api/File.ts","../src/Api/Role.ts","../src/Api/Member.ts","../src/Api/Project.ts","../src/Api/User.ts","../src/Api/OAuthClient.ts","../src/Api/SharedFile.ts","../src/Api/Plugin.ts","../src/Api/Client.ts","../src/index.ts"],"sourcesContent":["///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\n\n/**\n * Base class for the REST API endpoints.\n */\nexport class Endpoint {\n /**\n * Endpoint API path relative to the REST API server URL.\n */\n public path: string;\n\n /**\n * Endpoint-specific HTTP headers for the `GET`, `POST`, `PUT` and `DELETE` requests. You can add\n * custom headers at any time.\n */\n public headers: HeadersInit;\n\n public httpClient: IHttpClient;\n private _useVersion: number | undefined;\n\n /**\n * @ignore\n * @param path - The API path of the endpoint relative to the REST API server URL of the specified HTTP\n * client.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n * @param headers - Endpoint-specific HTTP headers.\n */\n constructor(path: string, httpClient: IHttpClient, headers = {}) {\n this.path = path;\n this.httpClient = httpClient;\n this.headers = headers;\n }\n\n // Internal: append the `?version=` search param to the specified relative path.\n\n appendVersionParam(relativePath: string): string {\n if (this._useVersion === undefined) return relativePath;\n const delimiter = relativePath.includes(\"?\") ? \"&\" : \"?\";\n return `${relativePath}${delimiter}version=${this._useVersion}`;\n }\n\n /**\n * Returns the endpoint API path.\n *\n * @ignore\n * @param relativePath - Nested endpoint relative path.\n */\n getEndpointPath(relativePath: string): string {\n return this.appendVersionParam(`${this.path}${relativePath}`);\n }\n\n /**\n * Sends the `GET` request to the endpoint.\n *\n * @ignore\n * @param relativePath - Nested endpoint relative path.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n get(relativePath: string, signal?: AbortSignal): Promise<Response> {\n return this.httpClient.get(this.getEndpointPath(relativePath), { signal, headers: this.headers });\n }\n\n /**\n * Sends the `POST` request to the endpoint.\n *\n * @ignore\n * @param relativePath - Nested endpoint relative path.\n * @param body - Request body. Can be\n * {@link https://developer.mozilla.org/docs/Web/API/FormData | FormData},\n * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},\n * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob}, JSON object or plain text.\n */\n post(relativePath: string, body?: BodyInit | object): Promise<Response> {\n return this.httpClient.post(this.getEndpointPath(relativePath), body, { headers: this.headers });\n }\n\n /**\n * Sends the `PUT` request to the endpoint.\n *\n * @ignore\n * @param relativePath - Nested endpoint relative path.\n * @param body - Request body. Can be\n * {@link https://developer.mozilla.org/docs/Web/API/FormData | FormData},\n * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},\n * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob}, JSON object or plain text.\n */\n put(relativePath: string, body?: BodyInit | object): Promise<Response> {\n return this.httpClient.put(this.getEndpointPath(relativePath), body, { headers: this.headers });\n }\n\n /**\n * Sends the `DELETE` request to the endpoint.\n *\n * @ignore\n * @param relativePath - Nested endpoint relative path.\n */\n delete(relativePath: string): Promise<Response> {\n return this.httpClient.delete(this.getEndpointPath(relativePath), { headers: this.headers });\n }\n\n // Internal: append the `version` param to the endpoint requests.\n\n useVersion(version?: number): this {\n this._useVersion = version;\n return this;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nconst STATUS_CODES = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 102: \"Processing\",\n 103: \"Early Hints\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 207: \"Multi-Status\",\n 208: \"Already Reported\",\n 226: \"IM Used\",\n 300: \"Multiple Choices\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 307: \"Temporary Redirect\",\n 308: \"Permanent Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Time-out\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Payload Too Large\",\n 414: \"URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 418: \"I'm a teapot\",\n 421: \"Misdirected Request\",\n 422: \"Unprocessable Entity\",\n 423: \"Locked\",\n 424: \"Failed Dependency\",\n 425: \"Too Early\",\n 426: \"Upgrade Required\",\n 428: \"Precondition Required\",\n 429: \"Too Many Requests\",\n 431: \"Header Fields Too Large\",\n 451: \"Unavailable For Legal Reasons\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\",\n 506: \"Variant Also Negotiates\",\n 507: \"Insufficient Storage\",\n 508: \"Loop Detected\",\n 509: \"Bandwidth Limit Exceeded\",\n 510: \"Not Extended\",\n 511: \"Network Authentication Required\",\n};\n\nexport function statusText(status: number): string {\n return STATUS_CODES[status] || `Error ${status}`;\n}\n\nexport function error400(text: string, _default = \"400\"): string {\n try {\n return JSON.parse(text).description;\n } catch {\n return _default;\n }\n}\n\n/**\n * The `FetchError` object indicates an error when request to Open Cloud Server could not be performed. A\n * `FetchError` is typically (but not exclusively) thrown when a network error occurs, access denied, or\n * object not found.\n */\n\nexport class FetchError extends Error {\n /**\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Status | HTTP status code} of the response.\n */\n public status: number;\n\n /**\n * Status message corresponding to the {@link status | status code}.\n */\n public statusText: string;\n\n /**\n * @property status - The {@link https://developer.mozilla.org/docs/Web/HTTP/Status | HTTP status code}\n * of the response.\n * @property message - Error message.\n */\n constructor(status: number, message?: string) {\n super(message || statusText(status));\n this.name = \"FetchError\";\n this.status = status;\n this.statusText = statusText(status);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Endpoint } from \"./Endpoint\";\nimport type { File } from \"./File\";\nimport type { Assembly } from \"./Assembly\";\nimport type { IFileReferences } from \"./IFile\";\nimport type { IModelTransformMatrix } from \"./IAssembly\";\n\n/**\n * Provides properties and methods for working with view of the {@link File | file} or\n * {@link Assembly| assembly}. For example, for `dwg` it is a `Model` space or layout, and for `rvt` files\n * it is a `3D` view.\n */\nexport class Model extends Endpoint {\n private _data: any;\n private _file: File | Assembly;\n\n /**\n * @param data - Raw model data received from the server.\n * @param file - The file/assembly instance that owns the model.\n */\n constructor(data: any, file: File | Assembly) {\n super(`${file.path}/downloads`, file.httpClient);\n this._data = data;\n this._file = file;\n }\n\n /**\n * The `Assembly` instance that owns the model.\n *\n * @readonly\n */\n get assembly(): Assembly {\n return this._file as Assembly;\n }\n\n /**\n * Raw model data received from the server.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n }\n\n /**\n * Scene description resource file name. Use {@link downloadResource | downloadResource()} to download\n * scene description file.\n *\n * @readonly\n */\n get database(): string {\n return this.data.database;\n }\n\n /**\n * `true` if this is default model.\n *\n * @readonly\n */\n get default(): boolean {\n return this.data.default;\n }\n\n /**\n * The `File` instance that owns the model.\n *\n * @readonly\n */\n get file(): File {\n return this._file as File;\n }\n\n /**\n * The ID of the file that owns the model.\n *\n * @readonly\n */\n get fileId(): string {\n return this.data.fileId;\n }\n\n /**\n * The list of geometry data resource files. Use {@link downloadResource | downloadResource()} to\n * download geometry data files.\n *\n * @readonly\n */\n get geometry(): string[] {\n return this.data.geometry;\n }\n\n /**\n * Unique model ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * Model name.\n *\n * @readonly\n */\n get name(): string {\n return this.data.name;\n }\n\n /**\n * Model owner type, matches the file extension this is model of the file, or `assembly` for\n * assemblies.\n *\n * @readonly\n */\n get type(): string {\n return this.file.type;\n }\n\n // Reserved for future use.\n get version(): string {\n return this.data.version;\n }\n\n /**\n * Returns model list with one item `self`.\n */\n getModels(): Promise<Model[]> {\n return Promise.resolve([this]);\n }\n\n /**\n * Returns a model transformation.\n *\n * @param handle - Model handle.\n */\n getModelTransformMatrix(handle: string): IModelTransformMatrix {\n return this.file.getModelTransformMatrix(handle);\n }\n\n /**\n * Sets or removes a model transformation.\n *\n * @param handle - Model handle.\n * @param transform - Transformation matrix. Specify `undefined` to remove transformation.\n */\n setModelTransformMatrix(handle: string, transform?: IModelTransformMatrix): Promise<this> {\n return this.file.setModelTransformMatrix(handle, transform).then(() => this);\n }\n\n /**\n * Returns a list of viewpoints of the owner file/assembly.\n */\n getViewpoints(): Promise<any[]> {\n return this._file\n .getViewpoints()\n .then((array) =>\n array.filter(\n ({ custom_fields = {} }) => custom_fields.modelId === this.id || custom_fields.modelName === this.name\n )\n );\n }\n\n /**\n * Saves a new model owner file/assembly viewpoint to the server. To create a new viewpoint use\n * `Viewer.createViewpoint()`.\n *\n * @param viewpoint - Viewpoint object.\n */\n saveViewpoint(viewpoint: any): Promise<any> {\n return this._file.saveViewpoint({\n ...viewpoint,\n custom_fields: { ...viewpoint.custom_fields, modelId: this.id, modelName: this.name },\n });\n }\n\n /**\n * Deletes the specified viewpoint from the owner file/assembly.\n *\n * @param guid - Viewpoint GUID.\n * @returns Returns the raw data of a deleted viewpoint.\n */\n deleteViewpoint(guid: string): Promise<any> {\n return this._file.deleteViewpoint(guid);\n }\n\n /**\n * Returns viewpoint snapshot as base64-encoded\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.\n *\n * @param guid - Viewpoint GUID.\n */\n getSnapshot(guid: string): Promise<string> {\n return this._file.getSnapshot(guid);\n }\n\n /**\n * Returns viewpoint snapshot data.\n *\n * @param guid - Viewpoint GUID.\n * @param bitmapGuid - Bitmap GUID.\n */\n getSnapshotData(guid: string, bitmapGuid: string): Promise<string> {\n return this._file.getSnapshotData(guid, bitmapGuid);\n }\n\n /**\n * Downloads a resource file. Resource files are files that contain model scene descriptions, or\n * geometry data.\n *\n * @param dataId - Resource file name.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadResource(\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this._file.downloadResource(dataId, onProgress, signal);\n }\n\n /**\n * Downloads a part of resource file. Resource files are files that contain model scene descriptions,\n * or geometry data.\n *\n * @param dataId - Resource file name.\n * @param requestId - Specify a non-empty `requestId` to append the `?requestId=` search parameter to\n * the server request. If specified, server-side caching may not work.\n * @param ranges - Ranges of resource file contents to download. See\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Guides/Range_requests | HTTP range requests} for\n * more details.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadResourceRange(\n dataId: string,\n requestId: number,\n ranges: Array<{ begin: number; end: number; requestId: number }>,\n onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this._file.downloadResourceRange(dataId, requestId, ranges, onProgress, signal);\n }\n\n /**\n * Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.\n *\n * @deprecated\n */\n partialDownloadResource(\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n console.warn(\n \"Model.partialDownloadResource() has been deprecated since 25.3 and will be removed in a future release, use Model.downloadResource() instead.\"\n );\n return this.downloadResource(dataId, onProgress, signal);\n }\n\n /**\n * Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.\n *\n * @deprecated\n */\n async downloadFileRange(\n requestId: number,\n records: any | null,\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void,\n signal?: AbortSignal\n ): Promise<void> {\n if (!records) return;\n\n let ranges = [];\n if (records.length) {\n ranges = records.map((record) => ({\n begin: Number(record.begin),\n end: Number(record.end),\n requestId: record.reqId,\n }));\n } else {\n for (let i = 0; i < records.size(); i++) {\n const record = records.get(i);\n ranges.push({ begin: Number(record.begin), end: Number(record.end), requestId });\n record.delete();\n }\n }\n\n await this.downloadResourceRange(dataId, requestId, ranges, onProgress, signal);\n }\n\n /**\n * Returns a list of references of the owner file/assembly.\n *\n * References are images, fonts, or any other files to correct rendering of the file.\n *\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n */\n getReferences(signal?: AbortSignal): Promise<IFileReferences> {\n return this._file.getReferences(signal);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nexport function normalizeParam(param: any, separator: string = \"|\"): string {\n if (typeof param === \"string\") param = param.split(\",\");\n if (Array.isArray(param)) param = param.filter((x) => x).join(separator);\n if (typeof param === \"string\") param = param.trim();\n return param.toString();\n}\n\nexport function delay(ms: number, signal: AbortSignal): Promise<boolean> {\n return new Promise((resolve) => {\n let timeoutId = 0;\n\n const abortHandler = () => {\n clearTimeout(timeoutId);\n resolve(true);\n };\n\n timeoutId = window.setTimeout(() => {\n signal.removeEventListener(\"abort\", abortHandler);\n resolve(false);\n }, ms || 0);\n\n signal.addEventListener(\"abort\", abortHandler, { once: true });\n });\n}\n\nexport async function waitFor(\n func: (params: any) => Promise<boolean>,\n params: {\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n abortError?: DOMException;\n timeoutError?: DOMException;\n result?: any;\n } = {}\n): Promise<any> {\n const timeout = params.timeout || 600000;\n const interval = params.interval || 3000;\n const signal = params.signal ?? new AbortController().signal;\n const abortError = params.abortError ?? new DOMException(\"Aborted\", \"AbortError\");\n const timeoutError = params.timeoutError ?? new DOMException(\"Timeout\", \"TimeoutError\");\n\n const end = performance.now() + timeout;\n let count = timeout / interval;\n\n do {\n if (await func(params)) return Promise.resolve(params.result);\n if ((await delay(interval, signal)) || signal.aborted) return Promise.reject(abortError);\n } while (performance.now() < end && --count > 0);\n\n return Promise.reject(timeoutError);\n}\n\nexport function parseArgs(args?: string | object): object {\n if (typeof args === \"string\") {\n const firstArg = args.indexOf(\"--\");\n if (firstArg !== -1) args = args.slice(firstArg);\n const argArray = args\n .split(\"--\")\n .map((x) =>\n x\n .split(\"=\")\n .map((y) => y.split(\" \"))\n .flat()\n )\n .filter((x) => x[0])\n .map((x) => x.concat([\"\"]));\n return Object.fromEntries(argArray);\n }\n return args || {};\n}\n\nexport function userFullName(firstName: string | any, lastName = \"\", userName = \"\"): string {\n if (firstName && typeof firstName !== \"string\") {\n return userFullName(firstName.firstName ?? firstName.name, firstName.lastName, firstName.userName);\n }\n return `${firstName ?? \"\"} ${lastName ?? \"\"}`.trim() || userName;\n}\n\nexport function userInitials(fullName = \"\"): string {\n const names = fullName.split(\" \").filter((x) => x);\n return names\n .reduce((initials, name, index) => {\n if (index === 0 || index === names.length - 1) initials += name.charAt(0);\n return initials;\n }, \"\")\n .toUpperCase();\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { IClashItem } from \"./IAssembly\";\nimport { IShortUserDesc } from \"./IUser\";\nimport { waitFor, userFullName, userInitials } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about a file/assembly clash detection test.\n */\nexport class ClashTest extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw test data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n * @param path - The clash test API path of the file/assembly that owns the test.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, path: string, httpClient: IHttpClient) {\n super(`${path}/clashes/${data.id}`, httpClient);\n this.data = data;\n }\n\n /**\n * The type of the clashes that the test detects:\n *\n * - `true` - Clearance clash. A clash in which the object A may or may not intersect with object B, but\n * comes within a distance of less than the {@link tolerance}.\n * - `false` - Hard clash. A clash in which the object A intersects with object B by a distance of more\n * than the {@link tolerance}.\n *\n * @readonly\n */\n get clearance(): boolean {\n return this.data.clearance;\n }\n\n /**\n * Test creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get createdAt(): string {\n return this.data.createdAt;\n }\n\n /**\n * Raw test data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;\n this._data.owner.fullName = userFullName(this._data.owner);\n this._data.owner.initials = userInitials(this._data.owner.fullName);\n }\n\n /**\n * Unique test ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * Test last update (UTC) time in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get lastModifiedAt(): string {\n return this.data.lastModifiedAt;\n }\n\n /**\n * Test name.\n */\n get name(): string {\n return this.data.name;\n }\n\n set name(value: string) {\n this.data.name = value;\n }\n\n /**\n * Test owner information.\n *\n * @readonly\n */\n get owner(): IShortUserDesc {\n return this.data.owner;\n }\n\n /**\n * First selection set for clash detection. Objects from `selectionSetA` will be tested against each\n * others by objects from the `selectionSetB` during the test.\n *\n * @readonly\n */\n get selectionSetA(): string[] {\n return this.data.selectionSetA;\n }\n\n /**\n * The type of first selection set for clash detection. Can be one of:\n *\n * - `all` - All file/assembly objects.\n * - `handle` - Objects with original handles specified in the `selectionSetA`.\n * - `models` - All objects of the models with original handles specified in the `selectionSetA`.\n * - `searchquery` - Objects retrieved by the search queries specified in `selectionSetA`.\n *\n * @readonly\n */\n get selectionTypeA(): string {\n return this.data.selectionTypeA;\n }\n\n /**\n * Second selection set for clash detection. Objects from `selectionSetB` will be tested against each\n * others by objects from the `selectionSetA` during the test.\n *\n * @readonly\n */\n get selectionSetB(): string[] {\n return this.data.selectionSetB;\n }\n\n /**\n * The type of second selection set for clash detection. Can be one of:\n *\n * - `all` - All file/assembly objects.\n * - `handle` - Objects with original handles specified in the `selectionSetB`.\n * - `models` - All objects of the models with original handles specified in the `selectionSetB`.\n * - `searchquery` - Objects retrieved by the search queries specified in `selectionSetB`.\n *\n * @readonly\n */\n get selectionTypeB(): string {\n return this.data.selectionTypeB;\n }\n\n /**\n * Test status. Can be `none`, `waiting`, `inprogress`, `done` or `failed`.\n *\n * @readonly\n */\n get status(): string {\n return this.data.status;\n }\n\n /**\n * The distance of separation between objects at which test begins detecting clashes.\n *\n * @readonly\n */\n get tolerance(): number {\n return this.data.tolerance;\n }\n\n /**\n * Reloads test data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates test data on the server.\n *\n * @param data - Raw test data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a test and its results report from the server.\n *\n * @returns Returns the raw data of a deleted test. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves test properties changes to the server. Call this method to update test data on the server\n * after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n\n /**\n * Waits for test to complete. Test is done when it changes to `done` or `failed` status.\n *\n * @param params - An object containing waiting parameters.\n * @param params.timeout - The time, in milliseconds that the function should wait test. If test is not\n * complete during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * test status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.\n */\n waitForDone(params?: {\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onCheckout?: (test: ClashTest, ready: boolean) => boolean;\n }): Promise<this> {\n const checkDone = () =>\n this.checkout().then((test) => {\n const ready = [\"done\", \"failed\"].includes(test.status);\n const cancel = params?.onCheckout?.(test, ready);\n return cancel || ready;\n });\n return waitFor(checkDone, params).then(() => this);\n }\n\n /**\n * Returns a list of detected clashes for this test.\n */\n getReport(): Promise<IClashItem[]> {\n return this.get(\"/report\").then((response) => response.json());\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { FetchError } from \"./FetchError\";\nimport { ICdaNode, IFileReferences } from \"./IFile\";\nimport { IAssociatedFileData, IAssemblyVersionInfo, IModelTransformMatrix } from \"./IAssembly\";\nimport { IShortUserDesc } from \"./IUser\";\nimport { Model } from \"./Model\";\nimport { ClashTest } from \"./ClashTest\";\nimport { ISharedLinkPermissions } from \"./ISharedLink\";\nimport { SharedLink } from \"./SharedLink\";\nimport { normalizeParam, waitFor, userFullName, userInitials } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about an assembly on the Open Cloud Server\n * and managing its data.\n */\nexport class Assembly extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw assembly data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/assemblies/${data.id}`, httpClient);\n this.data = data;\n }\n\n // Reserved for future use\n\n get activeVersion(): number {\n return this.data.activeVersion;\n }\n\n /**\n * List of unique files from which the assembly was created.\n *\n * @readonly\n */\n get associatedFiles(): IAssociatedFileData[] {\n return this.data.associatedFiles;\n }\n\n /**\n * Assembly creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get created(): string {\n return this.data.created;\n }\n\n /**\n * Returns the raw assembly data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;\n this._data.owner.fullName = userFullName(this._data.owner);\n this._data.owner.initials = userInitials(this._data.owner.fullName);\n // associatedFiles since 23.12\n this._data.associatedFiles ??= [];\n this._data.associatedFiles.forEach((file) => (file.link = `${this.httpClient.serverUrl}/files/${file.fileId}`));\n }\n\n /**\n * List of file IDs from which the assembly was created.\n *\n * @readonly\n */\n get files(): string[] {\n return this.data.files;\n }\n\n /**\n * Assembly geometry data type:\n *\n * - `vsfx` - `VSFX` format, assembly can be opened in `VisualizeJS` 3D viewer.\n *\n * Returns an empty string if the geometry data is not yet ready.\n */\n get geometryType(): string {\n return this.status === \"done\" ? \"vsfx\" : \"\";\n }\n\n /**\n * Unique assembly ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * Assembly name.\n */\n get name(): string {\n return this.data.name;\n }\n\n set name(value: string) {\n this.data.name = value;\n }\n\n // Reserved for future use\n\n get originalAssemblyId(): string {\n return this.data.originalAssemblyId;\n }\n\n /**\n * Assembly owner information.\n *\n * @readonly\n */\n get owner(): IShortUserDesc {\n return this.data.owner;\n }\n\n // Reserved for future use\n\n get previewUrl(): string {\n return this.data.previewUrl || \"\";\n }\n\n /**\n * List of assembly related job IDs.\n *\n * @readonly\n */\n get relatedJobs(): string[] {\n return this.data.relatedJobs;\n }\n\n /**\n * Assembly geometry data and properties status. Can be `waiting`, `inprogress`, `done` or `failed`.\n *\n * An assemblies without geometry data cannot be opened in viewer.\n *\n * @readonly\n */\n get status(): string {\n return this.data.status;\n }\n\n /**\n * Assembly type. Returns an `assembly` string.\n *\n * @readonly\n */\n get type(): string {\n return \"assembly\";\n }\n\n // Reserved for future use\n\n get version(): number {\n return this.data.version;\n }\n\n get versions(): IAssemblyVersionInfo[] {\n return this.data.versions;\n }\n\n /**\n * Reloads assembly data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates assembly data on the server.\n *\n * @param data - Raw assembly data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes an assembly from the server.\n *\n * @returns Returns the raw data of a deleted assembly. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves assembly properties changes to the server. Call this method to update assembly data on the\n * server after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n\n // Reserved for future use\n\n setPreview(image?: BodyInit | null): Promise<this> {\n console.warn(\"Assembly does not support preview\");\n return Promise.resolve(this);\n }\n\n deletePreview(): Promise<this> {\n console.warn(\"Assembly does not support preview\");\n return Promise.resolve(this);\n }\n\n /**\n * Returns list of assembly models.\n */\n getModels(): Promise<Model[]> {\n return this.get(\"/geometry\")\n .then((response) => response.json())\n .then((array) => array.map((data: any) => new Model(data, this)));\n }\n\n /**\n * Returns a model transformation.\n *\n * @param handle - Model original handle.\n */\n getModelTransformMatrix(handle: string): IModelTransformMatrix {\n return this.data.transform[handle];\n }\n\n /**\n * Sets or removes a model transformation.\n *\n * @param handle - Model original handle.\n * @param transform - Transformation matrix. Specify `undefined` to remove transformation.\n */\n setModelTransformMatrix(handle: string, transform?: IModelTransformMatrix): Promise<this> {\n const obj = { ...this.data.transform };\n obj[handle] = transform;\n return this.update({ transform: obj });\n }\n\n /**\n * Object properties.\n *\n * @typedef {any} Properties\n * @property {string} handle - Object original handle.\n * @property {string | any} * - Object property. Can be `any` for nested group properties.\n */\n\n /**\n * Returns the properties for objects in the assembly.\n *\n * @param handles - Object original handle or handles array. Specify `undefined` to get properties for\n * all objects in the assembly.\n * @param group - If the `group` parameter is `true`, properties are returned grouped by category. By\n * default, or if `group` is set to `false`, properties are returned ungrouped.\n *\n * To get grouped properties, the `--properties_group` command line argument must be specified for the\n * `properties` File Converter job when {@link Client.createAssembly | creating the assembly}.\n *\n * ```javascript\n * await client.createAssembly([file1.id, file2.id], \"AssemblyName\", {\n * jobParameters: { properties: \"--properties_group\" },\n * waitForDone: true,\n * });\n * ```\n *\n * Otherwise, the properties will be returned ungrouped, even if the `group` is `true`.\n */\n getProperties(handles?: string | string[], group = false): Promise<any[]> {\n const searchParams = new URLSearchParams();\n if (handles) {\n if (Array.isArray(handles)) handles = handles.join(\",\");\n if (typeof handles === \"string\") handles = handles.trim();\n if (handles) searchParams.set(\"handles\", handles);\n }\n if (group) searchParams.set(\"group\", \"true\");\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.get(`/properties${queryString}`).then((response) => response.json());\n }\n\n /**\n * Returns the list of original handles for objects in the file that match the specified patterns.\n * Search patterns may be combined using query operators.\n *\n * @example Simple search pattern.\n *\n * ```javascript\n * searchPattern = {\n * key: \"Category\",\n * value: \"OST_Stairs\",\n * };\n * ```\n *\n * @example Search patterns combination.\n *\n * ```javascript\n * searchPattern = {\n * $or: [\n * {\n * $and: [\n * { key: \"Category\", value: \"OST_GenericModel\" },\n * { key: \"Level\", value: \"03 - Floor\" },\n * ],\n * },\n * { key: \"Category\", value: \"OST_Stairs\" },\n * ],\n * };\n * ```\n *\n * @param searchPattern - Search pattern or combination of the patterns, see example below.\n */\n searchProperties(searchPattern: any): Promise<any[]> {\n return this.post(\"/properties/search\", searchPattern).then((response) => response.json());\n }\n\n /**\n * Returns the CDA tree for an assembly.\n */\n getCdaTree(): Promise<ICdaNode[]> {\n return this.get(`/properties/tree`).then((response) => response.json());\n }\n\n /**\n * Returns a list of assembly viewpoints. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#AssemblyViewpoints | Open Cloud Assembly Viewpoints API}.\n */\n getViewpoints(): Promise<any[]> {\n return this.get(\"/viewpoints\")\n .then((response) => response.json())\n .then((viewpoints) => viewpoints.result);\n }\n\n /**\n * Saves a new assembly viewpoint to the server. To create a viewpoint use `Viewer.createViewpoint()`.\n *\n * @param viewpoint - Viewpoint object. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#AssemblyViewpoints | Open Cloud Assembly Viewpoints API}.\n */\n saveViewpoint(viewpoint: any): Promise<any> {\n return this.post(\"/viewpoints\", viewpoint).then((response) => response.json());\n }\n\n /**\n * Deletes the specified assembly viewpoint.\n *\n * @param guid - Viewpoint GUID.\n * @returns Returns a deleted viewpoint. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#AssemblyViewpoints | Open Cloud Assembly Viewpoints API}.\n */\n deleteViewpoint(guid: string): Promise<any> {\n return super.delete(`/viewpoints/${guid}`).then((response) => response.json());\n }\n\n /**\n * Returns the viewpoint snapshot as base64-encoded\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.\n *\n * @param guid - Viewpoint GUID.\n */\n getSnapshot(guid: string): Promise<string> {\n return this.get(`/viewpoints/${guid}/snapshot`).then((response) => response.text());\n }\n\n /**\n * Returns the viewpoint snapshot data.\n *\n * @param guid - Viewpoint GUID.\n * @param bitmapGuid - Bitmap GUID.\n */\n getSnapshotData(guid: string, bitmapGuid: string): Promise<string> {\n return this.get(`/viewpoints/${guid}/bitmaps/${bitmapGuid}`).then((response) => response.text());\n }\n\n /**\n * Downloads an assembly resource file. Resource files are files that contain model scene descriptions,\n * or geometry data.\n *\n * @param dataId - Resource file name.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadResource(\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFile(this.getEndpointPath(`/downloads/${dataId}`), onProgress, { signal, headers: this.headers })\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Downloads a part of assembly resource file. Resource files are files that contain model scene\n * descriptions, or geometry data.\n *\n * @param dataId - Resource file name.\n * @param requestId - Specify a non-empty `requestId` to append the `?requestId=` search parameter to\n * the server request. If specified, server-side caching may not work.\n * @param ranges - Ranges of resource file contents to download. See\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Guides/Range_requests | HTTP range requests} for\n * more details.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadResourceRange(\n dataId: string,\n requestId: number | string,\n ranges: Array<{ begin: number; end: number; requestId: number }>,\n onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFileRange(\n this.getEndpointPath(`/downloads/${dataId}${requestId ? \"?requestId=\" + requestId : \"\"}`),\n requestId,\n ranges,\n onProgress,\n { signal, headers: this.headers }\n )\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.\n *\n * @deprecated\n */\n partialDownloadResource(\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n console.warn(\n \"Assembly.partialDownloadResource() has been deprecated since 25.3 and will be removed in a future release, use Assembly.downloadResource() instead.\"\n );\n return this.downloadResource(dataId, onProgress, signal);\n }\n\n /**\n * Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.\n */\n async downloadFileRange(\n requestId: number,\n records: any | null,\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void,\n signal?: AbortSignal\n ): Promise<void> {\n await this.downloadResourceRange(dataId, requestId, records, onProgress, signal);\n }\n\n /**\n * Returns a list of assembly references containing references from all the files from which the\n * assembly was created.\n *\n * References are images, fonts, or any other files to correct rendering of the assembly.\n *\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n */\n async getReferences(signal?: AbortSignal): Promise<IFileReferences> {\n const files = new Endpoint(\"/files\", this.httpClient, this.headers);\n const references = await Promise.all(\n this.associatedFiles\n .map((file) => `/${file.fileId}/references`)\n .map((link) => files.get(link, signal).then((response) => response.json()))\n )\n .then((references) => references.map((x) => x.references))\n .then((references) => references.reduce((x, v) => [...v, ...x], []))\n .then((references) => [...new Set(references.map(JSON.stringify))].map((x: string) => JSON.parse(x)));\n return { id: \"\", references };\n }\n\n /**\n * Waits for assembly to be created. Assembly is created when it changes to `done` or `failed` status.\n *\n * @param params - An object containing waiting parameters.\n * @param params.timeout - The time, in milliseconds that the function should wait assembly. If\n * assembly is not created during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * assembly status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.\n */\n waitForDone(params?: {\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onCheckout?: (assembly: Assembly, ready: boolean) => boolean;\n }): Promise<this> {\n const checkDone = () =>\n this.checkout().then((assembly) => {\n const ready = [\"done\", \"failed\"].includes(assembly.status);\n const cancel = params?.onCheckout?.(assembly, ready);\n return cancel || ready;\n });\n\n return waitFor(checkDone, params).then(() => this);\n }\n\n /**\n * Returns a list of assembly clash tests.\n *\n * @param start - The starting index in the test list. Used for paging.\n * @param limit - The maximum number of tests that should be returned per request. Used for paging.\n * @param name - Filter the tests by part of the name. Case sensitive.\n * @param ids - List of tests IDs to return.\n * @param sortByDesc - Allows to specify the descending order of the result. By default tests are\n * sorted by name in ascending order.\n * @param sortField - Allows to specify sort field.\n */\n getClashTests(\n start?: number,\n limit?: number,\n name?: string,\n ids?: string | string[],\n sortByDesc?: boolean,\n sortField?: string\n ): Promise<{ allSize: number; start: number; limit: number; result: ClashTest[]; size: number }> {\n const searchParams = new URLSearchParams();\n if (start > 0) searchParams.set(\"start\", start.toString());\n if (limit > 0) searchParams.set(\"limit\", limit.toString());\n if (name) searchParams.set(\"name\", name);\n if (ids) {\n ids = normalizeParam(ids);\n if (ids) searchParams.set(\"id\", ids);\n }\n if (sortByDesc !== undefined) searchParams.set(\"sortBy\", sortByDesc ? \"desc\" : \"asc\");\n if (sortField) searchParams.set(\"sortField\", sortField);\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.get(`/clashes${queryString}`)\n .then((response) => response.json())\n .then((tests) => {\n return {\n ...tests,\n result: tests.result.map((data) => new ClashTest(data, this.path, this.httpClient)),\n };\n });\n }\n\n /**\n * Returns information about the specified assembly clash test.\n *\n * @param testId - Test ID.\n */\n getClashTest(testId: string): Promise<ClashTest> {\n return this.get(`/clashes/${testId}`)\n .then((response) => response.json())\n .then((data) => new ClashTest(data, this.path, this.httpClient));\n }\n\n /**\n * Creates an assembly clash test. Assembly must be in a `done` state, otherwise the test will fail.\n *\n * @param name - Test name.\n * @param selectionTypeA - The type of first selection set for clash detection. Can be one of:\n *\n * - `all` - All file/assembly objects.\n * - `handle` - Objects with original handles specified in the `selectionSetA`.\n * - `models` - All objects of the models with original handles specified in the `selectionSetA`.\n * - `searchquery` - Objects retrieved by the search queries specified in `selectionSetA`.\n *\n * @param selectionTypeB - The type of second selection set for clash detection. Can be one of:\n *\n * - `all` - All file/assembly objects.\n * - `handle` - Objects with original handles specified in the `selectionSetB`.\n * - `models` - All objects of the models with original handles specified in the `selectionSetB`.\n * - `searchquery` - Objects retrieved by the search queries specified in `selectionSetB`.\n *\n * @param selectionSetA - First selection set for clash detection. Objects from `selectionSetA` will be\n * tested against each others by objects from the `selectionSetB` during the test.\n * @param selectionSetB - Second selection set for clash detection. Objects from `selectionSetB` will\n * be tested against each others by objects from the `selectionSetA` during the test.\n * @param params - An object containing test parameters.\n * @param params.tolerance - The distance of separation between objects at which test begins detecting\n * clashes.\n * @param params.clearance - The type of the clashes that the test detects:\n *\n * - `true` - Clearance clash. A clash in which the object A may or may not intersect with object B, but\n * comes within a distance of less than the `tolerance`.\n * - `false` - Hard clash. A clash in which the object A intersects with object B by a distance of more\n * than the `tolerance`.\n *\n * @param params.waitForDone - Wait for test to complete.\n * @param params.timeout - The time, in milliseconds that the function should wait test. If test is not\n * complete during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * test status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n */\n createClashTest(\n name: string,\n selectionTypeA: string,\n selectionTypeB: string,\n selectionSetA?: string | string[],\n selectionSetB?: string | string[],\n params?: {\n tolerance?: number | string;\n clearance?: boolean;\n waitForDone?: boolean;\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n }\n ): Promise<ClashTest> {\n const { tolerance, clearance, waitForDone } = params ?? {};\n if (!Array.isArray(selectionSetA)) selectionSetA = [selectionSetA];\n if (!Array.isArray(selectionSetB)) selectionSetB = [selectionSetB];\n\n return this.post(\"/clashes\", {\n name,\n selectionTypeA,\n selectionTypeB,\n selectionSetA,\n selectionSetB,\n tolerance,\n clearance,\n })\n .then((response) => response.json())\n .then((data) => new ClashTest(data, this.path, this.httpClient))\n .then((result) => (waitForDone ? result.waitForDone(params) : result));\n }\n\n /**\n * Deletes the specified assembly clash test.\n *\n * @param testId - Test ID.\n * @returns Returns the raw data of a deleted test. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.\n */\n deleteClashTest(testId: string): Promise<any> {\n return super.delete(`/clashes/${testId}`).then((response) => response.json());\n }\n\n // Reserved for future use\n\n updateVersion(\n files?: string[],\n params: {\n waitForDone?: boolean;\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onProgress?: (progress: number, file: globalThis.File) => void;\n } = {\n waitForDone: false,\n }\n ): Promise<Assembly> {\n return Promise.reject(new Error(\"Assembly version support will be implemeted in a future release\"));\n }\n\n getVersions(): Promise<Assembly[] | undefined> {\n return Promise.resolve(undefined);\n }\n\n getVersion(version: number): Promise<Assembly> {\n return Promise.reject(new FetchError(404));\n }\n\n deleteVersion(version: number): Promise<any> {\n return Promise.reject(new FetchError(404));\n }\n\n setActiveVersion(version: number): Promise<this> {\n return this.update({ activeVersion: version });\n }\n\n // Reserved for future use\n\n createSharedLink(permissions?: ISharedLinkPermissions): Promise<SharedLink> {\n return Promise.reject(new Error(\"Assembly shared link will be implemeted in a future release\"));\n }\n\n getSharedLink(): Promise<SharedLink> {\n return Promise.resolve(undefined);\n }\n\n deleteSharedLink(): Promise<any> {\n return Promise.reject(new FetchError(404));\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { FetchError, error400 } from \"./FetchError\";\n\nfunction handleFetchError(response: Response): Promise<Response> {\n if (!response.ok) {\n switch (response.status) {\n case 400: {\n return response.text().then((text) => {\n console.error(text);\n return Promise.reject(new FetchError(400, error400(text)));\n });\n }\n case 500: {\n return response.text().then((text) => {\n console.error(error400(text, text));\n return Promise.reject(new FetchError(500));\n });\n }\n default:\n return Promise.reject(new FetchError(response.status));\n }\n }\n return Promise.resolve(response);\n}\n\nexport function $fetch(\n url: string,\n init: {\n method?: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"HEAD\";\n headers?: HeadersInit;\n body?: BodyInit | object | null;\n signal?: AbortSignal;\n } = { method: \"GET\" }\n): Promise<Response> {\n const headers = { ...init.headers };\n delete headers[\"Content-Type\"];\n\n Object.keys(headers)\n .filter((x) => headers[x] === undefined)\n .forEach((x) => delete headers[x]);\n\n let body: FormData | string | undefined = undefined;\n if (init.method === \"POST\" || init.method === \"PUT\") {\n if (init.body instanceof FormData) {\n body = init.body;\n } else if (init.body instanceof Blob) {\n body = new FormData();\n body.append(\"file\", init.body);\n } else if (init.body instanceof ArrayBuffer) {\n body = new FormData();\n body.append(\"file\", new Blob([init.body]));\n } else if (typeof init.body === \"object\") {\n body = JSON.stringify(init.body);\n headers[\"Content-Type\"] = \"application/json\";\n } else if (typeof init.body === \"string\") {\n body = init.body;\n headers[\"Content-Type\"] = \"text/plain\";\n }\n }\n\n return fetch(url, { ...init, headers, body }).then(handleFetchError);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { FetchError, error400 } from \"./FetchError\";\n\nfunction handleXMLHttpError(xhr: XMLHttpRequest): Promise<XMLHttpRequest> {\n if (xhr.status === 0) {\n return Promise.reject(new FetchError(0, \"Network error\"));\n }\n if (xhr.status < 200 || xhr.status > 299) {\n switch (xhr.status) {\n case 400: {\n console.error(xhr.responseText);\n return Promise.reject(new FetchError(400, error400(xhr.responseText)));\n }\n case 500: {\n console.error(error400(xhr.responseText, xhr.responseText));\n return Promise.reject(new FetchError(500));\n }\n default: {\n return Promise.reject(new FetchError(xhr.status));\n }\n }\n }\n return Promise.resolve(xhr);\n}\n\nexport function $xmlhttp(\n url: string,\n params: {\n method: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"HEAD\";\n headers?: HeadersInit;\n body?: XMLHttpRequestBodyInit;\n uploadProgress?: (progress: number) => void;\n downloadProgress?: (progress: number) => void;\n } = { method: \"GET\" }\n): Promise<XMLHttpRequest> {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open(params.method, url, true);\n for (const key in params.headers) {\n xhr.setRequestHeader(key, params.headers[key]);\n }\n function calcProgress(event: ProgressEvent): number {\n return event.lengthComputable ? event.loaded / event.total : 1;\n }\n xhr.upload.onprogress = (event) => params.uploadProgress && params.uploadProgress(calcProgress(event));\n xhr.onprogress = (event) => params.downloadProgress && params.downloadProgress(calcProgress(event));\n xhr.onloadend = (event) => handleXMLHttpError(event.target as XMLHttpRequest).then(resolve, reject);\n xhr.send(params.body);\n });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { $fetch } from \"./Fetch\";\nimport { $xmlhttp } from \"./XMLHttp\";\n\nexport class HttpClient implements IHttpClient {\n public serverUrl: string;\n public headers: HeadersInit = {};\n public signInUserId = \"\";\n public signInUserIsAdmin = false;\n\n constructor(serverUrl: string) {\n this.serverUrl = serverUrl;\n }\n\n get(relativePath: string, init: RequestInit = {}): Promise<Response> {\n return $fetch(`${this.serverUrl}${relativePath}`, {\n ...init,\n method: \"GET\",\n headers: { ...this.headers, ...init.headers },\n });\n }\n\n post(relativePath: string, body?: BodyInit | object, init: RequestInit = {}): Promise<Response> {\n return $fetch(`${this.serverUrl}${relativePath}`, {\n ...init,\n method: \"POST\",\n headers: { ...this.headers, ...init.headers },\n body,\n });\n }\n\n put(relativePath: string, body?: BodyInit | object, init: RequestInit = {}): Promise<Response> {\n return $fetch(`${this.serverUrl}${relativePath}`, {\n ...init,\n method: \"PUT\",\n headers: { ...this.headers, ...init.headers },\n body,\n });\n }\n\n delete(relativePath: string, init: RequestInit = {}): Promise<Response> {\n return $fetch(`${this.serverUrl}${relativePath}`, {\n ...init,\n method: \"DELETE\",\n headers: { ...this.headers, ...init.headers },\n });\n }\n\n uploadFile(\n relativePath: string,\n file: File,\n onProgress?: (progress: number) => void,\n init: RequestInit = {}\n ): Promise<XMLHttpRequest> {\n const data = new FormData();\n data.append(\"file\", file);\n return $xmlhttp(`${this.serverUrl}${relativePath}`, {\n method: \"POST\",\n headers: { ...this.headers, ...init.headers },\n body: data,\n uploadProgress: onProgress,\n });\n }\n\n async downloadFile(\n relativePath: string,\n onProgress?: (progress: number, chunk: Uint8Array) => void,\n init: RequestInit = {}\n ): Promise<Response> {\n const response = await this.get(relativePath, init);\n if (!onProgress) return response;\n\n const contentLength = response.headers.get(\"Content-Length\");\n const total = parseInt(contentLength || \"\", 10) || 1;\n\n const stream = new ReadableStream({\n async start(controller) {\n const reader = response.body.getReader();\n let loaded = 0;\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n controller.enqueue(value);\n loaded += value.length;\n onProgress(loaded / total, value);\n }\n controller.close();\n },\n });\n\n return new Response(stream);\n }\n\n async downloadFileRange(\n relativePath: string,\n reserved: number | string,\n ranges: Array<{ begin: number; end: number; requestId: number }>,\n onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void,\n init: RequestInit = {}\n ): Promise<Response> {\n const headers = {\n ...init.headers,\n Range: \"bytes=\" + ranges.map((x) => `${x.begin}-${x.end}`).join(\",\"),\n };\n const response = await this.get(relativePath, { ...init, headers });\n if (!onProgress) return response;\n\n const contentLength = response.headers.get(\"content-length\");\n const total = parseInt(contentLength || \"\", 10) || 1;\n\n const stream = new ReadableStream({\n async start(controller) {\n const reader = response.body.getReader();\n let loaded = 0;\n let rangedIndex = 0;\n let rangePos = 0;\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n controller.enqueue(value);\n loaded += value.length;\n let chunkLeft = value.length;\n let chunkPos = 0;\n while (chunkLeft > 0) {\n const range = ranges[rangedIndex];\n const rangeLeft = range.end - range.begin + 1 - rangePos;\n if (chunkLeft < rangeLeft) {\n const chunk = value.subarray(chunkPos, chunkPos + chunkLeft);\n onProgress(loaded / total, chunk, range.requestId);\n rangePos += chunkLeft;\n chunkLeft = 0;\n } else {\n const chunk = value.subarray(chunkPos, chunkPos + rangeLeft);\n onProgress(loaded / total, chunk, range.requestId);\n chunkPos += rangeLeft;\n chunkLeft -= rangeLeft;\n rangedIndex++;\n rangePos = 0;\n }\n }\n }\n controller.close();\n },\n });\n\n return new Response(stream);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { IGrantedTo } from \"./IFile\";\n\n/**\n * Provides properties and methods for obtaining information about {@link File | file} actions granted to\n * a specific user, project, or group.\n */\nexport class Permission extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw permission data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud Permissions API}.\n * @param fileId - Owner file ID.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, fileId: string, httpClient: IHttpClient) {\n super(`/files/${fileId}/permissions/${data.id}`, httpClient);\n this.data = data;\n }\n\n /**\n * Defines what actions are allowed to be performed on a file with this permission:\n *\n * - `read` - The ability to read file description, geometry data and properties.\n * - `readSourceFile` - The ability to download source file.\n * - `write` - The ability to modify file name, description and references.\n * - `readViewpoint` - The ability to read file viewpoints.\n * - `createViewpoint` - The ability to create file viewpoints.\n *\n * @example Change file permissions for the the specified project.\n *\n * ```javascript\n * const myFile = client.getFile(myFileId);\n * const permissions = await myFile.getPermissions();\n * const projectPermissions = permissions.filter((permission) =>\n * permission.grantedTo.some((x) => x.project?.id === myProjectId)\n * );\n * const newActions = [\"read\", \"readSourceFile\", \"update\"];\n * await Promise.all(\n * projectPermissions.map((permission) => {\n * permission.actions = newActions;\n * return permission.save();\n * })\n * );\n * ```\n */\n get actions(): string[] {\n return this.data.actions;\n }\n\n set actions(value: string[]) {\n this._data.actions = value;\n }\n\n /**\n * Raw permission data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud Permissions API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n }\n\n /**\n * Unique permission ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * A list of users, projects, or groups that will get access to the file.\n */\n get grantedTo(): IGrantedTo[] {\n return this.data.grantedTo;\n }\n\n set grantedTo(value: IGrantedTo[]) {\n this.data.grantedTo = value;\n }\n\n /**\n * Specifies whether all users have access to the file or not.\n */\n get public(): boolean {\n return this.data.public;\n }\n\n set public(value: boolean) {\n this.data.public = value;\n }\n\n /**\n * Reloads permission data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates permission data on the server.\n *\n * @param data - Raw permission data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud Permissions API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Removes a permission from the file.\n *\n * @returns Returns the raw data of a deleted permission. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud Permissions API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves permission properties changes to the server. Call this method to update permission data on the\n * server after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { waitFor } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about a job on the Open Cloud Server.\n */\nexport class Job extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw job data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/jobs/${data.id}`, httpClient);\n this.data = data;\n }\n\n /**\n * The ID of the assembly the job is working on (internal).\n *\n * @readonly\n */\n get assemblyId(): string {\n return this.data.assemblyId;\n }\n\n /**\n * Job creator ID. Use {@link Client.getUser | Client.getUser()} to obtain detailed creator information.\n *\n * @readonly\n */\n get authorId(): string {\n return this.data.authorId;\n }\n\n /**\n * Job creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get createdAt(): string {\n return this.data.createdAt;\n }\n\n /**\n * Raw job data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n }\n\n /**\n * `true` if job is `done` or `failed`. See {@link status} for more details.\n *\n * @readonly\n */\n get done(): boolean {\n return this.data.status === \"done\" || this.data.status === \"failed\";\n }\n\n /**\n * The ID of the file the job is working on.\n *\n * @readonly\n */\n get fileId(): string {\n return this.data.fileId;\n }\n\n /**\n * Unique job ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * Job last update (UTC) time in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get lastUpdate(): string {\n return this.data.lastUpdate;\n }\n\n /**\n * Job type. Can be one of:\n *\n * - `geometry` - Convert file geometry data to `VSFX` format.\n * - `geometryGltf` - Convert file geometry data to `glTF` format.\n * - `properties` - Extract file properties.\n * - `validation` - Validate the IFC file.\n * - `clash` - Create the clash detection report.\n * - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the specified format.\n * - Other custom job name.\n *\n * @readonly\n */\n get outputFormat(): string {\n return this.data.outputFormat;\n }\n\n /**\n * Parameters with which the job was started. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.\n *\n * @readonly\n */\n get parameters(): any {\n return this.data.parameters;\n }\n\n /**\n * Job status. Can be `waiting`, `inprogress`, `done` or `failed`.\n *\n * @readonly\n */\n get status(): string {\n return this.data.status;\n }\n\n /**\n * Job status description message.\n *\n * @readonly\n */\n get statusMessage(): string {\n return this.data.statusMessage;\n }\n\n /**\n * Job starting time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get startedAt(): string {\n return this.data.startedAt;\n }\n\n /**\n * Reloads job data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates job data on the server.\n *\n * Only administrators can update job data. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * @param data - Raw job data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a job from the server job list. Jobs that are in progress or have already been completed\n * cannot be deleted.\n *\n * @returns Returns the raw data of a deleted job. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n // /**\n // * Save job properties changes to the server. Call this method to update job data on the server\n // * after any property changes.\n // */\n // save() {\n // return this.update(this.data);\n // }\n\n /**\n * Waits for job to be done. Job is done when it changes to `done` or `failed` status.\n *\n * @param params - An object containing waiting parameters.\n * @param params.timeout - The time, in milliseconds that the function should wait job. If jobs is not\n * done during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * job status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.\n */\n waitForDone(params?: {\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onCheckout?: (job: Job, ready: boolean) => boolean;\n }): Promise<this> {\n const checkDone = () =>\n this.checkout().then((job) => {\n const ready = [\"done\", \"failed\"].includes(job.status);\n const cancel = params?.onCheckout?.(job, ready);\n return cancel || ready;\n });\n\n return waitFor(checkDone, params).then(() => this);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { ISharedLinkPermissions } from \"./ISharedLink\";\n\n/**\n * Provides properties and methods for obtaining information about a file shared link.\n */\nexport class SharedLink extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw shared link data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#ShareLinks | Open Cloud SharedLinks API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/shares/${data.token}`, httpClient);\n this.data = data;\n }\n\n /**\n * Shared link creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get createdAt(): string {\n return this.data.createdAt;\n }\n\n /**\n * Raw shared link data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#ShareLinks | Open Cloud SharedLinks API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n }\n\n /**\n * Share permissions.\n */\n get permissions(): ISharedLinkPermissions {\n return this.data.permissions;\n }\n\n set permissions(value: ISharedLinkPermissions) {\n this.data.permissions = { ...this.data.permissions, ...value };\n }\n\n /**\n * Unique shared link token.\n *\n * @readonly\n */\n get token(): string {\n return this.data.token;\n }\n\n /**\n * URL to open shared file in the viewer.\n *\n * @readonly\n */\n get url(): string {\n return this.data.url;\n }\n\n /**\n * Reloads shared link data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates shared link data on the server.\n *\n * @param data - Raw shared link data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#ShareLinks | Open Cloud SharedLinks API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a shared link from the server.\n *\n * @returns Returns the raw data of a deleted shared link. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#SharedLinks | Open Cloud SharedLinks API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves shared link properties changes to the server. Call this method to update shared link data on\n * the server after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { ICdaNode, IFileStatus, IFileReferences, IFileVersionInfo, IGrantedTo } from \"./IFile\";\nimport { IShortUserDesc } from \"./IUser\";\nimport { Model } from \"./Model\";\nimport { Permission } from \"./Permission\";\nimport { Job } from \"./Job\";\nimport { SharedLink } from \"./SharedLink\";\nimport { ISharedLinkPermissions } from \"./ISharedLink\";\nimport { waitFor, parseArgs, userFullName, userInitials } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about a file on the Open Cloud Server and\n * managing its data and versions.\n */\nexport class File extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw file data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/files/${data.id}`, httpClient);\n this.data = data;\n }\n\n /**\n * Active version number of the file.\n *\n * @readonly\n */\n get activeVersion(): number {\n return this.data.activeVersion;\n }\n\n /**\n * File creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get created(): string {\n return this.data.created;\n }\n\n /**\n * File custom fields object, to store custom data.\n */\n get customFields(): any {\n return this.data.customFields;\n }\n\n set customFields(value: any) {\n this.data.customFields = value;\n }\n\n /**\n * Raw file data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n set data(value: any) {\n this._data = value;\n this._data.previewUrl = value.preview\n ? `${this.httpClient.serverUrl}${this.path}/preview?updated=${value.updatedAt}`\n : \"\";\n // owner since 24.8\n if (typeof this._data.owner === \"string\") this._data.owner = { userId: this._data.owner };\n this._data.owner ??= {};\n this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;\n this._data.owner.fullName = userFullName(this._data.owner);\n this._data.owner.initials = userInitials(this._data.owner.fullName);\n // status since 24.9\n this._data.status ??= {};\n this._data.status.geometry ??= { state: this._data.geometryStatus ?? \"none\" };\n this._data.status.properties ??= { state: this._data.propertiesStatus ?? \"none\" };\n this._data.status.validation ??= { state: this._data.validationStatus ?? \"none\" };\n // updatedBy since 24.10\n this._data.updatedBy ??= {};\n this._data.updatedBy.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.updatedBy.userId}/avatar`;\n this._data.updatedBy.fullName = userFullName(this._data.updatedBy);\n this._data.updatedBy.initials = userInitials(this._data.updatedBy.fullName);\n // versions since 24.10\n this._data.versions ??= [{ ...value }];\n // geometryGltf status since 24.12\n this._data.status.geometryGltf ??= { state: \"none\" };\n // isFileDeleted since 25.7\n this._data.isFileDeleted ??= false;\n // sharedLinkToken since 26.0\n this._data.sharedLinkToken ??= null;\n }\n\n /**\n * Returns a list of file formats in which the active version of the file was exported.\n *\n * To export file to one of the supported formats run the File Converter job using\n * {@link createJob | createJob()}. For an example, see the {@link downloadResource} help.\n *\n * @readonly\n */\n get exports(): string[] {\n return this.data.exports;\n }\n\n /**\n * Geometry data type of the active file version. Can be one of:\n *\n * - `vsfx` - `VSFX` format, file can be opened in `VisualizeJS` 3D viewer.\n * - `gltf` - `glTF` format, file can be opened in `Three.js` 3D viewer.\n *\n * Returns an empty string if geometry data has not yet been converted. A files without geometry data\n * can be exported to other formats, but cannot be opened in viewer.\n */\n get geometryType(): string {\n if (this.status.geometryGltf.state === \"done\") return \"gltf\";\n else if (this.status.geometry.state === \"done\") return \"vsfx\";\n else return \"\";\n }\n\n /**\n * Unique file ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * Returns `true` if the source file of the active file version has been deleted.\n *\n * A files with deleted source file can be opened in the viewer, but cannot be exported to other\n * formats.\n *\n * @readonly\n */\n get isFileDeleted(): boolean {\n return this.data.isFileDeleted;\n }\n\n /**\n * File name, including the extension.\n */\n get name(): string {\n return this.data.name;\n }\n\n set name(value: string) {\n this.data.name = value;\n }\n\n /**\n * If the file is a version, then returns the ID of the original file. Otherwise, returns the file ID.\n *\n * @readonly\n */\n get originalFileId(): string {\n return this.data.originalFileId;\n }\n\n /**\n * File owner information.\n *\n * @readonly\n */\n get owner(): IShortUserDesc {\n return this.data.owner;\n }\n\n /**\n * File preview image URL or empty string if the file does not have a preview. Use\n * {@link setPreview | setPreview()} to change preview image.\n *\n * @readonly\n */\n get previewUrl(): string {\n return this.data.previewUrl;\n }\n\n /**\n * The size of the active version of the file in bytes.\n *\n * @readonly\n */\n get size(): number {\n return this.data.size;\n }\n\n /**\n * Total size of all versions of the file in bytes.\n *\n * @readonly\n */\n get sizeTotal(): number {\n return this.data.sizeTotal;\n }\n\n /**\n * File shared link token or `null` if file is not shared yet.\n *\n * @readonly\n */\n get sharedLinkToken(): string {\n return this.data.sharedLinkToken;\n }\n\n /**\n * Jobs status of the active version of the file. This is an object contains keys corresponding to\n * different job types:\n *\n * - `geometry` - status of geometry extraction job (`VSFX` format).\n * - `geometryGltf` - status of geometry extraction job (`glTF` format).\n * - `properties` - status of property extraction job .\n * - `validation` - status of validation job .\n *\n * Export jobs (`dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf`) and custom jobs appear in the\n * status object dynamically as jobs are started.\n *\n * Each status entity is a record with properties:\n *\n * - `state` - Job state. Can be `none`, `waiting`, `inprogress`, `done` or `failed`.\n * - `jobId` - Unique ID of the job.\n *\n * @readonly\n */\n get status(): IFileStatus {\n return this.data.status;\n }\n\n /**\n * File type, matches the file extension (includes dot).\n *\n * @readonly\n */\n get type(): string {\n return this.data.type;\n }\n\n /**\n * File last update time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get updatedAt(): string {\n return this.data.updatedAt;\n }\n\n /**\n * Information about the user who made the last update.\n *\n * @readonly\n */\n get updatedBy(): IShortUserDesc {\n return this.data.updatedBy;\n }\n\n /**\n * Zero-based file version number for version files. The original file has version `0`.\n */\n\n get version(): number {\n return this.data.version;\n }\n\n /**\n * List of the file versions.\n *\n * @readonly\n */\n get versions(): IFileVersionInfo[] {\n return this.data.versions;\n }\n\n /**\n * Reloads file data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates file data on the server.\n *\n * @param data - Raw file data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a file and all its versions from the server.\n *\n * You cannot delete a version file using `delete()`, only the original file. To delete a version file\n * use {@link deleteVersion | deleteVersion()}.\n *\n * @returns Returns the raw data of a deleted file. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves file properties changes to the server. Call this method to update file data on the server\n * after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n\n /**\n * Sets or removes the file preview.\n *\n * @param image - Preview image. Can be a\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string,\n * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},\n * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or\n * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting the `image`\n * to `null` will remove the preview.\n */\n async setPreview(image?: BodyInit | null): Promise<this> {\n if (!image) {\n await this.deletePreview();\n } else {\n const response = await this.post(\"/preview\", image);\n this.data = await response.json();\n }\n return this;\n }\n\n /**\n * Removes the file preview.\n */\n async deletePreview(): Promise<this> {\n const response = await super.delete(\"/preview\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Returns a list of models of the active version of the file.\n */\n getModels(): Promise<Model[]> {\n return this.get(\"/geometry\")\n .then((response) => response.json())\n .then((array) => array.map((data) => new Model(data, this)));\n }\n\n // File does not support model transformation.\n\n getModelTransformMatrix(handle: string): any {\n return undefined;\n }\n\n setModelTransformMatrix(handle: string, transform?: any): Promise<this> {\n console.warn(\"File does not support model transformation\");\n return Promise.resolve(this);\n }\n\n /**\n * Object properties.\n *\n * @typedef {any} Properties\n * @property {string} handle - Object original handle.\n * @property {string | any} * - Object property. Can be `any` for nested group properties.\n */\n\n /**\n * Returns the properties for objects in the active version of the file.\n *\n * @param handles - Object original handle or handles array. Specify `undefined` to get properties for\n * all objects in the file.\n * @param group - If the `group` parameter is `true`, properties are returned grouped by category. By\n * default, or if `group` is set to `false`, properties are returned ungrouped.\n *\n * To get grouped properties, the `--properties_group` command line argument must be specified for the\n * `properties` File Converter job when {@link Client.uploadFile | uploading the file}:\n *\n * ```javascript\n * await client.uploadFile(file, {\n * geometry: true,\n * properties: true,\n * jobParameters: { properties: \"--properties_group\" },\n * waitForDone: true,\n * });\n * ```\n *\n * or when running the {@link extractProperties | extract file properties} job:\n *\n * ```javascript\n * await file.extractProperties(\"--properties_group\");\n * ```\n *\n * Otherwise, the properties will be returned ungrouped, even if the `group` is `true`.\n */\n getProperties(handles?: string | string[], group = false): Promise<any[]> {\n const searchParams = new URLSearchParams();\n if (handles) {\n if (Array.isArray(handles)) handles = handles.join(\",\");\n if (typeof handles === \"string\") handles = handles.trim();\n if (handles) searchParams.set(\"handles\", handles);\n }\n if (group) searchParams.set(\"group\", \"true\");\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.get(`/properties${queryString}`).then((response) => response.json());\n }\n\n /**\n * Search pattern.\n *\n * @typedef {any} SearchPattern\n * @property {string} key - Property name.\n * @property {string} value - Property value.\n */\n\n /**\n * Query operator. Operator name can be `$and`, `$or`, `$not`, `$eq`, `$regex`.\n *\n * @typedef {any} QueryOperator\n * @property {string | SearchPattern[] | QueryOperator[]} * - Array of the query values or patterns for\n * operator.\n */\n\n /**\n * Returns the list of original handles for objects in the active version of the file that match the\n * specified patterns. Search patterns may be combined using query operators.\n *\n * @example Simple search pattern.\n *\n * ```javascript\n * searchPattern = {\n * key: \"Category\",\n * value: \"OST_Stairs\",\n * };\n * ```\n *\n * @example Search patterns combination.\n *\n * ```javascript\n * searchPattern = {\n * $or: [\n * {\n * $and: [\n * { key: \"Category\", value: \"OST_GenericModel\" },\n * { key: \"Level\", value: \"03 - Floor\" },\n * ],\n * },\n * { key: \"Category\", value: \"OST_Stairs\" },\n * ],\n * };\n * ```\n *\n * @param {SearchPattern | QueryOperator} searchPattern - Search pattern or combination of the\n * patterns, see example below.\n * @returns {Promise<Properties[]>}\n */\n\n searchProperties(searchPattern: any): Promise<any[]> {\n return this.post(\"/properties/search\", searchPattern).then((response) => response.json());\n }\n\n /**\n * Returns the CDA tree for an active version of the file.\n */\n getCdaTree(): Promise<ICdaNode[]> {\n return this.get(`/properties/tree`).then((response) => response.json());\n }\n\n /**\n * Returns a list of file viewpoints. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#FileViewpoints | Open Cloud File Viewpoints API}.\n */\n getViewpoints(): Promise<any[]> {\n return this.get(\"/viewpoints\")\n .then((response) => response.json())\n .then((viewpoints) => viewpoints.result);\n }\n\n /**\n * Saves a new file viewpoint to the server. To create a viewpoint use `Viewer.createViewpoint()`.\n *\n * @param viewpoint - Viewpoint object. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#FileViewpoints | Open Cloud File Viewpoints API}.\n */\n saveViewpoint(viewpoint: any): Promise<any> {\n return this.post(\"/viewpoints\", viewpoint).then((response) => response.json());\n }\n\n /**\n * Deletes the specified file viewpoint.\n *\n * @param guid - Viewpoint GUID.\n * @returns Returns the raw data of a deleted viewpoint. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#FileViewpoints | Open Cloud File Viewpoints API}.\n */\n deleteViewpoint(guid: string): Promise<any> {\n return super.delete(`/viewpoints/${guid}`).then((response) => response.json());\n }\n\n /**\n * Returns viewpoint snapshot as base64-encoded\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.\n *\n * @param guid - Viewpoint GUID.\n */\n getSnapshot(guid: string): Promise<string> {\n return this.get(`/viewpoints/${guid}/snapshot`).then((response) => response.text());\n }\n\n /**\n * Returns viewpoint snapshot data.\n *\n * @param guid - Viewpoint GUID.\n * @param bitmapGuid - Bitmap GUID.\n */\n getSnapshotData(guid: string, bitmapGuid: string): Promise<string> {\n return this.get(`/viewpoints/${guid}/bitmaps/${bitmapGuid}`).then((response) => response.text());\n }\n\n /**\n * Downloads the source file of active version of the file from the server.\n *\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n download(onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFile(this.getEndpointPath(\"/downloads\"), onProgress, { signal, headers: this.headers })\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Downloads a resource file of the active version of the file. Resource files are files that contain\n * model scene descriptions, or geometry data, or exported files.\n *\n * @example Export file to PDF.\n *\n * ```javascript\n * const job = await file.createJob(\"pdf\");\n * await job.waitForDone();\n * const pdfResourceName = file.exports.find((x) => x.endsWith(\".pdf\"));\n * const arrayBuffer = await file.downloadResource(pdfResourceName);\n * const fileName = file.name + \".pdf\";\n * FileSaver.saveAs(new Blob([arrayBuffer]), fileName);\n * ```\n *\n * @param dataId - Resource file name.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadResource(\n dataId: string,\n onProgress?: (progress: number, chunk: Uint8Array) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFile(this.getEndpointPath(`/downloads/${dataId}`), onProgress, { signal, headers: this.headers })\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Downloads a part of resource file of the active version of the file. Resource files are files that\n * contain model scene descriptions, or geometry data, or exported files.\n *\n * @param dataId - Resource file name.\n * @param requestId - Specify a non-empty `requestId` to append the `?requestId=` search parameter to\n * the server request. If specified, server-side caching may not work.\n * @param ranges - Ranges of resource file contents to download. See\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Guides/Range_requests | HTTP range requests} for\n * more details.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadResourceRange(\n dataId: string,\n requestId: number | string,\n ranges: Array<{ begin: number; end: number; requestId: number }>,\n onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFileRange(\n this.getEndpointPath(`/downloads/${dataId}${requestId ? \"?requestId=\" + requestId : \"\"}`),\n requestId,\n ranges,\n onProgress,\n { signal, headers: this.headers }\n )\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.\n *\n * @deprecated\n */\n partialDownloadResource(\n dataId: string,\n onProgress?: (progress: number, downloaded: Uint8Array) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n console.warn(\n \"File.partialDownloadResource() has been deprecated since 25.3 and will be removed in a future release, use File.downloadResource() instead.\"\n );\n return this.downloadResource(dataId, onProgress, signal);\n }\n\n /**\n * Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.\n *\n * @deprecated\n */\n async downloadFileRange(\n requestId: number,\n records: any | null,\n dataId: string,\n onProgress?: (progress: number, downloaded: Uint8Array, requestId: number) => void,\n signal?: AbortSignal\n ): Promise<void> {\n await this.downloadResourceRange(dataId, requestId, records, onProgress, signal);\n }\n\n /**\n * Returns a list of file references.\n *\n * References are images, fonts, or any other files to correct rendering of the file.\n *\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n */\n getReferences(signal?: AbortSignal): Promise<IFileReferences> {\n return this.get(\"/references\", signal).then((response) => response.json());\n }\n\n /**\n * Sets the file references.\n *\n * References are images, fonts, or any other files to correct rendering of the file. Reference files\n * must be uploaded to the server before they can be assigned to the current file.\n *\n * @param references - File references.\n */\n setReferences(references: IFileReferences): Promise<IFileReferences> {\n return this.put(\"/references\", references).then((response) => response.json());\n }\n\n /**\n * Runs a new job on the server for the active version of the file.\n *\n * @param outputFormat - The job type. Can be one of:\n *\n * - `geometry` - Convert file geometry data to `VSFX` format for opening in `VisualizeJS` 3D viewer.\n * - `geometryGltf` - Convert file geometry data to `glTF` format for opening in `Three.js` 3D viewer.\n * - `properties` - Extract file properties.\n * - `validation` - Validate the IFC file.\n * - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the specified format. Use\n * {@link exports} to get the list of completed file exports. Use\n * {@link downloadResource | downloadResource()} to download the exported file.\n * - Other custom job name. Custom job must be registered in the job templates before running.\n *\n * @param parameters - Parameters for the File Converter jobs or custom job. Can be given as JSON\n * object or command line arguments in form `--arg=value`.\n */\n createJob(outputFormat: string, parameters?: string | object): Promise<Job> {\n const jobs = new Endpoint(\"/jobs\", this.httpClient, this.headers);\n return jobs\n .post(this.appendVersionParam(\"\"), {\n fileId: this.id,\n outputFormat,\n parameters: parseArgs(parameters),\n })\n .then((response) => response.json())\n .then((data) => new Job(data, this.httpClient));\n }\n\n /**\n * Runs a File Converter job to convert geometry data of active version of the file to the specified\n * format. This is alias to {@link createJob | createJob(\"geometry\")}.\n *\n * @param type - Geometry data type. Can be one of:\n *\n * - `vsfx` - `VSFX` format (default), for opening a file in `VisualizeJS` 3D viewer.\n * - `gltf` - `glTF` format, for opening a file in `Three.js` 3D viewer.\n *\n * @param parameters - Parameters for the File Converter job. Can be given as command line arguments in\n * form `--arg=value`.\n */\n extractGeometry(type?: string, parameters?: string | object): Promise<Job> {\n return this.createJob(type === \"gltf\" ? \"geometryGltf\" : \"geometry\", parameters);\n }\n\n /**\n * Runs a File Converter job to extract properties of the active version of the file. This is alias to\n * {@link createJob | createJob(\"properties\")}.\n *\n * @param parameters - Parameters for the File Converter job. Can be given as command line arguments in\n * form `--arg=value`.\n */\n extractProperties(parameters?: string | object): Promise<Job> {\n return this.createJob(\"properties\", parameters);\n }\n\n /**\n * Runs an IFC validator job to validate the active version of the file. This is alias to\n * {@link createJob | createJob(\"validation\")}.\n *\n * To get validation report use {@link downloadResource | downloadResource(\"validation_report.json\")}.\n *\n * @param parameters - Parameters for the IFC validator tool. Can be given as command line arguments in\n * form `--arg=value`.\n */\n validate(parameters?: string | object): Promise<Job> {\n return this.createJob(\"validation\", parameters);\n }\n\n /**\n * Waits for jobs of the active version of the file to be done. Job is done when it changes to `none`,\n * `done` or `failed` status.\n *\n * @param jobs - Job name or array of job names to wait on. Can be `geometry`, `geometryGltf`,\n * `properties`, `validation`, `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom job\n * name.\n * @param waitAll - If this parameter is `true`, the function returns when all the specified jobs have\n * done. If `false`, the function returns when any one of the jobs are done.\n * @param params - An object containing waiting parameters.\n * @param params.timeout - The time, in milliseconds that the function should wait jobs. If no one jobs\n * are done during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * jobs status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired. If waiting has been aborted, the `AbortError` exception\n * will be thrown.\n * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.\n */\n waitForDone(\n jobs: string | string[],\n waitAll?: boolean,\n params?: {\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onCheckout?: (file: File, ready: boolean) => boolean;\n }\n ): Promise<this> {\n const waitJobs = Array.isArray(jobs) ? jobs : [jobs];\n if (waitAll === undefined) waitAll = true;\n\n const checkDone = () =>\n this.checkout().then((file) => {\n const readyJobs = waitJobs.filter((job: string) => {\n const jobStatus = file.status[job] || {};\n return [\"none\", \"done\", \"failed\"].includes(jobStatus.state || \"none\");\n });\n const ready = waitAll ? readyJobs.length === waitJobs.length : readyJobs.length > 0;\n const cancel = params?.onCheckout?.(file, ready);\n return cancel || ready;\n });\n\n return waitFor(checkDone, params).then(() => this);\n }\n\n /**\n * Returns a list of file permissions.\n */\n getPermissions(): Promise<Permission[]> {\n return this.get(\"/permissions\")\n .then((response) => response.json())\n .then((array) => array.map((data) => new Permission(data, this.id, this.httpClient)));\n }\n\n /**\n * Returns information about specified file permission.\n *\n * @param permissionId - Permission ID.\n */\n getPermission(permissionId: string): Promise<Permission> {\n return this.get(`/permissions/${permissionId}`)\n .then((response) => response.json())\n .then((data) => new Permission(data, this.id, this.httpClient));\n }\n\n /**\n * Creates a new file permission for a user, project, or group.\n *\n * @example Grant the specified user permission to \"update\" the file.\n *\n * ```javascript\n * const action = \"update\";\n * const grantedTo = [{ user: { id: myUser.id, email: myUser.email } }];\n * await file.createPermission(action, grantedTo);\n * ```\n *\n * @example Add a file to the specified project in \"read-only\" mode.\n *\n * ```javascript\n * const actions = [\"read\", \"readSourceFile\"];\n * const grantedTo = [{ project: { id: myProject.id, name: myProject.name } }];\n * await file.createPermission(actions, grantedTo);\n * ```\n *\n * @param actions - Actions are allowed to be performed on a file with this permission:\n *\n * - `read` - The ability to read file description, geometry data and properties.\n * - `readSourceFile` - The ability to download source file.\n * - `write` - The ability to modify file name, description and references.\n * - `readViewpoint` - The ability to read file viewpoints.\n * - `createViewpoint` - The ability to create file viewpoints.\n *\n * @param grantedTo - A list of entities that will get access to the file.\n * @param _public - Specifies whether all users have access to the file or not.\n */\n createPermission(actions: string | string[], grantedTo: IGrantedTo[], _public: boolean): Promise<Permission> {\n return this.post(\"/permissions\", {\n actions: Array.isArray(actions) ? actions : [actions],\n grantedTo,\n public: _public,\n })\n .then((response) => response.json())\n .then((data) => new Permission(data, this.id, this.httpClient));\n }\n\n /**\n * Removes the specified permission from the file.\n *\n * @param permissionId - Permission ID.\n * @returns Returns the raw data of a deleted permission. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud File Permissions API}.\n */\n deletePermission(permissionId: string): Promise<any> {\n return super.delete(`/permissions/${permissionId}`).then((response) => response.json());\n }\n\n /**\n * Uploads the new version of the file to the server, convert the geometry data and extract properties\n * as needed.\n *\n * @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object are\n * generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}\n * object returned as a result of a user selecting files using the HTML `<input>` element.\n * @param params - An object containing upload parameters.\n * @param params.geometry - Create job to convert file geometry data. The geometry data type is the\n * same as the original file.\n * @param params.properties - Create job to extract file properties.\n * @param params.waitForDone - Wait for geometry and properties jobs to complete.\n * @param params.timeout - The time, in milliseconds that the function should wait jobs. If no one jobs\n * are done during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * jobs status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onProgress - Upload progress callback.\n */\n\n async uploadVersion(\n file: globalThis.File,\n params: {\n geometry?: boolean;\n properties?: boolean;\n waitForDone?: boolean;\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onProgress?: (progress: number, file: globalThis.File) => void;\n } = {\n waitForDone: false,\n }\n ): Promise<File> {\n const result = await this.httpClient\n .uploadFile(this.getEndpointPath(\"/versions\"), file, (progress) => params.onProgress?.(progress, file), {\n headers: this.headers,\n })\n .then((xhr: XMLHttpRequest) => JSON.parse(xhr.responseText))\n .then((data) => new File(data, this.httpClient));\n\n let geometryType = \"\";\n if (this.versions[0].status.geometryGltf.state !== \"none\") geometryType = \"gltf\";\n if (this.versions[0].status.geometry.state !== \"none\") geometryType = \"vsfx\";\n\n params = { ...params };\n if (params.geometry === undefined) params.geometry = geometryType !== \"\";\n if (params.properties === undefined) params.properties = this.versions[0].status.properties.state !== \"none\";\n\n const jobs: string[] = [];\n if (params.geometry) jobs.push((await result.extractGeometry(geometryType)).outputFormat);\n if (params.properties) jobs.push((await result.extractProperties()).outputFormat);\n if (jobs.length > 0)\n if (params.waitForDone) await result.waitForDone(jobs, true, params);\n else await result.checkout();\n\n await this.checkout();\n\n return result;\n }\n\n /**\n * Returns a list of version files.\n */\n getVersions(): Promise<File[]> {\n return this.get(\"/versions\")\n .then((response) => response.json())\n .then((files) => files.map((data) => new File(data, this.httpClient)))\n .then((files) => files.map((file) => (file.id == file.originalFileId ? file.useVersion(0) : file)));\n }\n\n /**\n * Returns information about the specified version file.\n *\n * @param version - Desired version.\n */\n getVersion(version: number): Promise<File> {\n return this.get(`/versions/${version}`)\n .then((response) => response.json())\n .then((data) => new File(data, this.httpClient))\n .then((file) => (file.id == file.originalFileId ? file.useVersion(0) : file));\n }\n\n /**\n * Deletes the specified version file.\n *\n * @param version - Version to delete.\n * @returns Returns the raw data of a deleted version file. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.\n */\n async deleteVersion(version: number): Promise<any> {\n const response = await super.delete(`/versions/${version}`);\n const data = await response.json();\n await this.checkout();\n return data;\n }\n\n /**\n * Replaces the active version of the file with the selected version.\n *\n * @param version - Desired active version.\n */\n\n setActiveVersion(version: number): Promise<this> {\n return this.update({ activeVersion: version });\n }\n\n /**\n * Makes the given version active on client side. Does not change the active file version on the\n * server.\n *\n * This version change will affect the result:\n *\n * - {@link getModels | getModels()}\n * - {@link getProperties | getProperties()}\n * - {@link searchProperties | searchProperties()}\n * - {@link getCdaTree | getCdaTree()}\n * - {@link download | download()}\n * - {@link downloadResource | downloadResource()}\n * - {@link createJob | createJob()}\n * - {@link extractGeometry | extractGeometry()}\n * - {@link extractProperties | extractProperties()}\n * - {@link validate | validate()}\n * - {@link waitForDone | waitForDone()}\n * - Viewer.open()\n *\n * Other clients will still continue to use the current active version of the file. Use `undefined` to\n * revert back to the active version.\n *\n * You need to reload the file data using {@link checkout | checkout()} to match the size and status\n * fields to the version you selected.\n */\n override useVersion(version?: number): this {\n return super.useVersion(version);\n }\n\n /**\n * Deletes the source file of the active file version from the server.\n */\n async deleteSource(): Promise<this> {\n const response = await super.delete(\"/source\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Creates a file shared link.\n *\n * @param permissions - Share permissions.\n */\n async createSharedLink(permissions?: ISharedLinkPermissions): Promise<SharedLink> {\n const shares = new Endpoint(\"/shares\", this.httpClient, this.headers);\n const response = await shares.post(\"\", { fileId: this.id, permissions });\n const data = await response.json();\n await this.checkout();\n return new SharedLink(data, this.httpClient);\n }\n\n /**\n * Returns information about the file shared link or `undefined` if file is not shared.\n */\n async getSharedLink(): Promise<SharedLink> {\n if (!this.sharedLinkToken) return Promise.resolve(undefined);\n const shares = new Endpoint(\"/shares\", this.httpClient, this.headers);\n const response = await shares.get(`/${this.sharedLinkToken}`);\n const data = await response.json();\n return new SharedLink(data, this.httpClient);\n }\n\n /**\n * Deletes the file shared link.\n *\n * @returns Returns the raw data of a deleted shared link. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#ShareLinks | Open Cloud SharedLinks API}.\n */\n async deleteSharedLink(): Promise<any> {\n const shares = new Endpoint(\"/shares\", this.httpClient, this.headers);\n const response = await shares.delete(`/${this.sharedLinkToken}`);\n const data = await response.json();\n await this.checkout();\n return data;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { IRoleActions } from \"./IRole\";\n\n/**\n * A role determines what actions allowed to be performed by {@link User | users} on a\n * {@link Project | project}.\n */\nexport class Role extends Endpoint {\n private _data: any;\n public projectId: string;\n\n /**\n * @param data - Raw role data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n * @param projectId - Owner project ID.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, projectId: string, httpClient: IHttpClient) {\n super(\"\", httpClient);\n this.projectId = projectId;\n this.data = data;\n }\n\n /**\n * Role description.\n */\n get description(): string {\n return this.data.description;\n }\n\n set description(value: string) {\n this._data.description = value;\n }\n\n /**\n * Raw role data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n set data(value: any) {\n this._data = value;\n this.path = `/projects/${this.projectId}/roles/${value.name}`;\n }\n\n /**\n * Role name.\n */\n get name(): string {\n return this.data.name;\n }\n\n set name(value: string) {\n this._data.name = value;\n }\n\n /**\n * Role actions are allowed to be performed.\n */\n get permissions(): IRoleActions {\n return this.data.permissions;\n }\n\n set permissions(value: IRoleActions) {\n this.data.permissions = value || {};\n }\n\n /**\n * Reloads role data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates role data on the server.\n *\n * @param data - Raw role data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a role from the project.\n *\n * @returns Returns the raw data of a deleted role. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves role properties changes to the server. Call this method to update role data on the server\n * after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { IShortUserDesc } from \"./IUser\";\nimport { userFullName, userInitials } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about a {@link User | user} who has access to\n * the {@link Project | project}.\n */\nexport class Member extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw member data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n * @param projectId - Owner project ID.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, projectId: string, httpClient: IHttpClient) {\n super(`/projects/${projectId}/members/${data.id}`, httpClient);\n this.data = data;\n }\n\n /**\n * Raw member data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n this._data.user.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.user.userId}/avatar`;\n this._data.user.fullName = userFullName(this._data.user);\n this._data.user.initials = userInitials(this._data.user.fullName);\n }\n\n /**\n * Unique member ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * Member role name in the project. See {@link Project.getRoles | Project.getRoles()} for list of\n * project roles.\n */\n get role(): string {\n return this.data.role;\n }\n\n set role(value: string) {\n this.data.role = value;\n }\n\n /**\n * Member type. Can be `owner` or `user`.\n *\n * @readonly\n */\n get type(): string {\n return this.data.type;\n }\n\n /**\n * User information.\n *\n * @readonly\n */\n get user(): IShortUserDesc {\n return this.data.user;\n }\n\n /**\n * Reloads member data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates member data on the server.\n *\n * @param data - Raw member data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Removes a member from the project.\n *\n * @returns Returns the raw data of a deleted member. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves member properties changes to the server. Call this method to update member data on the server\n * after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { IShortUserDesc } from \"./IUser\";\nimport { Role } from \"./Role\";\nimport { IRoleActions } from \"./IRole\";\nimport { Member } from \"./Member\";\nimport { File } from \"./File\";\nimport { normalizeParam, userFullName, userInitials } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about a project on the Open Cloud Server and\n * managing its {@link Role | roles}, {@link Member | members} and models.\n */\nexport class Project extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw project data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/projects/${data.id}`, httpClient);\n this.data = data;\n }\n\n /**\n * Project features the user has access to.\n *\n * @readonly\n */\n get authorization(): {\n /**\n * Actions are allowed to be performed:\n *\n * - `update` - The ability to update the project details.\n * - `createTopic` - The ability to create a new topic.\n * - `createDocument` - The ability to create a new document.\n */\n project_actions: string[];\n } {\n return this.data.authorization;\n }\n\n /**\n * Project creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get createdAt(): string {\n return this.data.createdAt;\n }\n\n /**\n * Project custom fields object, to store custom data.\n */\n get customFields(): any {\n return this.data.customFields;\n }\n\n set customFields(value: any) {\n this.data.customFields = value;\n }\n\n /**\n * Raw project data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n this._data.previewUrl = value.avatarUrl\n ? `${this.httpClient.serverUrl}/projects/${this._data.id}/preview?updated=${value.updatedAt}`\n : \"\";\n this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;\n this._data.owner.fullName = userFullName(this._data.owner);\n this._data.owner.initials = userInitials(this._data.owner.fullName);\n }\n\n /**\n * Project description.\n */\n get description(): string {\n return this.data.description;\n }\n\n set description(value: string) {\n this.data.description = value;\n }\n\n /**\n * Project end date in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n */\n get endDate(): string {\n return this.data.endDate;\n }\n\n set endDate(value: string | Date) {\n this.data.endDate = value instanceof Date ? value.toISOString() : value;\n }\n\n /**\n * Unique project ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * The number of members in the project.\n *\n * @readonly\n */\n get memberCount(): number {\n return this.data.memberCount;\n }\n\n /**\n * The number of models in the project.\n *\n * @readonly\n */\n get modelCount(): number {\n return this.data.modelCount;\n }\n\n /**\n * Project name.\n */\n get name(): string {\n return this.data.name;\n }\n\n set name(value: string) {\n this.data.name = value;\n }\n\n /**\n * Project owner information.\n *\n * @readonly\n */\n get owner(): IShortUserDesc {\n return this.data.owner;\n }\n\n /**\n * Project preview image URL or empty string if the project does not have a preview. Use\n * {@link Project.setPreview | setPreview()} to change preview image.\n *\n * @readonly\n */\n get previewUrl(): string {\n return this._data.previewUrl;\n }\n\n /**\n * `true` if project is shared project.\n */\n get public(): boolean {\n return this.data.public;\n }\n\n set public(value: boolean) {\n this.data.public = value;\n }\n\n /**\n * Project start date in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n */\n get startDate(): string {\n return this.data.startDate;\n }\n\n set startDate(value: string | Date) {\n this.data.startDate = value instanceof Date ? value.toISOString() : value;\n }\n\n /**\n * The number of topics in the project.\n *\n * @readonly\n */\n get topicCount(): number {\n return this.data.topicCount;\n }\n\n /**\n * Project last update time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get updatedAt(): string {\n return this.data.updatedAt;\n }\n\n /**\n * Reloads project data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates project data on the server.\n *\n * @param data - Raw project data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a project from the server.\n *\n * @returns Returns the raw data of a deleted project. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n override delete(): Promise<any> {\n return super\n .delete(\"\")\n .then((response) => response.text())\n .then((text) => {\n // TODO fix for server 23.5 and below\n try {\n return JSON.parse(text);\n } catch {\n return { id: this.id };\n }\n });\n }\n\n /**\n * Saves project properties changes to the server. Call this method to update project data on the\n * server after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n\n /**\n * Sets or removes the project preview.\n *\n * @param image - Preview image. Can be a\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string,\n * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},\n * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or\n * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting the `image`\n * to `null` will remove the preview.\n */\n\n async setPreview(image?: BodyInit | null): Promise<this> {\n if (!image) {\n await this.deletePreview();\n } else {\n const response = await this.post(\"/preview\", image);\n this.data = await response.json();\n }\n return this;\n }\n\n /**\n * Removes the project preview.\n */\n async deletePreview(): Promise<this> {\n const response = await super.delete(\"/preview\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Returns a list of project roles. Project members have different abilities depending on the role they\n * have in a project.\n */\n getRoles(): Promise<Role[]> {\n return this.get(\"/roles\")\n .then((response) => response.json())\n .then((array) => array.map((data) => new Role(data, this.id, this.httpClient)));\n }\n\n /**\n * Returns information about the specified project role.\n *\n * @param name - Role name.\n */\n getRole(name: string): Promise<Role> {\n return this.get(`/roles/${name}`)\n .then((response) => response.json())\n .then((data) => new Role(data, this.id, this.httpClient));\n }\n\n /**\n * Creates a new project role.\n *\n * @param name - Role name.\n * @param description - Role description.\n * @param permissions - Actions are allowed to be performed for the role.\n */\n createRole(name: string, description: string, permissions: IRoleActions): Promise<Role> {\n return this.post(\"/roles\", {\n name,\n description,\n permissions: permissions || {},\n })\n .then((response) => response.json())\n .then((data) => new Role(data, this.id, this.httpClient));\n }\n\n /**\n * Deletes the specified project role.\n *\n * @param name - Role name.\n * @returns Returns the raw data of a deleted role. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n deleteRole(name: string): Promise<any> {\n return super.delete(`/roles/${name}`).then((response) => response.json());\n }\n\n /**\n * Returns a list of project members.\n */\n getMembers(): Promise<Member[]> {\n return this.get(\"/members\")\n .then((response) => response.json())\n .then((array) => array.map((data) => new Member(data, this.id, this.httpClient)));\n }\n\n /**\n * Returns information about the specified project member.\n *\n * @param memberId - Member ID.\n */\n getMember(memberId: string): Promise<Member> {\n return this.get(`/members/${memberId}`)\n .then((response) => response.json())\n .then((data) => new Member(data, this.id, this.httpClient));\n }\n\n /**\n * Adds a user to the project to become a member and have permission to perform actions.\n *\n * @param userId - User ID.\n * @param role - Role name from the list of project {@link getRoles | roles}.\n */\n addMember(userId: string, role: string): Promise<Member> {\n return this.post(\"/members\", { userId, role })\n .then((response) => response.json())\n .then((data) => new Member(data, this.id, this.httpClient));\n }\n\n /**\n * Removes the specified member from a project.\n *\n * @param memberId - Member ID.\n * @returns Returns the raw data of a deleted member. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n removeMember(memberId: string): Promise<any> {\n return super.delete(`/members/${memberId}`).then((response) => response.json());\n }\n\n /**\n * Information about the file (model) that can be reference in the project topics.\n *\n * @typedef {any} FileInformation\n * @property {any[]} display_information - The list of fields to allow users to associate the file with\n * a server model.\n * @property {string} display_information.field_display_name - Field display name.\n * @property {string} display_information.field_value - Field value.\n * @property {any} file - The file reference object.\n * @property {string} file.file_name - File name.\n * @property {string} file.reference - File ID.\n */\n\n /**\n * Returns a list of project files. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/bcf3.html#ProjectFilesInformation | Open Cloud BCF3 API}.\n *\n * This list contains all files that the project has access to. To add a file to this list, create a\n * {@link IGrantedTo.project | project} permission on the file using\n * {@link File.createPermission | File.createPermission()}.\n */\n getFilesInformation(): Promise<any[]> {\n const bcfProjects = new Endpoint(\"/bcf/3.0/projects\", this.httpClient, this.headers);\n return bcfProjects\n .get(`/${this.id}/files_information`)\n .then((response) => response.json())\n .then((items) => {\n items.forEach((item) => {\n const getFieldValue = (displayName: string) => {\n return (item.display_information.find((x) => x.field_display_name === displayName) || {}).field_value;\n };\n\n const previewUrl = `${this.httpClient.serverUrl}/files/${item.file.reference}/preview`;\n const ownerAvatarUrl = `${this.httpClient.serverUrl}/users/${getFieldValue(\"Owner\")}/avatar`;\n\n const ownerFirstName = getFieldValue(\"Owner First Name\");\n const ownerLastName = getFieldValue(\"Owner Last Name\");\n const ownerUserName = getFieldValue(\"Owner User Name\");\n const ownerFullName = userFullName(ownerFirstName, ownerLastName, ownerUserName);\n const ownerInitials = userInitials(ownerFullName);\n\n item.display_information.push({ field_display_name: \"Preview URL\", field_value: previewUrl });\n item.display_information.push({ field_display_name: \"Owner Avatar URL\", field_value: ownerAvatarUrl });\n item.display_information.push({ field_display_name: \"Owner Full Name\", field_value: ownerFullName });\n item.display_information.push({ field_display_name: \"Owner Initials\", field_value: ownerInitials });\n\n // updatedBy since 24.10\n\n const updatedByAvatarUrl = `${this.httpClient.serverUrl}/users/${getFieldValue(\"Updated By\")}/avatar`;\n\n const updatedByFirstName = getFieldValue(\"Updated By First Name\");\n const updatedByLastName = getFieldValue(\"Updated By Last Name\");\n const updatedByUserName = getFieldValue(\"Updated By User Name\");\n const updatedByFullName = userFullName(updatedByFirstName, updatedByLastName, updatedByUserName);\n const updatedByInitials = userInitials(updatedByFullName);\n\n item.display_information.push({\n field_display_name: \"Updated By Avatar URL\",\n field_value: updatedByAvatarUrl,\n });\n item.display_information.push({ field_display_name: \"Updated By Full Name\", field_value: updatedByFullName });\n item.display_information.push({ field_display_name: \"Updated By Initials\", field_value: updatedByInitials });\n\n // geometryType since 24.12\n\n const geometry = getFieldValue(\"Geometry Status\");\n const geometryGltf = getFieldValue(\"GeometryGltf Status\");\n const geometryType = geometry === \"done\" ? \"vsfx\" : geometryGltf === \"done\" ? \"gltf\" : \"\";\n\n item.display_information.push({ field_display_name: \"Geometry Type\", field_value: geometryType });\n });\n return items;\n });\n }\n\n /**\n * Returns a list of project files.\n */\n getModels(): Promise<File[]> {\n return this.getFilesInformation()\n .then((filesInformation) => filesInformation.map((item) => item.file.reference))\n .then((ids) => {\n const files = new Endpoint(\"/files\", this.httpClient, this.headers);\n return files.get(`?id=${normalizeParam(ids)}`);\n })\n .then((response) => response.json())\n .then((files) => files.result.map((data) => new File(data, this.httpClient)));\n }\n\n /**\n * Adds a file to the project with specified permissions.\n *\n * To change file permissions for the project use {@link Permission.actions}.\n *\n * @param fileId - File ID.\n * @param actions - Actions are allowed to be performed on a file:\n *\n * - `read` - The ability to read file description, geometry data and properties.\n * - `readSourceFile` - The ability to download source file.\n * - `write` - The ability to modify file name, description and references.\n * - `readViewpoint` - The ability to read file viewpoints.\n * - `createViewpoint` - The ability to create file viewpoints.\n *\n * @param _public - Specifies whether all users have access to the file or not.\n * @returns Returns a file instance added to the project.\n */\n async addModel(fileId: string, actions: string | string[], _public: boolean): Promise<File> {\n const files = new Endpoint(\"/files\", this.httpClient, this.headers);\n const file = await files\n .get(`/${fileId}`)\n .then((response) => response.json())\n .then((data) => new File(data, this.httpClient));\n\n const grantedTo = [{ project: { id: this.id, name: this.name } }];\n await file.createPermission(actions, grantedTo, _public);\n\n return file;\n }\n\n /**\n * Removes the specified file from a project.\n *\n * @param fileId - File ID.\n * @returns Returns a file instance removed from the project.\n */\n async removeModel(fileId: string): Promise<File> {\n const files = new Endpoint(\"/files\", this.httpClient, this.headers);\n const file = await files\n .get(`/${fileId}`)\n .then((response) => response.json())\n .then((data) => new File(data, this.httpClient));\n\n const permissions = await file.getPermissions();\n await Promise.allSettled(\n permissions\n .filter((permission) => permission.grantedTo.some((x) => x.project?.id === this.id))\n .map((permission) => permission.delete())\n );\n\n return file;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\nimport { FetchError } from \"./FetchError\";\nimport { userFullName, userInitials } from \"./Utils\";\n\n/**\n * Provides properties and methods for obtaining information about a Open Cloud Server user and manage\n * its data.\n */\nexport class User extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw user data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(\"\", httpClient);\n this.data = data;\n }\n\n /**\n * User avatar image URL or empty string if the user does not have an avatar. Use\n * {@link setAvatar | setAvatar()} to change avatar image.\n *\n * @readonly\n */\n get avatarUrl(): string {\n return this._data.avatarUrl;\n }\n\n /**\n * `true` if user is allowed to create a projects.\n *\n * Only administrators can change create project permission.\n */\n get canCreateProject(): boolean {\n return this.data.canCreateProject;\n }\n\n set canCreateProject(value: boolean) {\n this._data.canCreateProject = value;\n }\n\n /**\n * Account registration time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n *\n * @readonly\n */\n get createAt(): string {\n return this.data.createAt;\n }\n\n /**\n * User custom fields object, to store custom data.\n */\n get customFields(): any {\n return this.data.customFields;\n }\n\n set customFields(value: any) {\n this._data.customFields = value;\n }\n\n /**\n * Raw user data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.\n *\n * @readonly\n */\n\n get data(): any {\n return this._data;\n }\n\n private set data(value: any) {\n this._data = value;\n this._data.avatarUrl = value.avatarImage\n ? `${this.httpClient.serverUrl}/users/${this._data.id}/avatar?updated=${value.lastModified}`\n : \"\";\n this._data.fullName = userFullName(this._data);\n this._data.initials = userInitials(this._data.fullName);\n }\n\n /**\n * User email.\n */\n get email(): string {\n return this.data.email;\n }\n\n set email(value: string) {\n this._data.email = value;\n }\n\n /**\n * The user's email confirmation code, or an empty string if the email has already been confirmed.\n *\n * To send the confirmation code to the server, use\n * {@link Client.confirmUserEmail | Client.confirmUserEmail()}.\n *\n * @readonly\n */\n get emailConfirmationId(): string {\n return this.data.emailConfirmationId;\n }\n\n /**\n * First name.\n */\n get firstName(): string {\n return this.data.firstName;\n }\n\n set firstName(value: string) {\n this._data.firstName = value;\n }\n\n /**\n * Full name. Returns the user's first and last name. If first name and last names are empty, returns\n * the user name.\n *\n * @readonly\n */\n get fullName(): string {\n return this.data.fullName;\n }\n\n /**\n * Unique user ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * User initials. Returns a first letters of the user's first and last names. If first name and last\n * names are empty, returns the first letter of the user name.\n *\n * @readonly\n */\n get initials(): string {\n return this.data.initials;\n }\n\n /**\n * `true` if user is an administrator.\n *\n * Only administrators can change user type.\n */\n get isAdmin(): boolean {\n return this.data.isAdmin;\n }\n\n set isAdmin(value: boolean) {\n this._data.isAdmin = value;\n }\n\n /**\n * `false` if the user has not yet confirmed his email address.\n *\n * @readonly\n */\n get isEmailConfirmed(): boolean {\n return this.data.isEmailConfirmed;\n }\n\n /**\n * User last update time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n */\n get lastModified(): string {\n return this.data.lastModified;\n }\n\n /**\n * Last name.\n */\n get lastName(): string {\n return this.data.lastName;\n }\n\n set lastName(value: string) {\n this._data.lastName = value;\n }\n\n /**\n * User last sign in time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n */\n get lastSignIn(): string {\n return this.data.lastSignIn;\n }\n\n /**\n * The maximum number of projects that a user can create.\n *\n * Only administrators can change projects limit.\n */\n get projectsLimit(): number {\n return this.data.projectsLimit;\n }\n\n set projectsLimit(value: number) {\n this._data.projectsLimit = value;\n }\n\n /**\n * The identity provider used to create the account. Can be `ldap`, `oauth`, `saml` or empty for local\n * accounts.\n *\n * @readonly\n */\n get providerType(): string {\n return this.data.providerType;\n }\n\n /**\n * User storage size on the server for uploading files.\n *\n * Only administrators can change storage size.\n */\n get storageLimit(): number {\n return this.data.storageLimit;\n }\n\n set storageLimit(value: number) {\n this._data.storageLimit = value;\n }\n\n /**\n * The total size of the user's files in the storage.\n *\n * @readonly\n */\n get storageUsed(): number {\n return this.data.storageUsed;\n }\n\n /**\n * The user's access token (API key). Use {@link Client.signInWithToken | Client.signInWithToken()} to\n * sign in to the server using this token.\n *\n * @readonly\n */\n get token(): string {\n return this.data.tokenInfo.token;\n }\n\n /**\n * User name.\n */\n get userName(): string {\n return this.data.userName;\n }\n\n set userName(value: string) {\n this._data.userName = value;\n }\n\n /**\n * Reloads user data from the server.\n *\n * Only administrators can checkout other users. If the current logged in user is not an administrator,\n * they can only checkout themselves, otherwise an exception will be thrown.\n */\n async checkout(): Promise<this> {\n if (this.httpClient.signInUserIsAdmin) {\n const response = await this.get(`/users/${this.id}`);\n const data = await response.json();\n this.data = { id: data.id, ...data.userBrief };\n } else if (this.id === this.httpClient.signInUserId) {\n const response = await this.get(\"/user\");\n const data = await response.json();\n this.data = { id: this.id, ...data };\n } else {\n return Promise.reject(new FetchError(403));\n }\n return this;\n }\n\n /**\n * Updates user data on the server.\n *\n * Only administrators can update other users. If the current logged in user is not an administrator,\n * they can only update themselves, otherwise an exception will be thrown.\n *\n * @param data - Raw user data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.\n */\n async update(data: any): Promise<this> {\n if (this.httpClient.signInUserIsAdmin) {\n const response = await this.put(`/users/${this.id}`, { isAdmin: data.isAdmin, userBrief: data });\n const newData = await response.json();\n this.data = { id: newData.id, ...newData.userBrief };\n } else if (this.id === this.httpClient.signInUserId) {\n const response = await this.put(\"/user\", data);\n const newData = await response.json();\n this.data = { id: this.id, ...newData };\n } else {\n return Promise.reject(new FetchError(403));\n }\n return this;\n }\n\n /**\n * Deletes a user from the server.\n *\n * Only administrators can delete users. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * Administrators can delete themselves or other administrators. An administrator can only delete\n * themselves if they are not the last administrator.\n *\n * You need to re-login after deleting the current logged in user.\n *\n * @returns Returns the raw data of a deleted user. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.\n */\n override delete(): Promise<any> {\n if (this.httpClient.signInUserIsAdmin) {\n return super\n .delete(`/users/${this.id}`)\n .then((response) => response.json())\n .then((data) => {\n if (this.id === this.httpClient.signInUserId) {\n delete this.httpClient.headers[\"Authorization\"];\n this.httpClient.signInUserId = \"\";\n this.httpClient.signInUserIsAdmin = false;\n }\n return data;\n });\n } else {\n return Promise.reject(new FetchError(403));\n }\n }\n\n /**\n * Saves user properties changes to the server. Call this method to update user data on the server\n * after any property changes.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n\n /**\n * Sets or removes the user avatar.\n *\n * Only administrators can set the avatar of other users. If the current logged in user is not an\n * administrator, they can only set their avatar, otherwise an exception will be thrown.\n *\n * @param image - Avatar image. Can be a\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string,\n * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},\n * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or\n * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting the `image`\n * to `null` will remove the avatar.\n */\n async setAvatar(image?: BodyInit | null): Promise<this> {\n if (!image) {\n await this.deleteAvatar();\n } else if (this.httpClient.signInUserIsAdmin) {\n const response = await this.post(`/users/${this.id}/avatar`, image);\n const data = await response.json();\n this.data = { id: data.id, ...data.userBrief };\n } else if (this.id === this.httpClient.signInUserId) {\n const response = await this.post(\"/user/avatar\", image);\n const data = await response.json();\n this.data = { id: this.id, ...data };\n } else {\n return Promise.reject(new FetchError(403));\n }\n return this;\n }\n\n /**\n * Removes the user avatar.\n *\n * Only administrators can remove the avatar of other users. If the current logged in user is not an\n * administrator, they can only remove their avatar, otherwise an exception will be thrown.\n */\n async deleteAvatar(): Promise<this> {\n if (this.httpClient.signInUserIsAdmin) {\n const response = await super.delete(`/users/${this.id}/avatar`);\n const data = await response.json();\n this.data = { id: data.id, ...data.userBrief };\n } else if (this.id === this.httpClient.signInUserId) {\n const response = await super.delete(\"/user/avatar\");\n const data = await response.json();\n this.data = { id: this.id, ...data };\n } else {\n return Promise.reject(new FetchError(403));\n }\n return this;\n }\n\n /**\n * Changes the user password.\n *\n * Only administrators can change the passwords of other users. If the current logged in user is not an\n * administrator, they can only change their password, otherwise an exception will be thrown.\n *\n * To change their password, non-administrator users must specify their old password.\n *\n * @param newPassword - New user password.\n * @param oldPassword - Old user password. Only required for non-administrator users to change their\n * password.\n */\n async changePassword(newPassword: string, oldPassword?: string): Promise<this> {\n if (this.httpClient.signInUserIsAdmin) {\n const response = await this.put(`/users/${this.id}/password`, { new: newPassword });\n const data = await response.json();\n this.data = { id: data.id, ...data.userBrief };\n } else if (this.id === this.httpClient.signInUserId) {\n const response = await this.put(\"/user/password\", { old: oldPassword, new: newPassword });\n const data = await response.json();\n this.data = { id: this.id, ...data };\n } else {\n return Promise.reject(new FetchError(403));\n }\n return this;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\n\n/**\n * Provides properties and methods for obtaining information about a OAuth 2.0 client that have access\n * the Open Cloud Server API.\n */\nexport class OAuthClient extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw client data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#OAuthClient | Open Cloud OAuth Clients API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/oauth/clients/${data.clientId}`, httpClient);\n this.data = data;\n }\n\n /**\n * OAuth 2.0 server authorization endpoint.\n */\n get authUrl(): string {\n return this.data.authUrl;\n }\n\n /**\n * OAuth 2.0 server token endpoint.\n */\n get accessTokenUrl(): string {\n return this.data.accessTokenUrl;\n }\n\n /**\n * Unique client ID.\n *\n * @readonly\n */\n get clientId(): string {\n return this.data.clientId;\n }\n\n /**\n * Client creation time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n */\n get createdAt(): string {\n return this.data.createdAt;\n }\n\n /**\n * Client application description.\n */\n get description(): string {\n return this.data.description;\n }\n\n set description(value: string) {\n this._data.description = value;\n }\n\n /**\n * Client data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#OAuthClient | Open Cloud OAuth Clients API}.\n *\n * @readonly\n */\n get data(): any {\n return this._data;\n }\n\n set data(value: any) {\n this._data = value;\n }\n\n /**\n * Client application name.\n */\n get name(): string {\n return this.data.name;\n }\n\n set name(value: string) {\n this._data.name = value;\n }\n\n /**\n * The endpoint to which the OAuth 2.0 server sends the response.\n */\n get redirectUrl(): string {\n return this.data.redirectUrl;\n }\n\n set redirectUrl(value: string) {\n this.data.redirectUrl = value;\n }\n\n /**\n * Client secret.\n *\n * @readonly\n */\n get secret(): string {\n return this.data.secret;\n }\n\n /**\n * Client last update time (UTC) in the format specified in\n * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.\n */\n get updatedAt(): string {\n return this.data.updatedAt;\n }\n\n /**\n * Reloads clien data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Updates client data on the server.\n *\n * Only administrators can update OAuth clients. If the current logged in user is not an administrator,\n * an exception will be thrown.\n *\n * @param data - Raw client data. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#OAuthClient | Open Cloud OAuth Clients API}.\n */\n async update(data: any): Promise<this> {\n const response = await this.put(\"\", data);\n this.data = await response.json();\n return this;\n }\n\n /**\n * Deletes a client from the server.\n *\n * Only administrators can delete OAuth clients. If the current logged in user is not an administrator,\n * an exception will be thrown.\n *\n * @returns Returns the raw data of a deleted client. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#OAuthClient | Open Cloud OAuth Clients API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Saves client properties changes to the server. Call this method to update client data on the server\n * after any property changes.\n *\n * Only administrators can update OAuth clients. If the current logged in user is not an administrator,\n * an exception will be thrown.\n */\n save(): Promise<this> {\n return this.update(this.data);\n }\n\n /**\n * Revokes the access tokens for all users of the client application.\n */\n async revoke(): Promise<this> {\n await this.post(\"/revoke\");\n return this;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { File } from \"./File\";\n\nexport class SharedFile extends File {\n constructor(data: any, password: string, httpClient: IHttpClient) {\n super(data.file, httpClient);\n this.path = `/shares/${data.file.sharedLinkToken}`;\n this.headers = { \"InWeb-Password\": password };\n }\n\n override async checkout(): Promise<this> {\n const response = await this.get(\"/info\");\n const data = await response.json();\n this.data = data.file;\n return this;\n }\n\n override async update(data: any): Promise<this> {\n const response = await this.put(\"/info\", data);\n this.data = await response.json();\n return this;\n }\n\n override getVersions(): Promise<File[]> {\n return Promise.resolve(undefined);\n }\n\n override useVersion(version?: number): this {\n return this;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { Endpoint } from \"./Endpoint\";\n\n/**\n * Provides properties and methods for obtaining information about a server plugin on the Open Cloud\n * Server and managing its data.\n */\nexport class Plugin extends Endpoint {\n private _data: any;\n\n /**\n * @param data - Raw plugin data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Plugin | Open Cloud Plugins API}.\n * @param httpClient - HTTP client instance used to send requests to the REST API server.\n */\n constructor(data: any, httpClient: IHttpClient) {\n super(`/plugins/${data.name}/${data.version}`, httpClient);\n this.data = data;\n }\n\n /**\n * Plugin author information. The `author` is an object with a `name` field and optionally `url` and\n * `email`. Or it can be shorten that all into a single string.\n *\n * @readonly\n */\n get author(): any {\n return this.data.author;\n }\n\n /**\n * Raw plugin data received from the server. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Plugin | Open Cloud Plugins API}.\n */\n get data(): any {\n return this._data;\n }\n\n set data(value: any) {\n this._data = value;\n }\n\n /**\n * Short description of the plugin.\n *\n * @readonly\n */\n get description(): string {\n return this.data.description;\n }\n\n /**\n * Plugin state.\n *\n * @readonly\n */\n get enabled(): boolean {\n return this.data.enabled;\n }\n\n /**\n * The URL to the plugin homepage.\n *\n * @readonly\n */\n get homepage(): string {\n return this.data.homepage;\n }\n\n /**\n * Unique plugin ID.\n *\n * @readonly\n */\n get id(): string {\n return this.data.id;\n }\n\n /**\n * A license for the plugin.\n *\n * @readonly\n */\n get license(): string {\n return this.data.license;\n }\n\n /**\n * Plugin name.\n *\n * @readonly\n */\n get name(): string {\n return this.data.name;\n }\n\n /**\n * API permissions required.\n *\n * @readonly\n */\n get permissions(): string[] {\n return this.data.permissions;\n }\n\n /**\n * Plugin type. Can be set of:\n *\n * - `app` - Viewer plugin, the client‑side web app that the server hosts and serves as static content.\n * - `server` - Binary dll that extends server functionality.\n * - `jobrunner` - Binary dll that adds a new Job Runner on the server.\n *\n * @readonly\n */\n get pluginType(): string[] {\n return this.data.pluginType;\n }\n\n /**\n * {@link https://semver.org/ | SemVer} compatible version of the plugin.\n *\n * @readonly\n */\n get version(): number {\n return this.data.version;\n }\n\n /**\n * Reloads plugin data from the server.\n */\n async checkout(): Promise<this> {\n const response = await this.get(\"\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Uninstalls and deletes a plugin from the server.\n *\n * @returns Returns the raw data of a deleted plugin. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Plugin | Open Cloud Plugins API}.\n */\n override delete(): Promise<any> {\n return super.delete(\"\").then((response) => response.json());\n }\n\n /**\n * Enables a plugin.\n */\n async enable(): Promise<this> {\n const response = await this.put(\"/enable\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Disables a plugin.\n */\n async disable(): Promise<this> {\n const response = await this.put(\"/disable\");\n this.data = await response.json();\n return this;\n }\n\n /**\n * Downloads the plugins package from the server.\n *\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n download(onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFile(this.getEndpointPath(\"/download\"), onProgress, { signal, headers: this.headers })\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Returns a plugin manfest.\n */\n getManifest(): Promise<any> {\n return this.get(\"/manifest\").then((response) => response.json());\n }\n\n /**\n * Returns the plugin settings.\n *\n * @returns Returns an object with plugin settings.\n */\n getSettings(): Promise<any> {\n return this.get(\"/settings\").then((response) => response.json());\n }\n\n /**\n * Changes the plugin settings.\n *\n * @param settings - An object with the new plugin settings or part of the settings.\n * @returns Returns an object with updated plugin settings.\n */\n updateSettings(settings: any): Promise<any> {\n return this.post(\"/settings\", settings).then((response) => response.json());\n }\n\n /**\n * Executes a plugin command.\n *\n * This method executes the command for the current version of the plugin. To execute a command for the\n * latest installed version of the plugin, use the {@link Client.executePluginCommand}.\n *\n * @param command - Command to execute.\n * @param parameters - Command parameters. Command-dependent.\n */\n executeCommand(command: string, parameters?: BodyInit | object): Promise<any> {\n const commands = new Endpoint(`/plugins/${this.name}/commands`, this.httpClient, this.headers);\n return commands.post(`/${command}?version=${this.version}`, parameters).then((response) => response.json());\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { EventEmitter2 } from \"@inweb/eventemitter2\";\n\nimport { IHttpClient } from \"./IHttpClient\";\nimport { HttpClient } from \"./HttpClient\";\nimport { FetchError } from \"./FetchError\";\nimport { ClientEventMap } from \"./ClientEvents\";\nimport { Assembly } from \"./Assembly\";\nimport { File } from \"./File\";\nimport { Job } from \"./Job\";\nimport { Project } from \"./Project\";\nimport { User } from \"./User\";\nimport { OAuthClient } from \"./OAuthClient\";\nimport { ISharedLinkPermissions } from \"./ISharedLink\";\nimport { SharedLink } from \"./SharedLink\";\nimport { SharedFile } from \"./SharedFile\";\nimport { Plugin } from \"./Plugin\";\nimport { normalizeParam, parseArgs } from \"./Utils\";\n\n/**\n * Provides methods for managing Open Cloud Server resources such as users, files, assemblies, jobs,\n * projects, etc.\n */\nexport class Client extends EventEmitter2<ClientEventMap> {\n private _serverUrl = \"\";\n private _httpClient: IHttpClient = new HttpClient(\"\");\n private _user: User | null = null;\n public eventEmitter: EventEmitter2 = this;\n\n /**\n * @param params - An object containing client configuration parameters.\n * @param params.serverUrl - Open Cloud REST API server URL.\n * @param params.url - Deprecated since `25.8`. Use `serverUrl` instead.\n */\n constructor(params: { serverUrl?: string; url?: string } = {}) {\n super();\n this.configure(params);\n }\n\n /**\n * Open Cloud REST API server URL. Use {@link configure | configure()} to change server URL.\n *\n * @readonly\n */\n get serverUrl(): string {\n return this._serverUrl;\n }\n\n /**\n * HTTP client instance used to send requests to the REST API server.\n *\n * @readonly\n */\n get httpClient(): IHttpClient {\n return this._httpClient;\n }\n\n /**\n * Deprecated since `25.3`. Use `Viewer.options()` instead to change `Viewer` parameters.\n *\n * @deprecated\n */\n get options(): any {\n console.warn(\n \"Client.options has been deprecated since 25.3 and will be removed in a future release, use Viewer.options instead.\"\n );\n const data = {\n showWCS: true,\n cameraAnimation: true,\n antialiasing: true,\n groundShadow: false,\n shadows: false,\n cameraAxisXSpeed: 4,\n cameraAxisYSpeed: 1,\n ambientOcclusion: false,\n enableStreamingMode: true,\n enablePartialMode: false,\n memoryLimit: 3294967296,\n cuttingPlaneFillColor: { red: 0xff, green: 0x98, blue: 0x00 },\n edgesColor: { r: 0xff, g: 0x98, b: 0x00 },\n facesColor: { r: 0xff, g: 0x98, b: 0x00 },\n edgesVisibility: true,\n edgesOverlap: true,\n facesOverlap: false,\n facesTransparancy: 200,\n enableCustomHighlight: true,\n sceneGraph: false,\n edgeModel: true,\n reverseZoomWheel: false,\n enableZoomWheel: true,\n enableGestures: true,\n geometryType: \"vsfx\",\n rulerUnit: \"Default\",\n cameraMode: \"perspective\",\n };\n return {\n ...data,\n data,\n defaults: () => data,\n resetToDefaults: () => {},\n saveToStorage: () => {},\n loadFromStorage: () => {},\n };\n }\n\n /**\n * Changes the client parameters.\n *\n * After changing the parameters, you must re-login.\n *\n * @param params - An object containing new parameters.\n * @param params.serverUrl - Open Cloud REST API server URL.\n */\n configure(params: { serverUrl?: string }): this {\n this._serverUrl = (params.serverUrl || \"\").replace(/\\/+$/, \"\");\n this._httpClient.serverUrl = this.serverUrl;\n this.clearCurrentUser();\n return this;\n }\n\n /**\n * Returns client and server versions.\n *\n * No login is required to obtain the version.\n */\n version(): Promise<{ server: string; client: string; hash: string }> {\n return this.httpClient\n .get(\"/version\")\n .then((response) => response.json())\n .then((data) => ({\n ...data,\n server: data.version,\n client: \"CLIENT_JS_VERSION\",\n }));\n }\n\n /**\n * Registers a new user on the server. No authorization is required to register a new user.\n *\n * @param email - User email. Cannot be empty. Must be unique within the server.\n * @param password - User password. Cannot be empty. Password can only contain letters (a-z, A-Z),\n * numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'\":;.,?).\n * @param userName - User name. Cannot be empty or blank if defined. this to `undefined` to use\n * `username` from email.\n */\n registerUser(email: string, password: string, userName?: string): Promise<any> {\n return this.httpClient\n .post(\"/register\", {\n email,\n password,\n userName: userName ?? (email + \"\").split(\"@\").shift(),\n })\n .then((response) => response.json());\n }\n\n /**\n * Resends a Confirmation Email to the new user. If the user's email is already confirmed, an exception\n * will be thrown.\n *\n * @param email - User email.\n * @param password - User password.\n */\n resendConfirmationEmail(email: string, password: string): Promise<any> {\n return this.httpClient\n .post(\"/register/email-confirmation\", { email, password })\n .then((response) => response.json());\n }\n\n /**\n * Marks the user's email address as confirmed. If the user's email is already confirmed, an exception\n * will be thrown.\n *\n * @param emailConfirmationId - Confirmation code from the Confirmation Email.\n */\n confirmUserEmail(emailConfirmationId: string): Promise<any> {\n return this.httpClient\n .get(`/register/email-confirmation/${emailConfirmationId}`)\n .then((response) => response.json());\n }\n\n /**\n * Log in an existing user using email or user name.\n *\n * @param email - An email or user name for authentication request.\n * @param password - Password for authentication request.\n */\n async signInWithEmail(email: string, password: string): Promise<User> {\n const credentials = btoa(unescape(encodeURIComponent(email + \":\" + password)));\n this.httpClient.headers[\"Authorization\"] = \"Basic \" + credentials;\n const response = await this.httpClient.get(\"/token\");\n const data = await response.json();\n return this.setCurrentUser(data);\n }\n\n /**\n * Log in an existing user using access token (API Key).\n *\n * @param token - An access token for authentication request. See {@link User.token} for more details.\n */\n async signInWithToken(token: string): Promise<User> {\n this.httpClient.headers[\"Authorization\"] = token;\n const response = await this.httpClient.get(\"/user\");\n const data = await response.json();\n return this.setCurrentUser(data);\n }\n\n /**\n * Log out.\n *\n * You must log in again using {@link signInWithEmail} or {@link signInWithToken} to continue making\n * requests to the server\n */\n signOut(): void {\n this.clearCurrentUser();\n }\n\n // Save the current logged in user information for internal use.\n\n private setCurrentUser(data: any): User {\n this._user = new User(data, this.httpClient);\n this.httpClient.headers[\"Authorization\"] = data.tokenInfo.token;\n this.httpClient.signInUserId = this._user.id;\n this.httpClient.signInUserIsAdmin = this._user.isAdmin;\n return this._user;\n }\n\n private clearCurrentUser(): void {\n this._user = null;\n delete this.httpClient.headers[\"Authorization\"];\n this.httpClient.signInUserId = \"\";\n this.httpClient.signInUserIsAdmin = false;\n }\n\n /**\n * Returns the current logged in user. Returns `null` if the user is not logged in or the logged in\n * user has deleted themselves.\n */\n getCurrentUser(): User | null {\n if (this._user && !this.httpClient.signInUserId) this._user = null;\n return this._user;\n }\n\n /**\n * Returns the list of server enabled identity providers. No authorization is required to obtain a list\n * of providers.\n */\n getIdentityProviders(): Promise<{ name: string; url: string }[]> {\n return this.httpClient.get(\"/identity\").then((response) => response.json());\n }\n\n /**\n * Returns the current server settings.\n *\n * @returns Returns an object with server settings. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Settings | Open Cloud Settings API}.\n */\n getServerSettings(): Promise<any> {\n return this.httpClient.get(\"/settings\").then((response) => response.json());\n }\n\n /**\n * Changes the server settings.\n *\n * Only administrators can change server settings. If the current logged in user is not an\n * administrator, an exception will be thrown.\n *\n * @param settings - An object with the new server settings or part of the settings. For more\n * information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Settings | Open Cloud Settings API}.\n * @returns Returns an object with updated server settings.\n */\n updateServerSettings(settings: any): Promise<any> {\n return this.httpClient.put(\"/settings\", settings).then((response) => response.json());\n }\n\n /**\n * Result for OAuth client list.\n *\n * @typedef {any} OAuthClientsResult\n * @property {OAuthClient[]} result - Result client list.\n * @property {number} start - The starting index in the client list in the request.\n * @property {number} limit - The maximum number of requested clients.\n * @property {number} allSize - Total number of OAuth clients on the server.\n * @property {number} size - The number of clients in the result list.\n */\n\n /**\n * Returns a list of OAuth clients of the server.\n *\n * Only administrators can get a list of OAuth clients. If the current logged in user is not an\n * administrator, an exception will be thrown.\n *\n * @param start - The starting index in the client list. Used for paging.\n * @param limit - The maximum number of clients that should be returned per request. Used for paging.\n */\n getOAuthClients(\n start?: number,\n limit?: number\n ): Promise<{\n result: OAuthClient[];\n start: number;\n limit: number;\n allSize: number;\n size: number;\n }> {\n const searchParams = new URLSearchParams();\n if (start > 0) searchParams.set(\"start\", start.toString());\n if (limit > 0) searchParams.set(\"limit\", limit.toString());\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.httpClient\n .get(`/oauth/clients${queryString}`)\n .then((response) => response.json())\n .then((clients) => {\n return {\n ...clients,\n result: clients.result.map((data) => new OAuthClient(data, this.httpClient)),\n };\n });\n }\n\n /**\n * Returns information about the specified OAuth client.\n *\n * Only administrators can get OAuth clients. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * @param clientId - Client ID.\n */\n getOAuthClient(clientId: string): Promise<OAuthClient> {\n return this.httpClient\n .get(`/oauth/clients/${clientId}`)\n .then((response) => response.json())\n .then((data) => new OAuthClient(data, this.httpClient));\n }\n\n /**\n * Creates a new OAuth client on the server.\n *\n * Only administrators can create OAuth clients. If the current logged in user is not an administrator,\n * an exception will be thrown.\n *\n * @param name - Client name.\n * @param redirectUrl - Endpoint to which the OAuth 2.0 server sends the response.\n * @param description - Client description.\n */\n createOAuthClient(name: string, redirectUrl: string, description?: string): Promise<OAuthClient> {\n return this.httpClient\n .post(\"/oauth/clients\", {\n name,\n redirectUrl,\n description,\n })\n .then((response) => response.json())\n .then((data) => new OAuthClient(data, this.httpClient));\n }\n\n /**\n * Deletes the specified OAuth client from the server.\n *\n * Only administrators can delete OAuth clients. If the current logged in user is not an administrator,\n * an exception will be thrown.\n *\n * @param clientId - Client ID.\n * @returns Returns the raw data of a deleted client. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#OAuthClient | Open Cloud OAuth Clients API}.\n */\n deleteOAuthClient(clientId: string): Promise<any> {\n return this.httpClient.delete(`/oauth/clients/${clientId}`).then((response) => response.json());\n }\n\n /**\n * Returns the list of server users.\n *\n * Only administrators can get a list of users. If the current logged in user is not an administrator,\n * an exception will be thrown.\n */\n getUsers(): Promise<User[]> {\n return this.httpClient\n .get(\"/users\")\n .then((response) => response.json())\n .then((array) => array.map((data) => ({ id: data.id, ...data.userBrief })))\n .then((array) => array.map((data) => new User(data, this.httpClient)));\n }\n\n /**\n * Returns information about the specified user.\n *\n * Only administrators can get other users. If the current logged in user is not an administrator, they\n * can only get themselves, otherwise an exception will be thrown.\n *\n * @param userId - User ID.\n */\n getUser(userId: string): Promise<User> {\n if (this.httpClient.signInUserIsAdmin) {\n return this.httpClient\n .get(`/users/${userId}`)\n .then((response) => response.json())\n .then((data) => ({ id: data.id, ...data.userBrief }))\n .then((data) => new User(data, this.httpClient));\n } else if (userId === this.httpClient.signInUserId) {\n return this.httpClient\n .get(\"/user\")\n .then((response) => response.json())\n .then((data) => ({ id: userId, ...data }))\n .then((data) => new User(data, this.httpClient));\n } else {\n return Promise.reject(new FetchError(403));\n }\n }\n\n /**\n * Creates a new user on the server.\n *\n * Only administrators can create users. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * @param email - User email. Cannot be empty. Must be unique within the server.\n * @param password - User password. Cannot be empty. Password can only contain latin letters (a-z,\n * A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'\":;.,?).\n * @param params - Additional user data.\n * @param params.isAdmin - `true` if user is an administrator.\n * @param params.userName - User name. Cannot be empty or blank if defined. Specify `undefined` to use\n * `username` from email.\n * @param params.firstName - First name.\n * @param params.lastName - Last name.\n * @param params.canCreateProject - `true` if user is allowed to create a project.\n * @param params.projectsLimit - The maximum number of projects that the user can create.\n * @param params.storageLimit - The size of the file storage available to the user in bytes.\n */\n createUser(\n email: string,\n password: string,\n params: {\n isAdmin?: boolean;\n userName?: string;\n firstName?: string;\n lastName?: string;\n canCreateProject?: boolean;\n projectsLimit?: number;\n storageLimit?: number;\n } = {}\n ): Promise<User> {\n const { isAdmin, userName, ...rest } = params;\n return this.httpClient\n .post(\"/users\", {\n isAdmin,\n userBrief: {\n ...rest,\n email,\n userName: userName ?? (email + \"\").split(\"@\").shift(),\n },\n password,\n })\n .then((response) => response.json())\n .then((data) => ({ id: data.id, ...data.userBrief }))\n .then((data) => new User(data, this.httpClient));\n }\n\n /**\n * Deletes the specified user from the server.\n *\n * Only administrators can delete users. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * Administrators can delete themselves or other administrators. An administrator can only delete\n * themselves if they are not the last administrator.\n *\n * You need to re-login after deleting the current logged in user.\n *\n * @param userId - User ID.\n * @returns Returns the raw data of a deleted user. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.\n */\n deleteUser(userId: string): Promise<any> {\n if (this.httpClient.signInUserIsAdmin) {\n return this.httpClient\n .delete(`/users/${userId}`)\n .then((response) => response.json())\n .then((data) => {\n if (userId === this.httpClient.signInUserId) {\n this.clearCurrentUser();\n }\n return data;\n });\n } else {\n return Promise.reject(new FetchError(403));\n }\n }\n\n /**\n * Result for file list.\n *\n * @typedef {any} FilesResult\n * @property {File[]} result - Result file list.\n * @property {number} start - The starting index in the file list in the request.\n * @property {number} limit - The maximum number of requested files.\n * @property {number} allSize - Total number of files the user has access to.\n * @property {number} size - The number of files in the result list.\n */\n\n /**\n * Returns a list of files that the current logged in user has uploaded to the server or has access to\n * through a project.\n *\n * @param start - The starting index in the file list. Used for paging.\n * @param limit - The maximum number of files that should be returned per request. Used for paging.\n * @param name - Filter the files by part of the name. Case sensitive.\n * @param ext - Filter the files by extension. Extension can be `dgn`, `dwf`, `dwg`, `dxf`, `ifc`,\n * `ifczip`, `nwc`, `nwd`, `obj`, `rcs`, `rfa`, `rvt`, `step`, `stl`, `stp`, `vsf`, or any other file\n * type extension.\n * @param ids - List of file IDs to return. The list can include files that the user has access to\n * through a project. If not specified, only files uploaded by the current user are returned.\n * @param sortByDesc - Allows to specify the descending order of the result. By default, files are\n * sorted by name in ascending order.\n * @param sortField - Allows to specify sort field.\n * @param shared - Returns shared files only.\n */\n getFiles(\n start?: number,\n limit?: number,\n name?: string,\n ext?: string | string[],\n ids?: string | string[],\n sortByDesc?: boolean,\n sortField?: string,\n shared?: boolean\n ): Promise<{\n result: File[];\n start: number;\n limit: number;\n allSize: number;\n size: number;\n }> {\n const searchParams = new URLSearchParams();\n if (start > 0) searchParams.set(\"start\", start.toString());\n if (limit > 0) searchParams.set(\"limit\", limit.toString());\n if (name) searchParams.set(\"name\", name);\n if (ext) {\n ext = normalizeParam(ext);\n if (ext) searchParams.set(\"ext\", ext.toLowerCase());\n }\n if (ids) {\n ids = normalizeParam(ids);\n if (ids) searchParams.set(\"id\", ids);\n }\n if (sortByDesc !== undefined) searchParams.set(\"sortBy\", sortByDesc ? \"desc\" : \"asc\");\n if (sortField) searchParams.set(\"sortField\", sortField);\n if (shared) searchParams.set(\"shared\", \"true\");\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.httpClient\n .get(`/files${queryString}`)\n .then((response) => response.json())\n .then((files) => {\n return {\n ...files,\n result: files.result.map((data) => new File(data, this.httpClient)),\n };\n });\n }\n\n /**\n * Returns information about the specified file that the current logged in user has uploaded or has\n * access to through a project.\n *\n * @param fileId - File ID.\n */\n getFile(fileId: string): Promise<File> {\n return this.httpClient\n .get(`/files/${fileId}`)\n .then((response) => response.json())\n .then((data) => new File(data, this.httpClient));\n }\n\n /**\n * Upload a drawing or reference file to the server.\n *\n * Fires:\n *\n * - {@link UploadProgressEvent | uploadprogress}\n *\n * @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object are\n * generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}\n * object returned as a result of a user selecting files using the HTML `<input>` element.\n * @param params - An object containing upload parameters.\n * @param params.geometry - Run File Converter job to convert geometry data after uploading the file.\n * Can be one of:\n *\n * - `true` - Convert file geometry data to `VSFX` format for opening in `VisualizeJS` 3D viewer.\n * - `vsfx` - Convert file geometry data to `VSFX` format for opening in `VisualizeJS` 3D viewer.\n * - `gltf` - Convert file geometry data to `glTF` format for opening in `Three.js` 3D viewer.\n *\n * @param params.properties - Run File Converter job to extract properties after uploading the file.\n * @param params.jobParameters - Parameters for the File Converter jobs. Use this to specify additional\n * parameters for retrieving the geometry and properties of uploaded file. Can be given as command\n * line arguments in form `--arg=value`.\n * @param params.waitForDone - Wait for geometry and properties jobs to complete.\n * @param params.timeout - The time, in milliseconds that the function should wait jobs. If no one jobs\n * are done during this time, the `TimeoutError` exception will be thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * jobs status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onProgress - Upload progress callback.\n */\n async uploadFile(\n file: globalThis.File,\n params: {\n geometry?: boolean | string;\n properties?: boolean;\n jobParameters?: {\n geometry?: string | object;\n properties?: string | object;\n };\n waitForDone?: boolean;\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onProgress?: (progress: number, file: globalThis.File) => void;\n } = {\n geometry: true,\n properties: false,\n waitForDone: false,\n }\n ): Promise<File> {\n const result = await this.httpClient\n .uploadFile(\"/files\", file, (progress) => {\n this.emitEvent({ type: \"uploadprogress\", data: progress, file });\n params.onProgress?.(progress, file);\n })\n .then((xhr: XMLHttpRequest) => JSON.parse(xhr.responseText))\n .then((data) => new File(data, this.httpClient));\n\n const geometryType = typeof params.geometry === \"string\" ? params.geometry : \"vsfx\";\n const jobParameters = params.jobParameters || {};\n\n const jobs: string[] = [];\n if (params.geometry) jobs.push((await result.extractGeometry(geometryType, jobParameters.geometry)).outputFormat);\n if (params.properties) jobs.push((await result.extractProperties(jobParameters.properties)).outputFormat);\n if (jobs.length > 0)\n if (params.waitForDone) await result.waitForDone(jobs, true, params);\n else await result.checkout();\n\n return result;\n }\n\n /**\n * Deletes the specified file and all its versions from the server.\n *\n * You cannot delete a version file using `deleteFile()`, only the original file. To delete a version\n * file use {@link File.deleteVersion | File.deleteVersion()}.\n *\n * @param fileId - File ID.\n * @returns Returns the raw data of a deleted file. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.\n */\n deleteFile(fileId: string): Promise<any> {\n return this.httpClient.delete(`/files/${fileId}`).then((response) => response.json());\n }\n\n /**\n * Downloads the specified file from the server.\n *\n * @param fileId - File ID.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadFile(fileId: string, onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFile(`/files/${fileId}/downloads`, onProgress, { signal })\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Result for job list.\n *\n * @typedef {any} JobsResult\n * @property {Job[]} result - Result job list.\n * @property {number} start - The starting index in the job list in the request.\n * @property {number} limit - The maximum number of requested jobs.\n * @property {number} allSize - Total number of jobs created by the user.\n * @property {number} size - The number of jobs in the result list.\n */\n\n /**\n * Returns a list of jobs started by the current logged in user.\n *\n * @param status - Filter the jobs by status. Status can be `waiting`, `inpogress`, `done` or `failed`.\n * @param limit - The maximum number of jobs that should be returned per request. Used for paging.\n * @param start - The starting index in the job list. Used for paging.\n * @param sortByDesc - Allows to specify the descending order of the result. By default, jobs are\n * sorted by creation time in ascending order.\n * @param {boolean} sortField - Allows to specify sort field.\n */\n getJobs(\n status?: string | string[],\n limit?: number,\n start?: number,\n sortByDesc?: boolean,\n sortField?: string\n ): Promise<{\n result: Job[];\n start: number;\n limit: number;\n allSize: number;\n size: number;\n }> {\n const searchParams = new URLSearchParams();\n if (start > 0) searchParams.set(\"start\", start.toString());\n if (limit > 0) searchParams.set(\"limit\", limit.toString());\n if (status) {\n status = normalizeParam(status);\n if (status) searchParams.set(\"status\", status.toLowerCase());\n }\n if (sortByDesc !== undefined) searchParams.set(\"sortBy\", sortByDesc ? \"desc\" : \"asc\");\n if (sortField) searchParams.set(\"sortField\", sortField);\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.httpClient\n .get(`/jobs${queryString}`)\n .then((response) => response.json())\n .then((jobs) => ({\n ...jobs,\n result: jobs.result.map((data) => new Job(data, this.httpClient)),\n }));\n }\n\n /**\n * Returns information about the specified job.\n *\n * @param jobId - Job ID.\n */\n getJob(jobId: string): Promise<Job> {\n return this.httpClient\n .get(`/jobs/${jobId}`)\n .then((response) => response.json())\n .then((data) => new Job(data, this.httpClient));\n }\n\n /**\n * Runs a new job on the server for the specified file.\n *\n * @param fileId - File ID.\n * @param outputFormat - The job type. Can be one of:\n *\n * - `geometry` - Convert file geometry data to `VSFX` format for opening in `VisualizeJS` 3D viewer.\n * - `geometryGltf` - Convert file geometry data to `glTF` format for opening in `Three.js` 3D viewer.\n * - `properties` - Extract file properties.\n * - `validation` - Validate the IFC file.\n * - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the specified format.\n * - Other custom job name. Custom job must be registered in the job templates before running.\n *\n * @param parameters - Parameters for the File Converter jobs or custom job. Can be given as JSON\n * object or command line arguments in form `--arg=value`.\n */\n createJob(fileId: string, outputFormat: string, parameters?: string | object): Promise<Job> {\n return this.httpClient\n .post(\"/jobs\", {\n fileId,\n outputFormat,\n parameters: parseArgs(parameters),\n })\n .then((response) => response.json())\n .then((data) => new Job(data, this.httpClient));\n }\n\n /**\n * Deletes the specified job from the server job list. Jobs that are in progress or have already been\n * completed cannot be deleted.\n *\n * @param jobId - Job ID.\n * @returns Returns the raw data of a deleted job. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.\n */\n deleteJob(jobId: string): Promise<any> {\n return this.httpClient.delete(`/jobs/${jobId}`).then((response) => response.json());\n }\n\n /**\n * Result for assembly list.\n *\n * @typedef {any} AssembliesResult\n * @property {Assembly[]} result - Result assembly list.\n * @property {number} start - The starting index in the assembly list in the request.\n * @property {number} limit - The maximum number of requested assemblies.\n * @property {number} allSize - Total number of assemblies the user has access to.\n * @property {number} size - The number of assemblies in the result list.\n */\n\n /**\n * Returns a list of assemblies created by the current logged in user.\n *\n * @param start - The starting index in the assembly list. Used for paging.\n * @param limit - The maximum number of assemblies that should be returned per request. Used for\n * paging.\n * @param name - Filter the assemblies by part of the name. Case sensitive.\n * @param ids - List of assembly IDs to return.\n * @param sortByDesc - Allows to specify the descending order of the result. By default assemblies are\n * sorted by name in ascending order.\n * @param sortField - Allows to specify sort field.\n */\n getAssemblies(\n start?: number,\n limit?: number,\n name?: string,\n ids?: string | string[],\n sortByDesc?: boolean,\n sortField?: string\n ): Promise<{\n result: Assembly[];\n start: number;\n limit: number;\n allSize: number;\n size: number;\n }> {\n const searchParams = new URLSearchParams();\n if (start > 0) searchParams.set(\"start\", start.toString());\n if (limit > 0) searchParams.set(\"limit\", limit.toString());\n if (name) searchParams.set(\"name\", name);\n if (ids) {\n ids = normalizeParam(ids);\n if (ids) searchParams.set(\"id\", ids);\n }\n if (sortByDesc !== undefined) searchParams.set(\"sortBy\", sortByDesc ? \"desc\" : \"asc\");\n if (sortField) searchParams.set(\"sortField\", sortField);\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n\n return this.httpClient\n .get(`/assemblies${queryString}`)\n .then((response) => response.json())\n .then((assemblies) => {\n return {\n ...assemblies,\n result: assemblies.result.map((data) => new Assembly(data, this.httpClient)),\n };\n });\n }\n\n /**\n * Returns information about the specified assembly.\n *\n * @param assemblyId - Assembly ID.\n */\n getAssembly(assemblyId: string): Promise<Assembly> {\n return this.httpClient\n .get(`/assemblies/${assemblyId}`)\n .then((response) => response.json())\n .then((data) => new Assembly(data, this.httpClient));\n }\n\n /**\n * Creates a new assembly on the server.\n *\n * @param files - List of file IDs.\n * @param name - Assembly name.\n * @param params - Additional assembly creating parameters.\n * @param params.jobParameters - Parameters for the File Converter jobs. Use this to specify additional\n * parameters for generating the geometry and properties of the new assembly. Can be given as JSON\n * object or command line arguments in form `--arg=value`.\n * @param params.waitForDone - Wait for assembly to be created.\n * @param params.timeout - The time, in milliseconds, that the function should wait for the assembly to\n * be created. If the assembly is not created within this time, a TimeoutError exception will be\n * thrown.\n * @param params.interval - The time, in milliseconds, the function should delay in between checking\n * assembly status.\n * @param params.signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which\n * can be used to abort waiting as desired.\n * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.\n */\n createAssembly(\n files: string[],\n name: string,\n params: {\n jobParameters?: {\n geometry?: string | object;\n properties?: string | object;\n };\n waitForDone?: boolean;\n timeout?: number;\n interval?: number;\n signal?: AbortSignal;\n onCheckout?: (assembly: Assembly, ready: boolean) => boolean;\n } = {}\n ): Promise<Assembly> {\n const jobParameters = params.jobParameters || {};\n return this.httpClient\n .post(\"/assemblies\", {\n name,\n files,\n jobParameters: {\n geometry: parseArgs(jobParameters.geometry),\n properties: parseArgs(jobParameters.properties),\n },\n })\n .then((response) => response.json())\n .then((data) => new Assembly(data, this.httpClient))\n .then((result) => (params.waitForDone ? result.waitForDone(params) : result));\n }\n\n /**\n * Deletes the specified assembly from the server.\n *\n * @param assemblyId - Assembly ID.\n * @returns Returns the raw data of a deleted assembly. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud API}.\n */\n deleteAssembly(assemblyId: string): Promise<any> {\n return this.httpClient.delete(`/assemblies/${assemblyId}`).then((response) => response.json());\n }\n\n /**\n * Result for project list.\n *\n * @typedef {any} ProjectsResult\n * @property {Project[]} result - Result project list.\n * @property {number} start - The starting index in the project list in the request.\n * @property {number} limit - The maximum number of requested projects.\n * @property {number} allSize - Total number of projects the user has access to.\n * @property {number} size - The number of projects in the result list.\n */\n\n /**\n * Returns a list of projects that the currently logged in user has created or has access to.\n *\n * @param start - The starting index in the project list. Used for paging.\n * @param limit - The maximum number of projects that should be returned per request. Used for paging.\n * @param name - Filter the projects by part of the name. Case sensitive.\n * @param ids - List of project IDs to return.\n * @param sortByDesc - Allows to specify the descending order of the result. By default projects are\n * sorted by name in ascending order.\n */\n getProjects(\n start?: number,\n limit?: number,\n name?: string,\n ids?: string | string[],\n sortByDesc?: boolean\n ): Promise<{\n result: Project[];\n start: number;\n limit: number;\n allSize: number;\n size: number;\n }> {\n const searchParams = new URLSearchParams();\n if (start > 0) searchParams.set(\"start\", start.toString());\n if (limit > 0) searchParams.set(\"limit\", limit.toString());\n if (name) searchParams.set(\"name\", name);\n if (ids) {\n ids = normalizeParam(ids);\n if (ids) searchParams.set(\"id\", ids);\n }\n if (sortByDesc !== undefined) searchParams.set(\"sortBy\", sortByDesc ? \"desc\" : \"asc\");\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n return this.httpClient\n .get(`/projects${queryString}`)\n .then((response) => response.json())\n .then((projects) => {\n // fix for server 23.5 and below\n if (Array.isArray(projects)) {\n let result = projects;\n if (ids) result = result.filter((x) => ids.includes(x.id));\n if (name) result = result.filter((x) => x.name.includes(name));\n if (limit > 0) {\n const begin = start > 0 ? start : 0;\n result = result.slice(begin, begin + limit);\n }\n return {\n allSize: projects.length,\n start,\n limit,\n result,\n size: result.length,\n };\n }\n return projects;\n })\n .then((projects) => {\n return {\n ...projects,\n result: projects.result.map((data) => new Project(data, this.httpClient)),\n };\n });\n }\n\n /**\n * Returns information about the specified project.\n *\n * @param projectId - Project ID.\n */\n getProject(projectId: string): Promise<Project> {\n return this.httpClient\n .get(`/projects/${projectId}`)\n .then((response) => response.json())\n .then((data) => new Project(data, this.httpClient));\n }\n\n /**\n * Creates a new project on the server.\n *\n * @param name - Project name.\n * @param description - Project description.\n * @param startDate - Project start date.\n * @param endDate - Project end date.\n */\n createProject(\n name: string,\n description?: string,\n startDate?: Date | string,\n endDate?: Date | string\n ): Promise<Project> {\n return this.httpClient\n .post(\"/projects\", {\n name,\n description,\n startDate: startDate instanceof Date ? startDate.toISOString() : startDate,\n endDate: endDate instanceof Date ? endDate.toISOString() : endDate,\n })\n .then((response) => response.json())\n .then((data) => new Project(data, this.httpClient));\n }\n\n /**\n * Deletes the specified project from the server.\n *\n * @param projectId - Project ID.\n * @returns Returns the raw data of a deleted project. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.\n */\n deleteProject(projectId: string): Promise<any> {\n return this.httpClient\n .delete(`/projects/${projectId}`)\n .then((response) => response.text())\n .then((text) => {\n // fix for server 23.5 and below\n try {\n return JSON.parse(text);\n } catch {\n return { id: projectId };\n }\n });\n }\n\n /**\n * Returns information about the specified file shared link.\n *\n * @param token - Shared link token.\n */\n getSharedLink(token: string): Promise<SharedLink> {\n return this.httpClient\n .get(`/shares/${token}`)\n .then((response) => response.json())\n .then((data) => new SharedLink(data, this.httpClient));\n }\n\n /**\n * Creates a shared link for the specified file.\n *\n * @param fileId - File ID.\n * @param permissions - Share permissions.\n */\n createSharedLink(fileId: string, permissions?: ISharedLinkPermissions): Promise<SharedLink> {\n return this.httpClient\n .post(\"/shares\", {\n fileId,\n permissions,\n })\n .then((response) => response.json())\n .then((data) => new SharedLink(data, this.httpClient));\n }\n\n /**\n * Deletes the specified shared link.\n *\n * Only file owner can delete shared link. If the current logged in user is not a file owner, an\n * exception will be thrown.\n *\n * @param token - Shared link token.\n * @returns Returns the raw data of a deleted shared link. For more information, see\n * {@link https://cloud.opendesign.com/docs//pages/server/api.html#ShareLinks | Open Cloud SharedLinks API}.\n */\n deleteSharedLink(token: string): Promise<any> {\n return this.httpClient.delete(`/shares/${token}`).then((response) => response.json());\n }\n\n /**\n * Returns information about a file from a shared link.\n *\n * Some file features are not available via shared link:\n *\n * - Updating file properties, preview, and viewpoints\n * - Running file jobs\n * - Managing file permissions\n * - Managing file versions\n * - Deleting file\n *\n * @param token - Shared link token.\n * @param password - Password to get access to the file.\n */\n getSharedFile(token: string, password?: string): Promise<File> {\n return this.httpClient\n .get(`/shares/${token}/info`, { headers: { \"InWeb-Password\": password } })\n .then((response) => response.json())\n .then((data) => new SharedFile(data, password, this.httpClient));\n }\n\n /**\n * Returns the list of installed plugins.\n *\n * Only administrators can get a list of plugins. If the current logged in user is not an\n * administrator, an exception will be thrown.\n */\n getPlugins(): Promise<Plugin[]> {\n return this.httpClient\n .get(\"/plugins\")\n .then((response) => response.json())\n .then((array) => array.map((data) => new Plugin(data, this.httpClient)));\n }\n\n /**\n * Returns information about the specified plugin.\n *\n * Only administrators can get plugins. If the current logged in user is not an administrator, they can\n * only get themselves, otherwise an exception will be thrown.\n *\n * @param name - Plugin name.\n * @param version - Plugin version.\n */\n getPlugin(name: string, version: string): Promise<Plugin> {\n return this.httpClient\n .get(`/plugins/${name}/${version}`)\n .then((response) => response.json())\n .then((data) => new Plugin(data, this.httpClient));\n }\n\n /**\n * Uploads and install a plugin package to the server. The package must be a ZIP file and undergoes\n * verification, scanning, and health checks during installation.\n *\n * Only administrators can upload plugins. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object are\n * generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}\n * object returned as a result of a user selecting files using the HTML `<input>` element.\n * @param onProgress - Upload progress callback.\n */\n async uploadPlugin(\n file: globalThis.File,\n onProgress?: (progress: number, file: globalThis.File) => void\n ): Promise<Plugin> {\n return await this.httpClient\n .uploadFile(\"/plugins\", file, (progress) => {\n this.emitEvent({ type: \"uploadprogress\", data: progress, file });\n if (onProgress) onProgress(progress, file);\n })\n .then((xhr: XMLHttpRequest) => JSON.parse(xhr.responseText))\n .then((data) => new Plugin(data, this.httpClient));\n }\n\n /**\n * Uninstalls and deletes the specified plugin from the server.\n *\n * Only administrators can delete plugins. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * @param name - Plugin name.\n * @param version - Plugin version.\n */\n deletePlugin(name: string, version: string): Promise<Plugin> {\n return this.httpClient.delete(`/plugins/${name}/${version}`).then((response) => response.json());\n }\n\n /**\n * Downloads the specified plugin package from the server.\n *\n * Only administrators can download plugins. If the current logged in user is not an administrator, an\n * exception will be thrown.\n *\n * @param name - Plugin name.\n * @param version - Plugin version.\n * @param onProgress - Download progress callback.\n * @param signal - An\n * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows\n * to communicate with a fetch request and abort it if desired.\n */\n downloadPlugin(\n name: string,\n version: string,\n onProgress?: (progress: number) => void,\n signal?: AbortSignal\n ): Promise<ArrayBuffer> {\n return this.httpClient\n .downloadFile(`/plugins/${name}/${version}/download`, onProgress, { signal })\n .then((response) => response.arrayBuffer());\n }\n\n /**\n * Executes a plugin command.\n *\n * If you have multiple versions of a plugin installed and want to run the command for the latest\n * version of the plugin, specify `undefined` or empty string for the `version` parameter.\n *\n * @param name - Plugin name.\n * @param version - Plugin version. Specify `undefined` or empty string to run the command for the\n * latest version of the plugin.\n * @param command - Command to execute.\n * @param parameters - Command parameters. Command-dependent.\n */\n executePluginCommand(name: string, version: string, command: string, parameters?: BodyInit | object): Promise<any> {\n const searchParams = new URLSearchParams();\n if (version) searchParams.set(\"version\", version);\n\n let queryString = searchParams.toString();\n if (queryString) queryString = \"?\" + queryString;\n return this.httpClient\n .post(`/plugins/${name}/commands/${command}${queryString}`, parameters)\n .then((response) => response.json());\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nexport { Assembly } from \"./Api/Assembly\";\nexport { Client } from \"./Api/Client\";\nexport { ClashTest } from \"./Api/ClashTest\";\nexport * from \"./Api/ClientEvents\";\nexport { File } from \"./Api/File\";\nexport { FetchError, statusText } from \"./Api/FetchError\";\nexport { Job } from \"./Api/Job\";\nexport { IHttpClient } from \"./Api/IHttpClient\";\nexport { IAssociatedFileData, IClashItem, IModelTransformMatrix } from \"./Api/IAssembly\";\nexport * from \"./Api/IFile\";\nexport { IRoleActions } from \"./Api/IRole\";\nexport * from \"./Api/ISharedLink\";\nexport { IShortUserDesc } from \"./Api/IUser\";\nexport { Member } from \"./Api/Member\";\nexport { Model } from \"./Api/Model\";\nexport { OAuthClient } from \"./Api/OAuthClient\";\nexport { Permission } from \"./Api/Permission\";\nexport { Project } from \"./Api/Project\";\nexport * from \"./Api/Endpoint\";\nexport { Role } from \"./Api/Role\";\nexport * from \"./Api/Plugin\";\nexport * from \"./Api/SharedLink\";\nexport * from \"./Api/SharedFile\";\nexport { User } from \"./Api/User\";\nexport * from \"./Api/Utils\";\n\nexport const version = \"CLIENT_JS_VERSION\";\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;MA4Ba,QAAQ,CAAA;AAsBnB,IAAA,WAAA,CAAY,IAAY,EAAE,UAAuB,EAAE,OAAO,GAAG,EAAE,EAAA;AAC7D,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU;AAC5B,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;IACxB;AAIA,IAAA,kBAAkB,CAAC,YAAoB,EAAA;AACrC,QAAA,I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