Skip to main content

@twinfinity/twin

Index

Classes

Functions

Interfaces

Type Aliases

Type Aliases

AssetBatchGetStatus

AssetBatchGetStatus: found | notFound

AssetBatchOperation

AssetBatchOperationStatus

AssetBatchOperationStatus: upserted | deleted | restored | reverted | conflicted | notFound | forbidden | badRequest

DiagnosticCategory

DiagnosticCategory: InvalidData | Geometry

The category of the diagnostic event.

DiagnosticLevel

DiagnosticLevel: Fatal | Error | Warning | Information | Debug

The severity level of the diagnostic event.

EpsgType

EpsgType: 4326

FacilityClass

FacilityClass: IfcBridge | IfcBuilding | IfcMarineFacility | IfcRailway | IfcRoad

Type of facility (e.g. IfcBuilding)

Types of facilities

FacilityPartClass

FacilityPartClass: IfcBridgePart | IfcBuildingStorey | IfcMarinePart | IfcRailwayPart | IfcRoadPart

Type of facility part (e.g. IfcBuildingStorey)

Types of facility parts

IfcDiagnosticCode

IfcDiagnosticCode: CompletelyTransparent | HighVertexCount | IncorrectAttributeDataType | InvalidBound | InvalidColor | InvalidElementQuantity | InvalidEnumValue | InvalidFace | InvalidMesh | InvalidObjectReference | InvalidPosition | InvalidProperty | InvalidPropertySet | InvalidQuantity | InvalidRelation | InvalidSpecularHighlight | InvalidWorldCoordinateSystem | InvalidUnit | LargeMeshNotHealed | MappedItemWithoutTarget | MaterialHasMultipleStyles | MeshFarFromOrigo | MeshOmitted | MissingOrInvalidSurfaceColor | MissingPlacement | MultipleProjects | NamedUnitWithoutName | NonUnitEntityReferredAsUnit | NoProject | NotEnoughAttributes | OpenSpace | PropertySetWithoutName | PropertyWithoutName | QuantityWithoutName | RepresentationItemWithoutContext | StyleContainsMultipleSurfaceStyles | SubContextInProjectRepresentationContexts | UnitWithoutType | UnknownMaterialType | UnknownPrefix | UnknownUnitType | UnsupportedRepresentationItem | UnsupportedStyleElement | UnsupportedUnitType

Op

Op: replace | remove

The patch operation type

SinglePropertyValueType

SinglePropertyValueType: IfcAbsorbedDoseMeasure | IfcAccelerationMeasure | IfcAmountOfSubstanceMeasure | IfcAngularVelocityMeasure | IfcAreaMeasure | IfcBinary | IfcBoolean | IfcCountMeasure | IfcDate | IfcDateTime | IfcDescriptiveMeasure | IfcDoseEquivalentMeasure | IfcDuration | IfcDynamicViscosityMeasure | IfcElectricCapacitanceMeasure | IfcElectricChargeMeasure | IfcElectricConductanceMeasure | IfcElectricCurrentMeasure | IfcElectricResistanceMeasure | IfcElectricVoltageMeasure | IfcEnergyMeasure | IfcForceMeasure | IfcFrequencyMeasure | IfcHeatFluxDensityMeasure | IfcHeatingValueMeasure | IfcIdentifier | IfcIlluminanceMeasure | IfcInductanceMeasure | IfcInteger | IfcIntegerCountRateMeasure | IfcIonConcentrationMeasure | IfcIsothermalMoistureCapacityMeasure | IfcKinematicViscosityMeasure | IfcLabel | IfcLengthMeasure | IfcLinearForceMeasure | IfcLinearMomentMeasure | IfcLinearStiffnessMeasure | IfcLinearVelocityMeasure | IfcLogical | IfcLuminousFluxMeasure | IfcLuminousIntensityDistributionMeasure | IfcLuminousIntensityMeasure | IfcMagneticFluxDensityMeasure | IfcMagneticFluxMeasure | IfcMassDensityMeasure | IfcMassFlowRateMeasure | IfcMassMeasure | IfcMassPerLengthMeasure | IfcModulusOfElasticityMeasure | IfcModulusOfLinearSubgradeReactionMeasure | IfcModulusOfRotationalSubgradeReactionMeasure | IfcModulusOfSubgradeReactionMeasure | IfcMoistureDiffusivityMeasure | IfcMolecularWeightMeasure | IfcMomentOfInertiaMeasure | IfcMonetaryMeasure | IfcNonNegativeLengthMeasure | IfcNormalisedRatioMeasure | IfcNumericMeasure | IfcParameterValue | IfcPHMeasure | IfcPlanarForceMeasure | IfcPlaneAngleMeasure | IfcPositiveInteger | IfcPositiveLengthMeasure | IfcPositivePlaneAngleMeasure | IfcPositiveRatioMeasure | IfcPowerMeasure | IfcPressureMeasure | IfcRadioActivityMeasure | IfcRatioMeasure | IfcReal | IfcRotationalFrequencyMeasure | IfcRotationalMassMeasure | IfcRotationalStiffnessMeasure | IfcSectionModulusMeasure | IfcSolidAngleMeasure | IfcSoundPowerMeasure | IfcSoundPressureLevelMeasure | IfcSoundPressureMeasure | IfcSpecificHeatCapacityMeasure | IfcTemperatureGradientMeasure | IfcTemperatureRateOfChangeMeasure | IfcText | IfcThermalAdmittanceMeasure | IfcThermalConductivityMeasure | IfcThermalExpansionCoefficientMeasure | IfcThermalResistanceMeasure | IfcThermalTransmittanceMeasure | IfcThermodynamicTemperatureMeasure | IfcTime | IfcTimeMeasure | IfcTimeStamp | IfcTorqueMeasure | IfcURIReference | IfcVaporPermeabilityMeasure | IfcVolumeMeasure | IfcVolumetricFlowRateMeasure | IfcWarpingConstantMeasure | IfcWarpingMomentMeasure

