@spytecgps/nova-orm 0.0.52 → 0.0.54
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/userAlertComplain.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/repositories/alerts/createUserAlertComplain.d.ts +4 -0
- package/dist/repositories/alerts/index.d.ts +14 -2
- package/dist/repositories/countries/getCountries.d.ts +4 -0
- package/dist/repositories/countries/index.d.ts +8 -1
- package/dist/types/alert.d.ts +8 -0
- package/dist/types/countries.d.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { UserAlertComplain } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { CreateUserAlertComplaintParams } from '../../types/alert';
|
|
4
|
+
export declare const createUserAlertComplain: (novaDataSource: NovaDataSource, params: CreateUserAlertComplaintParams) => Promise<UserAlertComplain>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Alert } from '../../entities';
|
|
2
|
-
import { AlertReport, CreateAlertParams, GetAlertReportByUserParams } from '../../types/alert';
|
|
1
|
+
import { Alert, UserAlertComplain } from '../../entities';
|
|
2
|
+
import { AlertReport, CreateAlertParams, CreateUserAlertComplaintParams, GetAlertReportByUserParams } from '../../types/alert';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class AlertRepository extends BaseRepository {
|
|
5
5
|
/** Create an alert record
|
|
@@ -40,4 +40,16 @@ export declare class AlertRepository extends BaseRepository {
|
|
|
40
40
|
* @returns Promise<AlertReport[]>
|
|
41
41
|
*/
|
|
42
42
|
getAlertsReportByUser(params: GetAlertReportByUserParams): Promise<AlertReport[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Insert a new user alert complain
|
|
45
|
+
* @param {CreateUserAlertComplaintParams} params containing information to create a user alert complain
|
|
46
|
+
* params.alertTypeId: The alert type id that has been disabled
|
|
47
|
+
* params.userId: The user id of the user associated with the alert
|
|
48
|
+
* params.clientId: The client id of the owner of the device generating the alert
|
|
49
|
+
* params.email: The email of the user
|
|
50
|
+
* params.reason: The reason for disabling the alert
|
|
51
|
+
* params.createdAt: The datetime the complaint was received, it will default to now if not provided
|
|
52
|
+
* @returns {Promise<UserAlertComplain>} The created user alert complain
|
|
53
|
+
*/
|
|
54
|
+
createUserAlertComplain(params: CreateUserAlertComplaintParams): Promise<UserAlertComplain>;
|
|
43
55
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Country } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { GetCountriesParams } from '../../types/countries';
|
|
4
|
+
export declare const getCountries: (novaDataSource: NovaDataSource, params: GetCountriesParams) => Promise<Country[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Country } from '../../entities';
|
|
2
|
-
import { GetCountryParams } from '../../types/countries';
|
|
2
|
+
import { GetCountriesParams, GetCountryParams } from '../../types/countries';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class CountriesRepository extends BaseRepository {
|
|
5
5
|
/**
|
|
@@ -10,4 +10,11 @@ export declare class CountriesRepository extends BaseRepository {
|
|
|
10
10
|
* @returns The country information
|
|
11
11
|
*/
|
|
12
12
|
getCountry(params: GetCountryParams): Promise<Country>;
|
|
13
|
+
/**
|
|
14
|
+
* Get countries
|
|
15
|
+
* @param {GetCountriesParams} params containing information to get countries
|
|
16
|
+
* - filters.idList: The country id list. If not provided, all countries will be returned
|
|
17
|
+
* @returns The countries information
|
|
18
|
+
*/
|
|
19
|
+
getCountries(params: GetCountriesParams): Promise<Country[]>;
|
|
13
20
|
}
|
package/dist/types/alert.d.ts
CHANGED
|
@@ -72,3 +72,11 @@ export interface AlertReport {
|
|
|
72
72
|
stage?: string | null;
|
|
73
73
|
totalCount: number;
|
|
74
74
|
}
|
|
75
|
+
export interface CreateUserAlertComplaintParams {
|
|
76
|
+
userId: string;
|
|
77
|
+
alertTypeId: number;
|
|
78
|
+
clientId: number;
|
|
79
|
+
createdAt?: Date;
|
|
80
|
+
email: string;
|
|
81
|
+
reason: string;
|
|
82
|
+
}
|