@spytecgps/nova-orm 0.0.194 → 0.0.196
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/appFeatureType.d.ts +6 -0
- package/dist/entities/clientAppFeature.d.ts +9 -0
- package/dist/entities/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/repositories/appFeatures/createAppFeatureType.d.ts +5 -0
- package/dist/repositories/appFeatures/createClientAppFeature.d.ts +5 -0
- package/dist/repositories/appFeatures/getClientAppFeatures.d.ts +5 -0
- package/dist/repositories/appFeatures/index.d.ts +37 -0
- package/dist/repositories/index.d.ts +2 -1
- package/dist/repositories/tasks/createTask.d.ts +5 -0
- package/dist/repositories/tasks/index.d.ts +19 -2
- package/dist/types/appFeatures.d.ts +23 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/tasks.d.ts +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AppFeatureType } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { CreateAppFeatureTypeParams } from '../../types/appFeatures';
|
|
4
|
+
import { Logger } from '../../types/logger';
|
|
5
|
+
export declare const createAppFeatureType: (novaDataSource: NovaDataSource, params: CreateAppFeatureTypeParams, logger: Logger) => Promise<AppFeatureType>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ClientAppFeature } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { CreateClientAppFeatureParams } from '../../types/appFeatures';
|
|
4
|
+
import { Logger } from '../../types/logger';
|
|
5
|
+
export declare const createClientAppFeature: (novaDataSource: NovaDataSource, params: CreateClientAppFeatureParams, logger: Logger) => Promise<ClientAppFeature>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ClientAppFeature } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { GetClientAppFeaturesParams } from '../../types/appFeatures';
|
|
4
|
+
import { Logger } from '../../types/logger';
|
|
5
|
+
export declare const getClientAppFeatures: (novaDataSource: NovaDataSource, params: GetClientAppFeaturesParams, logger: Logger) => Promise<ClientAppFeature[]>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AppFeatureType, ClientAppFeature } from '../../entities';
|
|
2
|
+
import { CreateAppFeatureTypeParams, CreateClientAppFeatureParams, GetClientAppFeaturesParams } from '../../types/appFeatures';
|
|
3
|
+
import { BaseRepository } from '../baseRepository';
|
|
4
|
+
export declare class AppFeaturesRepository extends BaseRepository {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new app feature type
|
|
7
|
+
* @param params - The parameters to create the app feature type
|
|
8
|
+
* params.id - The id of the app feature type, optional. If not provided, it will be auto-generated
|
|
9
|
+
* params.name - The name of the app feature type, required
|
|
10
|
+
* params.description - The description of the app feature type, required
|
|
11
|
+
* params.statusId - The status id of the app feature type, optional, default to 1
|
|
12
|
+
* @returns The created app feature type
|
|
13
|
+
*/
|
|
14
|
+
createAppFeatureType(params: CreateAppFeatureTypeParams): Promise<AppFeatureType>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a new client app feature
|
|
17
|
+
* @param params - The parameters to create the client app feature
|
|
18
|
+
* params.clientId: The client id of the client app feature, required
|
|
19
|
+
* params.appFeatureTypeId: The app feature type id of the client app feature, required
|
|
20
|
+
* params.entityId: The entity id of the client app feature, required
|
|
21
|
+
* params.statusId: The status id of the client app feature, optional, default to 1
|
|
22
|
+
* @returns The created client app feature
|
|
23
|
+
*/
|
|
24
|
+
createClientAppFeature(params: CreateClientAppFeatureParams): Promise<ClientAppFeature>;
|
|
25
|
+
/**
|
|
26
|
+
* Get client app features
|
|
27
|
+
* @param params - The parameters to get client app features
|
|
28
|
+
* One of the following filters is required:
|
|
29
|
+
* params.filters.clientId: The client id to filter, optional
|
|
30
|
+
* params.filters.appFeatureTypeId: The app feature type id to filter, optional
|
|
31
|
+
* params.filters.entityId: The entity id to filter, optional
|
|
32
|
+
* params.filters.statusId: The status id to filter, optional
|
|
33
|
+
* params.projectionOptions.withAppFeatureType: Whether to include app feature type relation in the result
|
|
34
|
+
* @returns The client app features
|
|
35
|
+
*/
|
|
36
|
+
getClientAppFeatures(params: GetClientAppFeaturesParams): Promise<ClientAppFeature[]>;
|
|
37
|
+
}
|
|
@@ -2,6 +2,7 @@ import { AcumaticaRepository } from './acumatica';
|
|
|
2
2
|
import { AempTokenRepository } from './aempToken';
|
|
3
3
|
import { AlertRepository } from './alerts';
|
|
4
4
|
import { AlertTypesRepository } from './alertTypes';
|
|
5
|
+
import { AppFeaturesRepository } from './appFeatures';
|
|
5
6
|
import { AssetCategoriesRepository } from './assetCategories';
|
|
6
7
|
import { BillingRepository } from './billing';
|
|
7
8
|
import { BlacklistRepository } from './blacklist';
|
|
@@ -27,4 +28,4 @@ import { UserInvitationsRepository } from './userInvitations';
|
|
|
27
28
|
import { UserRatingRequestsRepository } from './userRatingRequests';
|
|
28
29
|
import { UserRegistrationAttemptsRepository } from './userRegistrationAttempts';
|
|
29
30
|
import { UsersRepository } from './users';
|
|
30
|
-
export { AcumaticaRepository, AempTokenRepository, AlertRepository, AlertTypesRepository, AssetCategoriesRepository, BillingRepository, BlacklistRepository, BoundariesRepository, ClientsRepository, CountriesRepository, DeactivationsRepository, DeviceBehaviorsRepository, DevicePairingsRepository, DevicesRepository, FirmwaresRepository, NotificationRecipientsRepository, PositionRepository, SecurityRepository, TasksRepository, TripRepository, UserActivationsRepository, UserAppFeedbackRepository, UserAppIncidentsRepository, UserConfigurationsRepository, UserDataDeletionRequestsRepository, UserInvitationsRepository, UserRatingRequestsRepository, UserRegistrationAttemptsRepository, UsersRepository, };
|
|
31
|
+
export { AcumaticaRepository, AempTokenRepository, AlertRepository, AlertTypesRepository, AppFeaturesRepository, AssetCategoriesRepository, BillingRepository, BlacklistRepository, BoundariesRepository, ClientsRepository, CountriesRepository, DeactivationsRepository, DeviceBehaviorsRepository, DevicePairingsRepository, DevicesRepository, FirmwaresRepository, NotificationRecipientsRepository, PositionRepository, SecurityRepository, TasksRepository, TripRepository, UserActivationsRepository, UserAppFeedbackRepository, UserAppIncidentsRepository, UserConfigurationsRepository, UserDataDeletionRequestsRepository, UserInvitationsRepository, UserRatingRequestsRepository, UserRegistrationAttemptsRepository, UsersRepository, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Task } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { Logger } from '../../types/logger';
|
|
4
|
+
import { CreateTaskParams } from '../../types/tasks';
|
|
5
|
+
export declare const createTask: (novaDataSource: NovaDataSource, params: CreateTaskParams, logger: Logger) => Promise<Task>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DeviceTask, TaskSchedule } from '../../entities';
|
|
2
|
-
import { AddTaskScheduleDevicesParams, CreateTaskScheduleParams, DeleteTaskScheduleDevicesParams, DeleteTaskScheduleParams, GetDeviceTasksParams, GetTaskScheduleParams, GetTaskSchedulesParams, SetTaskScheduleDevicesParams, UpdateTaskScheduleParams } from '../../types/tasks';
|
|
1
|
+
import { DeviceTask, Task, TaskSchedule } from '../../entities';
|
|
2
|
+
import { AddTaskScheduleDevicesParams, CreateTaskParams, CreateTaskScheduleParams, DeleteTaskScheduleDevicesParams, DeleteTaskScheduleParams, GetDeviceTasksParams, GetTaskScheduleParams, GetTaskSchedulesParams, SetTaskScheduleDevicesParams, UpdateTaskScheduleParams } from '../../types/tasks';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class TasksRepository extends BaseRepository {
|
|
5
5
|
/**
|
|
@@ -141,4 +141,21 @@ export declare class TasksRepository extends BaseRepository {
|
|
|
141
141
|
* @returns Promise<boolean> whether the task schedule devices were deleted
|
|
142
142
|
*/
|
|
143
143
|
deleteTaskScheduleDevices(params: DeleteTaskScheduleDevicesParams): Promise<boolean>;
|
|
144
|
+
/**
|
|
145
|
+
* Create a new task
|
|
146
|
+
* @param params params containing information to create task
|
|
147
|
+
* params.id: the ID, optional. If not provided, a new ID will be generated
|
|
148
|
+
* params.taskScheduleId: the task schedule ID, required
|
|
149
|
+
* params.imei: the IMEI, required
|
|
150
|
+
* params.clientId: the client ID, required
|
|
151
|
+
* params.startDate: the starting date, optional
|
|
152
|
+
* params.startingOdometer: the starting odometer, optional
|
|
153
|
+
* params.startingActiveHours: the starting active hours, optional
|
|
154
|
+
* One of the following is required:
|
|
155
|
+
* params.dueDate: the due date, required
|
|
156
|
+
* params.dueOdometer: the due odometer, required
|
|
157
|
+
* params.dueActiveHours: the due active hours, required
|
|
158
|
+
* @returns Promise<Task> the created task
|
|
159
|
+
*/
|
|
160
|
+
createTask(params: CreateTaskParams): Promise<Task>;
|
|
144
161
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface CreateAppFeatureTypeParams {
|
|
2
|
+
id?: number;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
statusId?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface CreateClientAppFeatureParams {
|
|
8
|
+
clientId: number;
|
|
9
|
+
appFeatureTypeId: number;
|
|
10
|
+
entityId: number;
|
|
11
|
+
statusId?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface GetClientAppFeaturesParams {
|
|
14
|
+
filters: {
|
|
15
|
+
clientId?: number;
|
|
16
|
+
appFeatureTypeId?: number;
|
|
17
|
+
entityId?: number;
|
|
18
|
+
statusId?: number;
|
|
19
|
+
};
|
|
20
|
+
projectionOptions?: {
|
|
21
|
+
withAppFeatureType?: boolean;
|
|
22
|
+
};
|
|
23
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Acumatica from './acumatica';
|
|
2
2
|
import * as Alerts from './alert';
|
|
3
3
|
import * as AlertTypes from './alertTypes';
|
|
4
|
+
import * as AppFeatures from './appFeatures';
|
|
4
5
|
import * as Billing from './billing';
|
|
5
6
|
import * as Blacklist from './blacklist';
|
|
6
7
|
import * as Boundaries from './boundaries';
|
|
@@ -26,4 +27,4 @@ import * as UserDataDeletionRequests from './userDataDeletionRequests';
|
|
|
26
27
|
import * as UserInvitations from './userInvitations';
|
|
27
28
|
import * as UserRatingRequests from './userRatingRequests';
|
|
28
29
|
import * as UserRegistrationAttempts from './userRegistrationAttempts';
|
|
29
|
-
export { Acumatica, Alerts, AlertTypes, Billing, Blacklist, Boundaries, Clients, Countries, Deactivations, DeviceBehaviors, DevicePairings, Devices, Firmwares, Logger, NotificationRecipients, Positions, Security, Trips, Users, UserActivations, UserAppFeedback, UserAppIncidents, UserConfigurations, UserDataDeletionRequests, UserInvitations, UserRatingRequests, UserRegistrationAttempts, Enums, };
|
|
30
|
+
export { Acumatica, Alerts, AlertTypes, AppFeatures, Billing, Blacklist, Boundaries, Clients, Countries, Deactivations, DeviceBehaviors, DevicePairings, Devices, Firmwares, Logger, NotificationRecipients, Positions, Security, Trips, Users, UserActivations, UserAppFeedback, UserAppIncidents, UserConfigurations, UserDataDeletionRequests, UserInvitations, UserRatingRequests, UserRegistrationAttempts, Enums, };
|
package/dist/types/tasks.d.ts
CHANGED
|
@@ -97,3 +97,15 @@ export interface DeleteTaskScheduleDevicesParams {
|
|
|
97
97
|
taskScheduleId: number;
|
|
98
98
|
imeis: string[];
|
|
99
99
|
}
|
|
100
|
+
export interface CreateTaskParams {
|
|
101
|
+
id?: number;
|
|
102
|
+
taskScheduleId: number;
|
|
103
|
+
imei: string;
|
|
104
|
+
clientId: number;
|
|
105
|
+
dueDate?: Date;
|
|
106
|
+
dueOdometer?: number;
|
|
107
|
+
dueActiveHours?: number;
|
|
108
|
+
startDate?: Date;
|
|
109
|
+
startingOdometer?: number;
|
|
110
|
+
startingActiveHours?: number;
|
|
111
|
+
}
|