Skip to main content

Types

All types are exported from the package root.

import type {
PropertyItem,
PropertyListItem,
Floor,
Room,
Scan,
ScanStatus,
RoomType,
Visibility
} from "@thenoughtyfox/noughty-tours-web-sdk";

PropertyListItem

Returned by tours.list().

FieldTypeDescription
idstringTour identifier.
namestringDisplay name.
thumbnailURLstring | nullCover image, when one has been set.

PropertyItem

A tour in full. Returned by get, getBySlug and update.

FieldTypeDescription
idstringTour identifier.
localIdstringIdentifier assigned by the capture device.
namestringDisplay name.
descriptionstring | nullFree-text description.
slugstring | nullPublic slug. Present only while visibility is PUBLIC.
thumbnailURLstring | nullCover image.
defaultScanIdstring | nullScan the viewer opens on.
floorsFloor[]Floors, each with its rooms and scans.

Floor

FieldTypeDescription
idstringFloor identifier.
namestring | nullDisplay name. Falls back to the floor number when unset.
numbernumberOrdering index within the tour.
planURLstring | nullFloor-plan document, when one has been uploaded.
roomsRoom[]Rooms on this floor.

Room

FieldTypeDescription
idstringRoom identifier.
localIdstringIdentifier assigned by the capture device. Links a room to its outline in the floor plan.
namestring | nullDisplay name. Falls back to the room type when unset.
typeRoomTypeSee RoomType.
dateDateCapture date.
scansScan[]Panoramas captured in this room.

Scan

A single panorama. Image URLs are filled in once processing reaches FINISHED.

FieldTypeDescription
idstringScan identifier.
localIdstringIdentifier assigned by the capture device.
statusScanStatusProcessing state. See ScanStatus.
thetanumber | nullDefault view direction in radians.
transformnumber[]Column-major 4×4 matrix, 16 elements. Elements 12 and 14 hold the floor-plan position.
panoramaURLstring | nullFull-resolution panorama.
panoramaLowResURLstring | nullLow-resolution panorama, for a fast first paint.
thumbnailURLstring | nullThumbnail image.
datestringCapture timestamp, ISO 8601.

Presigned upload

Returned by getPlanUploadURL and getThumbnailUploadURL. Send a multipart/form-data POST to url with every entry of fields appended first and the file appended last.

FieldTypeDescription
urlstringStorage endpoint to POST to.
fieldsRecord<string, string>Policy fields covered by the signature. Send them unchanged.
expiresInnumberLifetime of the signature, in seconds.

Enumerations

ScanStatus

Only FINISHED scans have images.

ValueMeaning
EMPTYCreated, nothing uploaded yet.
QUEUEDUploaded and waiting to be processed.
PROCESSINGBeing processed.
FINISHEDReady. Image URLs are populated.
FAILEDProcessing failed. No images will be produced.

Visibility

PUBLIC · PRIVATE

A PUBLIC tour has a slug and is readable through getBySlug. Setting it PRIVATE revokes the slug, and any link built from it stops resolving.

RoomType

kitchen · livingRoom · bathroom · diningRoom · bedroom · hallway · office · terrace · balcony · other

Geometry

Shared shapes used by floor-plan and scan geometry.

interface Point2D { x: number; y: number; }
interface Point3D { x: number; y: number; z: number; }
interface Bounds2D { min: Point2D; max: Point2D; }
interface Bounds3D { min: Point3D; max: Point3D; }