@spytecgps/nova-orm 1.0.103 → 1.0.105

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.
Files changed (40) hide show
  1. package/dist/entities/index.d.ts +1 -4
  2. package/dist/entities/index.js +1 -4
  3. package/dist/entities/index.js.map +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/repositories/positions/getBatteryReportForDevice.d.ts +4 -0
  6. package/dist/repositories/positions/getBatteryReportForDevice.js +47 -0
  7. package/dist/repositories/positions/getBatteryReportForDevice.js.map +1 -0
  8. package/dist/repositories/positions/index.d.ts +2 -1
  9. package/dist/repositories/positions/index.js +8 -0
  10. package/dist/repositories/positions/index.js.map +1 -1
  11. package/dist/repositories/userConfigurations/index.d.ts +2 -56
  12. package/dist/repositories/userConfigurations/index.js +0 -89
  13. package/dist/repositories/userConfigurations/index.js.map +1 -1
  14. package/dist/types/position.d.ts +9 -1
  15. package/dist/types/userConfigurations.d.ts +1 -40
  16. package/package.json +1 -1
  17. package/dist/entities/alertTimeWindowConfiguration.d.ts +0 -12
  18. package/dist/entities/alertTimeWindowConfiguration.js +0 -62
  19. package/dist/entities/alertTimeWindowConfiguration.js.map +0 -1
  20. package/dist/entities/customUserAlertConfiguration.d.ts +0 -14
  21. package/dist/entities/customUserAlertConfiguration.js +0 -73
  22. package/dist/entities/customUserAlertConfiguration.js.map +0 -1
  23. package/dist/entities/deviceAlertConfiguration.d.ts +0 -14
  24. package/dist/entities/deviceAlertConfiguration.js +0 -72
  25. package/dist/entities/deviceAlertConfiguration.js.map +0 -1
  26. package/dist/repositories/userConfigurations/createCustomUserAlertConfiguration.d.ts +0 -5
  27. package/dist/repositories/userConfigurations/createCustomUserAlertConfiguration.js +0 -36
  28. package/dist/repositories/userConfigurations/createCustomUserAlertConfiguration.js.map +0 -1
  29. package/dist/repositories/userConfigurations/deleteCustomUserAlertConfiguration.d.ts +0 -4
  30. package/dist/repositories/userConfigurations/deleteCustomUserAlertConfiguration.js +0 -18
  31. package/dist/repositories/userConfigurations/deleteCustomUserAlertConfiguration.js.map +0 -1
  32. package/dist/repositories/userConfigurations/getCustomUserAlertConfiguration.d.ts +0 -7
  33. package/dist/repositories/userConfigurations/getCustomUserAlertConfiguration.js +0 -56
  34. package/dist/repositories/userConfigurations/getCustomUserAlertConfiguration.js.map +0 -1
  35. package/dist/repositories/userConfigurations/getCustomUserAlertConfigurationCount.d.ts +0 -4
  36. package/dist/repositories/userConfigurations/getCustomUserAlertConfigurationCount.js +0 -26
  37. package/dist/repositories/userConfigurations/getCustomUserAlertConfigurationCount.js.map +0 -1
  38. package/dist/repositories/userConfigurations/updateCustomUserAlertConfiguration.d.ts +0 -4
  39. package/dist/repositories/userConfigurations/updateCustomUserAlertConfiguration.js +0 -29
  40. package/dist/repositories/userConfigurations/updateCustomUserAlertConfiguration.js.map +0 -1
