<commit_before>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import { ActionType } from './actions';

export interface RequestUnitsDetailsAction {
	type: ActionType.RequestUnitsDetails;
}

export interface ReceiveUnitsDetailsAction {
	type: ActionType.ReceiveUnitsDetails;
	data: UnitData[];
}

export type UnitsAction = RequestUnitsDetailsAction | ReceiveUnitsDetailsAction;

export enum UnitType {
	unit = 'unit',
	meter = 'meter',
	suffix = 'suffix'
}

export enum DisplayableType {
	none = 'none',
	all = 'all',
	admin = 'admin'
}

export enum UnitRepresentType {
	quantity = 'quantity',
	flow = 'flow',
	raw = 'raw',
	unused = 'unused'
}

export interface UnitData {
	id: number;
	name: string;
	identifier: string;
	unitRepresent: UnitRepresentType;
	secInRate: number;
	typeOfUnit: UnitType;
	unitIndex: number;
	suffix: string;
	displayable: DisplayableType;
	preferredDisplay: boolean;
	note?: string;
}

export interface UnitDataById {
	[unitId: number]: UnitData;
}

export interface UnitsState {
	isFetching: boolean;
	units: UnitDataById[];
}<commit_msg>fix unit state syntax issue<commit_after>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import { ActionType } from './actions';

export interface RequestUnitsDetailsAction {
	type: ActionType.RequestUnitsDetails;
}

export interface ReceiveUnitsDetailsAction {
	type: ActionType.ReceiveUnitsDetails;
	data: UnitData[];
}

export type UnitsAction = RequestUnitsDetailsAction | ReceiveUnitsDetailsAction;

export enum UnitType {
	unit = 'unit',
	meter = 'meter',
	suffix = 'suffix'
}

export enum DisplayableType {
	none = 'none',
	all = 'all',
	admin = 'admin'
}

export enum UnitRepresentType {
	quantity = 'quantity',
	flow = 'flow',
	raw = 'raw',
	unused = 'unused'
}

export interface UnitData {
	id: number;
	name: string;
	identifier: string;
	unitRepresent: UnitRepresentType;
	secInRate: number;
	typeOfUnit: UnitType;
	unitIndex: number;
	suffix: string;
	displayable: DisplayableType;
	preferredDisplay: boolean;
	note?: string;
}

export interface UnitDataById {
	[unitId: number]: UnitData;
}

export interface UnitsState {
	isFetching: boolean;
	units: UnitDataById;
}
{'fraction_non_alphanumeric': 0.10479285134037368, 'fraction_numerical': 0.003249390739236393, 'mean_word_length': 4.822695035460993, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6701448', 'n_tokens_mistral': 801, 'n_tokens_neox': 786, 'n_words': 250}