export type JSONValue = string | number | boolean | undefined | { [x: string]: JSONValue; } | Array; export type JSONObject = Record; export type RPCMessage = { jsonrpc: '2.0'; method: string; params: JSONObject; id: number; }; export type RPCResult = { jsonrpc: '2.0'; result: { value: boolean; }; id: number; error: JSONObject | JSONValue; }; export type ValidationType = 'none' | 'normal'; export type ValidateParams = any | any[]; export type Timestamp = string | number | Date; export type LogValue = { timestamp: Timestamp; data: string | number; }; export type InitialState = string | number | LogValue; export type LogValues = LogValue[]; export type ValuePermission = 'r' | 'w' | 'rw' | 'wr'; export type StateType = 'Report' | 'Control'; export type StateStatus = 'Send' | 'Pending' | 'Failed'; export type EventLogLevel = 'important' | 'error' | 'success' | 'warning' | 'info' | 'debug'; export type LogOperation = 'arbitrary' | 'array_agg' | 'avg' | 'mean' | 'count' | 'geometric_mean' | 'max' | 'min' | 'sqrdiff' | 'stddev' | 'sum' | 'variance' | 'harmonic_mean' | 'first' | 'last' | 'count_distinct' | 'median' | 'percentile' | 'lower_quartile' | 'upper_quartile' | 'mode'; export type EventType = 'create' | 'update' | 'delete' | 'direct'; export type Mail = { body: string; subject: string; from: string; }; export type FilterOperatorType = '=' | '!=' | '==' | '<' | '<=' | '>' | '>=' | '~' | '!~'; export type FilterValueOperatorType = { operator: FilterOperatorType; value: string | string[] | number | number[]; }; export type FilterValueType = string | string[] | number | number[] | FilterValueOperatorType | undefined; export type Connection = { timestamp?: string; online?: boolean; }; export type ParentName = { network?: string; device?: string; value?: string; }; export type Meta = { id?: string; type?: string; version?: string; redirect?: string; manufacturer?: string; iot?: boolean; upgradable?: boolean; connection?: Connection; stable_connection?: Connection; created?: string; updated?: string; revision?: number; changed?: string; owner?: string; size?: number; path?: string; parent?: string; parent_name?: ParentName; parent_name_by_user?: ParentName; usage_daily?: Record; product?: string; deprecated?: boolean; icon?: string; historical?: boolean; name_by_user?: string; tag?: string[]; tag_by_user?: string[]; }; export type MetaItem = { meta: Meta; }; export type FetchRequest = { endpoint: string; params?: JSONObject; body?: JSONObject; throw_error?: boolean; go_internal?: boolean; }; export type AnalyticsResponse = any; export type NotificationCustomData = { all: boolean; future: boolean; selected: { meta: { id: string; }; }[]; }; export type NotificationCustom = { type: string; quantity: number; limitation: JSONObject[]; method: JSONObject[]; option: JSONObject; message: string; name_installation: string; title_installation: string | null; data?: NotificationCustomData; }; export type NotificationBase = { action: string; code: number; type: string; from: string; to: string; from_type: string; from_name: string; to_type: string; type_ids: string; priority: number; ids: string[]; info: JSONObject[]; identifier: string; }; export type LogGroupBy = 'year' | 'quarter' | 'month' | 'week' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond' | 'microsecond' | 'dow' | 'doy'; export type LogRequest = { start?: Date | string; end?: Date | string; limit?: number; offset?: number; operation?: LogOperation; group_by?: LogGroupBy; timestamp_format?: string; timezone?: string; order?: 'ascending' | 'descending'; order_by?: string; number?: boolean; all?: boolean; }; export type ExternalLogValues = { meta: Meta; more: boolean; type: string; data: { timestamp: string; time: string; data: string; [key: string]: string; }[]; }; export type OtherContact = { contact: string; status: 'pending' | 'refused' | 'accepted' | 'send' | 'not_sent' | 'archive'; contact_message: string; language: string; last_update?: string; }; export type UserDailyLimit = { point?: number; document?: number; log_row?: number; traffic?: number; iot_traffic?: number; stream_traffic?: number; file?: number; request?: number; request_time?: number; }; export type NetworkDailyLimit = { point?: number; iot_traffic?: number; request?: number; request_time?: number; }; export type PointManagement = { base_point?: any; base_network?: any; user_daily_limit?: UserDailyLimit; network_daily_limit?: NetworkDailyLimit; }; export type IRestriction = { retrieve: boolean; update: boolean; delete: boolean; create: boolean; }; export type DataMeta = { id?: string; type?: string; version?: number; }; export type AnalyticsParameters = { start?: string; end?: string; provider?: string; region?: string; };