@twinfinity/twin 6.0.1 → 6.0.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.
Files changed (97) hide show
  1. package/dist/BuildInfo.js +3 -3
  2. package/dist/TwinClient.d.ts +227 -0
  3. package/dist/TwinClient.d.ts.map +1 -1
  4. package/dist/TwinClient.js +474 -28
  5. package/dist/TwinClient.js.map +1 -1
  6. package/dist/errors.d.ts +122 -3
  7. package/dist/errors.d.ts.map +1 -1
  8. package/dist/errors.js +156 -0
  9. package/dist/errors.js.map +1 -1
  10. package/dist/tsconfig.tsbuildinfo +1 -1
  11. package/dist/types/asset-attachment-api.d.ts +51 -0
  12. package/dist/types/asset-attachment-api.d.ts.map +1 -0
  13. package/dist/types/asset-attachment-api.js +8 -0
  14. package/dist/types/asset-attachment-api.js.map +1 -0
  15. package/dist/types/asset-types-api.d.ts +76 -0
  16. package/dist/types/asset-types-api.d.ts.map +1 -0
  17. package/dist/types/asset-types-api.js +5 -0
  18. package/dist/types/asset-types-api.js.map +1 -0
  19. package/dist/types/index.d.ts +3 -0
  20. package/dist/types/index.d.ts.map +1 -1
  21. package/dist/types/index.js +3 -0
  22. package/dist/types/index.js.map +1 -1
  23. package/dist/types/twin-permissions-api.d.ts +20 -0
  24. package/dist/types/twin-permissions-api.d.ts.map +1 -0
  25. package/dist/types/twin-permissions-api.js +2 -0
  26. package/dist/types/twin-permissions-api.js.map +1 -0
  27. package/docs/assets/hierarchy.js +1 -1
  28. package/docs/assets/navigation.js +1 -1
  29. package/docs/assets/search.js +1 -1
  30. package/docs/classes/AssetAttachmentConflictError.html +3 -0
  31. package/docs/classes/AssetAttachmentNotFoundError.html +2 -0
  32. package/docs/classes/AssetBatchError.html +1 -1
  33. package/docs/classes/AssetCatalogTooLargeError.html +16 -0
  34. package/docs/classes/AssetCategoryConflictError.html +3 -0
  35. package/docs/classes/AssetCategoryForbiddenError.html +2 -0
  36. package/docs/classes/AssetCategoryNotFoundError.html +2 -0
  37. package/docs/classes/AssetCategoryValidationError.html +3 -0
  38. package/docs/classes/AssetConflictError.html +1 -1
  39. package/docs/classes/AssetForbiddenError.html +1 -1
  40. package/docs/classes/AssetNotFoundError.html +1 -1
  41. package/docs/classes/AssetTypeConflictError.html +3 -0
  42. package/docs/classes/AssetTypeForbiddenError.html +2 -0
  43. package/docs/classes/AssetTypeNotFoundError.html +2 -0
  44. package/docs/classes/AssetTypeValidationError.html +3 -0
  45. package/docs/classes/AssetValidationError.html +1 -1
  46. package/docs/classes/ProcessorNotFoundError.html +1 -1
  47. package/docs/classes/TwinClient.html +154 -48
  48. package/docs/classes/TwinConflictError.html +1 -1
  49. package/docs/classes/TwinFileConflictError.html +1 -1
  50. package/docs/classes/TwinFileNotFoundError.html +1 -1
  51. package/docs/classes/TwinFileValidationError.html +1 -1
  52. package/docs/classes/TwinNotFoundError.html +1 -1
  53. package/docs/classes/TwinUnauthenticatedError.html +6 -0
  54. package/docs/classes/TwinValidationError.html +1 -1
  55. package/docs/functions/isAssetCatalogTooLargeErrorBody.html +6 -0
  56. package/docs/functions/readErrorBody.html +10 -0
  57. package/docs/hierarchy.html +1 -1
  58. package/docs/interfaces/ApiCreateUploadSessionResponse.html +7 -0
  59. package/docs/interfaces/AssetAttachmentPut.html +6 -0
  60. package/docs/interfaces/AssetCatalogCategory.html +7 -0
  61. package/docs/interfaces/AssetCatalogResponse.html +6 -0
  62. package/docs/interfaces/AssetCatalogTooLargeErrorBody.html +15 -0
  63. package/docs/interfaces/AssetCategoryDelete.html +2 -0
  64. package/docs/interfaces/AssetCategoryGet.html +14 -0
  65. package/docs/interfaces/AssetCategoryPut.html +7 -0
  66. package/docs/interfaces/AssetTypeDelete.html +2 -0
  67. package/docs/interfaces/AssetTypeGet.html +16 -0
  68. package/docs/interfaces/AssetTypePut.html +9 -0
  69. package/docs/interfaces/AttachmentGet.html +20 -0
  70. package/docs/interfaces/AttachmentPost.html +4 -0
  71. package/docs/interfaces/ITwinClient.html +155 -49
  72. package/docs/interfaces/MyPermissions.html +7 -0
  73. package/docs/interfaces/TwinErrorBody.html +2 -2
  74. package/docs/interfaces/TwinSpecification.html +1 -1
  75. package/docs/interfaces/UploadStatusGet.html +3 -0
  76. package/docs/modules.html +1 -1
  77. package/docs/types/TwinCapability.html +6 -0
  78. package/docs/types/TwinErrorCause.html +8 -0
  79. package/docs/types/TwinErrorItemKind.html +4 -0
  80. package/docs/types/UploadStatus.html +1 -0
  81. package/package.json +3 -3
  82. package/src/BuildInfo.ts +41 -41
  83. package/src/TwinClient.ts +2334 -1496
  84. package/src/errors.ts +379 -117
  85. package/src/index.ts +3 -3
  86. package/src/types/Twin.ts +7 -7
  87. package/src/types/TwinGeometryInfo.ts +7 -7
  88. package/src/types/asset-api.ts +60 -60
  89. package/src/types/asset-attachment-api.ts +56 -0
  90. package/src/types/asset-batch-api.ts +88 -88
  91. package/src/types/asset-types-api.ts +86 -0
  92. package/src/types/common.ts +10 -10
  93. package/src/types/generated.ts +574 -574
  94. package/src/types/index.ts +9 -6
  95. package/src/types/twin-api.ts +99 -99
  96. package/src/types/twin-file-api.ts +67 -67
  97. package/src/types/twin-permissions-api.ts +20 -0
