@spytecgps/nova-orm 0.0.119 → 0.0.121
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.
|
@@ -57,6 +57,8 @@ export declare class FirmwaresRepository extends BaseRepository {
|
|
|
57
57
|
* - filters.taskId: The task id
|
|
58
58
|
* - filters.statuses: The list of statuses to filter
|
|
59
59
|
* - filters.imeis: The list of imeis to filter
|
|
60
|
+
* - filters.startDate: The start date to filter tasks based on modifiedAt column
|
|
61
|
+
* - filters.endDate: The end date to filter tasks based on modifiedAt column
|
|
60
62
|
* - projectionOptions.withDeviceFirmware: Whether to get the device firmware object
|
|
61
63
|
* - projectionOptions.withDevice: Whether to get the device object
|
|
62
64
|
* - projectionOptions.deviceWithDeviceType: Whether to get the device type object of the device. projectionOptions.withDevice should be true to use this option.
|
|
@@ -86,6 +88,7 @@ export declare class FirmwaresRepository extends BaseRepository {
|
|
|
86
88
|
* - status: The status of the firmware upgrade task
|
|
87
89
|
* - preConfig: The pre config of the device before sending the upgrade command
|
|
88
90
|
* - postConfig: The post config of the device after sending the upgrade command
|
|
91
|
+
* - postUpgradeCompleted: Whether the post upgrade completed or not
|
|
89
92
|
* @returns {boolea} Whether the firmware upgrade task is updated or not.
|
|
90
93
|
*/
|
|
91
94
|
updateFirmwareUpgradeTasks(params: UpdateFirmwareUpgradeTaskParams): Promise<boolean>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { Logger } from '../../types/logger';
|
|
3
|
+
import { GetTripsParams, GetTripsResult } from '../../types/trip';
|
|
4
|
+
export declare const getTrips: (novaDataSource: NovaDataSource, params: GetTripsParams, logger: Logger) => Promise<GetTripsResult>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Trip } from '../../entities';
|
|
2
|
-
import { CreateTripParams, UpdateTripEndValuesParams } from '../../types/trip';
|
|
2
|
+
import { CreateTripParams, GetTripsParams, GetTripsResult, UpdateTripEndValuesParams } from '../../types/trip';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class TripRepository extends BaseRepository {
|
|
5
5
|
/**
|
|
@@ -20,4 +20,10 @@ export declare class TripRepository extends BaseRepository {
|
|
|
20
20
|
* @returns {Trip} the Trip associated to the passed id or null
|
|
21
21
|
*/
|
|
22
22
|
getTripById(id: string): Promise<Trip>;
|
|
23
|
+
/**
|
|
24
|
+
* Get a trip by id
|
|
25
|
+
* @param {GetTripsParams} id the trip's filters
|
|
26
|
+
* @returns {GetTripsResult} The GetTripsResult containing the trips and the totalCount.
|
|
27
|
+
*/
|
|
28
|
+
getTrips(params: GetTripsParams): Promise<GetTripsResult>;
|
|
23
29
|
}
|
package/dist/types/trip.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Trip } from '../entities';
|
|
2
|
+
import { ReportPagination } from './common';
|
|
1
3
|
import { TripCompletionStatus, TripType } from './enums';
|
|
2
4
|
export declare const requiredCreateTripParamsAttributes: string[];
|
|
3
5
|
export interface CreateTripParams {
|
|
@@ -25,15 +27,45 @@ export interface CreateTripParams {
|
|
|
25
27
|
}
|
|
26
28
|
export declare const requiredUpdateTripEndValuesParamsAttributes: string[];
|
|
27
29
|
export interface UpdateTripEndValuesParams {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
filters: {
|
|
31
|
+
id: string;
|
|
32
|
+
};
|
|
33
|
+
values: {
|
|
34
|
+
endDate: Date;
|
|
35
|
+
endLat: number;
|
|
36
|
+
endLon: number;
|
|
37
|
+
endAddress: string;
|
|
38
|
+
positionEnd: string;
|
|
39
|
+
endMessageId: string;
|
|
40
|
+
distance: number;
|
|
41
|
+
duration: number;
|
|
42
|
+
tripType: TripType;
|
|
43
|
+
tripCompletionStatusId: TripCompletionStatus;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export declare const requiredGetTripsParamsAttributes: string[];
|
|
47
|
+
export interface GetTripSortParams {
|
|
48
|
+
sortField?: 'startDate' | 'endDate' | 'imei' | 'tripType' | 'deviceName';
|
|
49
|
+
sortOrder?: 'ASC' | 'DESC';
|
|
50
|
+
}
|
|
51
|
+
export interface GetTripsParams extends ReportPagination {
|
|
52
|
+
filters: {
|
|
53
|
+
clientId: number;
|
|
54
|
+
from: Date;
|
|
55
|
+
to: Date;
|
|
56
|
+
tripType?: TripType;
|
|
57
|
+
durationMin?: number;
|
|
58
|
+
durationMax?: number;
|
|
59
|
+
distanceMin?: number;
|
|
60
|
+
distanceMax?: number;
|
|
61
|
+
imeis?: string[];
|
|
62
|
+
completionStatus?: TripCompletionStatus;
|
|
63
|
+
deviceName?: string;
|
|
64
|
+
deviceStatus?: 'A' | 'D';
|
|
65
|
+
};
|
|
66
|
+
sortOptions?: GetTripSortParams;
|
|
67
|
+
}
|
|
68
|
+
export interface GetTripsResult {
|
|
69
|
+
trips: Trip[];
|
|
70
|
+
totalCount: number;
|
|
39
71
|
}
|