Skip to main content

@lifeaz/cure-helper

Lifeaz Clark Unified Retrieval Engine Helper - 1.2.4

DeviceType​

type DeviceType = '_Clark_' | '_Schiller_' | '_Unknown_';

DeviceTags​

type DeviceTags = '_Pro_' | '_Refurbished_' | '_None_';

ReportType​

type ReportType = '_Daily_' | '_Weekly_' | '_Monthly_' | '_Half_Yearly_' | '_Forced_' | '_Forced_Upgrade_' | '_Post_Utilization_' | '_Post_Provisioning_' | '_Unknown_';

BatteryState​

type BatteryState = '_Critical_' | '_Low_' | '_Normal_' | '_Unknown_';

LedState​

type LedState = '_Soon_Unstable_' | '_Stable_' | '_Unstable_' | '_Unknown_';

Criticality​

type Criticality = 0 | 1 | 2 | 3 | 4 | 5 | 6;

RecommendedActionType​

type RecommendedActionType = '_Embedded_' | '_Determined_';

NetworkStatusType​

type NetworkStatusType = '_2G_' | '_4G_' | '_WiFi_';

EventSource​

type EventSource = '_User_' | '_System_';

EventStatus​

type EventStatus = '_G_' | '_O_' | '_R_' | null;

AddressConfidence​

type AddressConfidence = '_Verified_' | '_Partial_';

PlaceType​

type PlaceType = '_Internal_' | '_Unverified_Address_';

Alert​

type Alert = {
  id: number;
  code: string;
  criticality: Criticality;
  positionDeviceStatus: number | null;
};

RecommendedAction​

type RecommendedAction = {
  id: number;
  title: string;
  content: string | null;
  type: RecommendedActionType;
  isForOOR: boolean;
  icon?: string;
  colors?: {
    primary: string;
    secondary?: string;
  };
  priority?: number;
};

Version​

type Version = {
id: string;
maintained: boolean;
released: boolean;
};

UserEvent​

type UserEvent = {
content: string;
writer: string;
};

SystemEvent​

type SystemEvent = {
  type: ReportType | '_OOR_';
  led?: LedState;
  temperature?: string | null;
  version?: Version | null;
  actions?: RecommendedAction[];
  content?: string;
  validities?: {
    electrodes: EventStatus;
    board: EventStatus;
    therapy: EventStatus;
    battery: EventStatus;
  };
  counters?: {
    analyses: number | null;
    shocks: number | null;
  };
};

Event​

type Event = {
  id: UUID | null;
  source: EventSource;
  content: UserEvent | SystemEvent;
  at: Dayjs | null;
};

Use​

type Use = {
id: UUID;
at: Dayjs;
active: boolean;
falsePositive: boolean;
};

Geozone​

type Geozone = {
id: UUID;
name: string;
};

Country​

type Country = {
  id: UUID;
  geozone: Geozone;
  iso: string;
  phonePrefix: string;
  name: string;
};

State​

type State = {
  id: UUID;
  country: Country;
  name: string;
  iso: string;
};

AddressCoordinates​

type AddressCoordinates = {
lat: number;
lng: number;
};

Address​

type Address = {
  id: UUID;
  stringified: string;
  confidence: AddressConfidence;
  country: Country | null;
  state: State | null;
  alias: string | null;
  line: string;
  details: string | null;
  postcode: string | null;
  city: string | null;
  placeId: string | null;
  coordinates: AddressCoordinates | null;
};

Contact​

type Contact = {
id: UUID;
stringified: string;
email: string | null;
name: string | null;
phone: string | null;
};

Place​

type Place = {
  id: UUID;
  label: string;
  type: PlaceType;
};

Temperature​

type Temperature = {
degrees: number;
raw: string;
};

ChargeDurations​

type ChargeDurations = {
_1: number;
_2: number;
_3: number;
};

VCap​

type VCap = {
_1: number;
_2: number;
};

Battery​

type Battery = {
  voltage: number;
  raw: string;
  chargeDurations: ChargeDurations;
  vcap: VCap;
};

Electrodes​

type Electrodes = {
expiration: Dayjs | null;
batch: string | null;
};

Counters​

type Counters = {
analysis: number;
onMode: number;
use: number;
shock: number;
charge: number;
demo: number;
};

Dates​

type Dates = {
lastOnMode: Dayjs | null;
lastAnalysis: Dayjs | null;
lastUse: Dayjs | null;
};

States​

type States = {
  led: LedState | null;
  battery: BatteryState | null;
};

Statuses​

type Statuses = {
_1: number;
_2: number;
_3: number;
_4: number;
_5: number;
_6: number;
};

AutotestResult​

type AutotestResult = {
id: UUID;
autotestId: string;
data: string;
};

NetworkStatus​

type NetworkStatus = {
mcc: string;
mnc: string;
tac: string;
cid: string;
rssi: string;
};

NetworkPosition2G4G​

type NetworkPosition2G4G = {
lac: number;
cellId: number;
};

NetworkPositionWiFi​

type NetworkPositionWiFi = {
mac: string;
rssi: number;
};

Network​

type Network = {
  id: UUID;
  type: NetworkStatusType;
  status: NetworkStatus;
  positions: NetworkPosition2G4G[] | NetworkPositionWiFi[];
};

Report​

type Report = {
  id: UUID;
  type: ReportType;
  receptionDate: Dayjs;
  date: Dayjs | null;
  awsSerial: string | null;
  bootloaderVersion: string | null;
  electrodes: Electrodes | null;
  counters: Counters | null;
  dates: Dates | null;
  battery: Battery | null;
  version: Version | null;
  temperature: Temperature | null;
  usbConnected: boolean | null;
  buffer: string | null;
  alerts: Alert[];
  states: States;
  statuses: Statuses | null;
  versionForced: boolean | null;
  serialRaw: string | null;
  autotestResults: AutotestResult[];
  network: Network | null;
  actions: RecommendedAction[];
};

Device​

type Device = {
  id: UUID;
  serial: string;
  sides: ('client' | 'server')[];
  reports: {
    latest?: Partial<Report>;
    history?: Partial<Report>[];
  };
  events: Event[];
  needAction: boolean | null;
  isDemoOrTest: boolean | null;
  type: DeviceType | null;
  tags: DeviceTags[];
  isOOR: boolean | null;
  docs: {
    logbook: string | null;
    certificate: string | null;
  };
  client: {
    places: Place[];
    title: string | null;
    contact: Contact | null;
    location: Address | null;
  };
  determined: {
    actions: RecommendedAction[];
    firstUp: Dayjs | null;
    uses: Use[];
  };
};