Type of value (e.g IfcDate, IfcAreaMeasure, IfcInteger, IfcElectricCurrentMeasure)

Types of property values that consists of a single value

SingleQuantityValueType

SingleQuantityValueType: IfcQuantityArea | IfcQuantityCount | IfcQuantityLength | IfcQuantityNumber | IfcQuantityVolume | IfcQuantityTime | IfcQuantityWeight

Type of value (e.g IfcQuantityArea, IfcQuantityNumber)

Types of qunatity values that consists of a single value

SiteType

SiteType: IfcSite

Type of site (i.e. IfcSite)

Types of Twins

SpaceType

SpaceType: IfcSpace

Type of space (e.g. IfcSpace)

TwinBoundCapabilityName

TwinBoundCapabilityName: TwinScopedCapability | TwinCapability | (string & {})

A capability as read back from GET /twins/{twinId}/permissions/me. That probe answers with one flat array mixing both vocabularies: the twin's own TwinScopedCapability values, plus the asset-instance capabilities ViewAssets, EditAssets and DeleteAssets from the customer-wide asset domain, which gate the assets hanging off the twin. EditAssetTypes and ManageAssetPermissions are not twin-bound and are absent — ask GET /twins/permissions/me.

Names never collide across the two enums, so includes('EditAssets') is unambiguous. As with TwinScopedCapabilityName, the (string & {}) tail admits names a newer server knows.

TwinCapability

TwinCapability: ViewAssets | EditAssets | DeleteAssets | EditAssetTypes | ManageAssetPermissions

Named, customer-scoped capability the caller can exercise against the Twin service, granted on the asset domain — the one thing the service governs that is not bound to a single twin. Returned by GET /twins/permissions/me, listed by GET /twins/permissions and accepted by PUT /twins/permissions/{principalId}. Mirrors Twinfinity.Twin.Model.TwinCapability.

Distinct from TwinScopedCapability, which is held on one twin. The two vocabularies never share a name, because GET /twins/{twinId}/permissions/me answers with one flat array mixing both and each name is resolved against the vocabulary it came from.

This is the write vocabulary — the capabilities a grant may ask for. Values read back from the service are TwinCapabilityName, which also admits capabilities a newer server knows and this client does not; such a value is "not granted" as far as this client is concerned, and must be ignored rather than treated as an error.

TwinCapabilityName

TwinCapabilityName: TwinCapability | (string & {})

A capability as read back from the service: one of TwinCapability, or a name a newer server knows and this client does not.

