Interface OpenStreamOptions

Options passed to API.openStream.

interface OpenStreamOptions {
    floorID?: string;
    locationID: string;
    onClose?: (() => void);
    onException?: ((error) => void);
    onInitialTags?: ((tags) => void);
    onOpen?: (() => void);
    onTagUpdate?: ((tag) => void);
    resourceIDs?: string[];
    resourceType?: "LOCATION" | "TAG" | "FLOOR" | "LABEL" | "ZONE";
}

Properties

floorID?: string

Meridian floor ID

locationID: string

Meridian location ID

onClose?: (() => void)

Called when the stream closes

Type declaration

    • (): void
    • Returns void

onException?: ((error) => void)

Called when an error happens

Type declaration

    • (error): void
    • Parameters

      • error: Error

      Returns void

onInitialTags?: ((tags) => void)

Called with ALL tags on first load

Type declaration

    • (tags): void
    • Parameters

      Returns void

onOpen?: (() => void)

Called when the stream opens

Type declaration

    • (): void
    • Returns void

onTagUpdate?: ((tag) => void)

Called when a tag location updates

Type declaration

    • (tag): void
    • Parameters

      Returns void

resourceIDs?: string[]

Default: [floorID] if resourceType === "FLOOR" OR [locationID] if resourceType === "LOCATION", Valid values: [locationID | floorIDs | tagIDs | tagLabelIDs | zoneIDs]

resourceType?: "LOCATION" | "TAG" | "FLOOR" | "LABEL" | "ZONE"

Default: "FLOOR" if floorID is defined Valid values: "LOCATION" | "TAG" | "FLOOR" | "LABEL" | "ZONE"