@@ -0,0 +1,4 @@
1
+ import { NovaDataSource } from '../../novaDataSource';
2
+ import { Logger } from '../../types/logger';
3
+ import { GetBatteryReportForDeviceParams } from '../../types/position';
4
+ export declare const getBatteryReportForDevice: (novaDataSource: NovaDataSource, params: GetBatteryReportForDeviceParams, logger: Logger) => Promise<any[]>;
@@ -0,0 +1,47 @@
1
+ import { Position } from '../../entities/position';
2
+ export const getBatteryReportForDevice = async (novaDataSource, params, logger) => {
3
+ if (!(params.filters.clientId && params.filters.imei)) {
4
+ return [];
5
+ }
6
+ // Force the query to run on master or slave
7
+ const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
8
+ try {
9
+ await novaDataSource.connect();
10
+ const positionsRepository = novaDataSource.getRepository(Position);
11
+ let positionsQuery = positionsRepository
12
+ .createQueryBuilder('p')
13
+ .setQueryRunner(dbQueryRunner)
14
+ .select('DATE(p.actualDate)', 'actualDate')
15
+ .addSelect('MAX(p.batteryPercentage)', 'batteryPercentage')
16
+ .where('p.clientId = :clientId', { clientId: params.filters.clientId })
17
+ .andWhere('p.imei = :imei', { imei: params.filters.imei });
18
+ if (params.filters.startDate) {
19
+ positionsQuery = positionsQuery.andWhere('p.actualDate >= :startDate', {
20
+ startDate: params.filters.startDate,
21
+ });
22
+ }
23
+ if (params.filters.endDate) {
24
+ positionsQuery = positionsQuery.andWhere('p.actualDate <= :endDate', {
25
+ endDate: params.filters.endDate,
26
+ });
27
+ }
28
+ const pageSize = params?.pagingOptions?.pageSize ?? 100;
29
+ const pageIndex = params?.pagingOptions?.pageIndex ?? 1;
30
+ positionsQuery = positionsQuery
31
+ .groupBy('DATE(p.actualDate)')
32
+ .orderBy('DATE(p.actualDate)', 'DESC')
33
+ .limit(pageSize)
34
+ .offset(pageSize * (pageIndex - 1));
35
+ const results = await positionsQuery.getRawMany();
36
+ return results;
37
+ }
38
+ catch (error) {
39
+ logger.error({ error }, 'PositionsRepository::GetPositionsReportByClientId error');
40
+ throw error;
41
+ }
42
+ finally {
43
+ await dbQueryRunner.release();
44
+ await novaDataSource.disconnect();
45
+ }
46
+ };
47
+ //# sourceMappingURL=getBatteryReportForDevice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBatteryReportForDevice.js","sourceRoot":"","sources":["../../../src/repositories/positions/getBatteryReportForDevice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAKlD,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,EAC5C,cAA8B,EAC9B,MAAuC,EACvC,MAAc,EACd,EAAE;IACF,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACrD,OAAO,EAAE,CAAA;KACV;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,IAAI;QACF,MAAM,cAAc,CAAC,OAAO,EAAE,CAAA;QAE9B,MAAM,mBAAmB,GAAG,cAAc,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;QAEl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AAC,EAAE,KAAK,EAAE,EAAE,yDAAyD,CAAC,CAAA;QAClF,MAAM,KAAK,CAAA;KACZ;YAAS;QACR,MAAM,aAAa,CAAC,OAAO,EAAE,CAAA;QAC7B,MAAM,cAAc,CAAC,UAAU,EAAE,CAAA;KAClC;AACH,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { LatestPosition, Position } from '../../entities';
2
- import { CreatePositionParams, GetLatestPositionByImeiParams, GetPositionsByImeiParams, GetPositionsReportByClientParams, PositionReport } from '../../types/position';
2
+ import { CreatePositionParams, GetBatteryReportForDeviceParams, GetLatestPositionByImeiParams, GetPositionsByImeiParams, GetPositionsReportByClientParams, PositionReport } from '../../types/position';
3
3
  import { BaseRepository } from '../baseRepository';
4
4
  export declare class PositionRepository extends BaseRepository {
5
5
  /**
@@ -65,4 +65,5 @@ export declare class PositionRepository extends BaseRepository {
65
65
  */
66
66
  getPositionsReportByClient(params: GetPositionsReportByClientParams): Promise<PositionReport[]>;
67
67
  getLatestPositionByImei(params: GetLatestPositionByImeiParams): Promise<LatestPosition>;
68
+ getBatteryReportForDevice(params: GetBatteryReportForDeviceParams): Promise<any[]>;
68
69
  }
@@ -1,6 +1,7 @@
1
1
  import { NovaDataSource } from '../../novaDataSource';
2
2
  import { BaseRepository } from '../baseRepository';
3
3
  import { createPosition, upsertPositions } from './createPosition';
4
+ import { getBatteryReportForDevice } from './getBatteryReportForDevice';
4
5
  import { getLatestPositionByImei } from './getLatestPositionByImei';
5
6
  import { getPositionsByImei } from './getPositionsByImei';
6
7
  import { getPositionsReportByClient } from './getPositionsReportByClient';
@@ -98,5 +99,12 @@ export class PositionRepository extends BaseRepository {
98
99
  this.logger.trace(result, 'PositionsRepository::getLatestPositionByImei result');
99
100
  return result;
100
101
  }
