import { AlarmHelpersConfig, Camera, Context, Event, Geofence, GeofenceUser, Location, NotificationCreate, Topic, User } from './utils/types'; export default class AlarmHelpers { context: Context; config: any; notificationUri?: string; constructor(config: AlarmHelpersConfig); /** * Returns the webhookId of the event. */ webhookId(): number | undefined; /** * Returns the id of the company. */ companyId(): number | undefined; /** * Returns all information about the location. */ location(): Location | undefined; /** * Returns the name of the location. */ locationName(): string | undefined; /** * Returns the id of the location. */ locationId(): number | undefined; /** * Returns the timezone of the location. */ timezone(): string; /** * Returns all information about the camera. */ camera(): Camera | undefined; /** * Returns the name of the camera. */ cameraName(): string | undefined; /** * Returns the id of the camera. */ cameraId(): number | undefined; /** * Returns all information about the geofence. */ geofence(): Geofence | undefined; /** * Returns the status of the geofence. */ geofenceStatus(): string | undefined; /** * Returns all information about each user on the geofence. */ geofenceUsers(): GeofenceUser[] | undefined; /** * Returns the presence of each user on the geofence. */ geofenceUsersPresence(): string[] | undefined; /** * Returns the device of each user on the geofence. */ geofenceUsersDevice(): string[] | undefined; /** * Returns all information about each user on the company. */ users(): User[] | undefined; /** * Returns the id of each user on the company. */ userIds(): number[] | undefined; /** * Returns the name of each user on the company. */ userNames(): string[] | undefined; /** * Returns the email of each user on the company. */ userEmails(): string[] | undefined; /** * Returns the eventId of the event. */ eventId(): string | undefined; /** * Returns all information about the event. */ event(): Event | undefined; /** * Returns the id of the identity associated with the event if it exists. */ identityId(): number | undefined; /** * Returns the identity name associated with the event if it exists. */ identityName(): string | undefined; /** * Returns the topic of the event. */ topic(): Topic | undefined; /** * Returns the timestamp of the event. */ timestamp(): string | undefined; /** * Returns the tagged feature of the event if it exists. */ feature(): string | undefined; /** * Returns the bounding box of the event if it exists. */ boundingBox(): object | undefined; /** * Returns the image url of the event. */ image(): string | undefined; /** * Checks if the the event was tagged with a 'face' feature. */ faceDetected(): boolean; /** * Checks if the the event was tagged with a 'person' feature. */ personDetected(): boolean; /** * Checks if the the event was tagged with a 'car' feature. */ carDetected(): boolean; /** * Checks if the the event was tagged with a 'person' feature and that the confidence * was greater than the input confidence. */ personDetectedWithConfidence(confidence: number): boolean; /** * Checks whether the location id in the alarm configuration matches the location id in * the event. */ matchesLocation(): boolean; /** * Checks whether the geofence status in the alarm configuration matches the geofence status * in the event. */ matchesGeofenceStatus(): boolean; /** * Checks whether the camera(s) id(s) in the alarm configuration matches the camera id * in the event. */ matchesCameras(): boolean; /** * Checks whether the feature in the alarm configuration matches the feature in the event. */ matchesFeature(): boolean; /** * Checks whether the identity(s) id(s) in the alarm configuration matches the identity id * in the event. */ matchesIdentities(): boolean; /** * Gets the current time in military time and the current day and checks it against the * schedule that may be specified in the alarm configuration. This can be useful when * choosing whether to trigger a script based on the schedule. */ inSchedule(): boolean; /** * Formats the timestamp sent in the event to be ISO8601 format. */ formattedTimestamp(): string; /** * Sends a notification to the Nirovision notification service or another specified service. * Generally this function will always want to be used as the final step of the script, after * the conditions of the script have been met and the desired notification has been constructed. */ sendNotification(notification: NotificationCreate): Promise; }