@spytecgps/nova-orm 0.0.189 → 0.0.190
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.
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DeviceTask } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { Logger } from '../../types/logger';
|
|
4
|
+
import { GetDeviceTasksParams } from '../../types/tasks';
|
|
5
|
+
export declare const getDeviceTasks: (novaDataSource: NovaDataSource, params: GetDeviceTasksParams, logger: Logger) => Promise<DeviceTask[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TaskSchedule } from '../../entities';
|
|
2
|
-
import { CreateTaskScheduleParams, DeleteTaskScheduleParams, GetTaskScheduleParams, GetTaskSchedulesParams, UpdateTaskScheduleParams } from '../../types/tasks';
|
|
1
|
+
import { DeviceTask, TaskSchedule } from '../../entities';
|
|
2
|
+
import { CreateTaskScheduleParams, DeleteTaskScheduleParams, GetDeviceTasksParams, GetTaskScheduleParams, GetTaskSchedulesParams, UpdateTaskScheduleParams } from '../../types/tasks';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class TasksRepository extends BaseRepository {
|
|
5
5
|
/**
|
|
@@ -102,4 +102,14 @@ export declare class TasksRepository extends BaseRepository {
|
|
|
102
102
|
* @returns Promise<TaskSchedule[]> the task schedules corresponding to the filters
|
|
103
103
|
*/
|
|
104
104
|
getTaskSchedules(params: GetTaskSchedulesParams): Promise<TaskSchedule[]>;
|
|
105
|
+
/**
|
|
106
|
+
* Get device tasks
|
|
107
|
+
* @param params params containing information to get device tasks
|
|
108
|
+
* At least one of the following filters is required:
|
|
109
|
+
* params.filters.taskScheduleId: the task schedule ID
|
|
110
|
+
* params.filters.imei: the IMEI
|
|
111
|
+
* params.filters.clientId: the client ID
|
|
112
|
+
* @returns Promise<DeviceTask[]> the device tasks corresponding to the filters
|
|
113
|
+
*/
|
|
114
|
+
getDeviceTasks(params: GetDeviceTasksParams): Promise<DeviceTask[]>;
|
|
105
115
|
}
|
package/dist/types/tasks.d.ts
CHANGED
|
@@ -78,3 +78,10 @@ export interface GetTaskSchedulesFilters {
|
|
|
78
78
|
export interface GetTaskSchedulesParams {
|
|
79
79
|
filters: GetTaskSchedulesFilters;
|
|
80
80
|
}
|
|
81
|
+
export interface GetDeviceTasksParams {
|
|
82
|
+
filters: {
|
|
83
|
+
taskScheduleId?: number;
|
|
84
|
+
imei?: string;
|
|
85
|
+
clientId?: number;
|
|
86
|
+
};
|
|
87
|
+
}
|