@spytecgps/nova-orm 0.0.121 → 0.0.122
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Boundary } from '../../entities';
|
|
2
|
-
import { BoundariesReportEntity, CreateBoundaryParams, DeleteBoundaryParams, GetBoundariesByClientIdParams, GetBoundariesReportParams, GetBoundaryByIdParams, UpdateBoundaryParams } from '../../types/boundaries';
|
|
2
|
+
import { BoundariesReportEntity, CreateBoundaryParams, DeleteBoundaryParams, GetBoundariesByClientIdParams, GetBoundariesReportParams, GetBoundaryByIdParams, UpdateBoundaryParams, UpsertBoundaryEventParams } from '../../types/boundaries';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class BoundariesRepository extends BaseRepository {
|
|
5
5
|
/**
|
|
@@ -82,4 +82,11 @@ export declare class BoundariesRepository extends BaseRepository {
|
|
|
82
82
|
* @returns The boundaries report
|
|
83
83
|
*/
|
|
84
84
|
getBoundariesReport(params: GetBoundariesReportParams): Promise<BoundariesReportEntity[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Upsert boundary event
|
|
87
|
+
* @param {UpsertBoundaryEventParams} params containing information to upsert boundary event
|
|
88
|
+
* - id: The id of the boundary event
|
|
89
|
+
* @returns true if the event was upserted, false otherwise
|
|
90
|
+
*/
|
|
91
|
+
upsertBoundaryEvent(params: UpsertBoundaryEventParams): Promise<boolean>;
|
|
85
92
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { UpsertBoundaryEventParams } from '../../types/boundaries';
|
|
3
|
+
import { Logger } from '../../types/logger';
|
|
4
|
+
export declare const upsertBoundaryEvent: (novaDataSource: NovaDataSource, params: UpsertBoundaryEventParams, logger: Logger) => Promise<boolean>;
|
|
@@ -91,3 +91,21 @@ export interface BoundariesReportEntity {
|
|
|
91
91
|
inOutDuration?: number | null;
|
|
92
92
|
totalCount: number;
|
|
93
93
|
}
|
|
94
|
+
export interface UpsertBoundaryEventParams {
|
|
95
|
+
id: number;
|
|
96
|
+
deviceId: number;
|
|
97
|
+
imei: string;
|
|
98
|
+
boundaryId: number;
|
|
99
|
+
userId?: string | null;
|
|
100
|
+
inDate?: Date | null;
|
|
101
|
+
inLat?: number | null;
|
|
102
|
+
inLon?: number | null;
|
|
103
|
+
inAddress?: string | null;
|
|
104
|
+
outDate?: Date | null;
|
|
105
|
+
outLat?: number | null;
|
|
106
|
+
outLon?: number | null;
|
|
107
|
+
outAddress?: string | null;
|
|
108
|
+
inOutDuration?: number | null;
|
|
109
|
+
createdAt?: Date | null;
|
|
110
|
+
modifiedAt?: Date | null;
|
|
111
|
+
}
|