@spytecgps/nova-orm 1.1.0-rc2 → 1.1.0
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/aempToken.d.ts +1 -0
- package/dist/entities/alert.d.ts +1 -0
- package/dist/entities/alertBeta.d.ts +1 -0
- package/dist/entities/alertMigration.d.ts +1 -0
- package/dist/entities/boundaryEvent.d.ts +1 -0
- package/dist/entities/client.d.ts +1 -0
- package/dist/entities/clientAlertRecipient.d.ts +1 -0
- package/dist/entities/dataExport.d.ts +1 -0
- package/dist/entities/deviceBleMeshUpdateTask.d.ts +1 -0
- package/dist/entities/deviceReplacement.d.ts +1 -0
- package/dist/entities/firmwareUpgradeTask.d.ts +1 -0
- package/dist/entities/latestPosition.d.ts +1 -0
- package/dist/entities/latestPositionMigration.d.ts +1 -0
- package/dist/entities/latestUserAppInfo.d.ts +1 -0
- package/dist/entities/liveLink.d.ts +1 -0
- package/dist/entities/notificationRecipient.d.ts +1 -0
- package/dist/entities/organization.d.ts +1 -0
- package/dist/entities/position.d.ts +1 -0
- package/dist/entities/positionMigration.d.ts +1 -0
- package/dist/entities/trip.d.ts +1 -0
- package/dist/entities/user.d.ts +1 -0
- package/dist/entities/userActivation.d.ts +1 -0
- package/dist/entities/userActivationEvent.d.ts +1 -0
- package/dist/entities/userActivationMetric.d.ts +1 -0
- package/dist/entities/userAlertComplain.d.ts +1 -0
- package/dist/entities/userAlertConfiguration.d.ts +1 -0
- package/dist/entities/userAlertNotificationsConfig.d.ts +1 -0
- package/dist/entities/userAppFeedback.d.ts +1 -0
- package/dist/entities/userAppIncident.d.ts +1 -0
- package/dist/entities/userConfiguration.d.ts +1 -0
- package/dist/entities/userDataDeletionRequest.d.ts +1 -0
- package/dist/entities/userDeviceBehaviorTask.d.ts +1 -0
- package/dist/entities/userInvitation.d.ts +1 -0
- package/dist/entities/userRatingRequest.d.ts +1 -0
- package/dist/entities/userRegistrationAttempt.d.ts +1 -0
- package/dist/entities/userSecurityRole.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/novaDataSource.d.ts +1 -0
- package/dist/repositories/baseRepository.d.ts +13 -1
- package/dist/repositories/clientAlertConfiguration/index.d.ts +2 -1
- package/dist/repositories/clientAlertConfiguration/isUserAllowedForAlertConfig.d.ts +4 -0
- package/dist/repositories/deviceStatus/index.d.ts +2 -2
- package/dist/repositories/devices/index.d.ts +2 -2
- package/dist/repositories/userConfigurations/index.d.ts +20 -2
- package/dist/types/alert.d.ts +1 -0
- package/dist/types/clientAlertConfiguration.d.ts +6 -1
- package/package.json +1 -1
package/dist/novaDataSource.d.ts
CHANGED
|
@@ -70,4 +70,5 @@ export declare class NovaDataSource {
|
|
|
70
70
|
createQueryRunner(mode?: ReplicationMode): QueryRunner;
|
|
71
71
|
createQueryRunnerFromParams(params: BaseSelectQueryParams): QueryRunner;
|
|
72
72
|
safeQuery<T>(queryBuilderHandler: queryBuilderHandler<T>, tag?: string, queryRunner?: QueryRunner): Promise<T>;
|
|
73
|
+
safeQuery2<T>(queryBuilderHandler: queryBuilderHandler<T>, tag?: string, queryRunner?: QueryRunner): Promise<T>;
|
|
73
74
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NovaDataSourceConfig } from '../novaDataSource';
|
|
1
|
+
import { NovaDataSource, NovaDataSourceConfig } from '../novaDataSource';
|
|
2
2
|
import { Logger } from '../types/logger';
|
|
3
3
|
export declare class BaseRepository {
|
|
4
4
|
protected readonly novaDataSourceConfig: NovaDataSourceConfig;
|
|
@@ -7,3 +7,15 @@ export declare class BaseRepository {
|
|
|
7
7
|
protected readonly useBeta: boolean;
|
|
8
8
|
constructor(config: NovaDataSourceConfig, logger: Logger, replicaConfig?: NovaDataSourceConfig, useBeta?: boolean);
|
|
9
9
|
}
|
|
10
|
+
interface BaseRepository2Options {
|
|
11
|
+
useBeta?: boolean;
|
|
12
|
+
dataSource: NovaDataSource;
|
|
13
|
+
logger?: Logger;
|
|
14
|
+
}
|
|
15
|
+
export declare class BaseRepository2 {
|
|
16
|
+
protected readonly useBeta: boolean;
|
|
17
|
+
protected readonly dataSource: NovaDataSource;
|
|
18
|
+
protected readonly logger: Logger;
|
|
19
|
+
constructor(options: BaseRepository2Options);
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClientAlertConfiguration } from '../../entities';
|
|
2
|
-
import { CreateClientAlertConfigurationParams, DeleteClientAlertConfigurationsParams, GetClientAlertConfigurationsParams, GetClientAlertRecipientsParams, GetClientAlertRecipientsResult, SetClientAlertRecipientsParams, UpdateClientAlertConfigurationParams } from '../../types/clientAlertConfiguration';
|
|
2
|
+
import { CreateClientAlertConfigurationParams, DeleteClientAlertConfigurationsParams, GetClientAlertConfigurationsParams, GetClientAlertRecipientsParams, GetClientAlertRecipientsResult, IsUserAllowedForAlertConfigParams, SetClientAlertRecipientsParams, UpdateClientAlertConfigurationParams } from '../../types/clientAlertConfiguration';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class ClientAlertConfigurationRepository extends BaseRepository {
|
|
5
5
|
getClientAlertConfigurations(params: GetClientAlertConfigurationsParams): Promise<ClientAlertConfiguration[]>;
|
|
@@ -8,4 +8,5 @@ export declare class ClientAlertConfigurationRepository extends BaseRepository {
|
|
|
8
8
|
deleteClientAlertConfigurations(params: DeleteClientAlertConfigurationsParams): Promise<boolean>;
|
|
9
9
|
getClientAlertRecipients(params: GetClientAlertRecipientsParams): Promise<GetClientAlertRecipientsResult>;
|
|
10
10
|
setClientAlertRecipients(params: SetClientAlertRecipientsParams): Promise<boolean>;
|
|
11
|
+
isUserAllowedForAlertConfig(params: IsUserAllowedForAlertConfigParams): Promise<boolean>;
|
|
11
12
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { IsUserAllowedForAlertConfigParams } from '../../types/clientAlertConfiguration';
|
|
3
|
+
import { Logger } from '../../types/logger';
|
|
4
|
+
export declare const isUserAllowedForAlertConfig: (novaDataSource: NovaDataSource, params: IsUserAllowedForAlertConfigParams, logger: Logger) => Promise<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeviceStatusRecord, GetDeviceStatusesCountParams, GetDeviceStatusesParams, UpsertDeviceStatusesParams } from '../../types/deviceStatus';
|
|
2
|
-
import {
|
|
3
|
-
export declare class DeviceStatusRepository extends
|
|
2
|
+
import { BaseRepository2 } from './../baseRepository';
|
|
3
|
+
export declare class DeviceStatusRepository extends BaseRepository2 {
|
|
4
4
|
/**
|
|
5
5
|
* Get device statuses
|
|
6
6
|
* @param {GetDeviceStatusesParams} params containing information to get device statuses
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClientDeviceSetting, Device, DeviceCustomConfiguration, DeviceReplacement, DeviceType, IccidStatus, ImeiIccidCarrier, ServiceProviderProduct } from '../../entities';
|
|
2
2
|
import { AllImeisAreActiveForClientParams, CanceledDeviceWithActiveSimCard, CarrierStatus, CreateClientDeviceSettingParams, CreateDeviceParams, CreateDeviceReplacementParams, CreateDeviceTypeParams, DeleteDeviceParams, DevicesCountByStatus, DeviceTypeModelWithDeviceCount, DeviceWithUsersInfo, GenerateIdentifierKeyParams, GetCanceledDevicesWithActiveSimCardsParams, GetCarrierStatusUpdatedBeforeParams, GetClientDeviceSettingParams, GetClientDeviceSettingsParams, GetDeviceCustomConfigParams, GetDeviceParams, GetDevicesCountByStatusParams, GetDevicesParams, GetDeviceTypeByImeiParams, GetDeviceTypesModelsOrderedByDeviceCountParams, GetDeviceTypesParams, GetDeviceWithUsersInfoParams, GetFilteredImeisWithStatusParams, GetIccidStatusParams, GetImeiIccidCarrierParams, GetImeiIccidCarriersParams, GetServiceProviderProductParams, UpdateClientDeviceSettingParams, UpdateDeviceParams, UpdateDeviceTypeParams, UpdateIccidStatusParams, UpdateImeiIccidCarrierParams, UpsertDeviceCustomConfigParams, UpsertIccidStatusParams } from '../../types/devices';
|
|
3
|
-
import {
|
|
4
|
-
export declare class DevicesRepository extends
|
|
3
|
+
import { BaseRepository2 } from './../baseRepository';
|
|
4
|
+
export declare class DevicesRepository extends BaseRepository2 {
|
|
5
5
|
/**
|
|
6
6
|
* Get device with filters
|
|
7
7
|
* @param {GetDeviceParams} params containing information to get a device with filters
|
|
@@ -146,7 +146,25 @@ export declare class UserConfigurationsRepository extends BaseRepository {
|
|
|
146
146
|
* @returns Whether the user alert configurations were deleted
|
|
147
147
|
*/
|
|
148
148
|
deleteUserAlertConfigurations(params: DeleteUserAlertConfigurationsParams): Promise<boolean>;
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
/**
|
|
150
|
+
* Get user alert notifications config
|
|
151
|
+
* @param {GetUserAlertNotificationsConfigParams} params containing information to get user alert notifications config
|
|
152
|
+
* - filters.userId: The user id to obtain all user alert notifications config from that user, required
|
|
153
|
+
* @returns The user alert notifications config
|
|
154
|
+
*/
|
|
155
|
+
getUserAlertNotificationsConfig(params: GetUserAlertNotificationsConfigParams): Promise<UserAlertNotificationsConfig[]>;
|
|
156
|
+
/**
|
|
157
|
+
* Upsert user alert notifications config
|
|
158
|
+
* @param {UpsertUserAlertNotificationsConfigParams} params containing information to upsert user alert notifications config
|
|
159
|
+
* - id: The user alert notifications config id, optional. If not provided, it will be generated
|
|
160
|
+
* - clientAlertConfigurationId: The client alert configuration id, required
|
|
161
|
+
* - userId: The user id, required
|
|
162
|
+
* - smsNotification: The user sms notification, optional
|
|
163
|
+
* - emailNotification: The user email notification, optional
|
|
164
|
+
* - appNotification: The user app notification, optional. If not provided, it will be true
|
|
165
|
+
* - pushNotification: The user push notification, optional. If not provided, it will be true
|
|
166
|
+
* @returns Whether the user alert notifications config was upserted
|
|
167
|
+
*/
|
|
168
|
+
upsertUserAlertNotificationsConfig(params: UpsertUserAlertNotificationsConfigParams): Promise<boolean>;
|
|
151
169
|
deleteUserAlertNotificationsConfig: (params: DeleteUserAlertNotificationsConfigParams) => Promise<boolean>;
|
|
152
170
|
}
|
package/dist/types/alert.d.ts
CHANGED
|
@@ -62,9 +62,10 @@ export interface BaseRecipient {
|
|
|
62
62
|
pushNotification: boolean;
|
|
63
63
|
isEnabled: boolean;
|
|
64
64
|
}
|
|
65
|
-
export interface ClientAlertExternalRecipient
|
|
65
|
+
export interface ClientAlertExternalRecipient {
|
|
66
66
|
recipient: string;
|
|
67
67
|
type: 'email' | 'sms';
|
|
68
|
+
isEnabled: boolean;
|
|
68
69
|
}
|
|
69
70
|
export interface ClientAlertUserIdRecipient extends BaseRecipient {
|
|
70
71
|
userId: string;
|
|
@@ -84,3 +85,7 @@ export interface SetClientAlertRecipientsParams {
|
|
|
84
85
|
externalRecipients?: ClientAlertExternalRecipient[];
|
|
85
86
|
};
|
|
86
87
|
}
|
|
88
|
+
export interface IsUserAllowedForAlertConfigParams {
|
|
89
|
+
clientAlertConfigurationId: number;
|
|
90
|
+
userId: string;
|
|
91
|
+
}
|