102
+ async getBatteryReportForDevice(params) {
103
+ this.logger.trace(params, `PositionsRepository::getBatteryReportForDevice started with params`);
104
+ const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
105
+ const result = await getBatteryReportForDevice(novaDataSource, params, this.logger);
106
+ this.logger.trace(result, 'PositionsRepository::getLatestPositionByImei result');
107
+ return result;
108
+ }
101
109
  }
102
110
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repositories/positions/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAQrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AAEzE,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IACpD;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,cAAc,CAAC,MAA4B;QAC/C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,8DAA8D,CAAC,CAAA;QAEzF,MAAM,cAAc,GAAG,IAAI,cAAc,CACvC,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,2BAA2B,CACjC,CAAA;QAED,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAExE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,6CAA6C,CAAC,CAAA;QAExE,OAAO,MAAM,CAAA;IACf,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,eAAe,CAAC,MAA8B;QAClD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,8DAA8D,CAAC,CAAA;QAEzF,MAAM,cAAc,G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AI,CAAC,2BAA2B,CACjC,CAAA;QAED,MAAM,MAAM,GAAG,MAAM,yBAAyB,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAEnF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,qDAAqD,CAAC,CAAA;QAEhF,OAAO,MAAM,CAAA;IACf,CAAC;CACF"}
@@ -1,5 +1,5 @@
1
- import { CustomUserAlertConfiguration, UserAlertConfiguration, UserConfiguration } from '../../entities';
2
- import { BulkCreateUserAlertConfigurationsParams, CreateCustomUserAlertConfigurationParams, CreateUserAlertConfigurationParams, CreateUserConfigurationParams, DeleteCustomUserAlertConfigurationParams, DeleteUserAlertConfigurationsParams, DeleteUserConfigurationParams, GetCustomUserAlertConfigurationParams, GetUserAlertConfigurationsParams, GetUserConfigurationsParams, UpdateCustomUserAlertConfigurationParams, UpdateUserAlertConfigurationByIdParams, UpdateUserAlertConfigurationsParams, UpdateUserConfigurationParams } from '../../types/userConfigurations';
1
+ import { UserAlertConfiguration, UserConfiguration } from '../../entities';
2
+ import { BulkCreateUserAlertConfigurationsParams, CreateUserAlertConfigurationParams, CreateUserConfigurationParams, DeleteUserAlertConfigurationsParams, DeleteUserConfigurationParams, GetUserAlertConfigurationsParams, GetUserConfigurationsParams, UpdateUserAlertConfigurationByIdParams, UpdateUserAlertConfigurationsParams, UpdateUserConfigurationParams } from '../../types/userConfigurations';
3
3
  import { BaseRepository } from '../baseRepository';
