dt-common-device
Version:
A secure and robust device management library for IoT applications
91 lines (90 loc) • 2.06 kB
TypeScript
export declare enum IssuesCategory {
READINESS = "READINESS",
OPERATIONS = "OPERATIONS",
SECURITY = "SECURITY",
ENERGY = "ENERGY",
OTHER = "OTHER"
}
export declare enum EntityType {
DEVICE = "DEVICE",
COLLECTION = "COLLECTION",
USER = "USER",
INTEGRATION = "INTEGRATION",
PROPERTY = "PROPERTY",
HUB = "HUB",
SCHEDULE = "SCHEDULE",
ALERT = "ALERT",
OTHER = "OTHER"
}
export declare enum IssueStatus {
PENDING = "PENDING",
IN_PROGRESS = "IN_PROGRESS",
RESOLVED = "RESOLVED",
CLOSED = "CLOSED",
CANCELLED = "CANCELLED",
ON_HOLD = "ON_HOLD"
}
export declare enum IssuePriority {
LOW = "LOW",
MEDIUM = "MEDIUM",
HIGH = "HIGH",
CRITICAL = "CRITICAL",
URGENT = "URGENT"
}
export interface IssueComment {
id: string;
userId: string;
content: string;
createdAt: Date;
updatedAt?: Date;
}
export interface IssueDocument {
_id: string;
category: IssuesCategory;
propertyId: string;
title: string;
description: string;
entityId?: string;
entityType: EntityType;
status: IssueStatus;
priority: IssuePriority;
assignedTo?: string;
createdBy: string;
updatedBy?: string;
isDeleted: boolean;
createdAt: Date;
updatedAt: Date;
resolvedAt?: Date;
dueDate?: Date;
comments?: IssueComment[];
}
export interface CreateIssueData {
category: IssuesCategory;
propertyId: string;
title: string;
description: string;
entityId?: string;
entityType: EntityType;
priority?: IssuePriority;
assignedTo?: string;
createdBy: string;
dueDate?: Date;
}
export interface UpdateIssueData {
category?: IssuesCategory;
title?: string;
description?: string;
entityId?: string;
entityType?: EntityType;
status?: IssueStatus;
priority?: IssuePriority;
assignedTo?: string;
updatedBy: string;
resolvedAt?: Date;
dueDate?: Date;
isDeleted?: boolean;
}
export interface AddCommentData {
userId: string;
content: string;
}