2023-06-21 16:08:39 +05:30
|
|
|
import type { ConfigFile } from 'fyo/core/types';
|
2023-04-03 13:51:46 +05:30
|
|
|
|
2022-05-19 14:35:19 +05:30
|
|
|
export type UnknownMap = Record<string, unknown>;
|
2022-04-08 12:29:42 +05:30
|
|
|
export type Translation = { translation: string; context?: string };
|
|
|
|
export type LanguageMap = Record<string, Translation>;
|
2022-04-23 14:53:44 +05:30
|
|
|
|
|
|
|
export type CountryInfoMap = Record<string, CountryInfo | undefined>;
|
|
|
|
export interface CountryInfo {
|
|
|
|
code: string;
|
|
|
|
currency: string;
|
|
|
|
currency_fraction?: string;
|
|
|
|
currency_fraction_units?: number;
|
|
|
|
smallest_currency_fraction_value?: number;
|
|
|
|
currency_symbol?: string;
|
|
|
|
timezones?: string[];
|
|
|
|
fiscal_year_start: string;
|
|
|
|
fiscal_year_end: string;
|
|
|
|
locale: string;
|
|
|
|
}
|
2022-05-24 12:48:56 +05:30
|
|
|
|
|
|
|
export interface VersionParts {
|
|
|
|
major: number;
|
|
|
|
minor: number;
|
|
|
|
patch: number;
|
|
|
|
beta?: number;
|
2022-05-27 15:09:24 +05:30
|
|
|
}
|
|
|
|
|
2023-03-07 14:16:19 +05:30
|
|
|
export type Creds = {
|
|
|
|
errorLogUrl: string;
|
|
|
|
telemetryUrl: string;
|
|
|
|
tokenString: string;
|
|
|
|
};
|
2022-09-20 22:49:09 +05:30
|
|
|
|
|
|
|
export type UnexpectedLogObject = {
|
|
|
|
name: string;
|
|
|
|
message: string;
|
|
|
|
stack: string;
|
|
|
|
more: Record<string, unknown>;
|
2023-03-07 14:16:19 +05:30
|
|
|
};
|
2022-10-25 13:43:00 +05:30
|
|
|
|
|
|
|
export interface SelectFileOptions {
|
|
|
|
title: string;
|
|
|
|
filters?: { name: string; extensions: string[] }[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface SelectFileReturn {
|
|
|
|
name: string;
|
|
|
|
filePath: string;
|
|
|
|
success: boolean;
|
|
|
|
data: Buffer;
|
|
|
|
canceled: boolean;
|
2023-02-01 14:30:02 +05:30
|
|
|
}
|
|
|
|
|
2023-06-22 14:22:54 +05:30
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2023-02-01 14:30:02 +05:30
|
|
|
export type PropertyEnum<T extends Record<string, any>> = {
|
|
|
|
[key in keyof Required<T>]: key;
|
|
|
|
};
|
2023-03-07 14:16:19 +05:30
|
|
|
|
|
|
|
export type TemplateFile = { file: string; template: string; modified: string };
|
2023-03-22 22:58:36 +05:30
|
|
|
|
|
|
|
export interface Keys extends ModMap {
|
|
|
|
pressed: Set<string>;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ModMap {
|
|
|
|
alt: boolean;
|
|
|
|
ctrl: boolean;
|
|
|
|
meta: boolean;
|
|
|
|
shift: boolean;
|
|
|
|
repeat: boolean;
|
|
|
|
}
|
2023-04-03 13:51:46 +05:30
|
|
|
|
|
|
|
export interface ConfigFilesWithModified extends ConfigFile {
|
|
|
|
modified: string;
|
2023-06-21 16:08:39 +05:30
|
|
|
}
|