@spytecgps/nova-orm 0.0.30 → 0.0.32

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.
@@ -36,27 +36,32 @@ export declare class FirmwaresRepository extends BaseRepository {
36
36
  * - id: The firmware upgrade task id
37
37
  * - deviceTypeFirmwareId: The device type firmware id
38
38
  * - clientId: The client id
39
- * - deviceId: The device id
39
+ * - deviceId: The device id. If deviceId is provided imei is not needed.
40
+ * - imei: The imei of the device. If imei is provided deviceId is not needed.
40
41
  * - status: The status of the firmware upgrade task
41
42
  * - behaviorName: The behavior name
42
43
  * - behaviorParams: The behavior params
43
44
  * - createdAt: The date when the firmware upgrade task is created
44
45
  * - modifiedAt: The date when the firmware upgrade task is modified
45
46
  * - preConfig: The pre config of the device before sending the upgrade command
46
- * - postConfig: The post config of the device after sending the upgrade command *
47
+ * - postConfig: The post config of the device after sending the upgrade command
47
48
  * @returns The newly created entity.
48
49
  */
49
50
  createFirmwareUpgradeTask(params: CreateFirmwareUpgradeTaskParams): Promise<FirmwareUpgradeTask>;
50
51
  /**
51
52
  * Get firmware upgrade tasks based on the filters.
52
53
  * @param {GetFirmwareUpgradeTasksParams} params containing information to get a firmware upgrade task with filters.
53
- * At leas one filter must be specified.
54
+ * At least one filter must be specified.
54
55
  * - filters.deviceId: The device id
55
56
  * - filters.firmwareId: The firmware id
56
57
  * - filters.taskId: The task id
58
+ * - filters.statuses: The list of statuses to filter
59
+ * - filters.imeis: The list of imeis to filter
57
60
  * - projectionOptions.withDeviceFirmware: Whether to get the device firmware object
58
61
  * - projectionOptions.withDevice: Whether to get the device object
59
- * - projectionOptions.deviceWithDeviceType: Whether to get the device type object of the device
62
+ * - projectionOptions.deviceWithDeviceType: Whether to get the device type object of the device. projectionOptions.withDevice should be true to use this option.
63
+ * - pagingOptions.offset: The offset of the number of firmware upgrade tasks to get. By default 0.
64
+ * - pagingOptions.limit: The limit of the number of firmware upgrade tasks to get. By default 100.
60
65
  * @returns {FirmwareUpgradeTask[]} A list of firmware upgrade tasks.
61
66
  */
62
67
  getFirmwareUpgradeTasks(params: GetFirmwareUpgradeTasksParams): Promise<FirmwareUpgradeTask[]>;
@@ -12,14 +12,25 @@ export interface GetFirmwareUpgradeTasksParams {
12
12
  deviceId?: number;
13
13
  firmwareId?: number;
14
14
  taskId?: string;
15
+ statuses?: FirmwareUpgradeTaskStatus[];
16
+ imeis?: string[];
15
17
  };
16
18
  projectionOptions?: {
17
19
  withDeviceFirmware?: boolean;
18
20
  withDevice?: boolean;
19
21
  deviceWithDeviceType?: boolean;
20
22
  };
23
+ pagingOptions?: {
24
+ limit?: number;
25
+ offset?: number;
26
+ };
27
+ }
28
+ export declare enum UpgradeType {
29
+ BB = "0",
30
+ MCU = "1",
31
+ BLE = "2",
32
+ MODEM = "7"
21
33
  }
22
- export type UpgradeType = '0' | '1' | '2' | '7';
23
34
  export interface CreateDeviceFirmwareParams {
24
35
  deviceTypeId: number;
25
36
  sourceFirmwareVersion?: string;
@@ -44,7 +55,8 @@ export interface CreateFirmwareUpgradeTaskParams {
44
55
  id: string;
45
56
  deviceTypeFirmwareId: number;
46
57
  clientId: number;
47
- deviceId: number;
58
+ deviceId?: number;
59
+ imei?: string;
48
60
  status: FirmwareUpgradeTaskStatus;
49
61
  behaviorName?: string;
50
62
  behaviorParams?: object;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",