akeyless-types-commons 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # akeyless-types-commons
2
+ commons types for server-side and client-side
@@ -0,0 +1,11 @@
1
+ export declare enum RuptelaEventEnum {
2
+ location = 1,
3
+ ignition_on = 2,
4
+ ignition_off = 3,
5
+ engine_on = 4,
6
+ engine_off = 5,
7
+ power_cut_on = 6,
8
+ power_cut_off = 7,
9
+ charging_on = 8,
10
+ charging_off = 9
11
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RuptelaEventEnum = void 0;
4
+ var RuptelaEventEnum;
5
+ (function (RuptelaEventEnum) {
6
+ RuptelaEventEnum[RuptelaEventEnum["location"] = 1] = "location";
7
+ RuptelaEventEnum[RuptelaEventEnum["ignition_on"] = 2] = "ignition_on";
8
+ RuptelaEventEnum[RuptelaEventEnum["ignition_off"] = 3] = "ignition_off";
9
+ RuptelaEventEnum[RuptelaEventEnum["engine_on"] = 4] = "engine_on";
10
+ RuptelaEventEnum[RuptelaEventEnum["engine_off"] = 5] = "engine_off";
11
+ RuptelaEventEnum[RuptelaEventEnum["power_cut_on"] = 6] = "power_cut_on";
12
+ RuptelaEventEnum[RuptelaEventEnum["power_cut_off"] = 7] = "power_cut_off";
13
+ RuptelaEventEnum[RuptelaEventEnum["charging_on"] = 8] = "charging_on";
14
+ RuptelaEventEnum[RuptelaEventEnum["charging_off"] = 9] = "charging_off";
15
+ })(RuptelaEventEnum || (exports.RuptelaEventEnum = RuptelaEventEnum = {}));
16
+ //# sourceMappingURL=car_events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"car_events.js","sourceRoot":"","sources":["../../src/enums/car_events.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IACxB,+DAAY,CAAA;IACZ,qEAAe,CAAA;IACf,uEAAgB,CAAA;IAChB,iEAAa,CAAA;IACb,mEAAc,CAAA;IACd,uEAAgB,CAAA;IAChB,yEAAiB,CAAA;IACjB,qEAAe,CAAA;IACf,uEAAgB,CAAA;AACpB,CAAC,EAVW,gBAAgB,gCAAhB,gBAAgB,QAU3B"}
@@ -0,0 +1,31 @@
1
+ export declare enum DefaultClient {
2
+ default = "akeyless",
3
+ camera_installation = "akeyless"
4
+ }
5
+ export declare enum BoardStatus {
6
+ ReadyForInstallation = 1,
7
+ Installed = 2,
8
+ Malfunction = 3,
9
+ NoSim = 4
10
+ }
11
+ export declare enum UnitStatus {
12
+ NewOrder = 0,
13
+ Installed = 1,
14
+ WaitingForService = 2,
15
+ InstalledButNotActive = 3,
16
+ NewInstallation = 4
17
+ }
18
+ export declare enum ClientStatus {
19
+ Active = "active",
20
+ Suspended = "suspended",
21
+ Deleted = "deleted"
22
+ }
23
+ export declare enum LanguageOptions {
24
+ He = "he",
25
+ En = "en",
26
+ Ru = "ru"
27
+ }
28
+ export declare enum CountryOptions {
29
+ US = "us",
30
+ IL = "il"
31
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CountryOptions = exports.LanguageOptions = exports.ClientStatus = exports.UnitStatus = exports.BoardStatus = exports.DefaultClient = void 0;
4
+ var DefaultClient;
5
+ (function (DefaultClient) {
6
+ DefaultClient["default"] = "akeyless";
7
+ DefaultClient["camera_installation"] = "akeyless";
8
+ })(DefaultClient || (exports.DefaultClient = DefaultClient = {}));
9
+ var BoardStatus;
10
+ (function (BoardStatus) {
11
+ BoardStatus[BoardStatus["ReadyForInstallation"] = 1] = "ReadyForInstallation";
12
+ BoardStatus[BoardStatus["Installed"] = 2] = "Installed";
13
+ BoardStatus[BoardStatus["Malfunction"] = 3] = "Malfunction";
14
+ BoardStatus[BoardStatus["NoSim"] = 4] = "NoSim";
15
+ })(BoardStatus || (exports.BoardStatus = BoardStatus = {}));
16
+ var UnitStatus;
17
+ (function (UnitStatus) {
18
+ UnitStatus[UnitStatus["NewOrder"] = 0] = "NewOrder";
19
+ UnitStatus[UnitStatus["Installed"] = 1] = "Installed";
20
+ UnitStatus[UnitStatus["WaitingForService"] = 2] = "WaitingForService";
21
+ UnitStatus[UnitStatus["InstalledButNotActive"] = 3] = "InstalledButNotActive";
22
+ UnitStatus[UnitStatus["NewInstallation"] = 4] = "NewInstallation";
23
+ })(UnitStatus || (exports.UnitStatus = UnitStatus = {}));
24
+ var ClientStatus;
25
+ (function (ClientStatus) {
26
+ ClientStatus["Active"] = "active";
27
+ ClientStatus["Suspended"] = "suspended";
28
+ ClientStatus["Deleted"] = "deleted";
29
+ })(ClientStatus || (exports.ClientStatus = ClientStatus = {}));
30
+ var LanguageOptions;
31
+ (function (LanguageOptions) {
32
+ LanguageOptions["He"] = "he";
33
+ LanguageOptions["En"] = "en";
34
+ LanguageOptions["Ru"] = "ru";
35
+ })(LanguageOptions || (exports.LanguageOptions = LanguageOptions = {}));
36
+ var CountryOptions;
37
+ (function (CountryOptions) {
38
+ CountryOptions["US"] = "us";
39
+ CountryOptions["IL"] = "il";
40
+ })(CountryOptions || (exports.CountryOptions = CountryOptions = {}));
41
+ //# sourceMappingURL=global.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/enums/global.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,qCAAoB,CAAA;IACpB,iDAAgC,CAAA;AACpC,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,6EAAwB,CAAA;IACxB,uDAAa,CAAA;IACb,2DAAe,CAAA;IACf,+CAAS,CAAA;AACb,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAED,IAAY,UAMX;AAND,WAAY,UAAU;IAClB,mDAAY,CAAA;IACZ,qDAAa,CAAA;IACb,qEAAqB,CAAA;IACrB,6EAAyB,CAAA;IACzB,iEAAmB,CAAA;AACvB,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,iCAAiB,CAAA;IACjB,uCAAuB,CAAA;IACvB,mCAAmB,CAAA;AACvB,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB;AACD,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,4BAAS,CAAA;IACT,4BAAS,CAAA;IACT,4BAAS,CAAA;AACb,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AACD,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,2BAAS,CAAA;IACT,2BAAS,CAAA;AACb,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}
@@ -0,0 +1,2 @@
1
+ export * from "./global";
2
+ export * from "./car_events";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./global"), exports);
18
+ __exportStar(require("./car_events"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,+CAA6B"}
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './interfaces';
3
+ export * from './enums';
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
18
+ __exportStar(require("./interfaces"), exports);
19
+ __exportStar(require("./enums"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,+CAA4B;AAC5B,0CAAuB"}
@@ -0,0 +1,167 @@
1
+ import { BoardStatus, ClientStatus, LanguageOptions, UnitStatus } from "../enums";
2
+ import { Timestamp } from "firebase-admin/firestore";
3
+ import { TObject } from "../types";
4
+ export interface firebase_timestamp {
5
+ _nanoseconds: number;
6
+ _seconds: number;
7
+ }
8
+ export interface NxUser {
9
+ id?: string;
10
+ clients?: string[];
11
+ first_name?: string;
12
+ last_name?: string;
13
+ phone_number?: string;
14
+ status?: string;
15
+ features?: string[];
16
+ site?: string;
17
+ sites?: string[];
18
+ created?: firebase_timestamp;
19
+ updated?: firebase_timestamp;
20
+ last_login?: firebase_timestamp;
21
+ }
22
+ export interface Installer {
23
+ id?: string;
24
+ fullName?: string;
25
+ phone?: string;
26
+ superTechnician?: string;
27
+ clients?: string[];
28
+ customers?: string[];
29
+ }
30
+ export interface Client {
31
+ created?: firebase_timestamp | Timestamp;
32
+ updated?: firebase_timestamp | Timestamp;
33
+ features?: string[];
34
+ id?: string;
35
+ name?: string;
36
+ root_site?: string;
37
+ status?: ClientStatus;
38
+ api_token?: string;
39
+ key?: string;
40
+ language?: LanguageOptions;
41
+ installation_name?: string;
42
+ installation_phone?: string;
43
+ installation_root_site?: string;
44
+ }
45
+ export interface Board {
46
+ id: string;
47
+ imei: string;
48
+ sim: string;
49
+ status: BoardStatus;
50
+ type: string;
51
+ uploaded: firebase_timestamp | Timestamp;
52
+ userId: string;
53
+ token?: string;
54
+ comments?: string;
55
+ }
56
+ export interface Peripheral {
57
+ boardRef: string;
58
+ boardType: string;
59
+ boardTypeId: string;
60
+ installationLocationImageUrl: string;
61
+ location: string;
62
+ mac: string;
63
+ relayType: null;
64
+ status: number;
65
+ technician: string;
66
+ updateDate: firebase_timestamp | Timestamp;
67
+ }
68
+ export interface Car {
69
+ confirmation_code: string;
70
+ id?: string;
71
+ install_confirmation_date: firebase_timestamp | Timestamp;
72
+ carId: string;
73
+ mainDriver: string;
74
+ installation_status: string;
75
+ name: string;
76
+ userPhone: string;
77
+ userEmail?: string;
78
+ camera_installation_details: TObject<string>;
79
+ status: UnitStatus;
80
+ warrantyExpire: firebase_timestamp | Timestamp;
81
+ protectionType: string;
82
+ protectionTypeId: string;
83
+ warranty: boolean;
84
+ statusMokedUser: string;
85
+ isEnforcementCenterUser: boolean;
86
+ sites: string[];
87
+ client: string;
88
+ installationDate: firebase_timestamp | Timestamp;
89
+ timestamp: number;
90
+ customer: string;
91
+ customerId: string;
92
+ technician: string;
93
+ technicianId: string;
94
+ engine_type: string;
95
+ gov_info: TObject<string | number>;
96
+ brand: string;
97
+ manufacturer: string;
98
+ carYear: string;
99
+ color: string;
100
+ commandOption: string;
101
+ chassisNumber: string;
102
+ subEnforcmentUser: TObject<string | null | null[]>;
103
+ peripherals: Peripheral[];
104
+ icon?: string;
105
+ vin?: string;
106
+ }
107
+ export interface LastLocationCar {
108
+ car_number: string;
109
+ latitude: number;
110
+ longitude: number;
111
+ timestamp: firebase_timestamp | Timestamp;
112
+ client?: string;
113
+ prev_latitude?: number;
114
+ prev_longitude?: number;
115
+ sites?: string[];
116
+ source?: string;
117
+ spd?: number;
118
+ vin?: number;
119
+ odo?: number;
120
+ ign?: number;
121
+ direction?: number;
122
+ }
123
+ export interface CanbusParameter {
124
+ desc?: string | null;
125
+ id: number | string;
126
+ value: number;
127
+ }
128
+ export interface EventFromDevice {
129
+ event_id: number;
130
+ car_number: string;
131
+ source: string;
132
+ timestamp: firebase_timestamp | Timestamp;
133
+ spd: number;
134
+ vin: number;
135
+ latitude: number;
136
+ longitude: number;
137
+ event_name: string;
138
+ }
139
+ export interface EventFromDevice_Ruptela extends EventFromDevice {
140
+ charge_percents: number;
141
+ }
142
+ export interface EventFromDevice_Erm extends EventFromDevice {
143
+ disarm_code: string;
144
+ }
145
+ export interface ErmStates {
146
+ car_number: string;
147
+ ign?: number;
148
+ is_online?: number;
149
+ last_offline?: Date;
150
+ last_online?: Date;
151
+ server: string;
152
+ updated?: Date;
153
+ vin?: number;
154
+ is_awake?: number;
155
+ battery_disconnected?: number;
156
+ }
157
+ export type ReportMetaDataType = "string" | "car_number" | "phone" | "date" | "time" | "datetime" | "number" | "email" | "boolean" | "geo";
158
+ export interface ReportMetaHeader {
159
+ name: string;
160
+ type: ReportMetaDataType;
161
+ class_name?: string;
162
+ style?: string;
163
+ }
164
+ export interface ReportMeta {
165
+ headers: ReportMetaHeader[];
166
+ }
167
+ export type ReportDataRow = (string | number | Date | boolean | null)[];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=global.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/interfaces/global.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from './global';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./global"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB"}
@@ -0,0 +1,10 @@
1
+ export type NumberObject = {
2
+ [key: number]: number;
3
+ };
4
+ export type TObject<T> = {
5
+ [key: string]: T;
6
+ };
7
+ export interface Geo {
8
+ lat: number;
9
+ lng: number;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=global.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/types/global.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from "./global";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./global"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"}
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "akeyless-types-commons",
3
+ "version": "1.0.1",
4
+ "main": "./dist/index.js",
5
+ "types": "./dist/index.d.ts",
6
+ "scripts": {
7
+ "build": "tsc && node ./dist/",
8
+ "deploy": "npm run build && npm version patch --no-git-tag-version && npm publish"
9
+ },
10
+ "author": "",
11
+ "license": "ISC",
12
+ "description": "",
13
+ "devDependencies": {
14
+ "@types/node": "^22.5.2",
15
+ "typescript": "^5.5.4"
16
+ },
17
+ "dependencies": {
18
+ "firebase-admin": "^12.6.0"
19
+ }
20
+ }
@@ -0,0 +1,11 @@
1
+ export enum RuptelaEventEnum {
2
+ location = 1,
3
+ ignition_on = 2,
4
+ ignition_off = 3,
5
+ engine_on = 4,
6
+ engine_off = 5,
7
+ power_cut_on = 6,
8
+ power_cut_off = 7,
9
+ charging_on = 8,
10
+ charging_off = 9,
11
+ }
@@ -0,0 +1,34 @@
1
+ export enum DefaultClient {
2
+ default = "akeyless",
3
+ camera_installation = "akeyless",
4
+ }
5
+
6
+ export enum BoardStatus {
7
+ ReadyForInstallation = 1,
8
+ Installed = 2,
9
+ Malfunction = 3,
10
+ NoSim = 4,
11
+ }
12
+
13
+ export enum UnitStatus {
14
+ NewOrder = 0,
15
+ Installed = 1,
16
+ WaitingForService = 2,
17
+ InstalledButNotActive = 3,
18
+ NewInstallation = 4,
19
+ }
20
+
21
+ export enum ClientStatus {
22
+ Active = "active",
23
+ Suspended = "suspended",
24
+ Deleted = "deleted",
25
+ }
26
+ export enum LanguageOptions {
27
+ He = "he",
28
+ En = "en",
29
+ Ru = "ru",
30
+ }
31
+ export enum CountryOptions {
32
+ US = "us",
33
+ IL = "il",
34
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./global";
2
+ export * from "./car_events";
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './types'
2
+ export * from './interfaces'
3
+ export * from './enums'
@@ -0,0 +1,183 @@
1
+ import { BoardStatus, ClientStatus, LanguageOptions, UnitStatus } from "../enums";
2
+ import { Timestamp } from "firebase-admin/firestore";
3
+ import { TObject } from "../types";
4
+
5
+ export interface firebase_timestamp {
6
+ _nanoseconds: number;
7
+ _seconds: number;
8
+ }
9
+
10
+ export interface NxUser {
11
+ id?: string;
12
+ clients?: string[];
13
+ first_name?: string;
14
+ last_name?: string;
15
+ phone_number?: string;
16
+ status?: string;
17
+ features?: string[];
18
+ site?: string;
19
+ sites?: string[];
20
+ created?: firebase_timestamp;
21
+ updated?: firebase_timestamp;
22
+ last_login?: firebase_timestamp;
23
+ }
24
+
25
+ export interface Installer {
26
+ id?: string;
27
+ fullName?: string;
28
+ phone?: string;
29
+ superTechnician?: string;
30
+ clients?: string[];
31
+ customers?: string[];
32
+ }
33
+
34
+ export interface Client {
35
+ created?: firebase_timestamp | Timestamp;
36
+ updated?: firebase_timestamp | Timestamp;
37
+ features?: string[];
38
+ id?: string;
39
+ name?: string;
40
+ root_site?: string;
41
+ status?: ClientStatus;
42
+ api_token?: string;
43
+ key?: string;
44
+ language?: LanguageOptions;
45
+ installation_name?: string;
46
+ installation_phone?: string;
47
+ installation_root_site?: string;
48
+ }
49
+
50
+ export interface Board {
51
+ id: string;
52
+ imei: string;
53
+ sim: string;
54
+ status: BoardStatus;
55
+ type: string;
56
+ uploaded: firebase_timestamp | Timestamp;
57
+ userId: string;
58
+ token?: string;
59
+ comments?: string;
60
+ }
61
+ export interface Peripheral {
62
+ boardRef: string;
63
+ boardType: string;
64
+ boardTypeId: string;
65
+ installationLocationImageUrl: string;
66
+ location: string;
67
+ mac: string;
68
+ relayType: null;
69
+ status: number;
70
+ technician: string;
71
+ updateDate: firebase_timestamp | Timestamp;
72
+ }
73
+
74
+ export interface Car {
75
+ confirmation_code: string;
76
+ id?: string;
77
+ install_confirmation_date: firebase_timestamp | Timestamp;
78
+ carId: string;
79
+ mainDriver: string;
80
+ installation_status: string;
81
+ name: string;
82
+ userPhone: string;
83
+ userEmail?: string;
84
+ camera_installation_details: TObject<string>;
85
+ status: UnitStatus;
86
+ warrantyExpire: firebase_timestamp | Timestamp;
87
+ protectionType: string;
88
+ protectionTypeId: string;
89
+ warranty: boolean;
90
+ statusMokedUser: string;
91
+ isEnforcementCenterUser: boolean;
92
+ sites: string[];
93
+ client: string;
94
+ installationDate: firebase_timestamp | Timestamp;
95
+ timestamp: number;
96
+ customer: string;
97
+ customerId: string;
98
+ technician: string;
99
+ technicianId: string;
100
+ engine_type: string;
101
+ gov_info: TObject<string | number>;
102
+ brand: string;
103
+ manufacturer: string;
104
+ carYear: string;
105
+ color: string;
106
+ commandOption: string;
107
+ chassisNumber: string;
108
+ subEnforcmentUser: TObject<string | null | null[]>;
109
+ peripherals: Peripheral[];
110
+ icon?: string;
111
+ vin?: string;
112
+ }
113
+
114
+ export interface LastLocationCar {
115
+ car_number: string;
116
+ latitude: number;
117
+ longitude: number;
118
+ timestamp: firebase_timestamp | Timestamp;
119
+ client?: string;
120
+ prev_latitude?: number;
121
+ prev_longitude?: number;
122
+ sites?: string[];
123
+ source?: string;
124
+ spd?: number;
125
+ vin?: number;
126
+ odo?: number;
127
+ ign?: number;
128
+ direction?: number;
129
+ }
130
+
131
+ export interface CanbusParameter {
132
+ desc?: string | null;
133
+ id: number | string;
134
+ value: number;
135
+ }
136
+
137
+ export interface EventFromDevice {
138
+ event_id: number;
139
+ car_number: string;
140
+ source: string;
141
+ timestamp: firebase_timestamp | Timestamp;
142
+ spd: number;
143
+ vin: number;
144
+ latitude: number;
145
+ longitude: number;
146
+ event_name: string;
147
+ }
148
+
149
+ export interface EventFromDevice_Ruptela extends EventFromDevice {
150
+ charge_percents: number;
151
+ }
152
+
153
+ export interface EventFromDevice_Erm extends EventFromDevice {
154
+ disarm_code: string;
155
+ }
156
+
157
+ export interface ErmStates {
158
+ car_number: string;
159
+ ign?: number;
160
+ is_online?: number;
161
+ last_offline?: Date;
162
+ last_online?: Date;
163
+ server: string;
164
+ updated?: Date;
165
+ vin?: number;
166
+ is_awake?: number;
167
+ battery_disconnected?: number;
168
+ }
169
+
170
+ export type ReportMetaDataType = "string" | "car_number" | "phone" | "date" | "time" | "datetime" | "number" | "email" | "boolean" | "geo";
171
+
172
+ export interface ReportMetaHeader {
173
+ name: string;
174
+ type: ReportMetaDataType;
175
+ class_name?: string;
176
+ style?: string;
177
+ }
178
+
179
+ export interface ReportMeta {
180
+ headers: ReportMetaHeader[];
181
+ }
182
+
183
+ export type ReportDataRow = (string | number | Date | boolean | null)[];
@@ -0,0 +1 @@
1
+ export * from './global'
@@ -0,0 +1,6 @@
1
+ export type NumberObject = { [key: number]: number };
2
+ export type TObject<T> = { [key: string]: T };
3
+ export interface Geo {
4
+ lat: number;
5
+ lng: number;
6
+ }
@@ -0,0 +1 @@
1
+ export * from "./global";
package/tsconfig.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES6",
4
+ "module": "CommonJS",
5
+ "moduleResolution": "node",
6
+ "outDir": "./dist",
7
+ "declaration": true,
8
+ "sourceMap": true,
9
+ "rootDir": "./src",
10
+ "esModuleInterop": true,
11
+ "skipLibCheck": true
12
+ },
13
+ "include": ["src/**/*"],
14
+ "exclude": ["node_modules"]
15
+ }