@spytecgps/nova-orm 1.0.11 → 1.0.12
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.
|
@@ -18,6 +18,7 @@ export const createClientDeviceSetting = async (novaDataSource, params, logger)
|
|
|
18
18
|
offlineThresholdMinutes: params.offlineThresholdMinutes,
|
|
19
19
|
movementThresholdSpeed: params.movementThresholdSpeed,
|
|
20
20
|
externalBatteryInformation: params.externalBatteryInformation,
|
|
21
|
+
reportingMode: params.reportingMode,
|
|
21
22
|
};
|
|
22
23
|
const result = await clientDeviceSettingRepository.save(newClientDeviceSetting);
|
|
23
24
|
return result;
|
|
@@ -11,7 +11,8 @@ export const updateClientDeviceSetting = async (novaDataSource, params, logger)
|
|
|
11
11
|
!params?.values?.stopThresholdMinutes &&
|
|
12
12
|
!params?.values?.offlineThresholdMinutes &&
|
|
13
13
|
!params?.values?.movementThresholdSpeed &&
|
|
14
|
-
params?.values?.externalBatteryInformation == null
|
|
14
|
+
params?.values?.externalBatteryInformation == null &&
|
|
15
|
+
!params?.values?.reportingMode) {
|
|
15
16
|
logger.warn({ params }, 'DevicesRepository::updateClientDeviceSetting missing required parameters');
|
|
16
17
|
return false;
|
|
17
18
|
}
|
|
@@ -29,6 +30,7 @@ export const updateClientDeviceSetting = async (novaDataSource, params, logger)
|
|
|
29
30
|
offlineThresholdMinutes: params.values.offlineThresholdMinutes,
|
|
30
31
|
movementThresholdSpeed: params.values.movementThresholdSpeed,
|
|
31
32
|
externalBatteryInformation: params.values.externalBatteryInformation,
|
|
33
|
+
reportingMode: params.values.reportingMode,
|
|
32
34
|
})
|
|
33
35
|
.where('imei = :imei', { imei: params.filters.imei })
|
|
34
36
|
.andWhere('clientId = :clientId', { clientId: params.filters.clientId });
|
package/dist/types/devices.d.ts
CHANGED
|
@@ -155,6 +155,7 @@ export interface CreateClientDeviceSettingParams {
|
|
|
155
155
|
offlineThresholdMinutes?: number;
|
|
156
156
|
movementThresholdSpeed?: number;
|
|
157
157
|
externalBatteryInformation?: boolean;
|
|
158
|
+
reportingMode?: string;
|
|
158
159
|
}
|
|
159
160
|
export interface UpdateClientDeviceSettingParams {
|
|
160
161
|
filters: {
|
|
@@ -170,6 +171,7 @@ export interface UpdateClientDeviceSettingParams {
|
|
|
170
171
|
offlineThresholdMinutes?: number;
|
|
171
172
|
movementThresholdSpeed?: number;
|
|
172
173
|
externalBatteryInformation?: boolean;
|
|
174
|
+
reportingMode?: string;
|
|
173
175
|
};
|
|
174
176
|
}
|
|
175
177
|
export interface GetDeviceTypesModelsOrderedByDeviceCountParams {
|