@spytecgps/nova-orm 0.0.193 → 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.
@@ -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 { AddTaskScheduleDevicesParams, 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
  /**
@@ -123,7 +123,7 @@ export declare class TasksRepository extends BaseRepository {
123
123
  */
124
124
  setTaskScheduleDevices(params: SetTaskScheduleDevicesParams): Promise<boolean>;
125
125
  /**
126
- * Adds the supplied imeis to the TaskScheduleDevices table, associated with a task schedule id.
126
+ * Adds the supplied imeis to the DeviceTask table, associated with a task schedule id.
127
127
  * This operation adds the imeis if they do not exist and does not remove or modifies other records.
128
128
  * @param params params containing information to add task schedule devices
129
129
  * params.taskScheduleId: the task schedule ID, required.
@@ -132,4 +132,13 @@ export declare class TasksRepository extends BaseRepository {
132
132
  * If the task schedule does not exist, the function will return false
133
133
  */
134
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>;
135
144
  }
@@ -93,3 +93,7 @@ export interface AddTaskScheduleDevicesParams {
93
93
  taskScheduleId: number;
94
94
  imeis: string[];
95
95
  }
96
+ export interface DeleteTaskScheduleDevicesParams {
97
+ taskScheduleId: number;
98
+ imeis: string[];
99
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "0.0.193",
3
+ "version": "0.0.194",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",