4
4
  export declare class UserConfigurationsRepository extends BaseRepository {
5
5
  /**
@@ -28,21 +28,6 @@ export declare class UserConfigurationsRepository extends BaseRepository {
28
28
  * @returns The created user configuration
29
29
  */
30
30
  createUserConfiguration(params: CreateUserConfigurationParams): Promise<UserConfiguration>;
31
- /**
32
- * Create device alert time windows
33
- * @param {CreateCustomUserAlertConfigurationParams} params containing information to create a device alert time windows
34
- * - id: The user alert time windows id, optional. If not provided, it will be generated
35
- * - clientId: The client id, required
36
- * - userId: The user id, required
37
- * - alertConfigurationId: The alert configuration id, optional
38
- * - daysOfTheWeek: The days of the week, required. It's a string of 7 characters, each one representing a day of the week, starting with Sunday. 1 means that the day is selected, 0 means that the day is not selected
39
- * - startTime: The start time, required
40
- * - endTime: The end time, required
41
- * - imei: The imei, required
42
- * - filter: The filter to apply on a specific alert type, optional
43
- * @returns {DeviceAlertConfiguration}
44
- */
45
- createCustomUserAlertConfiguration(params: CreateCustomUserAlertConfigurationParams): Promise<CustomUserAlertConfiguration>;
46
31
  /**
47
32
  * Update user configuration
48
33
  * @param {UpdateUserConfigurationParams} params containing information to update a user configuration
@@ -77,26 +62,6 @@ export declare class UserConfigurationsRepository extends BaseRepository {
77
62
  * @returns The user alert configurations
78
63
  */
79
64
  getUserAlertConfigurations(params: GetUserAlertConfigurationsParams): Promise<UserAlertConfiguration[]>;
80
- /**
81
- * Get custom user alert configurations
82
- * @param {GetCustomUserAlertConfigurationParams} params containing information to get custom user alert configurations
83
- * - filters.imei: The imei to obtain all user alert configurations from that device.
84
- * - filters.clientId: The client id to obtain the configurations.
85
- * - filters.userId: The user id to obtain the configurations.
86
- * - filters.configId: The device custom user alert configuration id to obtain the configurations.
87
- * @returns The user device time windows configurations
88
- */
89
- getCustomUserAlertConfiguration(params: GetCustomUserAlertConfigurationParams): Promise<CustomUserAlertConfiguration[]>;
90
- /**
91
- * Get the custom user alert configurations count
92
- * @param {GetCustomUserAlertConfigurationParams} params containing information to get custom user alert configurations
93
- * - filters.imei: The imei to obtain all user alert configurations from that device.
94
- * - filters.clientId: The client id to obtain the configurations.
95
- * - filters.userId: The user id to obtain the configurations.
96
- * - filters.configId: The device custom user alert configuration id to obtain the configurations.
97
- * @returns The user device time windows configurations
98
- */
99
- getCustomUserAlertConfigurationCount(params: GetCustomUserAlertConfigurationParams): Promise<number>;
100
65
  /**
101
66
  * Bulk create user alert configurations
102
67
  * @param {BulkCreateUserAlertConfigurationsParams} params containing information to bulk create user alert configurations
@@ -181,23 +146,4 @@ export declare class UserConfigurationsRepository extends BaseRepository {
181
146
  * @returns Whether the user alert configurations were deleted
182
147
  */
183
148
  deleteUserAlertConfigurations(params: DeleteUserAlertConfigurationsParams): Promise<boolean>;
184
- /**
185
- * Delete custom user alert configurations
186
- * @param {DeleteCustomUserAlertConfigurationParams} params containing information to delete custom user alert configurations
187
- * @returns Whether the custom user alert configurations were deleted or not
188
- */
189
- deleteCustomUserAlertConfiguration(params: DeleteCustomUserAlertConfigurationParams): Promise<boolean>;
190
- /**
191
- * Update custom user alert configurations
192
- * @param {UpdateCustomUserAlertConfigurationParams} params containing information to update custom user alert configurations
193
- * - filters.configId: The device custom user alert configuration id to update, required
194
- * - values.alertConfigurationId: The alert configuration id to update, optional
195
- * - values.daysOfTheWeek: The days of the week to update, optional
196
- * - values.startTime: The start time to update, optional
197
- * - values.endTime: The end time to update, optional
198
- * - values.filter: The filter to update, optional
199
- * One of the values should be provided
200
- * @returns Whether the custom user alert configurations were updated or not
201
- */
202
- updateCustomUserAlertConfiguration(params: UpdateCustomUserAlertConfigurationParams): Promise<boolean>;
203
149
  }
@@ -1,17 +1,12 @@
1
1
  import { NovaDataSource } from '../../novaDataSource';
2
2
  import { BaseRepository } from '../baseRepository';
3
3
  import { bulkCreateUserAlertConfigurations } from './bulkCreateUserAlertConfigurations';
4
- import { createCustomUserAlertConfiguration } from './createCustomUserAlertConfiguration';
5
4
  import { createUserAlertConfiguration } from './createUserAlertConfiguration';
6
5
  import { createUserConfiguration } from './createUserConfiguration';
7
- import { deleteCustomUserAlertConfiguration } from './deleteCustomUserAlertConfiguration';
8
6
  import { deleteUserAlertConfigurations } from './deleteUserAlertConfigurations';
9
7
  import { deleteUserConfiguration } from './deleteUserConfiguration';
10
- import { getCustomUserAlertConfiguration } from './getCustomUserAlertConfiguration';
11
- import { getCustomUserAlertConfigurationCount } from './getCustomUserAlertConfigurationCount';
12
8
  import { getUserAlertConfigurations } from './getUserAlertConfigurations';
13
9
  import { getUserConfigurations } from './getUserConfigurations';
14
- import { updateCustomUserAlertConfiguration } from './updateCustomUserAlertConfiguration';
15
10
  import { updateUserAlertConfigurations } from './updateUserAlertConfigurations';
16
11
  import { updateUserAlertConfigurationById } from './updateUserAlertConfigurationsByIds';
17
12
  import { updateUserConfiguration } from './updateUserConfiguration';
@@ -54,27 +49,6 @@ export class UserConfigurationsRepository extends BaseRepository {
54
49
  this.logger.trace(result, 'UserConfigurationsRepository::createUserConfiguration result');
55
50
  return result;
56
51
  }
