import { Types } from "mongoose"; import { AccountIndustry, } from "../constants"; import { EncryptedDataType } from "./common"; import { SAMLType } from "./saml"; export interface CronConfigSourceType extends Record { protocol: string, username: string, hostname: string, filePath: string, } export interface CronConfigAuthType { password: EncryptedDataType | null, sshPrivateKey: EncryptedDataType | null, sshPublicKey: EncryptedDataType | null, useSSHKey: boolean, } export interface CronConfigCSVFieldMapType { PersonnelID: string, PersonnelName: string, PersonnelRank: string, PersonnelWorkCode: string, PersonnelNote: string, StartTime: string, EndTime: string, UnitName: string, TimeFormat: string, } export interface ReconcileTimeOptionsType { enabled: boolean, startTime: string, endTime: string, } export interface AgencyCronConfigType extends Record { enabled: boolean, autoProcessingEnabled: boolean, source: CronConfigSourceType, auth: CronConfigAuthType processPath: string, completedPath: string, importType: string, timezone: string, customApiPath: string, alterChunkSize: boolean, reconcileEnabled: boolean, reconcileTimeOptions: ReconcileTimeOptionsType, hasLabelCustomization: boolean assignmentOverride: boolean, csvFieldMap: CronConfigCSVFieldMapType, useAlternateId: boolean, alternateIdField: string, useAlternateWorkingCode: boolean, alternateWorkingCodeField: string, useAlternateRadioName: boolean, alternateRadioNameField: string, exportWorkingOnly: boolean, strictAgencyCodeMatch: boolean, strictAgencyCodeMatchOptions: string[], } export interface AgencyLicensing extends Record { tcPro: number, tcManager: number, tcStatus: number, tcMobile: number, tcWeb: number, fireMapperPro: number, locationToCAD: number, } export interface CrossStaffedUnitType { radioName: string, crossStaffedUnits: string[], alwaysCrossStaff: boolean, } export interface SAMLRefType { // SAML._id _id: Types.ObjectId, selector: string, // What shows up on the login screens, // possibly the same value as saml.name label: string, } export interface AgencyType { _id: Types.ObjectId, active: boolean, isCADToCADDefault: boolean, activeUserCount: number, administrators: Types.ObjectId[], agencyApiKey: string, code: string, cronConfig: AgencyCronConfigType, crossStaffing: CrossStaffedUnitType[], departmentId: Types.ObjectId, domain: string, industry?: AccountIndustry, licensing: AgencyLicensing, modified: Date, modified_unix_date: number, name: string, personnelApiKey: string, personnelIntegration: boolean, personnelMonitorHours: number, saml: SAMLType[], samlRef: SAMLRefType[] uuid: string, }