@spytecgps/nova-orm 0.0.143 → 0.0.145

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 { DeviceType } from '../../entities';
2
+ import { NovaDataSource } from '../../novaDataSource';
3
+ import { CreateDeviceTypeParams } from '../../types/devices';
4
+ import { Logger } from '../../types/logger';
5
+ export declare const createDeviceType: (novaDataSource: NovaDataSource, params: CreateDeviceTypeParams, logger: Logger) => Promise<DeviceType>;
@@ -1,5 +1,5 @@
1
1
  import { ClientDeviceSetting, Device, DeviceCustomConfiguration, DeviceReplacement, DeviceType, IccidStatus, ImeiIccidCarrier } from '../../entities';
2
- import { CanceledDeviceWithActiveSimCard, CarrierStatus, CreateClientDeviceSettingParams, CreateDeviceParams, CreateDeviceReplacementParams, DeleteDeviceParams, DeviceTypeModelWithDeviceCount, DeviceWithUsersInfo, GenerateIdentifierKeyParams, GetCanceledDevicesWithActiveSimCardsParams, GetCarrierStatusUpdatedBeforeParams, GetClientDeviceSettingParams, GetClientDeviceSettingsParams, GetDeviceCustomConfigParams, GetDeviceParams, GetDevicesParams, GetDeviceTypesModelsOrderedByDeviceCountParams, GetDeviceTypesParams, GetDeviceWithUsersInfoParams, GetFilteredImeisWithStatusParams, GetIccidStatusParams, GetImeiIccidCarrierParams, GetImeiIccidCarriersParams, UpdateClientDeviceSettingParams, UpdateDeviceParams, UpdateIccidStatusParams, UpdateImeiIccidCarrierParams, UpsertIccidStatusParams } from '../../types/devices';
2
+ import { CanceledDeviceWithActiveSimCard, CarrierStatus, CreateClientDeviceSettingParams, CreateDeviceParams, CreateDeviceReplacementParams, CreateDeviceTypeParams, DeleteDeviceParams, DeviceTypeModelWithDeviceCount, DeviceWithUsersInfo, GenerateIdentifierKeyParams, GetCanceledDevicesWithActiveSimCardsParams, GetCarrierStatusUpdatedBeforeParams, GetClientDeviceSettingParams, GetClientDeviceSettingsParams, GetDeviceCustomConfigParams, GetDeviceParams, GetDevicesParams, GetDeviceTypesModelsOrderedByDeviceCountParams, GetDeviceTypesParams, GetDeviceWithUsersInfoParams, GetFilteredImeisWithStatusParams, GetIccidStatusParams, GetImeiIccidCarrierParams, GetImeiIccidCarriersParams, UpdateClientDeviceSettingParams, UpdateDeviceParams, UpdateDeviceTypeParams, UpdateIccidStatusParams, UpdateImeiIccidCarrierParams, UpsertIccidStatusParams } from '../../types/devices';
3
3
  import { BaseRepository } from './../baseRepository';
4
4
  export declare class DevicesRepository extends BaseRepository {
5
5
  /**
@@ -252,4 +252,18 @@ export declare class DevicesRepository extends BaseRepository {
252
252
  * @returns The device with users info
253
253
  */
254
254
  getDeviceWithUsersInfo(params: GetDeviceWithUsersInfoParams): Promise<DeviceWithUsersInfo[]>;
255
+ /**
256
+ * Create a device type
257
+ * @param {CreateDeviceTypeParams} params containing information to create a device type
258
+ * @returns {Promise<DeviceType>} The created device type
259
+ */
260
+ createDeviceType(params: CreateDeviceTypeParams): Promise<DeviceType>;
261
+ /**
262
+ * Update a device type
263
+ * @param {UpdateDeviceTypeParams} params containing information to update a device type
264
+ * - filters.id: The id of the device type
265
+ * - values: The values to update. At least one field is required
266
+ * @returns {Promise<boolean>} Whether the device type was updated
267
+ */
268
+ updateDeviceType(params: UpdateDeviceTypeParams): Promise<boolean>;
255
269
  }
@@ -0,0 +1,4 @@
1
+ import { NovaDataSource } from '../../novaDataSource';
2
+ import { UpdateDeviceTypeParams } from '../../types/devices';
3
+ import { Logger } from '../../types/logger';
4
+ export declare const updateDeviceType: (novaDataSource: NovaDataSource, params: UpdateDeviceTypeParams, logger: Logger) => Promise<boolean>;
@@ -264,3 +264,53 @@ export interface DeviceWithUsersInfo {
264
264
  roleName: string;
265
265
  subscriptionId: string;
266
266
  }
267
+ export interface CreateDeviceTypeParams {
268
+ id?: number;
269
+ brand: string;
270
+ model: string;
271
+ modelFamily: string;
272
+ identifierType: string;
273
+ description?: string;
274
+ tags?: string;
275
+ url?: string;
276
+ name?: string;
277
+ pictureUrl?: string;
278
+ userManualUrl?: string;
279
+ notes?: string;
280
+ supported?: boolean;
281
+ activatable?: boolean;
282
+ selfActivatable?: boolean;
283
+ port?: number;
284
+ protocolMatch?: string;
285
+ stage?: string;
286
+ landingPage?: string;
287
+ troubleshooting?: string;
288
+ protocol?: string;
289
+ }
290
+ export interface UpdateDeviceTypeParams {
291
+ filters: {
292
+ id: string;
293
+ };
294
+ values: {
295
+ brand: string;
296
+ model: string;
297
+ modelFamily: string;
298
+ identifierType: string;
299
+ description?: string;
300
+ tags?: string;
301
+ url?: string;
302
+ name?: string;
303
+ pictureUrl?: string;
304
+ userManualUrl?: string;
305
+ notes?: string;
306
+ supported?: boolean;
307
+ activatable?: boolean;
308
+ selfActivatable?: boolean;
309
+ port?: number;
310
+ protocolMatch?: string;
311
+ stage?: string;
312
+ landingPage?: string;
313
+ troubleshooting?: string;
314
+ protocol?: string;
315
+ };
316
+ }
@@ -126,6 +126,7 @@ export interface UpdateUserAlertTimeWindowsParams {
126
126
  daysOfTheWeek?: string;
127
127
  startTime?: Date;
128
128
  endTime?: Date;
129
+ label?: string;
129
130
  };
130
131
  }
131
132
  export interface UpdateDeviceAlertTimeWindowsParams {
@@ -138,6 +139,7 @@ export interface UpdateDeviceAlertTimeWindowsParams {
138
139
  startTime?: Date;
139
140
  endTime?: Date;
140
141
  filter?: any;
142
+ label?: string;
141
143
  };
142
144
  }
143
145
  export interface DeleteAlertTimeWindowsParams {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "0.0.143",
3
+ "version": "0.0.145",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",