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().
| Field | Type | Description |
|---|---|---|
id | string | Tour identifier. |
name | string | Display name. |
thumbnailURL | string | null | Cover image, when one has been set. |
PropertyItem
A tour in full. Returned by get, getBySlug and update.
| Field | Type | Description |
|---|---|---|
id | string | Tour identifier. |
localId | string | Identifier assigned by the capture device. |
name | string | Display name. |
description | string | null | Free-text description. |
slug | string | null | Public slug. Present only while visibility is PUBLIC. |
thumbnailURL | string | null | Cover image. |
defaultScanId | string | null | Scan the viewer opens on. |
floors | Floor[] | Floors, each with its rooms and scans. |
Floor
| Field | Type | Description |
|---|---|---|
id | string | Floor identifier. |
name | string | null | Display name. Falls back to the floor number when unset. |
number | number | Ordering index within the tour. |
planURL | string | null | Floor-plan document, when one has been uploaded. |
rooms | Room[] | Rooms on this floor. |
Room
| Field | Type | Description |
|---|---|---|
id | string | Room identifier. |
localId | string | Identifier assigned by the capture device. Links a room to its outline in the floor plan. |
name | string | null | Display name. Falls back to the room type when unset. |
type | RoomType | See RoomType. |
date | Date | Capture date. |
scans | Scan[] | Panoramas captured in this room. |
Scan
A single panorama. Image URLs are filled in once processing reaches FINISHED.
| Field | Type | Description |
|---|---|---|
id | string | Scan identifier. |
localId | string | Identifier assigned by the capture device. |
status | ScanStatus | Processing state. See ScanStatus. |
theta | number | null | Default view direction in radians. |
transform | number[] | Column-major 4×4 matrix, 16 elements. Elements 12 and 14 hold the floor-plan position. |
panoramaURL | string | null | Full-resolution panorama. |
panoramaLowResURL | string | null | Low-resolution panorama, for a fast first paint. |
thumbnailURL | string | null | Thumbnail image. |
date | string | Capture 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.
| Field | Type | Description |
|---|---|---|
url | string | Storage endpoint to POST to. |
fields | Record<string, string> | Policy fields covered by the signature. Send them unchanged. |
expiresIn | number | Lifetime of the signature, in seconds. |
Enumerations
ScanStatus
Only FINISHED scans have images.
| Value | Meaning |
|---|---|
EMPTY | Created, nothing uploaded yet. |
QUEUED | Uploaded and waiting to be processed. |
PROCESSING | Being processed. |
FINISHED | Ready. Image URLs are populated. |
FAILED | Processing 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; }