@twinfinity/twin
Index
Classes
- AssetAttachmentConflictError
- AssetAttachmentNotFoundError
- AssetBatchError
- AssetCatalogTooLargeError
- AssetCategoryConflictError
- AssetCategoryForbiddenError
- AssetCategoryNotFoundError
- AssetCategoryValidationError
- AssetConflictError
- AssetForbiddenError
- AssetNotFoundError
- AssetPermissionsConflictError
- AssetTypeConflictError
- AssetTypeForbiddenError
- AssetTypeNotFoundError
- AssetTypeValidationError
- AssetValidationError
- ProcessorNotFoundError
- TwinClient
- TwinConflictError
- TwinFileConflictError
- TwinFileNotFoundError
- TwinFileValidationError
- TwinNotFoundError
- TwinPermissionsConflictError
- TwinPermissionsForbiddenError
- TwinPrincipalNotFoundError
- TwinTemporarilyUnavailableError
- TwinUnauthenticatedError
- TwinValidationError
Functions
Interfaces
- ApiCreateUploadSessionResponse
- AssetAttachmentPut
- AssetBatchDeleteOperation
- AssetBatchGetRequest
- AssetBatchGetResponse
- AssetBatchRequest
- AssetBatchResponse
- AssetBatchRestoreOperation
- AssetBatchUpsertItem
- AssetBatchUpsertOperation
- AssetCatalogCategory
- AssetCatalogResponse
- AssetCatalogTooLargeErrorBody
- AssetCategoryDelete
- AssetCategoryGet
- AssetCategoryPut
- AssetGet
- AssetGroupGet
- AssetGroupsGet
- AssetListItem
- AssetPermissionsConflictErrorBody
- AssetPermissionsPut
- AssetPosition
- AssetPost
- AssetPrincipalPermissionsGet
- AssetPut
- AssetTypeDelete
- AssetTypeGet
- AssetTypePut
- AttachmentGet
- AttachmentPost
- BatchItemError
- BatchItemResult
- BatchSummary
- Coordinates
- Diagnostics
- DiagnosticsSummary
- ElementQuantities
- EntityCollection
- EntityRepresentation
- Facility
- FacilityPart
- FilePatch
- FilePatchSet
- GenericDiagnosticEntry
- ITwinClient
- IfcDiagnosticEntry
- IfcDiagnosticNode
- IfcDiagnosticNodeData
- InheritedPermissions
- ListTwinItem
- Location
- MyPermissions
- MyTwinPermissions
- PaginatedResponse
- Pagination
- Property
- PropertySet
- SimpleQuantity
- SinglePropertyValue
- Site
- Space
- TwinComputedPropertySetsResponse
- TwinContentResponse
- TwinDelete
- TwinDiagnosticEntry
- TwinDiagnosticNode
- TwinDiagnosticNodeData
- TwinDiagnosticsResponse
- TwinErrorBody
- TwinFileDelete
- TwinFileGet
- TwinFileListOptions
- TwinFilePut
- TwinFileReference
- TwinFileRestore
- TwinFileSource
- TwinFileTransform
- TwinFileVersionListOptions
- TwinGet
- TwinGroupGet
- TwinGroupsGet
- TwinPermissionsConflictErrorBody
- TwinPermissionsPut
- TwinPrincipalPermissionsGet
- TwinProcessorEvent
- TwinProcessorResponse
- TwinPut
- TwinReference
- TwinSpecification
- TwinVersionContentResponse
- UploadStatusGet
Type Aliases
- AssetBatchGetStatus
- AssetBatchOperation
- AssetBatchOperationStatus
- DiagnosticCategory
- DiagnosticLevel
- EpsgType
- FacilityClass
- FacilityPartClass
- IfcDiagnosticCode
- Op
- SinglePropertyValueType
- SingleQuantityValueType
- SiteType
- SpaceType
- TwinBoundCapabilityName
- TwinCapability
- TwinCapabilityName
- TwinDiagnosticCode
- TwinErrorCause
- TwinErrorItemKind
- TwinPermissionsConflictCause
- TwinScopedCapability
- TwinScopedCapabilityName
- UploadStatus
Type Aliases
AssetBatchGetStatus
AssetBatchOperation
AssetBatchOperationStatus
DiagnosticCategory
DiagnosticLevel
The severity level of the diagnostic event.
EpsgType
FacilityClass
Type of facility (e.g. IfcBuilding)
Types of facilities
FacilityPartClass
Type of facility part (e.g. IfcBuildingStorey)
Types of facility parts
IfcDiagnosticCode
Op
The patch operation type
SinglePropertyValueType
Type of value (e.g IfcDate, IfcAreaMeasure, IfcInteger, IfcElectricCurrentMeasure)
Types of property values that consists of a single value
SingleQuantityValueType
Type of value (e.g IfcQuantityArea, IfcQuantityNumber)
Types of qunatity values that consists of a single value
SiteType
Type of site (i.e. IfcSite)
Types of Twins
SpaceType
Type of space (e.g. IfcSpace)
TwinBoundCapabilityName
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
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
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
TwinErrorCause
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
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
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
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
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.
The category of the diagnostic event.