Deliberately wider than the write vocabulary. A grant may only ask for capabilities that exist, so TwinCapability stays closed and a typo is a compile error; a listing, though, is whatever the server says, and ADR-0008 §5 makes tolerating unknown names a rule for readers. The (string & {}) tail keeps autocomplete on the five known values while forcing consumers who switch over a capability to write a default arm — which is where an unknown one must land.

TwinDiagnosticCode

TwinDiagnosticCode: CircularHierarchy | FacilityPartNotMapped | GeometryReferenceEmpty | GeometryReferenceShadowed | InvalidInsertionPoint | InvalidStructure | MissingElement | MissingFile | PatchTargetNotFound

TwinErrorCause

TwinErrorCause: NotAllowedToEditDeletedItem | NotAllowedToDeleteItem | ImmutableField | ReferencedItemNotFound | ReferencedItemDeleted | FileNotOwnedByTwin | DuplicateFileReference | MultipleVersionsOfSameFileOnSameNode | LimitOutOfRange | OffsetOutOfRange | IdMismatchBetweenUrlAndBody | BatchSizeEmpty | BatchSizeExceedsMaximum | InvalidParameterCombination | DocumentChangeNotFound | DeletePermissionRequired | CannotEditDeletedFile | CannotMoveFileBetweenTwins | ContainerDoesNotExist | DuplicateContainerIds | InsufficientPermissionsOnContainer | DuplicateId | MetadataTooLarge | InvalidTransform | InvalidFilePatches | MetadataValidationFailed | MetadataSchemaInvalid | AssetTypeNotFound | AssetCategoryAndTypeRequired | StringIdInUse | CatalogTooLarge | EtagRequired | InvalidPaginationToken | SystemPrincipalImmutable | ManagePermissionsNotGrantableToAllAuthenticated | ValidationFailed | (string & {})

Closed union of cause values the Twin service emits on a 400 response. Mirrors TwinBadRequestCause in backend/services/Twinfinity.Twin/Controllers/Model/TwinStatus.cs. The trailing (string & {}) keeps autocomplete on the known values while still accepting unknown causes at the type level — a forward-compat pattern: a new cause emitted by a newer server doesn't break older clients that pattern-match on the union. Matches the shape of TwinCapability in types/twin-permissions-api.ts.

TwinErrorItemKind

TwinErrorItemKind: Twin | Asset | File | DocumentChange | AssetCategory | AssetType | Attachment | Document | Principal | Request | (string & {})

Closed union of item.kind values the server emits. Mirrors ItemKind in backend/services/Twinfinity.Twin/Model/ItemReference.cs. Same forward-compat shape as TwinErrorCause.

TwinPermissionsConflictCause

TwinPermissionsConflictCause: EtagMismatch | EtagRequired | ScopesNotProvisioned | (string & {})

The cause values the twin-scoped permission routes emit on a 409. A subset of TwinConflictCause in backend/services/Twinfinity.Twin/Controllers/Model/TwinStatus.cs: that enum's GroupIdAlreadyInUse and ScopeIdAlreadyInUse are raised by twin creation, which answers through TwinConflictError, never through this surface. Carries the same forward-compat tail as TwinErrorCause.

TwinScopedCapability

TwinScopedCapability: ReadTwin | WriteTwin | DeleteTwin | ManageTwinPermissions

Named capability a principal can hold on one specific twin, granted through /twins/{twinId}/permissions. Mirrors Twinfinity.Twin.Model.TwinScopedCapability.

Distinct from TwinCapability, which is customer-scoped and speaks about the asset domain rather than about one twin.

This is the write vocabulary — the four capabilities a grant may ask for. Values read back from the service are TwinScopedCapabilityName, which also admits capabilities a newer server knows and this client does not; such a value is "not granted" as far as this client is concerned, and must be ignored rather than treated as an error.

TwinScopedCapabilityName

TwinScopedCapabilityName: TwinScopedCapability | (string & {})

A capability as read back from the service: one of TwinScopedCapability, or a name a newer server knows and this client does not.

Deliberately wider than the write vocabulary. A grant may only ask for capabilities that exist, so TwinPermissionsPut stays closed and a typo is a compile error; a listing, though, is whatever the server says, and ADR-0008 §5 makes tolerating unknown names a rule for readers. The (string & {}) tail keeps autocomplete on the four known values while forcing consumers who switch over a capability to write a default arm — which is where an unknown one must land.

UploadStatus

UploadStatus: NotFound | InProgress | Completed | Cancelled | Failed