@spytecgps/nova-orm 0.0.118 → 0.0.120

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.
@@ -57,6 +57,8 @@ export declare class FirmwaresRepository extends BaseRepository {
57
57
  * - filters.taskId: The task id
58
58
  * - filters.statuses: The list of statuses to filter
59
59
  * - filters.imeis: The list of imeis to filter
60
+ * - filters.startDate: The start date to filter tasks based on modifiedAt column
61
+ * - filters.endDate: The end date to filter tasks based on modifiedAt column
60
62
  * - projectionOptions.withDeviceFirmware: Whether to get the device firmware object
61
63
  * - projectionOptions.withDevice: Whether to get the device object
62
64
  * - projectionOptions.deviceWithDeviceType: Whether to get the device type object of the device. projectionOptions.withDevice should be true to use this option.
@@ -86,6 +88,7 @@ export declare class FirmwaresRepository extends BaseRepository {
86
88
  * - status: The status of the firmware upgrade task
87
89
  * - preConfig: The pre config of the device before sending the upgrade command
88
90
  * - postConfig: The post config of the device after sending the upgrade command
91
+ * - postUpgradeCompleted: Whether the post upgrade completed or not
89
92
  * @returns {boolea} Whether the firmware upgrade task is updated or not.
90
93
  */
91
94
  updateFirmwareUpgradeTasks(params: UpdateFirmwareUpgradeTaskParams): Promise<boolean>;
@@ -0,0 +1,4 @@
1
+ import { Trip } from '../../entities';
2
+ import { NovaDataSource } from '../../novaDataSource';
3
+ import { Logger } from '../../types/logger';
4
+ export declare const getTripById: (novaDataSource: NovaDataSource, id: string, logger: Logger) => Promise<Trip>;
@@ -1,5 +1,5 @@
1
1
  import { Trip } from '../../entities';
2
- import { CreateTripParams } from '../../types/trip';
2
+ import { CreateTripParams, UpdateTripEndValuesParams } from '../../types/trip';
3
3
  import { BaseRepository } from '../baseRepository';
4
4
  export declare class TripRepository extends BaseRepository {
5
5
  /**
@@ -8,4 +8,16 @@ export declare class TripRepository extends BaseRepository {
8
8
  * @returns {Trip} the created trip
9
9
  */
10
10
  createTrip(params: CreateTripParams): Promise<Trip>;
11
+ /**
12
+ * Update the end's attributes in a trip
13
+ * @param {UpdateTripEndValuesParams} params containing information to update the trip
14
+ * @returns {boolean} true if the update was successfull, false otherwise
15
+ */
16
+ updateTripEndValues(params: UpdateTripEndValuesParams): Promise<boolean>;
17
+ /**
18
+ * Get a trip by id
19
+ * @param {CreateTripParams} id the trip's id
20
+ * @returns {Trip} the Trip associated to the passed id or null
21
+ */
22
+ getTripById(id: string): Promise<Trip>;
11
23
  }
@@ -0,0 +1,4 @@
1
+ import { NovaDataSource } from '../../novaDataSource';
2
+ import { Logger } from '../../types/logger';
3
+ import { UpdateTripEndValuesParams } from '../../types/trip';
4
+ export declare const updateTripEndValues: (novaDataSource: NovaDataSource, params: UpdateTripEndValuesParams, logger: Logger) => Promise<boolean>;
@@ -14,6 +14,8 @@ export interface GetFirmwareUpgradeTasksParams {
14
14
  taskId?: string;
15
15
  statuses?: FirmwareUpgradeTaskStatus[];
16
16
  imeis?: string[];
17
+ startDate?: Date;
18
+ endDate?: Date;
17
19
  };
18
20
  projectionOptions?: {
19
21
  withDeviceFirmware?: boolean;
@@ -13,6 +13,7 @@ import * as Logger from './logger';
13
13
  import * as NotificationRecipients from './notificationRecipients';
14
14
  import * as Positions from './position';
15
15
  import * as Security from './security';
16
+ import * as Trips from './trip';
16
17
  import * as Users from './user';
17
18
  import * as UserActivations from './userActivations';
18
19
  import * as UserAppFeedback from './userAppFeedback';
@@ -22,4 +23,4 @@ import * as UserDataDeletionRequests from './userDataDeletionRequests';
22
23
  import * as UserInvitations from './userInvitations';
23
24
  import * as UserRatingRequests from './userRatingRequests';
24
25
  import * as UserRegistrationAttempts from './userRegistrationAttempts';
25
- export { Acumatica, Alerts, AlertTypes, Billing, Blacklist, Boundaries, Clients, Countries, DeviceBehaviors, Devices, Firmwares, Logger, NotificationRecipients, Positions, Security, Users, UserActivations, UserAppFeedback, UserAppIncidents, UserConfigurations, UserDataDeletionRequests, UserInvitations, UserRatingRequests, UserRegistrationAttempts, };
26
+ export { Acumatica, Alerts, AlertTypes, Billing, Blacklist, Boundaries, Clients, Countries, DeviceBehaviors, Devices, Firmwares, Logger, NotificationRecipients, Positions, Security, Trips, Users, UserActivations, UserAppFeedback, UserAppIncidents, UserConfigurations, UserDataDeletionRequests, UserInvitations, UserRatingRequests, UserRegistrationAttempts, };
@@ -23,3 +23,17 @@ export interface CreateTripParams {
23
23
  startMessageId: string;
24
24
  endMessageId?: string;
25
25
  }
26
+ export declare const requiredUpdateTripEndValuesParamsAttributes: string[];
27
+ export interface UpdateTripEndValuesParams {
28
+ id: string;
29
+ endDate: Date;
30
+ endLat: number;
31
+ endLon: number;
32
+ endAddress: string;
33
+ positionEnd: string;
34
+ endMessageId: string;
35
+ distance: number;
36
+ duration: number;
37
+ tripType: TripType;
38
+ tripCompletionStatusId: TripCompletionStatus;
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "0.0.118",
3
+ "version": "0.0.120",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",