57
- /**
58
- * Create device alert time windows
59
- * @param {CreateCustomUserAlertConfigurationParams} params containing information to create a device alert time windows
60
- * - id: The user alert time windows id, optional. If not provided, it will be generated
61
- * - clientId: The client id, required
62
- * - userId: The user id, required
63
- * - alertConfigurationId: The alert configuration id, optional
64
- * - daysOfTheWeek: The days of the week, required. It's a string of 7 characters, each one representing a day of the week, starting with Sunday. 1 means that the day is selected, 0 means that the day is not selected
65
- * - startTime: The start time, required
66
- * - endTime: The end time, required
67
- * - imei: The imei, required
68
- * - filter: The filter to apply on a specific alert type, optional
69
- * @returns {DeviceAlertConfiguration}
70
- */
71
- async createCustomUserAlertConfiguration(params) {
72
- this.logger.trace(params, 'UserConfigurationsRepository::createDeviceAlertTimeWindows started with params');
73
- const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
74
- const result = await createCustomUserAlertConfiguration(novaDataSource, params, this.logger);
75
- this.logger.trace(result, 'UserConfigurationsRepository::createDeviceAlertTimeWindows result');
76
- return result;
77
- }
78
52
  /**
79
53
  * Update user configuration
80
54
  * @param {UpdateUserConfigurationParams} params containing information to update a user configuration
@@ -127,38 +101,6 @@ export class UserConfigurationsRepository extends BaseRepository {
127
101
  this.logger.trace(result, 'UserConfigurationsRepository::getUserAlertConfigurations result');
128
102
  return result;
129
103
  }
130
- /**
131
- * Get custom user alert configurations
132
- * @param {GetCustomUserAlertConfigurationParams} params containing information to get custom user alert configurations
133
- * - filters.imei: The imei to obtain all user alert configurations from that device.
134
- * - filters.clientId: The client id to obtain the configurations.
135
- * - filters.userId: The user id to obtain the configurations.
136
- * - filters.configId: The device custom user alert configuration id to obtain the configurations.
137
- * @returns The user device time windows configurations
138
- */
139
- async getCustomUserAlertConfiguration(params) {
140
- this.logger.trace(params, 'UserConfigurationsRepository::getCustomUserAlertConfiguration started with params');
141
- const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
142
- const result = await getCustomUserAlertConfiguration(novaDataSource, params, this.logger);
143
- this.logger.trace(result, 'UserConfigurationsRepository::getCustomUserAlertConfiguration result');
144
- return result;
145
- }
146
- /**
147
- * Get the custom user alert configurations count
148
- * @param {GetCustomUserAlertConfigurationParams} params containing information to get custom user alert configurations
149
- * - filters.imei: The imei to obtain all user alert configurations from that device.
150
- * - filters.clientId: The client id to obtain the configurations.
151
- * - filters.userId: The user id to obtain the configurations.
152
- * - filters.configId: The device custom user alert configuration id to obtain the configurations.
153
- * @returns The user device time windows configurations
154
- */
155
- async getCustomUserAlertConfigurationCount(params) {
156
- this.logger.trace(params, 'UserConfigurationsRepository::getCustomUserAlertConfigurationCount started with params');
157
- const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
158
- const result = await getCustomUserAlertConfigurationCount(novaDataSource, params, this.logger);
159
- this.logger.trace({ result }, 'UserConfigurationsRepository::getCustomUserAlertConfigurationCount result');
160
- return result;
161
- }
162
104
  /**
163
105
  * Bulk create user alert configurations
164
106
  * @param {BulkCreateUserAlertConfigurationsParams} params containing information to bulk create user alert configurations
@@ -273,36 +215,5 @@ export class UserConfigurationsRepository extends BaseRepository {
273
215
  this.logger.trace({ result }, 'UserConfigurationsRepository::deleteUserAlertConfigurations result');
274
216
  return result;
275
217
  }
276
- /**
277
- * Delete custom user alert configurations
278
- * @param {DeleteCustomUserAlertConfigurationParams} params containing information to delete custom user alert configurations
279
- * @returns Whether the custom user alert configurations were deleted or not
280
- */
281
- async deleteCustomUserAlertConfiguration(params) {
282
- this.logger.trace(params, 'UserConfigurationsRepository::deleteCustomUserAlertConfiguration started with params');
283
- const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
284
- const result = await deleteCustomUserAlertConfiguration(novaDataSource, params, this.logger);
285
- this.logger.trace({ result }, 'UserConfigurationsRepository::deleteCustomUserAlertConfiguration result');
286
- return result;
287
- }
288
- /**
289
- * Update custom user alert configurations
290
- * @param {UpdateCustomUserAlertConfigurationParams} params containing information to update custom user alert configurations
291
- * - filters.configId: The device custom user alert configuration id to update, required
292
- * - values.alertConfigurationId: The alert configuration id to update, optional
293
- * - values.daysOfTheWeek: The days of the week to update, optional
294
- * - values.startTime: The start time to update, optional
295
- * - values.endTime: The end time to update, optional
296
- * - values.filter: The filter to update, optional
297
- * One of the values should be provided
298
- * @returns Whether the custom user alert configurations were updated or not
299
- */
300
- async updateCustomUserAlertConfiguration(params) {
301
- this.logger.trace(params, 'UserConfigurationsRepository::updateCustomUserAlertConfiguration started with params');
302
- const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
303
- const result = await updateCustomUserAlertConfiguration(novaDataSource, params, this.logger);
304
- this.logger.trace({ result }, 'UserConfigurationsRepository::updateCustomUserAlertConfiguration result');
305
- return result;
306
- }
307
218
  }
