Restructure: rename to Pulse and move app to root
- Renamed project from PSA-Utils to Pulse - Moved all app files from autotask-app/ to root - Updated package.json name to 'pulse' - Updated Docker container names to pulse-app and pulse-redis - Updated Docker network name to pulse-network
This commit is contained in:
parent
f429f3af54
commit
3c3124d8c9
117 changed files with 8433 additions and 239 deletions
213
lib/types/addigy.ts
Normal file
213
lib/types/addigy.ts
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
// Addigy API Types
|
||||
|
||||
export interface AddigyConfig {
|
||||
apiUrl: string;
|
||||
apiToken: string;
|
||||
organizationId?: string; // Parent organization ID if needed
|
||||
}
|
||||
|
||||
export interface PaginationParams {
|
||||
page?: number;
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export interface FilterOperation {
|
||||
audit_field: string;
|
||||
type: 'string' | 'list' | 'number' | 'boolean' | 'date';
|
||||
operation: 'equals' | 'contains' | 'greater_than' | 'less_than' | 'in' | 'not_in';
|
||||
value: string | number | boolean | string[] | number[];
|
||||
}
|
||||
|
||||
export interface QueryParams {
|
||||
filters?: FilterOperation[];
|
||||
page?: number;
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export interface AddigyDevice {
|
||||
agentid: string;
|
||||
'Device Name': string;
|
||||
'Device Model Name': string;
|
||||
'MAC OS X Version'?: string;
|
||||
'iOS Version'?: string;
|
||||
'Processor Type'?: string;
|
||||
'Processor Speed (GHz)'?: number;
|
||||
'Total Disk Space (GB)'?: number;
|
||||
'Free Disk Space (GB)'?: number;
|
||||
'Free Disk Percentage'?: number;
|
||||
'Battery Percentage'?: number;
|
||||
'Battery Charging'?: boolean;
|
||||
'Battery Capacity Loss Percentage'?: number;
|
||||
'Current User'?: string;
|
||||
'Serial Number'?: string;
|
||||
'Displays Serial Number'?: string[];
|
||||
'Agent Version': string;
|
||||
policy_id: string;
|
||||
online: boolean;
|
||||
'Firewall Enabled'?: boolean;
|
||||
'FileVault Enabled'?: boolean;
|
||||
'Remote Login Enabled'?: boolean;
|
||||
'XCode Installed'?: boolean;
|
||||
'SMART Failing'?: boolean;
|
||||
'Has Wireless'?: boolean;
|
||||
Timezone?: string;
|
||||
'Warranty Expiration Date'?: string;
|
||||
'Warranty Days Left'?: number;
|
||||
'TeamViewer Client Id'?: string;
|
||||
'Crashplan Days Since Last Backup'?: number;
|
||||
'Last Check In'?: string;
|
||||
// Additional fields from device audits
|
||||
[key: string]: string | number | boolean | string[] | undefined;
|
||||
}
|
||||
|
||||
export interface AddigyPolicy {
|
||||
policyId: string;
|
||||
orgid: string;
|
||||
name: string;
|
||||
parent?: string | null;
|
||||
color?: string;
|
||||
icon?: string;
|
||||
download_path?: string;
|
||||
agent_path?: string;
|
||||
last_deployed?: string;
|
||||
creation_time?: number;
|
||||
agent_version?: string;
|
||||
ignore_updates?: boolean;
|
||||
instructions?: any[];
|
||||
vnc_settings?: any;
|
||||
splashtop_settings?: any;
|
||||
ssh_settings?: any;
|
||||
system_updates_settings?: any;
|
||||
collector_settings?: any;
|
||||
prebuilt_app_settings?: any;
|
||||
}
|
||||
|
||||
export interface AddigyOrganization {
|
||||
orgid: string;
|
||||
name: string;
|
||||
parent_org_id?: string;
|
||||
domain?: string;
|
||||
created_at?: string;
|
||||
}
|
||||
|
||||
export interface AddigyApplication {
|
||||
name: string;
|
||||
version: string;
|
||||
path: string;
|
||||
bundle_id?: string;
|
||||
installed_date?: string;
|
||||
}
|
||||
|
||||
export interface AddigyDeviceWithApps {
|
||||
agentid: string;
|
||||
'Device Name': string;
|
||||
'Device Model Name': string;
|
||||
'MAC OS X Version'?: string;
|
||||
'iOS Version'?: string;
|
||||
'Agent Version': string;
|
||||
policy_id: string;
|
||||
online: boolean;
|
||||
'Serial Number'?: string;
|
||||
'Current User'?: string;
|
||||
'Free Disk Percentage'?: number;
|
||||
'Battery Percentage'?: number;
|
||||
'Firewall Enabled'?: boolean;
|
||||
'FileVault Enabled'?: boolean;
|
||||
installed_applications?: AddigyApplication[];
|
||||
[key: string]: string | number | boolean | string[] | AddigyApplication[] | undefined;
|
||||
}
|
||||
|
||||
export interface AddigyAlert {
|
||||
id: string;
|
||||
device_id: string;
|
||||
alert_type: string;
|
||||
severity: 'critical' | 'warning' | 'info';
|
||||
message: string;
|
||||
created_at: string;
|
||||
resolved: boolean;
|
||||
resolved_at?: string;
|
||||
}
|
||||
|
||||
export interface AddigyMaintenanceItem {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
policy_id?: string;
|
||||
enabled: boolean;
|
||||
schedule?: string;
|
||||
last_run?: string;
|
||||
next_run?: string;
|
||||
}
|
||||
|
||||
export interface AddigyMonitoringItem {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
policy_id?: string;
|
||||
enabled: boolean;
|
||||
condition: string;
|
||||
alert_level: 'critical' | 'warning' | 'info';
|
||||
}
|
||||
|
||||
export interface AddigyCustomFact {
|
||||
id: string;
|
||||
name: string;
|
||||
value: string | number | boolean;
|
||||
device_id: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface AddigySoftwareItem {
|
||||
identifier: string;
|
||||
name: string;
|
||||
version?: string;
|
||||
versions?: string[];
|
||||
category?: string;
|
||||
description?: string;
|
||||
install_type?: string;
|
||||
}
|
||||
|
||||
export interface AddigyVariable {
|
||||
id: string;
|
||||
name: string;
|
||||
value: string;
|
||||
policy_id?: string;
|
||||
device_id?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface AddigyApiResponse<T> {
|
||||
data?: T;
|
||||
items?: T[];
|
||||
total?: number;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
pages?: number;
|
||||
}
|
||||
|
||||
export interface AddigyApiError {
|
||||
error: string;
|
||||
message: string;
|
||||
status_code?: number;
|
||||
details?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
// Enums for common values
|
||||
export enum AddigyDeviceStatus {
|
||||
Online = 'online',
|
||||
Offline = 'offline',
|
||||
}
|
||||
|
||||
export enum AddigyAlertSeverity {
|
||||
Critical = 'critical',
|
||||
Warning = 'warning',
|
||||
Info = 'info',
|
||||
}
|
||||
|
||||
export enum AddigyDeviceType {
|
||||
Mac = 'mac',
|
||||
iPhone = 'iphone',
|
||||
iPad = 'ipad',
|
||||
AppleTV = 'appletv',
|
||||
}
|
||||
262
lib/types/autotask.ts
Normal file
262
lib/types/autotask.ts
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
// Autotask API Types
|
||||
|
||||
export interface AutotaskConfig {
|
||||
apiUrl: string;
|
||||
username: string;
|
||||
password: string;
|
||||
apiIntegrationCode: string;
|
||||
}
|
||||
|
||||
export type AutotaskHeaders = {
|
||||
Authorization: string;
|
||||
ApiIntegrationcode: string;
|
||||
'Content-Type': string;
|
||||
Accept: string;
|
||||
ImpersonationResourceId?: string;
|
||||
}
|
||||
|
||||
export interface QueryFilter {
|
||||
op: 'eq' | 'noteq' | 'gt' | 'lt' | 'gte' | 'lte' | 'contains' | 'beginsWith' | 'endsWith';
|
||||
field: string;
|
||||
value: string | number | boolean;
|
||||
}
|
||||
|
||||
export interface QueryParams {
|
||||
filter?: QueryFilter[];
|
||||
maxRecords?: number;
|
||||
includeFields?: string[];
|
||||
excludeFields?: string[];
|
||||
}
|
||||
|
||||
export interface Resource {
|
||||
id: number;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
email: string;
|
||||
userName?: string;
|
||||
isActive?: boolean;
|
||||
title?: string;
|
||||
mobilePhone?: string;
|
||||
officePhone?: string;
|
||||
officeExtension?: string;
|
||||
}
|
||||
|
||||
export interface Ticket {
|
||||
id: number;
|
||||
ticketNumber: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
status: number;
|
||||
priority: number;
|
||||
assignedResourceID?: number;
|
||||
companyID: number;
|
||||
companyLocationID?: number;
|
||||
contactID?: number;
|
||||
createDate: string;
|
||||
dueDateTime?: string;
|
||||
lastActivityDate?: string;
|
||||
completedDate?: string;
|
||||
queueID?: number;
|
||||
issueType?: number;
|
||||
subIssueType?: number;
|
||||
}
|
||||
|
||||
export interface Task {
|
||||
id: number;
|
||||
title: string;
|
||||
description?: string;
|
||||
status: number;
|
||||
priority: number;
|
||||
assignedResourceID?: number;
|
||||
projectID?: number;
|
||||
phaseID?: number;
|
||||
createDateTime: string;
|
||||
startDateTime?: string;
|
||||
endDateTime?: string;
|
||||
completedDateTime?: string;
|
||||
percentComplete?: number;
|
||||
estimatedHours?: number;
|
||||
actualHours?: number;
|
||||
}
|
||||
|
||||
export interface Company {
|
||||
id: number;
|
||||
companyName: string;
|
||||
companyNumber?: string;
|
||||
isActive: boolean;
|
||||
phone?: string;
|
||||
alternatePhone1?: string;
|
||||
alternatePhone2?: string;
|
||||
fax?: string;
|
||||
webSiteURL?: string;
|
||||
address1?: string;
|
||||
address2?: string;
|
||||
city?: string;
|
||||
state?: string;
|
||||
postalCode?: string;
|
||||
country?: string;
|
||||
companyType?: number;
|
||||
territoryID?: number;
|
||||
marketSegmentID?: number;
|
||||
competitorID?: number;
|
||||
}
|
||||
|
||||
export interface ConfigurationItem {
|
||||
id: number;
|
||||
companyID: number;
|
||||
companyLocationID?: number;
|
||||
contactID?: number;
|
||||
contractID?: number;
|
||||
contractServiceID?: number;
|
||||
createDate: string;
|
||||
createdByPersonType?: number;
|
||||
createdByResourceID?: number;
|
||||
dattoAvailableKilobytes?: number;
|
||||
dattoDeviceMemoryMegabytes?: number;
|
||||
dattoHostname?: string;
|
||||
dattoInternalIP?: string;
|
||||
dattoKernelVersionID?: number;
|
||||
dattoLastCheckInDateTime?: string;
|
||||
dattoNumberOfCPUs?: number;
|
||||
dattoNumberOfLogicalProcessors?: number;
|
||||
dattoOSVersionID?: number;
|
||||
dattoProtectedKilobytes?: number;
|
||||
dattoRemoteIP?: string;
|
||||
dattoSerialNumber?: string;
|
||||
dattoUDF?: string;
|
||||
dattoUsedKilobytes?: number;
|
||||
dattoZfsPoolZpoolVersionID?: number;
|
||||
deviceNetworkingID?: string;
|
||||
dnsServer1?: string;
|
||||
dnsServer2?: string;
|
||||
installDate?: string;
|
||||
installedByContactID?: number;
|
||||
installedByID?: number;
|
||||
installedProductCategoryID?: number;
|
||||
isActive: boolean;
|
||||
lastActivityPersonResourceID?: number;
|
||||
lastActivityPersonType?: number;
|
||||
lastModifiedTime?: string;
|
||||
location?: string;
|
||||
macAddress?: string;
|
||||
modelNumber?: string;
|
||||
notes?: string;
|
||||
numberOfUsers?: number;
|
||||
parentConfigurationItemID?: number;
|
||||
productID?: number;
|
||||
referenceNumber?: string;
|
||||
referenceTitle: string;
|
||||
rmmDeviceAuditAntivirusStatusID?: number;
|
||||
rmmDeviceAuditArchitectureID?: number;
|
||||
rmmDeviceAuditBackupStatusID?: number;
|
||||
rmmDeviceAuditDescription?: string;
|
||||
rmmDeviceAuditDeviceTypeID?: number;
|
||||
rmmDeviceAuditDisplayAdaptorID?: number;
|
||||
rmmDeviceAuditDomainID?: number;
|
||||
rmmDeviceAuditHostname?: string;
|
||||
rmmDeviceAuditIPAddress?: string;
|
||||
rmmDeviceAuditLastUser?: string;
|
||||
rmmDeviceAuditMacAddress?: string;
|
||||
rmmDeviceAuditManufacturerID?: number;
|
||||
rmmDeviceAuditMemoryBytes?: number;
|
||||
rmmDeviceAuditMissingPatchCount?: number;
|
||||
rmmDeviceAuditMobileNetworkOperatorID?: number;
|
||||
rmmDeviceAuditMobileNumber?: string;
|
||||
rmmDeviceAuditModelID?: number;
|
||||
rmmDeviceAuditMotherboardID?: number;
|
||||
rmmDeviceAuditOperatingSystemID?: number;
|
||||
rmmDeviceAuditPatchStatusID?: number;
|
||||
rmmDeviceAuditProcessorID?: number;
|
||||
rmmDeviceAuditServicePackID?: number;
|
||||
rmmDeviceAuditSNMPContact?: string;
|
||||
rmmDeviceAuditSNMPLocation?: string;
|
||||
rmmDeviceAuditSNMPName?: string;
|
||||
rmmDeviceAuditSoftwareStatusID?: number;
|
||||
rmmDeviceAuditStorageBytes?: number;
|
||||
rmmDeviceID?: string;
|
||||
rmmDeviceUID?: string;
|
||||
rmmOpenAlertCount?: number;
|
||||
serialNumber?: string;
|
||||
serviceBundleID?: number;
|
||||
serviceID?: number;
|
||||
serviceLevelAgreementID?: number;
|
||||
setupFee?: number;
|
||||
sourceProductID?: number;
|
||||
type?: number;
|
||||
vendorID?: number;
|
||||
vendorName?: string;
|
||||
warrantyExpirationDate?: string;
|
||||
}
|
||||
|
||||
export interface Attachment {
|
||||
id: number;
|
||||
attachmentType: 'FILE_ATTACHMENT' | 'FILE_LINK' | 'URL' | 'NOTE';
|
||||
fullPath: string;
|
||||
title: string;
|
||||
publish: 1 | 2; // 1 = All Autotask Users, 2 = Internal Users Only
|
||||
data?: string; // Base64 encoded file data
|
||||
contentType?: string;
|
||||
createDate?: string;
|
||||
creatorResourceID?: number;
|
||||
}
|
||||
|
||||
export interface PicklistValue {
|
||||
value: number | string;
|
||||
label: string;
|
||||
isDefaultValue?: boolean;
|
||||
sortOrder?: number;
|
||||
isActive?: boolean;
|
||||
isSystem?: boolean;
|
||||
}
|
||||
|
||||
export interface EntityField {
|
||||
name: string;
|
||||
dataType: string;
|
||||
length?: number;
|
||||
isRequired?: boolean;
|
||||
isReadOnly?: boolean;
|
||||
isQueryable?: boolean;
|
||||
isReference?: boolean;
|
||||
referenceEntityType?: string;
|
||||
picklistValues?: PicklistValue[];
|
||||
}
|
||||
|
||||
export interface ApiResponse<T> {
|
||||
item?: T;
|
||||
items?: T[];
|
||||
pageDetails?: {
|
||||
count: number;
|
||||
requestCount: number;
|
||||
prevPageUrl?: string;
|
||||
nextPageUrl?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiError {
|
||||
message: string;
|
||||
errors?: Array<{
|
||||
message: string;
|
||||
field?: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
export enum TicketStatus {
|
||||
New = 1,
|
||||
InProgress = 8,
|
||||
Waiting = 9,
|
||||
Complete = 5,
|
||||
}
|
||||
|
||||
export enum TaskStatus {
|
||||
New = 1,
|
||||
InProgress = 11,
|
||||
Waiting = 12,
|
||||
Complete = 5,
|
||||
}
|
||||
|
||||
export enum Priority {
|
||||
Critical = 1,
|
||||
High = 2,
|
||||
Medium = 3,
|
||||
Low = 4,
|
||||
}
|
||||
105
lib/types/datto-rmm.ts
Normal file
105
lib/types/datto-rmm.ts
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
// Datto RMM API Types
|
||||
|
||||
export interface DattoRMMConfig {
|
||||
apiUrl: string;
|
||||
apiKey: string;
|
||||
apiSecret: string;
|
||||
}
|
||||
|
||||
export interface DattoRMMDevice {
|
||||
id: number;
|
||||
uid: string;
|
||||
siteId: number;
|
||||
siteUid: string;
|
||||
siteName: string;
|
||||
deviceType: {
|
||||
category: string;
|
||||
type: string;
|
||||
};
|
||||
hostname: string;
|
||||
description: string;
|
||||
intIpAddress: string;
|
||||
extIpAddress: string;
|
||||
macAddresses?: string[];
|
||||
domain: string;
|
||||
manufacturer?: string;
|
||||
model?: string;
|
||||
serialNumber?: string;
|
||||
lastSeen: number; // timestamp in milliseconds
|
||||
lastLoggedInUser?: string;
|
||||
lastReboot?: number;
|
||||
lastAuditDate?: number;
|
||||
creationDate?: number;
|
||||
online: boolean;
|
||||
suspended: boolean;
|
||||
deleted: boolean;
|
||||
rebootRequired?: boolean;
|
||||
a64Bit?: boolean;
|
||||
operatingSystem: string;
|
||||
cagVersion?: string;
|
||||
displayVersion?: string;
|
||||
memory?: number; // in MB
|
||||
cpuCores?: number;
|
||||
cpuName?: string;
|
||||
diskSize?: number; // in GB
|
||||
antivirus?: {
|
||||
antivirusProduct: string;
|
||||
antivirusStatus: string;
|
||||
};
|
||||
patchManagement?: {
|
||||
patchStatus: string;
|
||||
patchesApprovedPending: number;
|
||||
patchesNotApproved: number;
|
||||
patchesInstalled: number;
|
||||
};
|
||||
softwareStatus?: string;
|
||||
portalUrl?: string;
|
||||
webRemoteUrl?: string;
|
||||
warrantyDate?: string | null;
|
||||
snmpEnabled?: boolean;
|
||||
deviceClass?: string;
|
||||
udf?: Record<string, any>;
|
||||
}
|
||||
|
||||
export interface DattoRMMSite {
|
||||
id: string;
|
||||
uid: string;
|
||||
name: string;
|
||||
description: string;
|
||||
notes: string;
|
||||
onDemand: boolean;
|
||||
proxySettings?: {
|
||||
host: string;
|
||||
port: number;
|
||||
username?: string;
|
||||
};
|
||||
devices?: DattoRMMDevice[];
|
||||
}
|
||||
|
||||
export interface DattoRMMApiResponse<T> {
|
||||
items?: T[];
|
||||
item?: T;
|
||||
pageDetails?: {
|
||||
page: number;
|
||||
perPage: number;
|
||||
totalPages: number;
|
||||
totalItems: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface DattoRMMError {
|
||||
error: string;
|
||||
message: string;
|
||||
code?: string;
|
||||
}
|
||||
|
||||
export interface DeviceComparison {
|
||||
autotaskDevice?: any; // ConfigurationItem from Autotask
|
||||
rmmDevice?: DattoRMMDevice;
|
||||
status: 'matched' | 'autotask-only' | 'rmm-only' | 'mismatch';
|
||||
discrepancies?: {
|
||||
field: string;
|
||||
autotaskValue: any;
|
||||
rmmValue: any;
|
||||
}[];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue