@spytecgps/nova-orm 0.0.118 → 0.0.119
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 { 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>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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, };
|
package/dist/types/trip.d.ts
CHANGED
|
@@ -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
|
+
}
|