@inweb/client 25.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +70 -0
- package/dist/client.js +21126 -0
- package/dist/client.js.map +1 -0
- package/dist/client.min.js +1 -0
- package/dist/client.module.js +7151 -0
- package/dist/client.module.js.map +1 -0
- package/lib/Api/Assembly.d.ts +339 -0
- package/lib/Api/ClashTest.d.ts +176 -0
- package/lib/Api/Client.d.ts +452 -0
- package/lib/Api/ClientEvents.d.ts +29 -0
- package/lib/Api/File.d.ts +568 -0
- package/lib/Api/HttpClient.d.ts +13 -0
- package/lib/Api/IAssembly.d.ts +14 -0
- package/lib/Api/IFile.d.ts +46 -0
- package/lib/Api/IHttpClient.d.ts +11 -0
- package/lib/Api/IUser.d.ts +11 -0
- package/lib/Api/Job.d.ts +142 -0
- package/lib/Api/Member.d.ts +85 -0
- package/lib/Api/Model.d.ts +147 -0
- package/lib/Api/Permission.d.ts +93 -0
- package/lib/Api/Project.d.ts +247 -0
- package/lib/Api/Role.d.ts +82 -0
- package/lib/Api/User.d.ts +197 -0
- package/lib/Api/impl/FetchError.d.ts +18 -0
- package/lib/Api/impl/Utils.d.ts +33 -0
- package/lib/Api/impl/http.d.ts +67 -0
- package/lib/ConvetMath.d.ts +29 -0
- package/lib/Viewer/CanvasEvents.d.ts +2 -0
- package/lib/Viewer/Commands/ApplyModelTransform.d.ts +2 -0
- package/lib/Viewer/Commands/ClearMarkup.d.ts +2 -0
- package/lib/Viewer/Commands/ClearSlices.d.ts +2 -0
- package/lib/Viewer/Commands/CreatePreview.d.ts +2 -0
- package/lib/Viewer/Commands/Explode.d.ts +2 -0
- package/lib/Viewer/Commands/GetDefaultViewPositions.d.ts +2 -0
- package/lib/Viewer/Commands/GetModels.d.ts +2 -0
- package/lib/Viewer/Commands/GetSelected.d.ts +2 -0
- package/lib/Viewer/Commands/HideSelected.d.ts +2 -0
- package/lib/Viewer/Commands/IsolateSelected.d.ts +2 -0
- package/lib/Viewer/Commands/RegenerateAll.d.ts +2 -0
- package/lib/Viewer/Commands/ResetView.d.ts +2 -0
- package/lib/Viewer/Commands/SelectModel.d.ts +2 -0
- package/lib/Viewer/Commands/SetActiveDragger.d.ts +2 -0
- package/lib/Viewer/Commands/SetDefaultViewPosition.d.ts +2 -0
- package/lib/Viewer/Commands/SetMarkupColor.d.ts +2 -0
- package/lib/Viewer/Commands/SetSelected.d.ts +2 -0
- package/lib/Viewer/Commands/ShowAll.d.ts +2 -0
- package/lib/Viewer/Commands/Unselect.d.ts +2 -0
- package/lib/Viewer/Commands/ZoomToExtents.d.ts +2 -0
- package/lib/Viewer/Commands/ZoomToObjects.d.ts +2 -0
- package/lib/Viewer/Commands/ZoomToSelected.d.ts +2 -0
- package/lib/Viewer/Commands.d.ts +3 -0
- package/lib/Viewer/Draggers/Actions/OrbitAction.d.ts +22 -0
- package/lib/Viewer/Draggers/Actions/PanAction.d.ts +18 -0
- package/lib/Viewer/Draggers/Actions/ZoomAction.d.ts +8 -0
- package/lib/Viewer/Draggers/Common/Geometry.d.ts +115 -0
- package/lib/Viewer/Draggers/Common/GestureManager.d.ts +41 -0
- package/lib/Viewer/Draggers/Common/OdBaseDragger.d.ts +54 -0
- package/lib/Viewer/Draggers/Common/OdaGeAction.d.ts +30 -0
- package/lib/Viewer/Draggers/MeasureLineDragger/MeasureLineItem.d.ts +31 -0
- package/lib/Viewer/Draggers/MeasureLineDragger/MeasureUtils.d.ts +20 -0
- package/lib/Viewer/Draggers/MeasureLineDragger/index.d.ts +24 -0
- package/lib/Viewer/Draggers/OdBaseCuttingPlaneDragger.d.ts +27 -0
- package/lib/Viewer/Draggers/OdCuttingPlaneXAxisDragger.d.ts +8 -0
- package/lib/Viewer/Draggers/OdCuttingPlaneYAxisDragger.d.ts +8 -0
- package/lib/Viewer/Draggers/OdCuttingPlaneZAxisDragger.d.ts +8 -0
- package/lib/Viewer/Draggers/OdOrbitDragger.d.ts +15 -0
- package/lib/Viewer/Draggers/OdPanDragger.d.ts +12 -0
- package/lib/Viewer/Draggers/OdZoomDragger.d.ts +12 -0
- package/lib/Viewer/Draggers/OdZoomWheelDragger.d.ts +11 -0
- package/lib/Viewer/Draggers/OdZoomWindowDragger/OdSelectionFrame.d.ts +19 -0
- package/lib/Viewer/Draggers/OdZoomWindowDragger/index.d.ts +14 -0
- package/lib/Viewer/Draggers/OdaLineDragger.d.ts +15 -0
- package/lib/Viewer/Draggers/OdaTextDragger.d.ts +16 -0
- package/lib/Viewer/Draggers/OdaWalkDragger.d.ts +30 -0
- package/lib/Viewer/Draggers/OrbitAroundBuildingDragger.d.ts +19 -0
- package/lib/Viewer/EventEmitter2.d.ts +54 -0
- package/lib/Viewer/ICommands.d.ts +25 -0
- package/lib/Viewer/IEventEmitter2.d.ts +13 -0
- package/lib/Viewer/IViewer.d.ts +27 -0
- package/lib/Viewer/Loaders/BaseLoader.d.ts +11 -0
- package/lib/Viewer/Loaders/LoaderFactory.d.ts +10 -0
- package/lib/Viewer/Loaders/TCSLoader.d.ts +5 -0
- package/lib/Viewer/Loaders/UpdaterController.d.ts +15 -0
- package/lib/Viewer/Loaders/VsfXLoader.d.ts +5 -0
- package/lib/Viewer/Loaders/VsfXPartialLoader.d.ts +5 -0
- package/lib/Viewer/Markup/Api/IMarkupArrow.d.ts +12 -0
- package/lib/Viewer/Markup/Api/IMarkupColorable.d.ts +5 -0
- package/lib/Viewer/Markup/Api/IMarkupEllipse.d.ts +15 -0
- package/lib/Viewer/Markup/Api/IMarkupImage.d.ts +15 -0
- package/lib/Viewer/Markup/Api/IMarkupLine.d.ts +11 -0
- package/lib/Viewer/Markup/Api/IMarkupObject.d.ts +12 -0
- package/lib/Viewer/Markup/Api/IMarkupRectangle.d.ts +15 -0
- package/lib/Viewer/Markup/Api/IMarkupText.d.ts +13 -0
- package/lib/Viewer/Markup/Api/Impl/Konva/KonvaArrow.d.ts +32 -0
- package/lib/Viewer/Markup/Api/Impl/Konva/KonvaEllipse.d.ts +40 -0
- package/lib/Viewer/Markup/Api/Impl/Konva/KonvaImage.d.ts +36 -0
- package/lib/Viewer/Markup/Api/Impl/Konva/KonvaLine.d.ts +32 -0
- package/lib/Viewer/Markup/Api/Impl/Konva/KonvaRectangle.d.ts +38 -0
- package/lib/Viewer/Markup/Api/Impl/Konva/KonvaText.d.ts +37 -0
- package/lib/Viewer/Markup/IMarkup.d.ts +38 -0
- package/lib/Viewer/Markup/Impl/Konva/KonvaMarkup.d.ts +63 -0
- package/lib/Viewer/Markup/Impl/Konva/MarkupColor.d.ts +19 -0
- package/lib/Viewer/Markup/Impl/Visualize/VisualizeMarkup.d.ts +33 -0
- package/lib/Viewer/Markup/MarkupFactory.d.ts +7 -0
- package/lib/Viewer/Options.d.ts +228 -0
- package/lib/Viewer/OptionsEvents.d.ts +26 -0
- package/lib/Viewer/Viewer.d.ts +353 -0
- package/lib/Viewer/ViewerCommands.d.ts +23 -0
- package/lib/Viewer/ViewerEvents.d.ts +601 -0
- package/lib/Viewer/utils.d.ts +4 -0
- package/lib/index.d.ts +24 -0
- package/package.json +32 -0
- package/src/Api/Assembly.ts +678 -0
- package/src/Api/ClashTest.ts +290 -0
- package/src/Api/Client.ts +816 -0
- package/src/Api/ClientEvents.ts +31 -0
- package/src/Api/File.ts +962 -0
- package/src/Api/HttpClient.ts +73 -0
- package/src/Api/IAssembly.ts +37 -0
- package/src/Api/IFile.ts +74 -0
- package/src/Api/IHttpClient.ts +50 -0
- package/src/Api/IUser.ts +33 -0
- package/src/Api/Job.ts +253 -0
- package/src/Api/Member.ts +161 -0
- package/src/Api/Model.ts +259 -0
- package/src/Api/Permission.ts +173 -0
- package/src/Api/Project.ts +479 -0
- package/src/Api/Role.ts +158 -0
- package/src/Api/User.ts +357 -0
- package/src/Api/impl/FetchError.ts +48 -0
- package/src/Api/impl/Utils.ts +367 -0
- package/src/Api/impl/http.ts +92 -0
- package/src/ConvetMath.ts +372 -0
- package/src/Viewer/CanvasEvents.ts +41 -0
- package/src/Viewer/Commands/ApplyModelTransform.ts +70 -0
- package/src/Viewer/Commands/ClearMarkup.ts +28 -0
- package/src/Viewer/Commands/ClearSlices.ts +27 -0
- package/src/Viewer/Commands/CreatePreview.ts +33 -0
- package/src/Viewer/Commands/Explode.ts +38 -0
- package/src/Viewer/Commands/GetDefaultViewPositions.ts +36 -0
- package/src/Viewer/Commands/GetModels.ts +43 -0
- package/src/Viewer/Commands/GetSelected.ts +58 -0
- package/src/Viewer/Commands/HideSelected.ts +37 -0
- package/src/Viewer/Commands/IsolateSelected.ts +37 -0
- package/src/Viewer/Commands/RegenerateAll.ts +37 -0
- package/src/Viewer/Commands/ResetView.ts +43 -0
- package/src/Viewer/Commands/SelectModel.ts +52 -0
- package/src/Viewer/Commands/SetActiveDragger.ts +29 -0
- package/src/Viewer/Commands/SetDefaultViewPosition.ts +50 -0
- package/src/Viewer/Commands/SetMarkupColor.ts +29 -0
- package/src/Viewer/Commands/SetSelected.ts +47 -0
- package/src/Viewer/Commands/ShowAll.ts +37 -0
- package/src/Viewer/Commands/Unselect.ts +37 -0
- package/src/Viewer/Commands/ZoomToExtents.ts +43 -0
- package/src/Viewer/Commands/ZoomToObjects.ts +47 -0
- package/src/Viewer/Commands/ZoomToSelected.ts +39 -0
- package/src/Viewer/Commands.ts +81 -0
- package/src/Viewer/Draggers/Actions/OrbitAction.ts +250 -0
- package/src/Viewer/Draggers/Actions/PanAction.ts +102 -0
- package/src/Viewer/Draggers/Actions/ZoomAction.ts +45 -0
- package/src/Viewer/Draggers/Common/Geometry.ts +152 -0
- package/src/Viewer/Draggers/Common/GestureManager.ts +263 -0
- package/src/Viewer/Draggers/Common/OdBaseDragger.ts +270 -0
- package/src/Viewer/Draggers/Common/OdaGeAction.ts +146 -0
- package/src/Viewer/Draggers/MeasureLineDragger/MeasureLineItem.ts +248 -0
- package/src/Viewer/Draggers/MeasureLineDragger/MeasureUtils.ts +182 -0
- package/src/Viewer/Draggers/MeasureLineDragger/index.ts +166 -0
- package/src/Viewer/Draggers/OdBaseCuttingPlaneDragger.ts +182 -0
- package/src/Viewer/Draggers/OdCuttingPlaneXAxisDragger.ts +53 -0
- package/src/Viewer/Draggers/OdCuttingPlaneYAxisDragger.ts +53 -0
- package/src/Viewer/Draggers/OdCuttingPlaneZAxisDragger.ts +53 -0
- package/src/Viewer/Draggers/OdOrbitDragger.ts +70 -0
- package/src/Viewer/Draggers/OdPanDragger.ts +62 -0
- package/src/Viewer/Draggers/OdZoomDragger.ts +59 -0
- package/src/Viewer/Draggers/OdZoomWheelDragger.ts +103 -0
- package/src/Viewer/Draggers/OdZoomWindowDragger/OdSelectionFrame.ts +123 -0
- package/src/Viewer/Draggers/OdZoomWindowDragger/index.ts +75 -0
- package/src/Viewer/Draggers/OdaLineDragger.ts +80 -0
- package/src/Viewer/Draggers/OdaTextDragger.ts +118 -0
- package/src/Viewer/Draggers/OdaWalkDragger.ts +278 -0
- package/src/Viewer/Draggers/OrbitAroundBuildingDragger.ts +184 -0
- package/src/Viewer/EventEmitter2.ts +116 -0
- package/src/Viewer/ICommands.ts +53 -0
- package/src/Viewer/IEventEmitter2.ts +36 -0
- package/src/Viewer/IViewer.ts +55 -0
- package/src/Viewer/Loaders/BaseLoader.ts +40 -0
- package/src/Viewer/Loaders/LoaderFactory.ts +44 -0
- package/src/Viewer/Loaders/TCSLoader.ts +82 -0
- package/src/Viewer/Loaders/UpdaterController.ts +36 -0
- package/src/Viewer/Loaders/VsfXLoader.ts +87 -0
- package/src/Viewer/Loaders/VsfXPartialLoader.ts +208 -0
- package/src/Viewer/Markup/Api/IMarkupArrow.ts +15 -0
- package/src/Viewer/Markup/Api/IMarkupColorable.ts +4 -0
- package/src/Viewer/Markup/Api/IMarkupEllipse.ts +15 -0
- package/src/Viewer/Markup/Api/IMarkupImage.ts +15 -0
- package/src/Viewer/Markup/Api/IMarkupLine.ts +10 -0
- package/src/Viewer/Markup/Api/IMarkupObject.ts +15 -0
- package/src/Viewer/Markup/Api/IMarkupRectangle.ts +15 -0
- package/src/Viewer/Markup/Api/IMarkupText.ts +12 -0
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaArrow.ts +119 -0
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaEllipse.ts +113 -0
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaImage.ts +121 -0
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaLine.ts +99 -0
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaRectangle.ts +113 -0
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaText.ts +104 -0
- package/src/Viewer/Markup/IMarkup.ts +39 -0
- package/src/Viewer/Markup/Impl/Konva/KonvaMarkup.ts +872 -0
- package/src/Viewer/Markup/Impl/Konva/MarkupColor.ts +39 -0
- package/src/Viewer/Markup/Impl/Visualize/VisualizeMarkup.ts +273 -0
- package/src/Viewer/Markup/MarkupFactory.ts +32 -0
- package/src/Viewer/Options.ts +502 -0
- package/src/Viewer/OptionsEvents.ts +28 -0
- package/src/Viewer/Viewer.ts +1109 -0
- package/src/Viewer/ViewerCommands.ts +45 -0
- package/src/Viewer/ViewerEvents.ts +700 -0
- package/src/Viewer/utils.ts +74 -0
- package/src/index.ts +48 -0
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
import { IHttpClient } from "./IHttpClient";
|
|
2
|
+
import { IFileStatus, IFileReferences, IFileVersionInfo } from "./IFile";
|
|
3
|
+
import { IShortUserDescription } from "./IUser";
|
|
4
|
+
import { Model } from "./Model";
|
|
5
|
+
import { Permission } from "./Permission";
|
|
6
|
+
import { Job } from "./Job";
|
|
7
|
+
/**
|
|
8
|
+
* The class representing a `file` entity.
|
|
9
|
+
*/
|
|
10
|
+
export declare class File {
|
|
11
|
+
private _data;
|
|
12
|
+
private _useVersion;
|
|
13
|
+
httpClient: IHttpClient;
|
|
14
|
+
path: string;
|
|
15
|
+
/**
|
|
16
|
+
* @param data - An object that implements file data storage.
|
|
17
|
+
* @param httpClient - Http client for API.
|
|
18
|
+
*/
|
|
19
|
+
constructor(data: any, httpClient: IHttpClient);
|
|
20
|
+
private appendVersionParam;
|
|
21
|
+
private internalGet;
|
|
22
|
+
private internalPost;
|
|
23
|
+
private internalPut;
|
|
24
|
+
private internalDelete;
|
|
25
|
+
partialDownloadResource(dataId: string, onProgress?: (progress: number, downloaded: Uint8Array) => void, signal?: AbortSignal): Promise<void>;
|
|
26
|
+
downloadFileRange(requestId: number, records: any | null, dataId: string, onProgress?: (progress: number, downloaded: Uint8Array, requestId: number) => void, signal?: AbortSignal): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Active version number of the file.
|
|
29
|
+
*
|
|
30
|
+
* @readonly
|
|
31
|
+
*/
|
|
32
|
+
get activeVersion(): number;
|
|
33
|
+
/**
|
|
34
|
+
* File creation time (UTC) in the format specified in <a
|
|
35
|
+
* href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
|
|
36
|
+
*
|
|
37
|
+
* @readonly
|
|
38
|
+
*/
|
|
39
|
+
get created(): string;
|
|
40
|
+
/**
|
|
41
|
+
* File custom fields object, to store custom data.
|
|
42
|
+
*
|
|
43
|
+
* @readonly
|
|
44
|
+
*/
|
|
45
|
+
get customFields(): any;
|
|
46
|
+
set customFields(value: any);
|
|
47
|
+
/**
|
|
48
|
+
* Raw file data received from the server.
|
|
49
|
+
*
|
|
50
|
+
* @readonly
|
|
51
|
+
*/
|
|
52
|
+
get data(): any;
|
|
53
|
+
private set data(value);
|
|
54
|
+
/**
|
|
55
|
+
* Returns a list of formats in which the active version of the file was exported. To export
|
|
56
|
+
* file to one of the supported formats create File Converter job using
|
|
57
|
+
* {@link File.createJob()}. To download exported file use {@link File.downloadResource()}.
|
|
58
|
+
*
|
|
59
|
+
* @readonly
|
|
60
|
+
*/
|
|
61
|
+
get exports(): string[];
|
|
62
|
+
/**
|
|
63
|
+
* Geometry data type of the active file version. Can be one of:
|
|
64
|
+
*
|
|
65
|
+
* - `vsfx` - `VSFX`, file can be opened in `VisualizeJS` viewer.
|
|
66
|
+
* - `gltf` - `glTF`, file can be opened in `Three.js` viewer.
|
|
67
|
+
*
|
|
68
|
+
* Returns an empty string if geometry data has not yet been extracted. A files without
|
|
69
|
+
* geometry data can be exported to other formas, but cannot be opened in viewer.
|
|
70
|
+
*/
|
|
71
|
+
get geometryType(): string;
|
|
72
|
+
/**
|
|
73
|
+
* Unique file ID.
|
|
74
|
+
*
|
|
75
|
+
* @readonly
|
|
76
|
+
*/
|
|
77
|
+
get id(): string;
|
|
78
|
+
/**
|
|
79
|
+
* File name, including the extension.
|
|
80
|
+
*/
|
|
81
|
+
get name(): string;
|
|
82
|
+
set name(value: string);
|
|
83
|
+
/**
|
|
84
|
+
* If the file is a version, then returns the ID of the original file. Otherwise, returns the file ID.
|
|
85
|
+
*
|
|
86
|
+
* @readonly
|
|
87
|
+
*/
|
|
88
|
+
get originalFileId(): string;
|
|
89
|
+
/**
|
|
90
|
+
* File owner information.
|
|
91
|
+
*
|
|
92
|
+
* @property {string} userId - User ID.
|
|
93
|
+
* @property {string} userName - User name.
|
|
94
|
+
* @property {string} name - First name.
|
|
95
|
+
* @property {string} lastName - Last name.
|
|
96
|
+
* @property {string} fullName - Full name.
|
|
97
|
+
* @property {string} initials - Initials.
|
|
98
|
+
* @property {string} email - User email.
|
|
99
|
+
* @property {string} avatarUrl - User avatar image URL.
|
|
100
|
+
* @readonly
|
|
101
|
+
*/
|
|
102
|
+
get owner(): IShortUserDescription;
|
|
103
|
+
/**
|
|
104
|
+
* File preview image URL. Use {@link File#setPreview | setPreview()} to change preview image.
|
|
105
|
+
*
|
|
106
|
+
* @readonly
|
|
107
|
+
*/
|
|
108
|
+
get previewUrl(): string;
|
|
109
|
+
/**
|
|
110
|
+
* The size of the active version of the file in bytes.
|
|
111
|
+
*
|
|
112
|
+
* @readonly
|
|
113
|
+
*/
|
|
114
|
+
get size(): number;
|
|
115
|
+
/**
|
|
116
|
+
* Total size of all versions of the file in the storage in bytes.
|
|
117
|
+
*
|
|
118
|
+
* @readonly
|
|
119
|
+
*/
|
|
120
|
+
get sizeTotal(): number;
|
|
121
|
+
/**
|
|
122
|
+
* Data status of the active version of the file. Contains:
|
|
123
|
+
*
|
|
124
|
+
* - `geometry` - status of geometry data of `VSFX` type.
|
|
125
|
+
* - `geometryGltf` - status of geometry data of `glTF` type.
|
|
126
|
+
* - `properties` - status of properties.
|
|
127
|
+
* - `validation` - status of validation.
|
|
128
|
+
*
|
|
129
|
+
* Each status entity is a record with properties:
|
|
130
|
+
*
|
|
131
|
+
* - `state` - Data state. Can be `none`, `waiting`, `inprogress`, `done` or `failed`.
|
|
132
|
+
* - `jobId` - Unique ID of the data job.
|
|
133
|
+
*
|
|
134
|
+
* @readonly
|
|
135
|
+
*/
|
|
136
|
+
get status(): IFileStatus;
|
|
137
|
+
/**
|
|
138
|
+
* File type, matches the file extension.
|
|
139
|
+
*
|
|
140
|
+
* @readonly
|
|
141
|
+
*/
|
|
142
|
+
get type(): string;
|
|
143
|
+
/**
|
|
144
|
+
* File last update time (UTC) in the format specified in <a
|
|
145
|
+
* href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
|
|
146
|
+
*
|
|
147
|
+
* @readonly
|
|
148
|
+
*/
|
|
149
|
+
get updatedAt(): string;
|
|
150
|
+
/**
|
|
151
|
+
* Information about the user who made the last update.
|
|
152
|
+
*
|
|
153
|
+
* @property {string} userId - User ID.
|
|
154
|
+
* @property {string} userName - User name.
|
|
155
|
+
* @property {string} name - First name.
|
|
156
|
+
* @property {string} lastName - Last name.
|
|
157
|
+
* @property {string} fullName - Full name.
|
|
158
|
+
* @property {string} initials - Initials.
|
|
159
|
+
* @property {string} email - User email.
|
|
160
|
+
* @property {string} avatarUrl - User avatar image URL.
|
|
161
|
+
* @readonly
|
|
162
|
+
*/
|
|
163
|
+
get updatedBy(): IShortUserDescription;
|
|
164
|
+
/**
|
|
165
|
+
* Zero-based file version number for version files. The original file has version `0`.
|
|
166
|
+
*/
|
|
167
|
+
get version(): number;
|
|
168
|
+
/**
|
|
169
|
+
* List of the file versions.
|
|
170
|
+
*
|
|
171
|
+
* @readonly
|
|
172
|
+
*/
|
|
173
|
+
get versions(): IFileVersionInfo[];
|
|
174
|
+
/**
|
|
175
|
+
* Refresh file data.
|
|
176
|
+
*
|
|
177
|
+
* @async
|
|
178
|
+
*/
|
|
179
|
+
checkout(): Promise<File>;
|
|
180
|
+
/**
|
|
181
|
+
* Update file data on the server.
|
|
182
|
+
*
|
|
183
|
+
* @async
|
|
184
|
+
* @param data - Raw file data.
|
|
185
|
+
*/
|
|
186
|
+
update(data: any): Promise<File>;
|
|
187
|
+
/**
|
|
188
|
+
* Delete the file and all its versions from the server.
|
|
189
|
+
*
|
|
190
|
+
* @async
|
|
191
|
+
* @returns Returns the raw data of a deleted file.
|
|
192
|
+
*/
|
|
193
|
+
delete(): Promise<any>;
|
|
194
|
+
/**
|
|
195
|
+
* Save file data changes to the server. Call this method to update file data on the server
|
|
196
|
+
* after any changes.
|
|
197
|
+
*
|
|
198
|
+
* @async
|
|
199
|
+
*/
|
|
200
|
+
save(): Promise<File>;
|
|
201
|
+
/**
|
|
202
|
+
* Set or remove the file preview.
|
|
203
|
+
*
|
|
204
|
+
* @async
|
|
205
|
+
* @param image - Preview image. Can be a <a
|
|
206
|
+
* href="https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs"
|
|
207
|
+
* target="_blank">Data URL</a> string, <a
|
|
208
|
+
* href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer"
|
|
209
|
+
* target="_blank">ArrayBuffer</a>, <a
|
|
210
|
+
* href="https://developer.mozilla.org/docs/Web/API/Blob/Blob" target="_blank">Blob</a> or
|
|
211
|
+
* Web API <a href="https://developer.mozilla.org/docs/Web/API/File"
|
|
212
|
+
* target="_blank">File</a> object. Setting the `image` to `null` will remove the preview.
|
|
213
|
+
*/
|
|
214
|
+
setPreview(image?: ArrayBuffer | Blob | globalThis.File | FormData | string | null): Promise<File>;
|
|
215
|
+
/**
|
|
216
|
+
* Returns a list of models of the active version of the file.
|
|
217
|
+
*
|
|
218
|
+
* @async
|
|
219
|
+
*/
|
|
220
|
+
getModels(): Promise<Model[]>;
|
|
221
|
+
getModelTransformMatrix(handle: string): any;
|
|
222
|
+
setModelTransformMatrix(handle: string, transform: any): Promise<File>;
|
|
223
|
+
/**
|
|
224
|
+
* Object properties.
|
|
225
|
+
*
|
|
226
|
+
* @typedef {any} Properties
|
|
227
|
+
* @property {string} handle - Object original handle.
|
|
228
|
+
* @property {string | any} * - Object property. Can be `any` for nested properties.
|
|
229
|
+
*/
|
|
230
|
+
/**
|
|
231
|
+
* Returns the properties for an objects in the active version of the file.
|
|
232
|
+
*
|
|
233
|
+
* @async
|
|
234
|
+
* @param handles - Object original handle or handles array. Leave this parameter `undefined`
|
|
235
|
+
* to get properties for all objects in the file.
|
|
236
|
+
*/
|
|
237
|
+
getProperties(handles?: string | string[]): Promise<any[]>;
|
|
238
|
+
/**
|
|
239
|
+
* Search pattern.
|
|
240
|
+
*
|
|
241
|
+
* @typedef {any} SearchPattern
|
|
242
|
+
* @property {string} key - Property name.
|
|
243
|
+
* @property {string} value - Property value.
|
|
244
|
+
*/
|
|
245
|
+
/**
|
|
246
|
+
* Query operator. Operator name can be `$and`, `$or`, `$not`, `$eq`, `$regex`.
|
|
247
|
+
*
|
|
248
|
+
* @typedef {any} QueryOperator
|
|
249
|
+
* @property {string | SearchPattern[] | QueryOperator[]} * - Array of the query values or
|
|
250
|
+
* patterns for operator.
|
|
251
|
+
*/
|
|
252
|
+
/**
|
|
253
|
+
* Returns the list of original handles for an objects in the active version of the file that
|
|
254
|
+
* match the specified patterns. Search patterns may be combined using query operators.
|
|
255
|
+
*
|
|
256
|
+
* @async
|
|
257
|
+
* @example <caption>Simple search pattern.</caption>
|
|
258
|
+
* searchPattern = {
|
|
259
|
+
* key: "Category",
|
|
260
|
+
* value: "OST_Stairs",
|
|
261
|
+
* };
|
|
262
|
+
*
|
|
263
|
+
* @example <caption>Search patterns combination.</caption>
|
|
264
|
+
* searchPattern = {
|
|
265
|
+
* $or: [
|
|
266
|
+
* {
|
|
267
|
+
* $and: [
|
|
268
|
+
* { key: "Category", value: "OST_GenericModel" },
|
|
269
|
+
* { key: "Level", value: "03 - Floor" },
|
|
270
|
+
* ],
|
|
271
|
+
* },
|
|
272
|
+
* { key: "Category", value: "OST_Stairs" },
|
|
273
|
+
* ],
|
|
274
|
+
* };
|
|
275
|
+
*
|
|
276
|
+
* @param {SearchPattern | QueryOperator} searchPattern - Search pattern or combination of
|
|
277
|
+
* the patterns, see example below.
|
|
278
|
+
* @returns {Promise<Properties[]>}
|
|
279
|
+
*/
|
|
280
|
+
searchProperties(searchPattern: any): Promise<any[]>;
|
|
281
|
+
/**
|
|
282
|
+
* Returns the cda.json for an active version of the file.
|
|
283
|
+
*
|
|
284
|
+
* @async
|
|
285
|
+
*/
|
|
286
|
+
getCdaTree(): Promise<any[]>;
|
|
287
|
+
/**
|
|
288
|
+
* Returns a list of file viewpoints.
|
|
289
|
+
*
|
|
290
|
+
* @async
|
|
291
|
+
*/
|
|
292
|
+
getViewpoints(): Promise<any[]>;
|
|
293
|
+
/**
|
|
294
|
+
* Add new file viewpoint. To create a new viewpoint use
|
|
295
|
+
* {@link Viewer#createViewpoint | Viewer.createViewpoint()}.
|
|
296
|
+
*
|
|
297
|
+
* @async
|
|
298
|
+
* @param viewpoint - Viewpoint.
|
|
299
|
+
*/
|
|
300
|
+
saveViewpoint(viewpoint: any): Promise<any>;
|
|
301
|
+
/**
|
|
302
|
+
* Delete file viewpoint.
|
|
303
|
+
*
|
|
304
|
+
* @async
|
|
305
|
+
* @param guid - Viewpoint GUID.
|
|
306
|
+
* @returns Returns the raw data of a deleted viewpoint.
|
|
307
|
+
*/
|
|
308
|
+
deleteViewpoint(guid: string): Promise<any>;
|
|
309
|
+
/**
|
|
310
|
+
* Returns viewpoint preview image as <a
|
|
311
|
+
* href="https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs"
|
|
312
|
+
* target="_blank">Data URL</a>.
|
|
313
|
+
*
|
|
314
|
+
* @async
|
|
315
|
+
* @param guid - Viewpoint GUID.
|
|
316
|
+
*/
|
|
317
|
+
getSnapshot(guid: string): Promise<string>;
|
|
318
|
+
/**
|
|
319
|
+
* Returns viewpoint preview data.
|
|
320
|
+
*
|
|
321
|
+
* @async
|
|
322
|
+
* @param guid - Viewpoint GUID.
|
|
323
|
+
* @param bitmapGuid - Bitmap GUID.
|
|
324
|
+
*/
|
|
325
|
+
getSnapshotData(guid: string, bitmapGuid: string): Promise<string>;
|
|
326
|
+
/**
|
|
327
|
+
* Download source of active version of the file.
|
|
328
|
+
*
|
|
329
|
+
* @async
|
|
330
|
+
* @param onProgress - Download progress callback.
|
|
331
|
+
* @param signal - An <a href="https://developer.mozilla.org/docs/Web/API/AbortSignal" target
|
|
332
|
+
* ="_blank">AbortSignal</a> object instance. Allows to communicate with a fetch request
|
|
333
|
+
* and abort it if desired.
|
|
334
|
+
*/
|
|
335
|
+
download(onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
336
|
+
/**
|
|
337
|
+
* Download file resource data of the active version of the file, such as exported file.
|
|
338
|
+
*
|
|
339
|
+
* @example <caption>Export file to DWG.</caption>
|
|
340
|
+
* const job = await file.crateJob("dwg");
|
|
341
|
+
* await job.waitForDone();
|
|
342
|
+
* const resourceId = file.exports.find((x) => x.endsWith(".dwg"));
|
|
343
|
+
* const arrayBuffer = await file.downloadResource(resourceId);
|
|
344
|
+
* const blob = new Blob([arrayBuffer]);
|
|
345
|
+
* const fileName = file.name.replace(/\.[^.]+$/, "") + ".dwg";
|
|
346
|
+
* FileSaver.saveAs(blob, fileName);
|
|
347
|
+
*
|
|
348
|
+
* @param dataId - Resource ID.
|
|
349
|
+
* @param onProgress - Download progress callback.
|
|
350
|
+
* @param signal - An <a href="https://developer.mozilla.org/docs/Web/API/AbortSignal" target
|
|
351
|
+
* ="_blank">AbortSignal</a> object instance. Allows to communicate with a fetch request
|
|
352
|
+
* and abort it if desired.
|
|
353
|
+
*/
|
|
354
|
+
downloadResource(dataId: string, onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
355
|
+
/**
|
|
356
|
+
* Returns a list of references to files used to correct rendering of the current file.
|
|
357
|
+
*
|
|
358
|
+
* @async
|
|
359
|
+
* @param [signal] - An <a
|
|
360
|
+
* href="https://developer.mozilla.org/docs/Web/API/AbortController">AbortController</a>
|
|
361
|
+
* signal object instance, which can be used to abort waiting as desired.
|
|
362
|
+
*/
|
|
363
|
+
getReferences(signal?: AbortSignal): Promise<IFileReferences>;
|
|
364
|
+
/**
|
|
365
|
+
* Set the file references.
|
|
366
|
+
*
|
|
367
|
+
* @async
|
|
368
|
+
* @param references - File references.
|
|
369
|
+
*/
|
|
370
|
+
setReferences(references: IFileReferences): Promise<IFileReferences>;
|
|
371
|
+
/**
|
|
372
|
+
* Create a new job for the active version of the file.
|
|
373
|
+
*
|
|
374
|
+
* @async
|
|
375
|
+
* @param outputFormat - The job type. Can be one of:
|
|
376
|
+
*
|
|
377
|
+
* - `geometry` - Extract file geometry data into `VSFX`.
|
|
378
|
+
* - `geometryGltf` - Extract file geometry data into `glTF`.
|
|
379
|
+
* - `properties` - Extract file properties.
|
|
380
|
+
* - `validation` - Validate the file. Only for `IFC`.
|
|
381
|
+
* - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the one of the
|
|
382
|
+
* supported format. Use {@link File.exports | File.exports()} to get the list of
|
|
383
|
+
* completed file exports. Use {@link File.downloadResource | File.downloadResource()}
|
|
384
|
+
* to download the exported file.
|
|
385
|
+
* - Other custom job name. Custom job runner must be registered in the job templates table
|
|
386
|
+
* before creating a job.
|
|
387
|
+
*
|
|
388
|
+
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
389
|
+
* for the File Converter tool in form "--arg=value".
|
|
390
|
+
*/
|
|
391
|
+
createJob(outputFormat: string, parameters?: string | object): Promise<Job>;
|
|
392
|
+
/**
|
|
393
|
+
* Create job to extract geometry data of active version of the file. This is alias to
|
|
394
|
+
* {@link File.createJob | File.createJob("geometry")}.
|
|
395
|
+
*
|
|
396
|
+
* @async
|
|
397
|
+
* @param type - Geometry data type. Can be one of:
|
|
398
|
+
*
|
|
399
|
+
* - `vsfx` - `VSFX` (default), for opening a file in `VisualizeJS` viewer.
|
|
400
|
+
* - `gltf` - `glTF`, for opening a file in `Three.js` viewer.
|
|
401
|
+
*
|
|
402
|
+
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
403
|
+
* for the File Converter tool in form "--arg=value".
|
|
404
|
+
*/
|
|
405
|
+
extractGeometry(type?: string, parameters?: string | object): Promise<Job>;
|
|
406
|
+
/**
|
|
407
|
+
* Create job to extract properties of the active version of the file. This is alias to
|
|
408
|
+
* {@link File.createJob | File.createJob("properties")}.
|
|
409
|
+
*
|
|
410
|
+
* @async
|
|
411
|
+
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
412
|
+
* for the File Converter tool in form "--arg=value".
|
|
413
|
+
*/
|
|
414
|
+
extractProperties(parameters?: string | object): Promise<Job>;
|
|
415
|
+
/**
|
|
416
|
+
* Create a job to validate the active version of the file. This is alias to
|
|
417
|
+
* {@link File.createJob | File.createJob("validation")}.
|
|
418
|
+
*
|
|
419
|
+
* To get validation report use
|
|
420
|
+
* {@link File.downloadResource | File.downloadResource("validation_report.json")}.
|
|
421
|
+
*
|
|
422
|
+
* @async
|
|
423
|
+
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
424
|
+
* for the File Converter tool in form "--arg=value".
|
|
425
|
+
*/
|
|
426
|
+
validate(parameters?: string | object): Promise<Job>;
|
|
427
|
+
/**
|
|
428
|
+
* Wait for jobs of the active version of the file to be done. Job is done when it changes to
|
|
429
|
+
* `none`, `done` or `failed` status.
|
|
430
|
+
*
|
|
431
|
+
* @async
|
|
432
|
+
* @param {string | string[]} jobs - Job or job array to wait on. Can be `geometry`,
|
|
433
|
+
* `geometryGltf`, `properties`, `validation`, `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`,
|
|
434
|
+
* `3dpdf` or custom job name.
|
|
435
|
+
* @param {Boolean} [waitAll] - If this parameter is `true`, the function returns when all
|
|
436
|
+
* the specified jobs have done. If `false`, the function returns when any one of the jobs are done.
|
|
437
|
+
* @param {Object} [params] - An object containing waiting parameters.
|
|
438
|
+
* @param {Number} [params.timeout] - The time, in milliseconds that the function should wait
|
|
439
|
+
* jobs. If no one jobs are done during this time, the `TimeoutError` exception will be thrown.
|
|
440
|
+
* @param {Number} [params.interval] - The time, in milliseconds, the function should delay
|
|
441
|
+
* in between checking jobs status.
|
|
442
|
+
* @param {AbortSignal} [params.signal] - An <a
|
|
443
|
+
* href="https://developer.mozilla.org/docs/Web/API/AbortController">AbortController</a>
|
|
444
|
+
* signal object instance, which can be used to abort waiting as desired.
|
|
445
|
+
* @param {function} [params.onCheckout] - Waiting progress callback. Return `true` to cancel waiting.
|
|
446
|
+
* @returns {Promise<File>}
|
|
447
|
+
*/
|
|
448
|
+
waitForDone(jobs: any, waitAll?: boolean, params?: {
|
|
449
|
+
timeout?: number;
|
|
450
|
+
interval?: number;
|
|
451
|
+
signal?: AbortSignal;
|
|
452
|
+
onCheckout?: (file: File, ready: boolean) => boolean;
|
|
453
|
+
}): Promise<this>;
|
|
454
|
+
/**
|
|
455
|
+
* Returns a list of file permissions.
|
|
456
|
+
*
|
|
457
|
+
* @async
|
|
458
|
+
*/
|
|
459
|
+
getPermissions(): Promise<Permission[]>;
|
|
460
|
+
/**
|
|
461
|
+
* Returns the permission information.
|
|
462
|
+
*
|
|
463
|
+
* @async
|
|
464
|
+
* @param permissionId - Permission ID.
|
|
465
|
+
*/
|
|
466
|
+
getPermission(permissionId: string): Promise<Permission>;
|
|
467
|
+
/**
|
|
468
|
+
* Create a new file permission.
|
|
469
|
+
*
|
|
470
|
+
* @async
|
|
471
|
+
* @param actions - Actions are allowed to be performed on a file with this permission. See
|
|
472
|
+
* {@link Permission#actions | Permission.actions} for more details.
|
|
473
|
+
* @param grantedTo - A collection of principials that will get access to the file.
|
|
474
|
+
* @param public = false - Specifies whether all users have access to the file or not.
|
|
475
|
+
*/
|
|
476
|
+
createPermission(actions: string | string[], grantedTo: any[], _public: boolean): Promise<Permission>;
|
|
477
|
+
/**
|
|
478
|
+
* Delete file permission.
|
|
479
|
+
*
|
|
480
|
+
* @async
|
|
481
|
+
* @param permissionId - Permission ID.
|
|
482
|
+
* @returns Returns the raw data of a deleted permission.
|
|
483
|
+
*/
|
|
484
|
+
deletePermission(permissionId: string): Promise<any>;
|
|
485
|
+
/**
|
|
486
|
+
* Upload the new version of the file to the server and extract the geometry and properties as needed.
|
|
487
|
+
*
|
|
488
|
+
* @async
|
|
489
|
+
* @param file - Web API <a href="https://developer.mozilla.org/docs/Web/API/File"
|
|
490
|
+
* target="_blank">File</a> object are generally retrieved from a <a
|
|
491
|
+
* href="https://developer.mozilla.org/docs/Web/API/FileList" target="_blank">FileList</a>
|
|
492
|
+
* object returned as a result of a user selecting files using the HTML `<input>` element.
|
|
493
|
+
* @param params - An object containing upload parameters.
|
|
494
|
+
* @param params.geometry=true - Create job to extract file geometry data. The geometry data
|
|
495
|
+
* type is the same as the original file.
|
|
496
|
+
* @param params.properties=false - Create job to extract file properties.
|
|
497
|
+
* @param params.waitForDone=false - Wait for geometry and properties jobs to complete.
|
|
498
|
+
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If
|
|
499
|
+
* no one jobs are done during this time, the `TimeoutError` exception will be thrown.
|
|
500
|
+
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
501
|
+
* checking jobs status.
|
|
502
|
+
* @param params.signal - An <a
|
|
503
|
+
* href="https://developer.mozilla.org/docs/Web/API/AbortController">AbortController</a>
|
|
504
|
+
* signal object instance, which can be used to abort waiting as desired.
|
|
505
|
+
* @param params.onProgress - Upload progress callback.
|
|
506
|
+
*/
|
|
507
|
+
uploadVersion(file: globalThis.File, params?: {
|
|
508
|
+
geometry?: boolean;
|
|
509
|
+
properties?: boolean;
|
|
510
|
+
waitForDone?: boolean;
|
|
511
|
+
timeout?: number;
|
|
512
|
+
interval?: number;
|
|
513
|
+
signal?: AbortSignal;
|
|
514
|
+
onProgress?: (progress: number, file: globalThis.File) => void;
|
|
515
|
+
}): Promise<File>;
|
|
516
|
+
/**
|
|
517
|
+
* Returns a list of version files.
|
|
518
|
+
*
|
|
519
|
+
* @async
|
|
520
|
+
*/
|
|
521
|
+
getVersions(): Promise<File[]>;
|
|
522
|
+
/**
|
|
523
|
+
* Returns the version file.
|
|
524
|
+
*
|
|
525
|
+
* @async
|
|
526
|
+
* @param version - Desired version.
|
|
527
|
+
*/
|
|
528
|
+
getVersion(version: number): Promise<File>;
|
|
529
|
+
/**
|
|
530
|
+
* Delete version file.
|
|
531
|
+
*
|
|
532
|
+
* @async
|
|
533
|
+
* @param version - Version to delete.
|
|
534
|
+
*/
|
|
535
|
+
deleteVersion(version: number): Promise<any>;
|
|
536
|
+
/**
|
|
537
|
+
* Replace the active version of the file with the selected version.
|
|
538
|
+
*
|
|
539
|
+
* @async
|
|
540
|
+
* @param version - Desired active version.
|
|
541
|
+
*/
|
|
542
|
+
setActiveVersion(version: number): Promise<File>;
|
|
543
|
+
/**
|
|
544
|
+
* Use given version instead of active version for current file on client side. This version
|
|
545
|
+
* change will affect the result:
|
|
546
|
+
*
|
|
547
|
+
* - getModels()
|
|
548
|
+
* - getProperties()
|
|
549
|
+
* - searchProperties()
|
|
550
|
+
* - getCdaTree()
|
|
551
|
+
* - download()
|
|
552
|
+
* - downloadResource()
|
|
553
|
+
* - createJob()
|
|
554
|
+
* - extractGeometry()
|
|
555
|
+
* - extractProperties()
|
|
556
|
+
* - validate()
|
|
557
|
+
* - waitForDone()
|
|
558
|
+
* - Viewer.open()
|
|
559
|
+
*
|
|
560
|
+
* Other clients will still continue to use the currently active version of the file. Use
|
|
561
|
+
* `undefined` to revert back to the active version.
|
|
562
|
+
*
|
|
563
|
+
* Note. You need to update the file data using [File.checkout()]{@link File#checkout} to
|
|
564
|
+
* match the size and status fields to the version you selected.
|
|
565
|
+
*/
|
|
566
|
+
useVersion(version?: number): this;
|
|
567
|
+
}
|
|
568
|
+
//# sourceMappingURL=File.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IHttpClient } from "./IHttpClient";
|
|
2
|
+
export declare class HttpClient implements IHttpClient {
|
|
3
|
+
serverUrl: string;
|
|
4
|
+
headers: HeadersInit;
|
|
5
|
+
signInUserId: string;
|
|
6
|
+
constructor(serverUrl: string);
|
|
7
|
+
get(relativePath: string, signal?: AbortSignal): Promise<Response>;
|
|
8
|
+
post(relativePath: string, body?: string | object | ArrayBuffer | Blob | globalThis.File | FormData): Promise<Response>;
|
|
9
|
+
put(relativePath: string, body?: string | object | ArrayBuffer | Blob | globalThis.File | FormData): Promise<Response>;
|
|
10
|
+
delete(relativePath: string): Promise<Response>;
|
|
11
|
+
postFile(relativePath: string, file: globalThis.File, onProgress?: (progress: number) => void): Promise<XMLHttpRequest>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=HttpClient.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface IAssociatedFileData {
|
|
2
|
+
fileId: string;
|
|
3
|
+
name: string;
|
|
4
|
+
link: string;
|
|
5
|
+
version?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IAssemblyVersionInfo {
|
|
8
|
+
assemblyId: string;
|
|
9
|
+
status: string;
|
|
10
|
+
version: number;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
ownerId: string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=IAssembly.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface IFileDataStatus {
|
|
2
|
+
state: string;
|
|
3
|
+
jobId?: string;
|
|
4
|
+
jobUrl?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IFileStatus {
|
|
7
|
+
geometry: IFileDataStatus;
|
|
8
|
+
geometryGltf: IFileDataStatus;
|
|
9
|
+
properties: IFileDataStatus;
|
|
10
|
+
validation: IFileDataStatus;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Reference to file.
|
|
14
|
+
*/
|
|
15
|
+
export interface IFileReference {
|
|
16
|
+
/**
|
|
17
|
+
* The ID of the referenced file.
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
/**
|
|
21
|
+
* The name of the referenced file.
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* References are images, fonts, or any other files to correct rendering of the file.
|
|
27
|
+
*/
|
|
28
|
+
export interface IFileReferences {
|
|
29
|
+
/**
|
|
30
|
+
* The references ID, changed after each update of the file references.
|
|
31
|
+
*/
|
|
32
|
+
id: string;
|
|
33
|
+
/**
|
|
34
|
+
* List of file references or `null` if there are no references.
|
|
35
|
+
*/
|
|
36
|
+
references: IFileReference[] | null;
|
|
37
|
+
}
|
|
38
|
+
export interface IFileVersionInfo {
|
|
39
|
+
fileId: string;
|
|
40
|
+
status: object;
|
|
41
|
+
version: number;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
size: number;
|
|
44
|
+
ownerId: string;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=IFile.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IHttpClient {
|
|
2
|
+
serverUrl: string;
|
|
3
|
+
headers: HeadersInit;
|
|
4
|
+
signInUserId: string;
|
|
5
|
+
get(relativePath: any, signal?: AbortSignal): Promise<Response>;
|
|
6
|
+
post(relativePath: string, body?: ArrayBuffer | Blob | globalThis.File | FormData | object | string | null): Promise<Response>;
|
|
7
|
+
put(relativePath: string, body?: ArrayBuffer | Blob | globalThis.File | FormData | object | string | null): Promise<Response>;
|
|
8
|
+
delete(relativePath: string): Promise<Response>;
|
|
9
|
+
postFile(relativePath: string, file: globalThis.File, onProgress?: (progress: number) => void): Promise<XMLHttpRequest>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=IHttpClient.d.ts.map
|