@spytecgps/nova-orm 0.0.215 → 0.0.217

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 { 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;
@@ -114,6 +114,7 @@ export interface UpdateImeiIccidCarrierParams {
114
114
  deviceTypeId?: number;
115
115
  serviceProviderProductId?: number;
116
116
  isValid?: boolean;
117
+ model?: string;
117
118
  realModel?: string;
118
119
  po?: string;
119
120
  outOfInventory?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "0.0.215",
3
+ "version": "0.0.217",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",