@@ -1,574 +1,574 @@
1
- export interface Diagnostics {
2
- generic?: GenericDiagnosticEntry[];
3
- ifc?: { [key: string]: IfcDiagnosticNode };
4
- twin?: TwinDiagnosticNode[];
5
- [property: string]: any;
6
- }
7
-
8
- export interface GenericDiagnosticEntry {
9
- category: DiagnosticCategory;
10
- level: DiagnosticLevel;
11
- message: string;
12
- }
13
-
14
- /**
15
- * The category of the diagnostic event.
16
- */
17
- export type DiagnosticCategory = 'InvalidData' | 'Geometry';
18
-
19
- /**
20
- * The severity level of the diagnostic event.
21
- */
22
- export type DiagnosticLevel = 'Fatal' | 'Error' | 'Warning' | 'Information' | 'Debug';
23
-
24
- /**
25
- * A diagnostic node for an IFC file.
26
- */
27
- export interface IfcDiagnosticNode {
28
- data: IfcDiagnosticNodeData;
29
- entries: IfcDiagnosticEntry[];
30
- incomingConnections: string[];
31
- outgoingConnections: string[];
32
- [property: string]: any;
33
- }
34
-
35
- export interface IfcDiagnosticNodeData {
36
- /**
37
- * The globally unique identifier of the entity in the IFC file.
38
- */
39
- gid?: string;
40
- /**
41
- * The local identifier of the entity in the IFC file.
42
- */
43
- id: string;
44
- ifcType: string;
45
- [property: string]: any;
46
- }
47
-
48
- export interface IfcDiagnosticEntry {
49
- category: DiagnosticCategory;
50
- code: IfcDiagnosticCode;
51
- level: DiagnosticLevel;
52
- message?: string;
53
- }
54
-
55
- export type IfcDiagnosticCode =
56
- | 'CompletelyTransparent'
57
- | 'HighVertexCount'
58
- | 'IncorrectAttributeDataType'
59
- | 'InvalidBound'
60
- | 'InvalidColor'
61
- | 'InvalidElementQuantity'
62
- | 'InvalidEnumValue'
63
- | 'InvalidFace'
64
- | 'InvalidMesh'
65
- | 'InvalidObjectReference'
66
- | 'InvalidPosition'
67
- | 'InvalidProperty'
68
- | 'InvalidPropertySet'
69
- | 'InvalidQuantity'
70
- | 'InvalidRelation'
71
- | 'InvalidSpecularHighlight'
72
- | 'InvalidWorldCoordinateSystem'
73
- | 'InvalidUnit'
74
- | 'LargeMeshNotHealed'
75
- | 'MappedItemWithoutTarget'
76
- | 'MaterialHasMultipleStyles'
77
- | 'MeshFarFromOrigo'
78
- | 'MeshOmitted'
79
- | 'MissingOrInvalidSurfaceColor'
80
- | 'MissingPlacement'
81
- | 'MultipleProjects'
82
- | 'NamedUnitWithoutName'
83
- | 'NonUnitEntityReferredAsUnit'
84
- | 'NoProject'
85
- | 'NotEnoughAttributes'
86
- | 'OpenSpace'
87
- | 'PropertySetWithoutName'
88
- | 'PropertyWithoutName'
89
- | 'QuantityWithoutName'
90
- | 'RepresentationItemWithoutContext'
91
- | 'StyleContainsMultipleSurfaceStyles'
92
- | 'SubContextInProjectRepresentationContexts'
93
- | 'UnitWithoutType'
94
- | 'UnknownMaterialType'
95
- | 'UnknownPrefix'
96
- | 'UnknownUnitType'
97
- | 'UnsupportedRepresentationItem'
98
- | 'UnsupportedStyleElement'
99
- | 'UnsupportedUnitType';
100
-
101
- /**
102
- * A diagnostic node for a Twin file.
103
- */
104
- export interface TwinDiagnosticNode {
105
- data: TwinDiagnosticNodeData;
106
- entries: TwinDiagnosticEntry[];
107
- [property: string]: any;
108
- }
109
-
110
- export interface TwinDiagnosticNodeData {
111
- /**
112
- * The identifier of the entity in the Twin file.
113
- */
114
- gid?: string;
115
- /**
116
- * The identifier of the model this entity belongs to.
117
- */
118
- modelId?: string;
119
- /**
120
- * The name of the entity.
121
- */
122
- name?: string;
123
- /**
124
- * Incoming identifier from the IFC file.
125
- */
126
- originalGid?: string;
127
- [property: string]: any;
128
- }
129
-
130
- export interface TwinDiagnosticEntry {
131
- category: DiagnosticCategory;
132
- code?: TwinDiagnosticCode;
133
- level: DiagnosticLevel;
134
- message: string;
135
- }
136
-
137
- export type TwinDiagnosticCode =
138
- | 'CircularHierarchy'
139
- | 'FacilityPartNotMapped'
140
- | 'GeometryReferenceEmpty'
141
- | 'GeometryReferenceShadowed'
142
- | 'InvalidInsertionPoint'
143
- | 'InvalidStructure'
144
- | 'MissingElement'
145
- | 'MissingFile'
146
- | 'PatchTargetNotFound';
147
-
148
- /**
149
- * Specification of a Twinfinity Twin
150
- */
151
- export interface TwinSpecification {
152
- /**
153
- * Spaces that are not part of any facility
154
- */
155
- aggregatedSpaces?: string[];
156
- /**
157
- * Ids of Twins that are part of this Twin
158
- */
159
- aggregatedTwins?: string[];
160
- elementQuantities?: ElementQuantities[];
161
- /**
162
- * Collection of entities that are part of the twin
163
- */
164
- entities: EntityCollection;
165
- /**
166
- * Per-file patch operations applied to model products before merge
167
- */
168
- filePatches?: { [key: string]: FilePatchSet };
169
- /**
170
- * Unique identifier for the twin
171
- */
172
- id?: string;
173
- /**
174
- * Twin location in WGS84
175
- */
176
- location?: Location;
177
- /**
178
- * Name of the Twin
179
- */
180
- name: string;
181
- propertySets?: PropertySet[];
182
- /**
183
- * The site of the Twin
184
- */
185
- site?: string;
186
- }
187
-
188
- export interface ElementQuantities {
189
- name: string;
190
- simpleQuantities?: SimpleQuantity[];
191
- }
192
-
193
- export interface SimpleQuantity {
194
- name: string;
195
- /**
196
- * Type of value (e.g IfcQuantityArea, IfcQuantityNumber)
197
- */
198
- type?: SingleQuantityValueType;
199
- /**
200
- * Value of the quantity given in SI units
201
- */
202
- value?: number;
203
- }
204
-
205
- /**
206
- * Type of value (e.g IfcQuantityArea, IfcQuantityNumber)
207
- *
208
- * Types of qunatity values that consists of a single value
209
- */
210
- export type SingleQuantityValueType =
211
- | 'IfcQuantityArea'
212
- | 'IfcQuantityCount'
213
- | 'IfcQuantityLength'
214
- | 'IfcQuantityNumber'
215
- | 'IfcQuantityVolume'
216
- | 'IfcQuantityTime'
217
- | 'IfcQuantityWeight';
218
-
219
- /**
220
- * Collection of entities that are part of the twin
221
- */
222
- export interface EntityCollection {
223
- /**
224
- * Facility entities in the Twin
225
- */
226
- facilities?: { [key: string]: Facility };
227
- /**
228
- * Facility part entities in the Twin
229
- */
230
- facilityParts?: { [key: string]: FacilityPart };
231
- /**
232
- * Site entities in the Twin
233
- */
234
- sites?: { [key: string]: Site };
235
- /**
236
- * Space entities in the Twin
237
- */
238
- spaces?: { [key: string]: Space };
239
- [property: string]: any;
240
- }
241
-
242
- /**
243
- * Facility (e.g. building or bridge)
244
- */
245
- export interface Facility {
246
- /**
247
- * Facilities that are part of the facility (e.g. when a building is a complex of buildings)
248
- */
249
- aggregatedFacilities?: string[];
250
- /**
251
- * Distinct parts of the facility (e.g. storey or railway part)
252
- */
253
- aggregatedFacilityParts?: string[];
254
- /**
255
- * Spaces in the facility that do not belong to a facility part
256
- */
257
- aggregatedSpaces?: string[];
258
- /**
259
- * Type of facility (e.g. IfcBuilding)
260
- */
261
- class: FacilityClass;
262
- elementQuantities?: ElementQuantities[];
263
- /**
264
- * Unique identifier for the building
265
- */
266
- id: string;
267
- name?: string;
268
- propertySets?: PropertySet[];
269
- }
270
-
271
- /**
272
- * Type of facility (e.g. IfcBuilding)
273
- *
274
- * Types of facilities
275
- */
276
- export type FacilityClass = 'IfcBridge' | 'IfcBuilding' | 'IfcMarineFacility' | 'IfcRailway' | 'IfcRoad';
277
-
278
- export interface PropertySet {
279
- name: string;
280
- /**
281
- * Properties contained in the set
282
- */
283
- properties?: Property[];
284
- /**
285
- * Properties that in themselves are sets of properties
286
- */
287
- propertySets?: PropertySet[];
288
- }
289
-
290
- export interface Property {
291
- name: string;
292
- /**
293
- * Property value for simple single value properties
294
- */
295
- value?: SinglePropertyValue;
296
- }
297
-
298
- /**
299
- * Property value for simple single value properties
300
- */
301
- export interface SinglePropertyValue {
302
- /**
303
- * Type of value (e.g IfcDate, IfcAreaMeasure, IfcInteger, IfcElectricCurrentMeasure)
304
- */
305
- type: SinglePropertyValueType;
306
- value: number | string;
307
- }
308
-
309
- /**
310
- * Type of value (e.g IfcDate, IfcAreaMeasure, IfcInteger, IfcElectricCurrentMeasure)
311
- *
312
- * Types of property values that consists of a single value
313
- */
314
- export type SinglePropertyValueType =
315
- | 'IfcAbsorbedDoseMeasure'
316
- | 'IfcAccelerationMeasure'
317
- | 'IfcAmountOfSubstanceMeasure'
318
- | 'IfcAngularVelocityMeasure'
319
- | 'IfcAreaMeasure'
320
- | 'IfcBinary'
321
- | 'IfcBoolean'
322
- | 'IfcCountMeasure'
323
- | 'IfcDate'
324
- | 'IfcDateTime'
325
- | 'IfcDescriptiveMeasure'
326
- | 'IfcDoseEquivalentMeasure'
327
- | 'IfcDuration'
328
- | 'IfcDynamicViscosityMeasure'
329
- | 'IfcElectricCapacitanceMeasure'
330
- | 'IfcElectricChargeMeasure'
331
- | 'IfcElectricConductanceMeasure'
332
- | 'IfcElectricCurrentMeasure'
333
- | 'IfcElectricResistanceMeasure'
334
- | 'IfcElectricVoltageMeasure'
335
- | 'IfcEnergyMeasure'
336
- | 'IfcForceMeasure'
337
- | 'IfcFrequencyMeasure'
338
- | 'IfcHeatFluxDensityMeasure'
339
- | 'IfcHeatingValueMeasure'
340
- | 'IfcIdentifier'
341
- | 'IfcIlluminanceMeasure'
342
- | 'IfcInductanceMeasure'
343
- | 'IfcInteger'
344
- | 'IfcIntegerCountRateMeasure'
345
- | 'IfcIonConcentrationMeasure'
346
- | 'IfcIsothermalMoistureCapacityMeasure'
347
- | 'IfcKinematicViscosityMeasure'
348
- | 'IfcLabel'
349
- | 'IfcLengthMeasure'
350
- | 'IfcLinearForceMeasure'
351
- | 'IfcLinearMomentMeasure'
352
- | 'IfcLinearStiffnessMeasure'
353
- | 'IfcLinearVelocityMeasure'
354
- | 'IfcLogical'
355
- | 'IfcLuminousFluxMeasure'
356
- | 'IfcLuminousIntensityDistributionMeasure'
357
- | 'IfcLuminousIntensityMeasure'
358
- | 'IfcMagneticFluxDensityMeasure'
359
- | 'IfcMagneticFluxMeasure'
360
- | 'IfcMassDensityMeasure'
361
- | 'IfcMassFlowRateMeasure'
362
- | 'IfcMassMeasure'
363
- | 'IfcMassPerLengthMeasure'
364
- | 'IfcModulusOfElasticityMeasure'
365
- | 'IfcModulusOfLinearSubgradeReactionMeasure'
366
- | 'IfcModulusOfRotationalSubgradeReactionMeasure'
367
- | 'IfcModulusOfSubgradeReactionMeasure'
368
- | 'IfcMoistureDiffusivityMeasure'
369
- | 'IfcMolecularWeightMeasure'
370
- | 'IfcMomentOfInertiaMeasure'
371
- | 'IfcMonetaryMeasure'
372
- | 'IfcNonNegativeLengthMeasure'
373
- | 'IfcNormalisedRatioMeasure'
374
- | 'IfcNumericMeasure'
375
- | 'IfcParameterValue'
376
- | 'IfcPHMeasure'
377
- | 'IfcPlanarForceMeasure'
378
- | 'IfcPlaneAngleMeasure'
379
- | 'IfcPositiveInteger'
380
- | 'IfcPositiveLengthMeasure'
381
- | 'IfcPositivePlaneAngleMeasure'
382
- | 'IfcPositiveRatioMeasure'
383
- | 'IfcPowerMeasure'
384
- | 'IfcPressureMeasure'
385
- | 'IfcRadioActivityMeasure'
386
- | 'IfcRatioMeasure'
387
- | 'IfcReal'
388
- | 'IfcRotationalFrequencyMeasure'
389
- | 'IfcRotationalMassMeasure'
390
- | 'IfcRotationalStiffnessMeasure'
391
- | 'IfcSectionModulusMeasure'
392
- | 'IfcSolidAngleMeasure'
393
- | 'IfcSoundPowerMeasure'
394
- | 'IfcSoundPressureLevelMeasure'
395
- | 'IfcSoundPressureMeasure'
396
- | 'IfcSpecificHeatCapacityMeasure'
397
- | 'IfcTemperatureGradientMeasure'
398
- | 'IfcTemperatureRateOfChangeMeasure'
399
- | 'IfcText'
400
- | 'IfcThermalAdmittanceMeasure'
401
- | 'IfcThermalConductivityMeasure'
402
- | 'IfcThermalExpansionCoefficientMeasure'
403
- | 'IfcThermalResistanceMeasure'
404
- | 'IfcThermalTransmittanceMeasure'
405
- | 'IfcThermodynamicTemperatureMeasure'
406
- | 'IfcTime'
407
- | 'IfcTimeMeasure'
408
- | 'IfcTimeStamp'
409
- | 'IfcTorqueMeasure'
410
- | 'IfcURIReference'
411
- | 'IfcVaporPermeabilityMeasure'
412
- | 'IfcVolumeMeasure'
413
- | 'IfcVolumetricFlowRateMeasure'
414
- | 'IfcWarpingConstantMeasure'
415
- | 'IfcWarpingMomentMeasure';
416
-
417
- /**
418
- * Distinct part of the facility (e.g. storey or railway part)
419
- */
420
- export interface FacilityPart {
421
- /**
422
- * Facility parts that are parts of this part (e.g multiple floor 3 in on different height
423
- * that are in different parts of the building)
424
- */
425
- aggregatedFacilityParts?: string[];
426
- /**
427
- * Spaces that are part of the facility part
428
- */
429
- aggregatedSpaces?: string[];
430
- /**
431
- * Type of facility part (e.g. IfcBuildingStorey)
432
- */
433
- class: FacilityPartClass;
434
- elementQuantities?: ElementQuantities[];
435
- /**
436
- * Unique identifier for the facility part
437
- */
438
- id: string;
439
- name?: string;
440
- propertySets?: PropertySet[];
441
- }
442
-
443
- /**
444
- * Type of facility part (e.g. IfcBuildingStorey)
445
- *
446
- * Types of facility parts
447
- */
448
- export type FacilityPartClass =
449
- | 'IfcBridgePart'
450
- | 'IfcBuildingStorey'
451
- | 'IfcMarinePart'
452
- | 'IfcRailwayPart'
453
- | 'IfcRoadPart';
454
-
455
- /**
456
- * A site is a defined area of land, possibly covered with water, upon which constructions
457
- * are located
458
- */
459
- export interface Site {
460
- /**
461
- * Facilities (e.g. buildings) in Twin
462
- */
463
- aggregatedFacilities?: string[];
464
- /**
465
- * Sites are part of this site
466
- */
467
- aggregatedSites?: string[];
468
- /**
469
- * Spaces that are not part of any facility
470
- */
471
- aggregatedSpaces?: string[];
472
- /**
473
- * Type of site (i.e. IfcSite)
474
- */
475
- class?: SiteType;
476
- elementQuantities?: ElementQuantities[];
477
- /**
478
- * Unique identifier for the site
479
- */
480
- id?: string;
481
- /**
482
- * Name of the site
483
- */
484
- name: string;
485
- /**
486
- * Sets of properties describing the Twin (e.g. AreaType = Residential)
487
- */
488
- propertySets?: PropertySet[];
489
- }
490
-
491
- /**
492
- * Type of site (i.e. IfcSite)
493
- *
494
- * Types of Twins
495
- */
496
- export type SiteType = 'IfcSite';
497
-
498
- /**
499
- * A volume defining part of a Twin or facility
500
- */
501
- export interface Space {
502
- /**
503
- * Spaces that are part of this space
504
- */
505
- aggregatedSpaces?: string[];
506
- /**
507
- * Type of space (e.g. IfcSpace)
508
- */
509
- class: SpaceType;
510
- elementQuantities?: ElementQuantities[];
511
- /**
512
- * Unique identifier for the space
513
- */
514
- id: string;
515
- name?: string;
516
- propertySets?: PropertySet[];
517
- }
518
-
519
- /**
520
- * Type of space (e.g. IfcSpace)
521
- */
522
- export type SpaceType = 'IfcSpace';
523
-
524
- export interface FilePatchSet {
525
- /**
526
- * Ordered list of patch operations to apply
527
- */
528
- patches: FilePatch[];
529
- /**
530
- * Format version of the patch view. Currently only version 1 is supported.
531
- */
532
- viewVersion: number;
533
- }
534
-
535
- export interface FilePatch {
536
- /**
537
- * The patch operation type
538
- */
539
- op: Op;
540
- /**
541
- * JSON Pointer-style path: /entities/{ifcGid} or /entities/{ifcGid}/(name|description)
542
- */
543
- path: string;
544
- /**
545
- * New value for replace operations. Must be omitted for remove operations.
546
- */
547
- value?: string;
548
- }
549
-
550
- /**
551
- * The patch operation type
552
- */
553
- export type Op = 'replace' | 'remove';
554
-
555
- /**
556
- * Twin location in WGS84
557
- *
558
- * A location in WGS84
559
- */
560
- export interface Location {
561
- /**
562
- * Metres above sea level
563
- */
564
- elevation?: number;
565
- epsg: EpsgType;
566
- latitude: number;
567
- longitude: number;
568
- /**
569
- * Vector pointing to the true north
570
- */
571
- trueNorth?: number[];
572
- }
573
-
574
- export type EpsgType = '4326';
1
+ export interface Diagnostics {
2
+ generic?: GenericDiagnosticEntry[];
3
+ ifc?: { [key: string]: IfcDiagnosticNode };
4
+ twin?: TwinDiagnosticNode[];
5
+ [property: string]: any;
6
+ }
7
+
8
+ export interface GenericDiagnosticEntry {
9
+ category: DiagnosticCategory;
10
+ level: DiagnosticLevel;
11
+ message: string;
12
+ }
13
+
14
+ /**
15
+ * The category of the diagnostic event.
16
+ */
17
+ export type DiagnosticCategory = 'InvalidData' | 'Geometry';
18
+
19
+ /**
20
+ * The severity level of the diagnostic event.
21
+ */
22
+ export type DiagnosticLevel = 'Fatal' | 'Error' | 'Warning' | 'Information' | 'Debug';
23
+
24
+ /**
25
+ * A diagnostic node for an IFC file.
26
+ */
27
+ export interface IfcDiagnosticNode {
28
+ data: IfcDiagnosticNodeData;
29
+ entries: IfcDiagnosticEntry[];
30
+ incomingConnections: string[];
31
+ outgoingConnections: string[];
32
+ [property: string]: any;
33
+ }
34
+
35
+ export interface IfcDiagnosticNodeData {
36
+ /**
37
+ * The globally unique identifier of the entity in the IFC file.
38
+ */
39
+ gid?: string;
40
+ /**
41
+ * The local identifier of the entity in the IFC file.
42
+ */
43
+ id: string;
44
+ ifcType: string;
45
+ [property: string]: any;
46
+ }
47
+
48
+ export interface IfcDiagnosticEntry {
49
+ category: DiagnosticCategory;
50
+ code: IfcDiagnosticCode;
51
+ level: DiagnosticLevel;
52
+ message?: string;
53
+ }
54
+
55
+ export type IfcDiagnosticCode =
56
+ | 'CompletelyTransparent'
57
+ | 'HighVertexCount'
58
+ | 'IncorrectAttributeDataType'
59
+ | 'InvalidBound'
60
+ | 'InvalidColor'
61
+ | 'InvalidElementQuantity'
62
+ | 'InvalidEnumValue'
63
+ | 'InvalidFace'
64
+ | 'InvalidMesh'
65
+ | 'InvalidObjectReference'
66
+ | 'InvalidPosition'
67
+ | 'InvalidProperty'
68
+ | 'InvalidPropertySet'
69
+ | 'InvalidQuantity'
70
+ | 'InvalidRelation'
71
+ | 'InvalidSpecularHighlight'
72
+ | 'InvalidWorldCoordinateSystem'
73
+ | 'InvalidUnit'
74
+ | 'LargeMeshNotHealed'
75
+ | 'MappedItemWithoutTarget'
76
+ | 'MaterialHasMultipleStyles'
77
+ | 'MeshFarFromOrigo'
78
+ | 'MeshOmitted'
79
+ | 'MissingOrInvalidSurfaceColor'
80
+ | 'MissingPlacement'
81
+ | 'MultipleProjects'
82
+ | 'NamedUnitWithoutName'
83
+ | 'NonUnitEntityReferredAsUnit'
84
+ | 'NoProject'
85
+ | 'NotEnoughAttributes'
86
+ | 'OpenSpace'
87
+ | 'PropertySetWithoutName'
88
+ | 'PropertyWithoutName'
89
+ | 'QuantityWithoutName'
90
+ | 'RepresentationItemWithoutContext'
91
+ | 'StyleContainsMultipleSurfaceStyles'
92
+ | 'SubContextInProjectRepresentationContexts'
93
+ | 'UnitWithoutType'
94
+ | 'UnknownMaterialType'
95
+ | 'UnknownPrefix'
96
+ | 'UnknownUnitType'
97
+ | 'UnsupportedRepresentationItem'
98
+ | 'UnsupportedStyleElement'
99
+ | 'UnsupportedUnitType';
100
+
101
+ /**
102
+ * A diagnostic node for a Twin file.
103
+ */
104
+ export interface TwinDiagnosticNode {
105
+ data: TwinDiagnosticNodeData;
106
+ entries: TwinDiagnosticEntry[];
107
+ [property: string]: any;
108
+ }
109
+
110
+ export interface TwinDiagnosticNodeData {
111
+ /**
112
+ * The identifier of the entity in the Twin file.
113
+ */
114
+ gid?: string;
115
+ /**
116
+ * The identifier of the model this entity belongs to.
117
+ */
118
+ modelId?: string;
119
+ /**
120
+ * The name of the entity.
121
+ */
122
+ name?: string;
123
+ /**
124
+ * Incoming identifier from the IFC file.
125
+ */
126
+ originalGid?: string;
127
+ [property: string]: any;
128
+ }
129
+
130
+ export interface TwinDiagnosticEntry {
131
+ category: DiagnosticCategory;
132
+ code?: TwinDiagnosticCode;
133
+ level: DiagnosticLevel;
134
+ message: string;
135
+ }
136
+
137
+ export type TwinDiagnosticCode =
138
+ | 'CircularHierarchy'
139
+ | 'FacilityPartNotMapped'
140
+ | 'GeometryReferenceEmpty'
141
+ | 'GeometryReferenceShadowed'
142
+ | 'InvalidInsertionPoint'
143
+ | 'InvalidStructure'
144
+ | 'MissingElement'
145
+ | 'MissingFile'
146
+ | 'PatchTargetNotFound';
147
+
148
+ /**
149
+ * Specification of a Twinfinity Twin
150
+ */
151
+ export interface TwinSpecification {
152
+ /**
153
+ * Spaces that are not part of any facility
154
+ */
155
+ aggregatedSpaces?: string[];
156
+ /**
157
+ * Ids of Twins that are part of this Twin
158
+ */
159
+ aggregatedTwins?: string[];
160
+ elementQuantities?: ElementQuantities[];
161
+ /**
162
+ * Collection of entities that are part of the twin
163
+ */
164
+ entities: EntityCollection;
165
+ /**
166
+ * Per-file patch operations applied to model products before merge
167
+ */
168
+ filePatches?: { [key: string]: FilePatchSet };
169
+ /**
170
+ * Unique identifier for the twin
171
+ */
172
+ id?: string;
173
+ /**
174
+ * Twin location in WGS84
175
+ */
176
+ location?: Location;
177
+ /**
178
+ * Name of the Twin
179
+ */
180
+ name: string;
181
+ propertySets?: PropertySet[];
182
+ /**
183
+ * The site of the Twin
184
+ */
185
+ site?: string;
186
+ }
187
+
188
+ export interface ElementQuantities {
189
+ name: string;
190
+ simpleQuantities?: SimpleQuantity[];
191
+ }
192
+
193
+ export interface SimpleQuantity {
194
+ name: string;
195
+ /**
196
+ * Type of value (e.g IfcQuantityArea, IfcQuantityNumber)
197
+ */
198
+ type?: SingleQuantityValueType;
199
+ /**
200
+ * Value of the quantity given in SI units
201
+ */
202
+ value?: number;
203
+ }
204
+
205
+ /**
206
+ * Type of value (e.g IfcQuantityArea, IfcQuantityNumber)
207
+ *
208
+ * Types of qunatity values that consists of a single value
209
+ */
210
+ export type SingleQuantityValueType =
211
+ | 'IfcQuantityArea'
212
+ | 'IfcQuantityCount'
213
+ | 'IfcQuantityLength'
214
+ | 'IfcQuantityNumber'
215
+ | 'IfcQuantityVolume'
216
+ | 'IfcQuantityTime'
217
+ | 'IfcQuantityWeight';
218
+
219
+ /**
220
+ * Collection of entities that are part of the twin
221
+ */
222
+ export interface EntityCollection {
223
+ /**
224
+ * Facility entities in the Twin
225
+ */
226
+ facilities?: { [key: string]: Facility };
227
+ /**
228
+ * Facility part entities in the Twin
229
+ */
230
+ facilityParts?: { [key: string]: FacilityPart };
231
+ /**
232
+ * Site entities in the Twin
233
+ */
234
+ sites?: { [key: string]: Site };
235
+ /**
236
+ * Space entities in the Twin
237
+ */
238
+ spaces?: { [key: string]: Space };
239
+ [property: string]: any;
240
+ }
241
+
242
+ /**
243
+ * Facility (e.g. building or bridge)
244
+ */
245
+ export interface Facility {
246
+ /**
247
+ * Facilities that are part of the facility (e.g. when a building is a complex of buildings)
248
+ */
249
+ aggregatedFacilities?: string[];
250
+ /**
251
+ * Distinct parts of the facility (e.g. storey or railway part)
252
+ */
253
+ aggregatedFacilityParts?: string[];
254
+ /**
255
+ * Spaces in the facility that do not belong to a facility part
256
+ */
257
+ aggregatedSpaces?: string[];
258
+ /**
259
+ * Type of facility (e.g. IfcBuilding)
260
+ */
261
+ class: FacilityClass;
262
+ elementQuantities?: ElementQuantities[];
263
+ /**
264
+ * Unique identifier for the building
265
+ */
266
+ id: string;
267
+ name?: string;
268
+ propertySets?: PropertySet[];
269
+ }
270
+
271
+ /**
272
+ * Type of facility (e.g. IfcBuilding)
273
+ *
274
+ * Types of facilities
275
+ */
276
+ export type FacilityClass = 'IfcBridge' | 'IfcBuilding' | 'IfcMarineFacility' | 'IfcRailway' | 'IfcRoad';
277
+
278
+ export interface PropertySet {
279
+ name: string;
280
+ /**
281
+ * Properties contained in the set
282
+ */
283
+ properties?: Property[];
284
+ /**
285
+ * Properties that in themselves are sets of properties
286
+ */
287
+ propertySets?: PropertySet[];
288
+ }
289
+
290
+ export interface Property {
291
+ name: string;
292
+ /**
293
+ * Property value for simple single value properties
294
+ */
295
+ value?: SinglePropertyValue;
296
+ }
297
+
298
+ /**
299
+ * Property value for simple single value properties
300
+ */
301
+ export interface SinglePropertyValue {
302
+ /**
303
+ * Type of value (e.g IfcDate, IfcAreaMeasure, IfcInteger, IfcElectricCurrentMeasure)
304
+ */
305
+ type: SinglePropertyValueType;
306
+ value: number | string;
307
+ }
308
+
309
+ /**
310
+ * Type of value (e.g IfcDate, IfcAreaMeasure, IfcInteger, IfcElectricCurrentMeasure)
311
+ *
312
+ * Types of property values that consists of a single value
313
+ */
314
+ export type SinglePropertyValueType =
315
+ | 'IfcAbsorbedDoseMeasure'
316
+ | 'IfcAccelerationMeasure'
317
+ | 'IfcAmountOfSubstanceMeasure'
318
+ | 'IfcAngularVelocityMeasure'
319
+ | 'IfcAreaMeasure'
320
+ | 'IfcBinary'
321
+ | 'IfcBoolean'
322
+ | 'IfcCountMeasure'
323
+ | 'IfcDate'
324
+ | 'IfcDateTime'
325
+ | 'IfcDescriptiveMeasure'
326
+ | 'IfcDoseEquivalentMeasure'
327
+ | 'IfcDuration'
328
+ | 'IfcDynamicViscosityMeasure'
329
+ | 'IfcElectricCapacitanceMeasure'
330
+ | 'IfcElectricChargeMeasure'
331
+ | 'IfcElectricConductanceMeasure'
332
+ | 'IfcElectricCurrentMeasure'
333
+ | 'IfcElectricResistanceMeasure'
334
+ | 'IfcElectricVoltageMeasure'
335
+ | 'IfcEnergyMeasure'
336
+ | 'IfcForceMeasure'
337
+ | 'IfcFrequencyMeasure'
338
+ | 'IfcHeatFluxDensityMeasure'
339
+ | 'IfcHeatingValueMeasure'
340
+ | 'IfcIdentifier'
341
+ | 'IfcIlluminanceMeasure'
342
+ | 'IfcInductanceMeasure'
343
+ | 'IfcInteger'
344
+ | 'IfcIntegerCountRateMeasure'
345
+ | 'IfcIonConcentrationMeasure'
346
+ | 'IfcIsothermalMoistureCapacityMeasure'
347
+ | 'IfcKinematicViscosityMeasure'
348
+ | 'IfcLabel'
349
+ | 'IfcLengthMeasure'
350
+ | 'IfcLinearForceMeasure'
351
+ | 'IfcLinearMomentMeasure'
352
+ | 'IfcLinearStiffnessMeasure'
353
+ | 'IfcLinearVelocityMeasure'
354
+ | 'IfcLogical'
355
+ | 'IfcLuminousFluxMeasure'
356
+ | 'IfcLuminousIntensityDistributionMeasure'
357
+ | 'IfcLuminousIntensityMeasure'
358
+ | 'IfcMagneticFluxDensityMeasure'
359
+ | 'IfcMagneticFluxMeasure'
360
+ | 'IfcMassDensityMeasure'
361
+ | 'IfcMassFlowRateMeasure'
362
+ | 'IfcMassMeasure'
363
+ | 'IfcMassPerLengthMeasure'
364
+ | 'IfcModulusOfElasticityMeasure'
365
+ | 'IfcModulusOfLinearSubgradeReactionMeasure'
366
+ | 'IfcModulusOfRotationalSubgradeReactionMeasure'
367
+ | 'IfcModulusOfSubgradeReactionMeasure'
368
+ | 'IfcMoistureDiffusivityMeasure'
369
+ | 'IfcMolecularWeightMeasure'
370
+ | 'IfcMomentOfInertiaMeasure'
371
+ | 'IfcMonetaryMeasure'
372
+ | 'IfcNonNegativeLengthMeasure'
373
+ | 'IfcNormalisedRatioMeasure'
374
+ | 'IfcNumericMeasure'
375
+ | 'IfcParameterValue'
376
+ | 'IfcPHMeasure'
377
+ | 'IfcPlanarForceMeasure'
378
+ | 'IfcPlaneAngleMeasure'
379
+ | 'IfcPositiveInteger'
380
+ | 'IfcPositiveLengthMeasure'
381
+ | 'IfcPositivePlaneAngleMeasure'
382
+ | 'IfcPositiveRatioMeasure'
383
+ | 'IfcPowerMeasure'
384
+ | 'IfcPressureMeasure'
385
+ | 'IfcRadioActivityMeasure'
386
+ | 'IfcRatioMeasure'
387
+ | 'IfcReal'
388
+ | 'IfcRotationalFrequencyMeasure'
389
+ | 'IfcRotationalMassMeasure'
390
+ | 'IfcRotationalStiffnessMeasure'
391
+ | 'IfcSectionModulusMeasure'
392
+ | 'IfcSolidAngleMeasure'
393
+ | 'IfcSoundPowerMeasure'
394
+ | 'IfcSoundPressureLevelMeasure'
395
+ | 'IfcSoundPressureMeasure'
396
+ | 'IfcSpecificHeatCapacityMeasure'
397
+ | 'IfcTemperatureGradientMeasure'
398
+ | 'IfcTemperatureRateOfChangeMeasure'
399
+ | 'IfcText'
400
+ | 'IfcThermalAdmittanceMeasure'
401
+ | 'IfcThermalConductivityMeasure'
402
+ | 'IfcThermalExpansionCoefficientMeasure'
403
+ | 'IfcThermalResistanceMeasure'
404
+ | 'IfcThermalTransmittanceMeasure'
405
+ | 'IfcThermodynamicTemperatureMeasure'
406
+ | 'IfcTime'
407
+ | 'IfcTimeMeasure'
408
+ | 'IfcTimeStamp'
409
+ | 'IfcTorqueMeasure'
410
+ | 'IfcURIReference'
411
+ | 'IfcVaporPermeabilityMeasure'
412
+ | 'IfcVolumeMeasure'
413
+ | 'IfcVolumetricFlowRateMeasure'
414
+ | 'IfcWarpingConstantMeasure'
415
+ | 'IfcWarpingMomentMeasure';
416
+
417
+ /**
418
+ * Distinct part of the facility (e.g. storey or railway part)
419
+ */
420
+ export interface FacilityPart {
421
+ /**
422
+ * Facility parts that are parts of this part (e.g multiple floor 3 in on different height
423
+ * that are in different parts of the building)
424
+ */
425
+ aggregatedFacilityParts?: string[];
426
+ /**
427
+ * Spaces that are part of the facility part
428
+ */
429
+ aggregatedSpaces?: string[];
430
+ /**
431
+ * Type of facility part (e.g. IfcBuildingStorey)
432
+ */
433
+ class: FacilityPartClass;
434
+ elementQuantities?: ElementQuantities[];
435
+ /**
436
+ * Unique identifier for the facility part
437
+ */
438
+ id: string;
439
+ name?: string;
440
+ propertySets?: PropertySet[];
441
+ }
442
+
443
+ /**
444
+ * Type of facility part (e.g. IfcBuildingStorey)
445
+ *
446
+ * Types of facility parts
447
+ */
448
+ export type FacilityPartClass =
449
+ | 'IfcBridgePart'
450
+ | 'IfcBuildingStorey'
451
+ | 'IfcMarinePart'
452
+ | 'IfcRailwayPart'
453
+ | 'IfcRoadPart';
454
+
455
+ /**
456
+ * A site is a defined area of land, possibly covered with water, upon which constructions
457
+ * are located
458
+ */
459
+ export interface Site {
460
+ /**
461
+ * Facilities (e.g. buildings) in Twin
462
+ */
463
+ aggregatedFacilities?: string[];
464
+ /**
465
+ * Sites are part of this site
466
+ */
467
+ aggregatedSites?: string[];
468
+ /**
469
+ * Spaces that are not part of any facility
470
+ */
471
+ aggregatedSpaces?: string[];
472
+ /**
473
+ * Type of site (i.e. IfcSite)
474
+ */
475
+ class?: SiteType;
476
+ elementQuantities?: ElementQuantities[];
477
+ /**
478
+ * Unique identifier for the site
479
+ */
480
+ id?: string;
481
+ /**
482
+ * Name of the site
483
+ */
484
+ name: string;
485
+ /**
486
+ * Sets of properties describing the Twin (e.g. AreaType = Residential)
487
+ */
488
+ propertySets?: PropertySet[];
489
+ }
490
+
491
+ /**
492
+ * Type of site (i.e. IfcSite)
493
+ *
494
+ * Types of Twins
495
+ */
496
+ export type SiteType = 'IfcSite';
497
+
498
+ /**
499
+ * A volume defining part of a Twin or facility
500
+ */
501
+ export interface Space {
502
+ /**
503
+ * Spaces that are part of this space
504
+ */
505
+ aggregatedSpaces?: string[];
506
+ /**
507
+ * Type of space (e.g. IfcSpace)
508
+ */
509
+ class: SpaceType;
510
+ elementQuantities?: ElementQuantities[];
511
+ /**
512
+ * Unique identifier for the space
513
+ */
514
+ id: string;
515
+ name?: string;
516
+ propertySets?: PropertySet[];
517
+ }
518
+
519
+ /**
520
+ * Type of space (e.g. IfcSpace)
521
+ */
522
+ export type SpaceType = 'IfcSpace';
523
+
524
+ export interface FilePatchSet {
525
+ /**
526
+ * Ordered list of patch operations to apply
527
+ */
528
+ patches: FilePatch[];
529
+ /**
530
+ * Format version of the patch view. Currently only version 1 is supported.
531
+ */
532
+ viewVersion: number;
533
+ }
534
+
535
+ export interface FilePatch {
536
+ /**
537
+ * The patch operation type
538
+ */
539
+ op: Op;
540
+ /**
541
+ * JSON Pointer-style path: /entities/{ifcGid} or /entities/{ifcGid}/(name|description)
542
+ */
543
+ path: string;
544
+ /**
545
+ * New value for replace operations. Must be omitted for remove operations.
546
+ */
547
+ value?: string;
548
+ }
549
+
550
+ /**
551
+ * The patch operation type
552
+ */
553
+ export type Op = 'replace' | 'remove';
554
+
555
+ /**
556
+ * Twin location in WGS84
557
+ *
558
+ * A location in WGS84
559
+ */
560
+ export interface Location {
561
+ /**
562
+ * Metres above sea level
563
+ */
564
+ elevation?: number;
565
+ epsg: EpsgType;
566
+ latitude: number;
567
+ longitude: number;
568
+ /**
569
+ * Vector pointing to the true north
570
+ */
571
+ trueNorth?: number[];
572
+ }
573
+
574
+ export type EpsgType = '4326';