@spytecgps/nova-orm 0.0.83 → 0.0.84
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/index.d.ts +2 -1
- package/dist/entities/latestPosition.d.ts +19 -0
- package/dist/index.js +1 -1
- package/dist/repositories/positions/createPosition.d.ts +1 -2
- package/dist/repositories/positions/getLatestPositionByImei.d.ts +5 -0
- package/dist/repositories/positions/index.d.ts +5 -4
- package/dist/repositories/positions/upsertLatestPosition.d.ts +3 -0
- package/dist/types/position.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { InsertResult } from 'typeorm';
|
|
2
1
|
import { Position } from '../../entities';
|
|
3
2
|
import { NovaDataSource } from '../../novaDataSource';
|
|
4
3
|
import { Logger } from '../../types/logger';
|
|
5
4
|
import { CreatePositionParams } from '../../types/position';
|
|
6
5
|
export declare const createPosition: (novaDataSource: NovaDataSource, params: CreatePositionParams, logger: Logger) => Promise<Position>;
|
|
7
|
-
export declare const upsertPositions: (novaDataSource: NovaDataSource, params: CreatePositionParams[], logger: Logger) => Promise<
|
|
6
|
+
export declare const upsertPositions: (novaDataSource: NovaDataSource, params: CreatePositionParams[], logger: Logger) => Promise<Position[]>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LatestPosition } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { Logger } from '../../types/logger';
|
|
4
|
+
import { GetLatestPositionByImeiParams } from '../../types/position';
|
|
5
|
+
export declare const getLatestPositionByImei: (novaDataSource: NovaDataSource, params: GetLatestPositionByImeiParams, logger: Logger) => Promise<LatestPosition>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { CreatePositionParams, GetPositionsByImeiParams, GetPositionsReportByClientParams, PositionReport } from '../../types/position';
|
|
1
|
+
import { LatestPosition, Position } from '../../entities';
|
|
2
|
+
import { CreatePositionParams, GetLatestPositionByImeiParams, GetPositionsByImeiParams, GetPositionsReportByClientParams, PositionReport } from '../../types/position';
|
|
4
3
|
import { BaseRepository } from '../baseRepository';
|
|
5
4
|
export declare class PositionRepository extends BaseRepository {
|
|
6
5
|
/**
|
|
@@ -39,8 +38,9 @@ export declare class PositionRepository extends BaseRepository {
|
|
|
39
38
|
* - sendTime: the time the message was sent
|
|
40
39
|
* - gpsUtcTime: the time the gps was set
|
|
41
40
|
* - externalBatteryPercentage: the external battery percentage reported by the device
|
|
41
|
+
* @returns {Position[]} the created positions
|
|
42
42
|
*/
|
|
43
|
-
upsertPositions(params: CreatePositionParams[]): Promise<
|
|
43
|
+
upsertPositions(params: CreatePositionParams[]): Promise<Position[]>;
|
|
44
44
|
/**
|
|
45
45
|
* Get positions by imei
|
|
46
46
|
* @param {GetPositionsByImeiParams} params containing information to get positions
|
|
@@ -64,4 +64,5 @@ export declare class PositionRepository extends BaseRepository {
|
|
|
64
64
|
* - sortOptions.sortOrder: the sort order
|
|
65
65
|
*/
|
|
66
66
|
getPositionsReportByClient(params: GetPositionsReportByClientParams): Promise<PositionReport[]>;
|
|
67
|
+
getLatestPositionByImei(params: GetLatestPositionByImeiParams): Promise<LatestPosition>;
|
|
67
68
|
}
|
package/dist/types/position.d.ts
CHANGED