@spytecgps/nova-orm 0.0.216 → 0.0.218
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/firmwareUpgradeTask.d.ts +2 -3
- package/dist/index.js +1 -1
- package/dist/repositories/deviceBehaviors/getDevicesLastBehaviorTask.d.ts +5 -0
- package/dist/repositories/deviceBehaviors/index.d.ts +14 -1
- package/dist/types/deviceBehaviors.d.ts +11 -0
- package/dist/types/firmwares.d.ts +0 -2
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UserDeviceBehaviorTask } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { GettDevicesLastBehaviorTaskParams } from '../../types/deviceBehaviors';
|
|
4
|
+
import { Logger } from '../../types/logger';
|
|
5
|
+
export declare const getDevicesLastBehaviorTask: (novaDataSource: NovaDataSource, params: GettDevicesLastBehaviorTaskParams, logger: Logger) => Promise<UserDeviceBehaviorTask[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeviceBehavior, UserDeviceBehaviorTask } from '../../entities';
|
|
2
|
-
import { CreateDeviceBehaviorTaskParams, GetDeviceBehaviorsByIdsParams, GetDeviceBehaviorsParams, GetDeviceBehaviorTasksParams, GetLatestDeviceBehaviorTasksParams, GetLatestDeviceBehaviorTasksResult, UpdateDeviceBehaviorTaskParams, UpsertDeviceBehaviorParams } from '../../types/deviceBehaviors';
|
|
2
|
+
import { CreateDeviceBehaviorTaskParams, GetDeviceBehaviorsByIdsParams, GetDeviceBehaviorsParams, GetDeviceBehaviorTasksParams, GetLatestDeviceBehaviorTasksParams, GetLatestDeviceBehaviorTasksResult, GettDevicesLastBehaviorTaskParams, UpdateDeviceBehaviorTaskParams, UpsertDeviceBehaviorParams } from '../../types/deviceBehaviors';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class DeviceBehaviorsRepository extends BaseRepository {
|
|
5
5
|
/**
|
|
@@ -35,6 +35,19 @@ export declare class DeviceBehaviorsRepository extends BaseRepository {
|
|
|
35
35
|
* @returns The device behavior tasks list
|
|
36
36
|
*/
|
|
37
37
|
getDeviceBehaviorTasks(params: GetDeviceBehaviorTasksParams): Promise<UserDeviceBehaviorTask[]>;
|
|
38
|
+
/**
|
|
39
|
+
* Get the devices last behavior task
|
|
40
|
+
* @param {GettDevicesLastBehaviorTaskParams} params containing information to get device behavior tasks
|
|
41
|
+
* Filters (One of taskId or imeiList is required):
|
|
42
|
+
* - filters.imeiList: The imei list
|
|
43
|
+
* - filters.status: The status, optional
|
|
44
|
+
* - filters.deviceBehaviorIdList: The device behavior id list, optional
|
|
45
|
+
* Paging options:
|
|
46
|
+
* - pagingOptions.offset: The offset, optional. Default is 0
|
|
47
|
+
* - pagingOptions.limit: The limit, optional. Default is 100
|
|
48
|
+
* @returns The device behavior tasks list
|
|
49
|
+
*/
|
|
50
|
+
getDevicesLastBehaviorTask(params: GettDevicesLastBehaviorTaskParams): Promise<UserDeviceBehaviorTask[]>;
|
|
38
51
|
/**
|
|
39
52
|
* Create device behavior task
|
|
40
53
|
* @param {CreateDeviceBehaviorTaskParams} params containing information to create a device behavior task
|
|
@@ -26,6 +26,17 @@ export interface GetDeviceBehaviorTasksParams {
|
|
|
26
26
|
offset?: number;
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
+
export interface GettDevicesLastBehaviorTaskParams {
|
|
30
|
+
filters: {
|
|
31
|
+
imeiList?: string[];
|
|
32
|
+
status?: DeviceBehaviorTaskStatus;
|
|
33
|
+
deviceBehaviorIdList?: number[];
|
|
34
|
+
};
|
|
35
|
+
pagingOptions?: {
|
|
36
|
+
limit?: number;
|
|
37
|
+
offset?: number;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
29
40
|
export interface CreateDeviceBehaviorTaskParams {
|
|
30
41
|
taskId: string;
|
|
31
42
|
deviceBehaviorId: number;
|
|
@@ -9,7 +9,6 @@ export interface GetDeviceFirmwaresParams {
|
|
|
9
9
|
}
|
|
10
10
|
export interface GetFirmwareUpgradeTasksParams {
|
|
11
11
|
filters: {
|
|
12
|
-
deviceId?: number;
|
|
13
12
|
firmwareId?: number;
|
|
14
13
|
firmwareIds?: number[];
|
|
15
14
|
taskId?: string;
|
|
@@ -40,7 +39,6 @@ export interface GetFirmwareAutoUpgradeBlacklistParams {
|
|
|
40
39
|
}
|
|
41
40
|
export interface GetFirmwareUpgradeTasksCountParams {
|
|
42
41
|
filters: {
|
|
43
|
-
deviceId?: number;
|
|
44
42
|
firmwareId?: number;
|
|
45
43
|
taskId?: string;
|
|
46
44
|
statuses?: FirmwareUpgradeTaskStatus[];
|