308
219
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repositories/userConfigurations/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAiBrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAA;AACvF,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAA;AACzF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAC7E,OAAO,EAAE,uBAAu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AED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,gCAAgC,CACpC,MAA8C;QAE9C,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,MAAM,EACN,sFAAsF,CACvF,CAAA;QAED,MAAM,cAAc,GAAG,IAAI,cAAc,CACvC,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,2BAA2B,CACjC,CAAA;QAED,MAAM,MAAM,GAAG,MAAM,gCAAgC,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAE1F,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,EAAE,MAAM,EAAE,EACV,yEAAyE,CAC1E,CAAA;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,6BAA6B,CACjC,MAA2C;QAE3C,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,MAAM,EACN,iFAAiF,CAClF,CAAA;QAED,MAAM,cAAc,GAAG,IAAI,cAAc,CACvC,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,2BAA2B,CACjC,CAAA;QAED,MAAM,MAAM,GAAG,MAAM,6BAA6B,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAEvF,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,EAAE,MAAM,EAAE,EACV,oEAAoE,CACrE,CAAA;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- import { BaseSelectQueryParams, ReportPagination } from './common';
1
+ import { BaseSelectQueryParams, OptionalReportPagination, ReportPagination } from './common';
2
2
  export interface CreatePositionParams {
3
3
  id?: number;
4
4
  imei: string;
@@ -61,3 +61,11 @@ export interface GetLatestPositionByImeiParams extends BaseSelectQueryParams {
61
61
  imei: string;
62
62
  };
63
63
  }
64
+ export interface GetBatteryReportForDeviceParams extends OptionalReportPagination {
65
+ filters: {
66
+ imei: string;
67
+ clientId: number;
68
+ startDate?: Date;
69
+ endDate?: Date;
70
+ };
71
+ }
@@ -1,4 +1,4 @@
1
- import { BaseSelectQueryParams, OptionalReportPagination } from './common';
1
+ import { BaseSelectQueryParams } from './common';
2
2
  export interface GetUserConfigurationsParams extends BaseSelectQueryParams {
3
3
  filters: {
4
4
  clientId?: number;
@@ -49,14 +49,6 @@ export interface GetUserAlertConfigurationsParams extends BaseSelectQueryParams
49
49
  withNotificationRecipients?: boolean;
50
50
  };
51
51
  }
52
- export interface GetCustomUserAlertConfigurationParams extends OptionalReportPagination {
53
- filters: {
54
- configId?: number;
55
- imei?: string;
56
- clientId?: number;
57
- userId?: string;
58
- };
59
- }
60
52
  export interface CreateUserAlertConfigurationParams {
61
53
  id?: number;
62
54
  userId: string;
@@ -113,34 +105,3 @@ export interface DeleteUserAlertConfigurationsParams {
113
105
  userAlertConfigurationIds?: number[];
114
106
  };
115
107
  }
