@spytecgps/nova-orm 0.0.192 → 0.0.194
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/deviceTask.d.ts +1 -2
- package/dist/index.js +1 -1
- package/dist/repositories/tasks/addTaskScheduleDevices.d.ts +4 -0
- package/dist/repositories/tasks/deleteTaskScheduleDevices.d.ts +4 -0
- package/dist/repositories/tasks/index.d.ts +20 -1
- package/dist/types/tasks.d.ts +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { Logger } from '../../types/logger';
|
|
3
|
+
import { AddTaskScheduleDevicesParams } from '../../types/tasks';
|
|
4
|
+
export declare const addTaskScheduleDevices: (novaDataSource: NovaDataSource, params: AddTaskScheduleDevicesParams, logger: Logger) => Promise<boolean>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { Logger } from '../../types/logger';
|
|
3
|
+
import { DeleteTaskScheduleDevicesParams } from '../../types/tasks';
|
|
4
|
+
export declare const deleteTaskScheduleDevices: (novaDataSource: NovaDataSource, params: DeleteTaskScheduleDevicesParams, logger: Logger) => Promise<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeviceTask, TaskSchedule } from '../../entities';
|
|
2
|
-
import { CreateTaskScheduleParams, DeleteTaskScheduleParams, GetDeviceTasksParams, GetTaskScheduleParams, GetTaskSchedulesParams, SetTaskScheduleDevicesParams, UpdateTaskScheduleParams } from '../../types/tasks';
|
|
2
|
+
import { AddTaskScheduleDevicesParams, CreateTaskScheduleParams, DeleteTaskScheduleDevicesParams, DeleteTaskScheduleParams, GetDeviceTasksParams, GetTaskScheduleParams, GetTaskSchedulesParams, SetTaskScheduleDevicesParams, UpdateTaskScheduleParams } from '../../types/tasks';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class TasksRepository extends BaseRepository {
|
|
5
5
|
/**
|
|
@@ -122,4 +122,23 @@ export declare class TasksRepository extends BaseRepository {
|
|
|
122
122
|
* If the task schedule does not exist, the function will return false
|
|
123
123
|
*/
|
|
124
124
|
setTaskScheduleDevices(params: SetTaskScheduleDevicesParams): Promise<boolean>;
|
|
125
|
+
/**
|
|
126
|
+
* Adds the supplied imeis to the DeviceTask table, associated with a task schedule id.
|
|
127
|
+
* This operation adds the imeis if they do not exist and does not remove or modifies other records.
|
|
128
|
+
* @param params params containing information to add task schedule devices
|
|
129
|
+
* params.taskScheduleId: the task schedule ID, required.
|
|
130
|
+
* params.imeis: the IMEIs, required.
|
|
131
|
+
* @returns Promise<boolean> whether the task schedule devices were added
|
|
132
|
+
* If the task schedule does not exist, the function will return false
|
|
133
|
+
*/
|
|
134
|
+
addTaskScheduleDevices(params: AddTaskScheduleDevicesParams): Promise<boolean>;
|
|
135
|
+
/**
|
|
136
|
+
* Deletes the supplied imeis from the DeviceTask table, associated with a task schedule id.
|
|
137
|
+
* This operation deletes the imeis if they exist and does not remove or modifies other records.
|
|
138
|
+
* @param params params containing information to delete task schedule devices
|
|
139
|
+
* params.taskScheduleId: the task schedule ID, required.
|
|
140
|
+
* params.imeis: the IMEIs, required.
|
|
141
|
+
* @returns Promise<boolean> whether the task schedule devices were deleted
|
|
142
|
+
*/
|
|
143
|
+
deleteTaskScheduleDevices(params: DeleteTaskScheduleDevicesParams): Promise<boolean>;
|
|
125
144
|
}
|
package/dist/types/tasks.d.ts
CHANGED
|
@@ -89,3 +89,11 @@ export interface SetTaskScheduleDevicesParams {
|
|
|
89
89
|
taskScheduleId: number;
|
|
90
90
|
imeis?: string[];
|
|
91
91
|
}
|
|
92
|
+
export interface AddTaskScheduleDevicesParams {
|
|
93
|
+
taskScheduleId: number;
|
|
94
|
+
imeis: string[];
|
|
95
|
+
}
|
|
96
|
+
export interface DeleteTaskScheduleDevicesParams {
|
|
97
|
+
taskScheduleId: number;
|
|
98
|
+
imeis: string[];
|
|
99
|
+
}
|