@spytecgps/nova-orm 0.0.192 → 0.0.193

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 { AddTaskScheduleDevicesParams } from '../../types/tasks';
4
+ export declare const addTaskScheduleDevices: (novaDataSource: NovaDataSource, params: AddTaskScheduleDevicesParams, 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, 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,14 @@ 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 TaskScheduleDevices 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>;
125
135
  }
@@ -89,3 +89,7 @@ export interface SetTaskScheduleDevicesParams {
89
89
  taskScheduleId: number;
90
90
  imeis?: string[];
91
91
  }
92
+ export interface AddTaskScheduleDevicesParams {
93
+ taskScheduleId: number;
94
+ imeis: string[];
95
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "0.0.192",
3
+ "version": "0.0.193",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",