116
- export interface CreateCustomUserAlertConfigurationParams {
117
- id?: number;
118
- alertTypeId: number;
119
- userId: string;
120
- clientId: number;
121
- daysOfTheWeek: string;
122
- startTime: Date;
123
- endTime: Date;
124
- alertConfigurationId?: number;
125
- imei?: string;
126
- filter?: any;
127
- label?: string;
128
- }
129
- export interface UpdateCustomUserAlertConfigurationParams {
130
- filters: {
131
- configId: number;
132
- };
133
- values: {
134
- alertConfigurationId?: number;
135
- daysOfTheWeek?: string;
136
- startTime?: Date;
137
- endTime?: Date;
138
- filter?: any;
139
- label?: string;
140
- };
141
- }
142
- export interface DeleteCustomUserAlertConfigurationParams {
143
- filters: {
144
- configId: number;
145
- };
146
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "1.0.103",
3
+ "version": "1.0.105",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,12 +0,0 @@
1
- /// <reference types="node" />
2
- export declare class AlertTimeWindowConfiguration {
3
- id: number;
4
- alertId: number | null;
5
- userId: Buffer | null;
6
- clientId: number | null;
7
- alertConfigurationId: number;
8
- daysOfTheWeek: string | null;
9
- startTime: Date | null;
10
- endTime: Date | null;
11
- label: string | null;
12
- }
@@ -1,62 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
11
- let AlertTimeWindowConfiguration = class AlertTimeWindowConfiguration {
12
- id;
13
- alertId;
14
- userId;
15
- clientId;
16
- alertConfigurationId;
17
- daysOfTheWeek;
18
- startTime;
19
- endTime;
20
- label;
21
- };
22
- __decorate([
23
- PrimaryGeneratedColumn({ type: 'int', name: 'id' }),
24
- __metadata("design:type", Number)
25
- ], AlertTimeWindowConfiguration.prototype, "id", void 0);
26
- __decorate([
27
- Column('int', { name: 'alertId', nullable: true }),
28
- __metadata("design:type", Number)
29
- ], AlertTimeWindowConfiguration.prototype, "alertId", void 0);
30
- __decorate([
31
- Column('binary', { name: 'userId', nullable: true, length: 16 }),
32
- __metadata("design:type", Buffer)
33
- ], AlertTimeWindowConfiguration.prototype, "userId", void 0);
34
- __decorate([
35
- Column('int', { name: 'clientId', nullable: true }),
36
- __metadata("design:type", Number)
37
- ], AlertTimeWindowConfiguration.prototype, "clientId", void 0);
38
- __decorate([
39
- Column('int', { name: 'alertConfigurationId', nullable: true }),
40
- __metadata("design:type", Number)
41
- ], AlertTimeWindowConfiguration.prototype, "alertConfigurationId", void 0);
42
- __decorate([
43
- Column('varchar', { name: 'daysOfTheWeek', nullable: true, length: 7 }),
44
- __metadata("design:type", String)
45
- ], AlertTimeWindowConfiguration.prototype, "daysOfTheWeek", void 0);
46
- __decorate([
47
- Column('datetime', { name: 'startTime', nullable: true, precision: 0 }),
48
- __metadata("design:type", Date)
49
- ], AlertTimeWindowConfiguration.prototype, "startTime", void 0);
50
- __decorate([
51
- Column('datetime', { name: 'endTime', nullable: true, precision: 0 }),
52
- __metadata("design:type", Date)
53
- ], AlertTimeWindowConfiguration.prototype, "endTime", void 0);
54
- __decorate([
55
- Column('varchar', { name: 'label', nullable: true, length: 100 }),
56
- __metadata("design:type", String)
57
- ], AlertTimeWindowConfiguration.prototype, "label", void 0);
58
- AlertTimeWindowConfiguration = __decorate([
59
- Entity('alertTimeWindowConfiguration', { schema: 'nova' })
60
- ], AlertTimeWindowConfiguration);
61
- export { AlertTimeWindowConfiguration };
62
- //# sourceMappingURL=alertTimeWindowConfiguration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alertTimeWindowConfiguration.js","sourceRoot":"","sources":["../../src/entities/alertTimeWindowConfiguration.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAGzD,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAEvC,EAAE,CAAQ;IAGV,OAAO,CAAe;IAGtB,MAAM,CAAe;IAGrB,QAAQ,CAAe;IAGvB,oBAAoB,CAAQ;IAG5B,aAAa,CAAe;IAG5B,SAAS,CAAa;IAGtB,OAAO,CAAa;IAGpB,KAAK,CAAe;CACrB,CAAA;AA1BC;IAAC,sBAAsB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;wDAC1C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Id: number | null;
5
- userId: Buffer | null;
6
- clientId: number | null;
7
- alertConfigurationId: number | null;
8
- daysOfTheWeek: string | null;
9
- startTime: Date | null;
10
- endTime: Date | null;
11
- imei: string | null;
12
- filter: object | null;
13
- label: string | null;
14
- }
@@ -1,73 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
11
- let CustomUserAlertConfiguration = class CustomUserAlertConfiguration {
12
- id;
13
- alertTypeId;
14
- userId;
15
- clientId;
16
- alertConfigurationId;
17
- daysOfTheWeek;
18
- startTime;
19
- endTime;
20
- imei;
21
- filter;
22
- label;
23
- };
24
- __decorate([
25
- PrimaryGeneratedColumn({ type: 'int', name: 'id' }),
26
- __metadata("design:type", Number)
27
- ], CustomUserAlertConfiguration.prototype, "id", void 0);
28
- __decorate([
29
- Column('int', { name: 'alertTypeId', nullable: true }),
30
- __metadata("design:type", Number)
31
- ], CustomUserAlertConfiguration.prototype, "alertTypeId", void 0);
32
- __decorate([
33
- Column('binary', { name: 'userId', nullable: true, length: 16 }),
34
- __metadata("design:type", Buffer)
35
- ], CustomUserAlertConfiguration.prototype, "userId", void 0);
36
- __decorate([
37
- Column('int', { name: 'clientId', nullable: true }),
38
- __metadata("design:type", Number)
39
- ], CustomUserAlertConfiguration.prototype, "clientId", void 0);
40
- __decorate([
41
- Column('int', { name: 'alertConfigurationId', nullable: true }),
42
- __metadata("design:type", Number)
43
- ], CustomUserAlertConfiguration.prototype, "alertConfigurationId", void 0);
44
- __decorate([
45
- Column('varchar', { name: 'daysOfTheWeek', nullable: true, length: 7 }),
46
- __metadata("design:type", String)
47
- ], CustomUserAlertConfiguration.prototype, "daysOfTheWeek", void 0);
48
- __decorate([
49
- Column('datetime', { name: 'startTime', nullable: true, precision: 0 }),
50
- __metadata("design:type", Date)
51
- ], CustomUserAlertConfiguration.prototype, "startTime", void 0);
52
- __decorate([
53
- Column('datetime', { name: 'endTime', nullable: true, precision: 0 }),
54
- __metadata("design:type", Date)
55
- ], CustomUserAlertConfiguration.prototype, "endTime", void 0);
56
- __decorate([
57
- Column('varchar', { name: 'imei', nullable: true, length: 15 }),
58
- __metadata("design:type", String)
59
- ], CustomUserAlertConfiguration.prototype, "imei", void 0);
60
- __decorate([
61
- Column('json', { name: 'filter', nullable: true }),
62
- __metadata("design:type", Object)
63
- ], CustomUserAlertConfiguration.prototype, "filter", void 0);
64
- __decorate([
65
- Column('varchar', { name: 'label', nullable: true, length: 100 }),
66
- __metadata("design:type", String)
67
- ], CustomUserAlertConfiguration.prototype, "label", void 0);
68
- CustomUserAlertConfiguration = __decorate([
69
- Index('ixCustomUserAlertConfigurationUserId', ['userId'], {}),
70
- Entity('customUserAlertConfiguration', { schema: 'nova' })
71
- ], CustomUserAlertConfiguration);
72
- export { CustomUserAlertConfiguration };
73
- //# sourceMappingURL=customUserAlertConfiguration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"customUserAlertConfiguration.js","sourceRoot":"","sources":["../../src/entities/customUserAlertConfiguration.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAIhE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAEvC,EAAE,CAAQ;IAGV,WAAW,CAAe;IAG1B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,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;0DAC7C;AAEnB;IAAC,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DAC9B;AAErB;IAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;2DAC9C;AAhCT,4BAA4B;IAFxC,KAAK,CAAC,sCAAsC,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;IAC7D,MAAM,CAAC,8BAA8B,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GAC9C,4BAA4B,CAiCxC;SAjCY,4BAA4B"}
@@ -1,14 +0,0 @@
1
- /// <reference types="node" />
2
- export declare class DeviceAlertConfiguration {
3
- id: number;
4
- alertTypeId: number | null;
5
- userId: Buffer | null;
6
- clientId: number | null;
7
- alertConfigurationId: number;
8
- daysOfTheWeek: string | null;
9
- startTime: Date | null;
10
- endTime: Date | null;
11
- imei: string;
12
- filter: object | null;
13
- label: string | null;
14
- }