@spytecgps/nova-orm 1.0.107 → 1.0.109
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/dist/entities/tag.d.ts +1 -0
- package/dist/entities/tag.js +5 -0
- package/dist/entities/tag.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/repositories/deviceStatus/extendedDeviceStatus.d.ts +12 -0
- package/dist/repositories/deviceStatus/extendedDeviceStatus.js +207 -0
- package/dist/repositories/deviceStatus/extendedDeviceStatus.js.map +1 -0
- package/dist/repositories/deviceStatus/getDeviceStatuses.d.ts +2 -3
- package/dist/repositories/deviceStatus/getDeviceStatuses.js +7 -2
- package/dist/repositories/deviceStatus/getDeviceStatuses.js.map +1 -1
- package/dist/repositories/deviceStatus/index.d.ts +2 -3
- package/dist/repositories/deviceStatus/index.js +10 -0
- package/dist/repositories/deviceStatus/index.js.map +1 -1
- package/dist/repositories/liveLinks/getLiveLinkData.js +6 -1
- package/dist/repositories/liveLinks/getLiveLinkData.js.map +1 -1
- package/dist/repositories/tags/index.d.ts +7 -1
- package/dist/repositories/tags/index.js +13 -0
- package/dist/repositories/tags/index.js.map +1 -1
- package/dist/repositories/tags/searchTags.js +5 -0
- package/dist/repositories/tags/searchTags.js.map +1 -1
- package/dist/repositories/tags/searchTagsByUser.d.ts +4 -0
- package/dist/repositories/tags/searchTagsByUser.js +46 -0
- package/dist/repositories/tags/searchTagsByUser.js.map +1 -0
- package/dist/repositories/tags/updateTag.js +1 -0
- package/dist/repositories/tags/updateTag.js.map +1 -1
- package/dist/types/deviceStatus.d.ts +48 -6
- package/dist/types/liveLinks.d.ts +3 -0
- package/dist/types/tag.d.ts +14 -0
- package/dist/types/tag.js +5 -0
- package/dist/types/tag.js.map +1 -1
- package/dist/utils/parsingTools.d.ts +1 -0
- package/dist/utils/parsingTools.js +9 -0
- package/dist/utils/parsingTools.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,49 @@
|
|
|
1
|
-
import { Client, ClientDeviceSetting, Device } from '../entities';
|
|
1
|
+
import { Client, ClientDeviceSetting, Device, DeviceStatus } from '../entities';
|
|
2
2
|
import { Enums } from '.';
|
|
3
3
|
import { BaseSelectQueryParams } from './common';
|
|
4
|
-
interface DeviceStatusEntity {
|
|
4
|
+
export interface DeviceStatusEntity {
|
|
5
|
+
address: string;
|
|
5
6
|
imei: string;
|
|
6
7
|
clientId: number;
|
|
7
8
|
created: string;
|
|
8
9
|
sendTime: string;
|
|
10
|
+
latitude?: string;
|
|
11
|
+
longitude?: string;
|
|
12
|
+
speed?: string;
|
|
13
|
+
gpsUTCTime?: string;
|
|
14
|
+
batteryPercentage?: string;
|
|
15
|
+
azimuth?: string;
|
|
16
|
+
deviceTypeId?: number;
|
|
17
|
+
staleGPS?: string;
|
|
18
|
+
isStaleGPS?: boolean;
|
|
19
|
+
insideCellularRadio?: string;
|
|
20
|
+
isInsideCellularRadio?: boolean;
|
|
21
|
+
message_id?: string;
|
|
22
|
+
gpsMessageId?: string;
|
|
23
|
+
isOnline?: string;
|
|
24
|
+
lastGPSCellTower?: string;
|
|
25
|
+
mcc?: string;
|
|
26
|
+
mnc?: string;
|
|
27
|
+
cellId?: string;
|
|
28
|
+
lac?: string;
|
|
29
|
+
cellTowerLat?: number;
|
|
30
|
+
cellTowerLocationTime?: string;
|
|
31
|
+
cellTowerLon?: number;
|
|
32
|
+
cellTowerRange?: number;
|
|
33
|
+
restFrequency?: number;
|
|
34
|
+
connectionStatus?: ConnectionStatusInfo[];
|
|
35
|
+
odoMileage?: string;
|
|
36
|
+
batteryVoltage?: string;
|
|
37
|
+
externalPowerVoltage?: string;
|
|
38
|
+
externalPowerVoltage2?: string;
|
|
39
|
+
hoursOfOperation?: string;
|
|
40
|
+
reportType?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ConnectionStatusInfo {
|
|
43
|
+
name: string;
|
|
44
|
+
ok?: boolean;
|
|
45
|
+
confidence?: number;
|
|
46
|
+
msg?: string;
|
|
9
47
|
}
|
|
10
48
|
export interface GetDeviceStatusesParams extends BaseSelectQueryParams {
|
|
11
49
|
filters: {
|
|
@@ -15,12 +53,14 @@ export interface GetDeviceStatusesParams extends BaseSelectQueryParams {
|
|
|
15
53
|
deviceStatus?: Enums.DeviceStatus;
|
|
16
54
|
};
|
|
17
55
|
projectionOptions?: {
|
|
18
|
-
deviceStatusProperties?: string[];
|
|
19
56
|
withClient?: boolean;
|
|
20
|
-
clientProperties?: (keyof Client)[];
|
|
21
57
|
withDevice?: boolean;
|
|
22
|
-
deviceProperties?: (keyof Device)[];
|
|
23
58
|
withClientDeviceSettings?: boolean;
|
|
59
|
+
withConnectionStatus?: boolean;
|
|
60
|
+
withOnlineStatus?: boolean;
|
|
61
|
+
deviceStatusProperties?: (keyof DeviceStatusEntity)[];
|
|
62
|
+
deviceProperties?: (keyof Device)[];
|
|
63
|
+
clientProperties?: (keyof Client)[];
|
|
24
64
|
clientDeviceSettingsProperties?: (keyof ClientDeviceSetting)[];
|
|
25
65
|
};
|
|
26
66
|
pagingOptions?: {
|
|
@@ -39,4 +79,6 @@ export interface GetDeviceStatusesCountParams extends BaseSelectQueryParams {
|
|
|
39
79
|
export interface UpsertDeviceStatusesParams {
|
|
40
80
|
items: DeviceStatusEntity[];
|
|
41
81
|
}
|
|
42
|
-
export {
|
|
82
|
+
export interface DeviceStatusRecord extends Omit<DeviceStatus, 'data'> {
|
|
83
|
+
data: DeviceStatusEntity;
|
|
84
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseSelectQueryParams, OptionalReportPagination } from './common';
|
|
2
|
+
import { ConnectionStatusInfo } from './deviceStatus';
|
|
2
3
|
export interface CreateLiveLinkParams {
|
|
3
4
|
id: string;
|
|
4
5
|
name: string;
|
|
@@ -81,6 +82,8 @@ export interface TrackerWithStatus {
|
|
|
81
82
|
batteryVoltage?: number;
|
|
82
83
|
externalPowerVoltage?: number;
|
|
83
84
|
reportType?: number;
|
|
85
|
+
connectionStatus?: ConnectionStatusInfo[];
|
|
86
|
+
isOnline?: boolean;
|
|
84
87
|
};
|
|
85
88
|
}
|
|
86
89
|
export interface LiveLinkData {
|
package/dist/types/tag.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface CreateTagParams {
|
|
|
7
7
|
name: string;
|
|
8
8
|
color?: string;
|
|
9
9
|
description?: string;
|
|
10
|
+
metadata?: Record<string, any>;
|
|
10
11
|
}
|
|
11
12
|
export declare const requiredBulkCreateTagParamsAttributes: string[];
|
|
12
13
|
export interface BulkCreateTagParams {
|
|
@@ -16,6 +17,7 @@ export interface BulkCreateTagParams {
|
|
|
16
17
|
name: string;
|
|
17
18
|
color?: string;
|
|
18
19
|
description?: string;
|
|
20
|
+
metadata?: Record<string, any>;
|
|
19
21
|
}[];
|
|
20
22
|
}
|
|
21
23
|
export declare const requiredUpdateTagParamsAttributes: string[];
|
|
@@ -29,6 +31,7 @@ export interface UpdateTagParams {
|
|
|
29
31
|
name?: string | null;
|
|
30
32
|
description?: string | null;
|
|
31
33
|
color?: string | null;
|
|
34
|
+
metadata?: Record<string, any> | null;
|
|
32
35
|
};
|
|
33
36
|
}
|
|
34
37
|
export declare const requiredDeleteTagParamsAttributes: string[];
|
|
@@ -43,9 +46,20 @@ export interface SearchTagsParams extends OptionalReportPagination {
|
|
|
43
46
|
clientId: number;
|
|
44
47
|
names?: string[];
|
|
45
48
|
tagIds?: number[];
|
|
49
|
+
metadata?: Record<string, any>;
|
|
46
50
|
};
|
|
47
51
|
}
|
|
48
52
|
export interface GetTagsResult {
|
|
49
53
|
tags: Tag[];
|
|
50
54
|
totalCount: number;
|
|
51
55
|
}
|
|
56
|
+
export declare const requiredSearchTagsByUserParamsAttributes: string[];
|
|
57
|
+
export declare const oneRequiredSearchTagsByUserParamsAttributes: string[];
|
|
58
|
+
export interface SearchTagsByUserParams extends OptionalReportPagination {
|
|
59
|
+
filters: {
|
|
60
|
+
clientId: number;
|
|
61
|
+
userId?: string;
|
|
62
|
+
userNumberId?: number;
|
|
63
|
+
metadata?: Record<string, any>;
|
|
64
|
+
};
|
|
65
|
+
}
|
package/dist/types/tag.js
CHANGED
|
@@ -7,4 +7,9 @@ export const requiredUpdateTagParamsAttributes = [
|
|
|
7
7
|
];
|
|
8
8
|
export const requiredDeleteTagParamsAttributes = ['clientId', 'tagId', 'deletedBy'];
|
|
9
9
|
export const requiredSearchTagsParamsAttributes = ['filters.clientId'];
|
|
10
|
+
export const requiredSearchTagsByUserParamsAttributes = ['filters.clientId'];
|
|
11
|
+
export const oneRequiredSearchTagsByUserParamsAttributes = [
|
|
12
|
+
'filters.userId',
|
|
13
|
+
'filters.userNumberId',
|
|
14
|
+
];
|
|
10
15
|
//# sourceMappingURL=tag.js.map
|
package/dist/types/tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.js","sourceRoot":"","sources":["../../src/types/tag.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"tag.js","sourceRoot":"","sources":["../../src/types/tag.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,CAAC,CAAA;AAWlF,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,CAAC,CAAA;AAatF,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,eAAe;IACf,kBAAkB;IAClB,mBAAmB;CACpB,CAAA;AAgBD,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,CAAC,CAAA;AAOnF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,kBAAkB,CAAC,CAAA;AAgBtE,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,kBAAkB,CAAC,CAAA;AAC5E,MAAM,CAAC,MAAM,2CAA2C,GAAG;IACzD,gBAAgB;IAChB,sBAAsB;CACvB,CAAA"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare const tryParseFloat: (valueToParse: any, defaultValue?: number | null) => number | null;
|
|
2
2
|
export declare const tryParseDate: (anyDate: any, defaultValue?: Date | null) => Date;
|
|
3
|
+
export declare const tryParseBoolean: (valueToParse: any, defaultValue?: boolean | null) => boolean | null;
|
|
@@ -10,4 +10,13 @@ export const tryParseDate = (anyDate, defaultValue = null) => {
|
|
|
10
10
|
return defaultValue;
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
+
export const tryParseBoolean = (valueToParse, defaultValue = null) => {
|
|
14
|
+
if (typeof valueToParse === 'boolean') {
|
|
15
|
+
return valueToParse;
|
|
16
|
+
}
|
|
17
|
+
if (typeof valueToParse === 'string') {
|
|
18
|
+
return valueToParse.toLowerCase() === 'true';
|
|
19
|
+
}
|
|
20
|
+
return defaultValue;
|
|
21
|
+
};
|
|
13
22
|
//# sourceMappingURL=parsingTools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsingTools.js","sourceRoot":"","sources":["../../src/utils/parsingTools.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,YAAiB,EACjB,eAA8B,IAAI,EACnB,EAAE;IACjB,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAA;IACnD,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAA;AAC/D,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAY,EAAE,eAA4B,IAAI,EAAQ,EAAE;IACnF,IAAI;QACF,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,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