@spytecgps/nova-orm 0.0.134 → 0.0.136
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.
- package/dist/entities/deviceTypeFirmware.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/repositories/userConfigurations/createDeviceAlertTimeWindows.d.ts +5 -0
- package/dist/repositories/userConfigurations/createUserAlertTimeWindows.d.ts +5 -0
- package/dist/repositories/userConfigurations/deleteDeviceAlertTimeWindows.d.ts +4 -0
- package/dist/repositories/userConfigurations/deleteUserAlertTimeWindows.d.ts +4 -0
- package/dist/repositories/userConfigurations/index.d.ts +66 -1
- package/dist/repositories/userConfigurations/updateDeviceAlertTimeWindows.d.ts +4 -0
- package/dist/repositories/userConfigurations/updateUserAlertTimeWindows.d.ts +4 -0
- package/dist/types/userConfigurations.d.ts +50 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DeviceAlertConfiguration } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { Logger } from '../../types/logger';
|
|
4
|
+
import { CreateDeviceAlertTimeWindowsParams } from '../../types/userConfigurations';
|
|
5
|
+
export declare const createDeviceAlertTimeWindows: (novaDataSource: NovaDataSource, params: CreateDeviceAlertTimeWindowsParams, logger: Logger) => Promise<DeviceAlertConfiguration>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AlertTimeWindowConfiguration } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { Logger } from '../../types/logger';
|
|
4
|
+
import { CreateUserAlertTimeWindowsParams } from '../../types/userConfigurations';
|
|
5
|
+
export declare const createUserAlertTimeWindows: (novaDataSource: NovaDataSource, params: CreateUserAlertTimeWindowsParams, logger: Logger) => Promise<AlertTimeWindowConfiguration>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { Logger } from '../../types/logger';
|
|
3
|
+
import { DeleteAlertTimeWindowsParams } from '../../types/userConfigurations';
|
|
4
|
+
export declare const deleteDeviceAlertTimeWindows: (novaDataSource: NovaDataSource, params: DeleteAlertTimeWindowsParams, logger: Logger) => Promise<boolean>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { Logger } from '../../types/logger';
|
|
3
|
+
import { DeleteAlertTimeWindowsParams } from '../../types/userConfigurations';
|
|
4
|
+
export declare const deleteUserAlertTimeWindows: (novaDataSource: NovaDataSource, params: DeleteAlertTimeWindowsParams, logger: Logger) => Promise<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AlertTimeWindowConfiguration, DeviceAlertConfiguration, UserAlertConfiguration, UserConfiguration } from '../../entities';
|
|
2
|
-
import { BulkCreateUserAlertConfigurationsParams, CreateUserConfigurationParams, DeleteUserAlertConfigurationsParams, DeleteUserConfigurationParams, GetDeviceAlertTimeWindowsParams, GetUserAlertConfigurationsParams, GetUserAlertTimeWindowsParams, GetUserConfigurationsParams, UpdateUserAlertConfigurationsParams, UpdateUserConfigurationParams } from '../../types/userConfigurations';
|
|
2
|
+
import { BulkCreateUserAlertConfigurationsParams, CreateDeviceAlertTimeWindowsParams, CreateUserAlertTimeWindowsParams, CreateUserConfigurationParams, DeleteAlertTimeWindowsParams, DeleteUserAlertConfigurationsParams, DeleteUserConfigurationParams, GetDeviceAlertTimeWindowsParams, GetUserAlertConfigurationsParams, GetUserAlertTimeWindowsParams, GetUserConfigurationsParams, UpdateDeviceAlertTimeWindowsParams, UpdateUserAlertConfigurationsParams, UpdateUserAlertTimeWindowsParams, UpdateUserConfigurationParams } from '../../types/userConfigurations';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class UserConfigurationsRepository extends BaseRepository {
|
|
5
5
|
/**
|
|
@@ -28,6 +28,34 @@ export declare class UserConfigurationsRepository extends BaseRepository {
|
|
|
28
28
|
* @returns The created user configuration
|
|
29
29
|
*/
|
|
30
30
|
createUserConfiguration(params: CreateUserConfigurationParams): Promise<UserConfiguration>;
|
|
31
|
+
/**
|
|
32
|
+
* Create user alert time windows
|
|
33
|
+
* @param {CreateUserAlertTimeWindowsParams} params containing information to create a user alert time windows
|
|
34
|
+
* - id: The user alert time windows id, optional. If not provided, it will be generated
|
|
35
|
+
* - clientId: The client id, required
|
|
36
|
+
* - userId: The user id, required
|
|
37
|
+
* - alertConfigurationId: The alert configuration id, optional
|
|
38
|
+
* - daysOfTheWeek: The days of the week, required. It's a string of 7 characters, each one representing a day of the week, starting with Sunday. 1 means that the day is selected, 0 means that the day is not selected
|
|
39
|
+
* - startTime: The start time, required
|
|
40
|
+
* - endTime: The end time, required
|
|
41
|
+
* @returns {AlertTimeWindowConfiguration} The created user alert time windows
|
|
42
|
+
*/
|
|
43
|
+
createUserAlertTimeWindows(params: CreateUserAlertTimeWindowsParams): Promise<AlertTimeWindowConfiguration>;
|
|
44
|
+
/**
|
|
45
|
+
* Create device alert time windows
|
|
46
|
+
* @param {CreateDeviceAlertTimeWindowsParams} params containing information to create a device alert time windows
|
|
47
|
+
* - id: The user alert time windows id, optional. If not provided, it will be generated
|
|
48
|
+
* - clientId: The client id, required
|
|
49
|
+
* - userId: The user id, required
|
|
50
|
+
* - alertConfigurationId: The alert configuration id, optional
|
|
51
|
+
* - daysOfTheWeek: The days of the week, required. It's a string of 7 characters, each one representing a day of the week, starting with Sunday. 1 means that the day is selected, 0 means that the day is not selected
|
|
52
|
+
* - startTime: The start time, required
|
|
53
|
+
* - endTime: The end time, required
|
|
54
|
+
* - imei: The imei, required
|
|
55
|
+
* - filter: The filter to apply on a specific alert type, optional
|
|
56
|
+
* @returns {DeviceAlertConfiguration}
|
|
57
|
+
*/
|
|
58
|
+
createDeviceAlertTimeWindows(params: CreateDeviceAlertTimeWindowsParams): Promise<DeviceAlertConfiguration>;
|
|
31
59
|
/**
|
|
32
60
|
* Update user configuration
|
|
33
61
|
* @param {UpdateUserConfigurationParams} params containing information to update a user configuration
|
|
@@ -118,4 +146,41 @@ export declare class UserConfigurationsRepository extends BaseRepository {
|
|
|
118
146
|
* @returns Whether the user alert configurations were deleted
|
|
119
147
|
*/
|
|
120
148
|
deleteUserAlertConfigurations(params: DeleteUserAlertConfigurationsParams): Promise<boolean>;
|
|
149
|
+
/**
|
|
150
|
+
* Delete user alert time windows configurations
|
|
151
|
+
* @param {DeleteAlertTimeWindowsParams} params containing information to delete user alert time windows configurations
|
|
152
|
+
* @returns Whether the user alert time windows configurations were deleted or not
|
|
153
|
+
*/
|
|
154
|
+
deleteUserAlertTimeWindows(params: DeleteAlertTimeWindowsParams): Promise<boolean>;
|
|
155
|
+
/**
|
|
156
|
+
* Delete device alert time windows configurations
|
|
157
|
+
* @param {DeleteAlertTimeWindowsParams} params containing information to delete device alert time windows configurations
|
|
158
|
+
* @returns Whether the device alert time windows configurations were deleted or not
|
|
159
|
+
*/
|
|
160
|
+
deleteDeviceAlertTimeWindows(params: DeleteAlertTimeWindowsParams): Promise<boolean>;
|
|
161
|
+
/**
|
|
162
|
+
* Update user alert time windows configurations
|
|
163
|
+
* @param {UpdateUserAlertTimeWindowsParams} params containing information to update user alert time windows configurations
|
|
164
|
+
* - filters.configId: The user alert time windows configuration id to update, required
|
|
165
|
+
* - values.alertConfigurationId: The alert configuration id to update, optional
|
|
166
|
+
* - values.daysOfTheWeek: The days of the week to update, optional
|
|
167
|
+
* - values.startTime: The start time to update, optional
|
|
168
|
+
* - values.endTime: The end time to update, optional
|
|
169
|
+
* One of the values should be provided
|
|
170
|
+
* @returns Whether the user alert time windows configurations were updated or not
|
|
171
|
+
*/
|
|
172
|
+
updateUserAlertTimeWindows(params: UpdateUserAlertTimeWindowsParams): Promise<boolean>;
|
|
173
|
+
/**
|
|
174
|
+
* Update device alert time windows configurations
|
|
175
|
+
* @param {UpdateDeviceAlertTimeWindowsParams} params containing information to update device alert time windows configurations
|
|
176
|
+
* - filters.configId: The device alert time windows configuration id to update, required
|
|
177
|
+
* - values.alertConfigurationId: The alert configuration id to update, optional
|
|
178
|
+
* - values.daysOfTheWeek: The days of the week to update, optional
|
|
179
|
+
* - values.startTime: The start time to update, optional
|
|
180
|
+
* - values.endTime: The end time to update, optional
|
|
181
|
+
* - values.filter: The filter to update, optional
|
|
182
|
+
* One of the values should be provided
|
|
183
|
+
* @returns Whether the device alert time windows configurations were updated or not
|
|
184
|
+
*/
|
|
185
|
+
updateDeviceAlertTimeWindows(params: UpdateDeviceAlertTimeWindowsParams): Promise<boolean>;
|
|
121
186
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { Logger } from '../../types/logger';
|
|
3
|
+
import { UpdateDeviceAlertTimeWindowsParams } from '../../types/userConfigurations';
|
|
4
|
+
export declare const updateDeviceAlertTimeWindows: (novaDataSource: NovaDataSource, params: UpdateDeviceAlertTimeWindowsParams, logger: Logger) => Promise<boolean>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { Logger } from '../../types/logger';
|
|
3
|
+
import { UpdateUserAlertTimeWindowsParams } from '../../types/userConfigurations';
|
|
4
|
+
export declare const updateUserAlertTimeWindows: (novaDataSource: NovaDataSource, params: UpdateUserAlertTimeWindowsParams, logger: Logger) => Promise<boolean>;
|
|
@@ -89,3 +89,53 @@ export interface DeleteUserAlertConfigurationsParams {
|
|
|
89
89
|
userId: string;
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
+
export interface CreateUserAlertTimeWindowsParams {
|
|
93
|
+
id?: number;
|
|
94
|
+
alertTypeId: number;
|
|
95
|
+
userId: string;
|
|
96
|
+
clientId: number;
|
|
97
|
+
alertConfigurationId?: number;
|
|
98
|
+
daysOfTheWeek: string;
|
|
99
|
+
startTime: Date;
|
|
100
|
+
endTime: Date;
|
|
101
|
+
}
|
|
102
|
+
export interface CreateDeviceAlertTimeWindowsParams {
|
|
103
|
+
id?: number;
|
|
104
|
+
alertTypeId: number;
|
|
105
|
+
userId: string;
|
|
106
|
+
clientId: number;
|
|
107
|
+
alertConfigurationId?: number;
|
|
108
|
+
daysOfTheWeek: string;
|
|
109
|
+
startTime: Date;
|
|
110
|
+
endTime: Date;
|
|
111
|
+
imei: string;
|
|
112
|
+
filter?: any;
|
|
113
|
+
}
|
|
114
|
+
export interface UpdateUserAlertTimeWindowsParams {
|
|
115
|
+
filters: {
|
|
116
|
+
configId: number;
|
|
117
|
+
};
|
|
118
|
+
values: {
|
|
119
|
+
alertConfigurationId?: number;
|
|
120
|
+
daysOfTheWeek?: string;
|
|
121
|
+
startTime?: Date;
|
|
122
|
+
endTime?: Date;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export interface UpdateDeviceAlertTimeWindowsParams {
|
|
126
|
+
filters: {
|
|
127
|
+
configId: number;
|
|
128
|
+
};
|
|
129
|
+
values: {
|
|
130
|
+
alertConfigurationId?: number;
|
|
131
|
+
daysOfTheWeek?: string;
|
|
132
|
+
startTime?: Date;
|
|
133
|
+
endTime?: Date;
|
|
134
|
+
filter?: any;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export interface DeleteAlertTimeWindowsParams {
|
|
138
|
+
filters: {
|
|
139
|
+
configId: number;
|
|
140
|
+
};
|
|
141
|
+
}
|