@spytecgps/nova-orm 0.0.147 → 0.0.149
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeviceBehavior, UserDeviceBehaviorTask } from '../../entities';
|
|
2
|
-
import { CreateDeviceBehaviorTaskParams, GetDeviceBehaviorsByIdsParams, GetDeviceBehaviorsParams, GetDeviceBehaviorTasksParams, GetLatestDeviceBehaviorTasksParams, GetLatestDeviceBehaviorTasksResult, UpdateDeviceBehaviorTaskParams } from '../../types/deviceBehaviors';
|
|
2
|
+
import { CreateDeviceBehaviorTaskParams, GetDeviceBehaviorsByIdsParams, GetDeviceBehaviorsParams, GetDeviceBehaviorTasksParams, GetLatestDeviceBehaviorTasksParams, GetLatestDeviceBehaviorTasksResult, UpdateDeviceBehaviorTaskParams, UpsertDeviceBehaviorParams } from '../../types/deviceBehaviors';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class DeviceBehaviorsRepository extends BaseRepository {
|
|
5
5
|
/**
|
|
@@ -70,4 +70,10 @@ export declare class DeviceBehaviorsRepository extends BaseRepository {
|
|
|
70
70
|
* @returns The latest device behavior tasks list
|
|
71
71
|
*/
|
|
72
72
|
getLatestDeviceBehaviorTasks(params: GetLatestDeviceBehaviorTasksParams): Promise<GetLatestDeviceBehaviorTasksResult[]>;
|
|
73
|
+
/**
|
|
74
|
+
* Upsert device behavior
|
|
75
|
+
* @param {UpsertDeviceBehaviorParams} params containing information to upsert a device behavior
|
|
76
|
+
* @returns The device behavior
|
|
77
|
+
*/
|
|
78
|
+
upsertDeviceBehavior(params: UpsertDeviceBehaviorParams): Promise<DeviceBehavior>;
|
|
73
79
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DeviceBehavior } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { UpsertDeviceBehaviorParams } from '../../types/deviceBehaviors';
|
|
4
|
+
import { Logger } from '../../types/logger';
|
|
5
|
+
export declare const upsertDeviceBehavior: (novaDataSource: NovaDataSource, params: UpsertDeviceBehaviorParams, logger: Logger) => Promise<DeviceBehavior>;
|
|
@@ -60,3 +60,26 @@ export interface GetLatestDeviceBehaviorTasksResult {
|
|
|
60
60
|
taskId: string;
|
|
61
61
|
modifiedAt: Date;
|
|
62
62
|
}
|
|
63
|
+
export interface UpsertDeviceBehaviorParams {
|
|
64
|
+
id?: number;
|
|
65
|
+
deviceTypeId: number;
|
|
66
|
+
name: string;
|
|
67
|
+
description: string;
|
|
68
|
+
status: string;
|
|
69
|
+
behaviorName: string;
|
|
70
|
+
ordinalPosition: number;
|
|
71
|
+
type?: string | null;
|
|
72
|
+
behaviorParams?: object | null;
|
|
73
|
+
extraParams?: object | null;
|
|
74
|
+
pendingNotes?: string | null;
|
|
75
|
+
clientId?: number | null;
|
|
76
|
+
imei?: string | null;
|
|
77
|
+
icon?: string | null;
|
|
78
|
+
confirmationNotes?: string | null;
|
|
79
|
+
stage?: string | null;
|
|
80
|
+
additionalSettings?: object | null;
|
|
81
|
+
blocking?: boolean | null;
|
|
82
|
+
displayType?: string | null;
|
|
83
|
+
minWebVersion?: string | null;
|
|
84
|
+
minAppVersion?: string | null;
|
|
85
|
+
}
|