@spytecgps/nova-orm 0.0.72 → 0.0.73
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/billing.d.ts +2 -2
- package/dist/entities/index.d.ts +2 -1
- package/dist/entities/positionMigrationBatch.d.ts +3 -0
- package/dist/entities/userConfiguration.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/repositories/billing/createBilling.d.ts +5 -0
- package/dist/repositories/billing/getBillings.d.ts +5 -0
- package/dist/repositories/billing/index.d.ts +50 -0
- package/dist/repositories/billing/updateBilling.d.ts +4 -0
- package/dist/repositories/index.d.ts +2 -1
- package/dist/types/billing.d.ts +36 -0
- package/dist/types/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Billing } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { CreateBillingParams } from '../../types/billing';
|
|
4
|
+
import { Logger } from '../../types/logger';
|
|
5
|
+
export declare const createBilling: (novaDataSource: NovaDataSource, params: CreateBillingParams, logger: Logger) => Promise<Billing>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Billing } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { GetBillingsParams } from '../../types/billing';
|
|
4
|
+
import { Logger } from '../../types/logger';
|
|
5
|
+
export declare const getBillings: (novaDataSource: NovaDataSource, params: GetBillingsParams, logger: Logger) => Promise<Billing[]>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Billing } from '../../entities';
|
|
2
|
+
import { CreateBillingParams, GetBillingsParams, UpdateBillingParams } from '../../types/billing';
|
|
3
|
+
import { BaseRepository } from '../baseRepository';
|
|
4
|
+
export declare class BillingRepository extends BaseRepository {
|
|
5
|
+
/**
|
|
6
|
+
* Get billings
|
|
7
|
+
* @param {GetBillingsParams} params containing information to get billings
|
|
8
|
+
* One of the following filters is required:
|
|
9
|
+
* - filters.imei: The billing imei
|
|
10
|
+
* - filters.clientId: The billing clientId
|
|
11
|
+
* - filters.subscriptionId: The billing subscriptionId
|
|
12
|
+
* @returns The billings information
|
|
13
|
+
*/
|
|
14
|
+
getBillings(params: GetBillingsParams): Promise<Billing[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Create billing
|
|
17
|
+
* @param {CreateBillingParams} params containing information to create billing
|
|
18
|
+
* One of the following parameters is required:
|
|
19
|
+
* - params.id: The billing id
|
|
20
|
+
* - params.deviceId: The billing deviceId
|
|
21
|
+
* - params.clientId: The billing clientId
|
|
22
|
+
* - params.subscriptionId: The billing subscriptionId
|
|
23
|
+
* - params.imei: The billing imei
|
|
24
|
+
* - params.planId: The billing planId
|
|
25
|
+
* - params.platform: The billing platform
|
|
26
|
+
* - params.status: The billing status
|
|
27
|
+
* - params.subscriptionValue: The billing subscriptionValue
|
|
28
|
+
* - params.subscriptionPeriodMonths: The billing subscriptionPeriodMonths
|
|
29
|
+
* - params.subscriptionValueMonthly: The billing subscriptionValueMonthly
|
|
30
|
+
* @returns The created billing information
|
|
31
|
+
*/
|
|
32
|
+
createBilling(params: CreateBillingParams): Promise<Billing>;
|
|
33
|
+
/**
|
|
34
|
+
* Update billing
|
|
35
|
+
* @param {UpdateBillingParams} params containing information to update billing
|
|
36
|
+
* - params.filters.imei: The billing imei
|
|
37
|
+
* One of the following parameters is required:
|
|
38
|
+
* - params.values.deviceId: The billing deviceId
|
|
39
|
+
* - params.values.clientId: The billing clientId
|
|
40
|
+
* - params.values.subscriptionId: The billing subscriptionId
|
|
41
|
+
* - params.values.planId: The billing planId
|
|
42
|
+
* - params.values.platform: The billing platform
|
|
43
|
+
* - params.values.status: The billing status
|
|
44
|
+
* - params.values.subscriptionValue: The billing subscriptionValue
|
|
45
|
+
* - params.values.subscriptionPeriodMonths: The billing subscriptionPeriodMonths
|
|
46
|
+
* - params.values.subscriptionValueMonthly: The billing subscriptionValueMonthly
|
|
47
|
+
* Whether the billing was updated or not
|
|
48
|
+
*/
|
|
49
|
+
updateBilling(params: UpdateBillingParams): Promise<boolean>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { UpdateBillingParams } from '../../types/billing';
|
|
3
|
+
import { Logger } from '../../types/logger';
|
|
4
|
+
export declare const updateBilling: (novaDataSource: NovaDataSource, params: UpdateBillingParams, logger: Logger) => Promise<boolean>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AlertRepository } from './alerts';
|
|
2
2
|
import { AlertTypesRepository } from './alertTypes';
|
|
3
3
|
import { AssetCategoriesRepository } from './assetCategories';
|
|
4
|
+
import { BillingRepository } from './billing';
|
|
4
5
|
import { BoundariesRepository } from './boundaries';
|
|
5
6
|
import { ClientsRepository } from './clients';
|
|
6
7
|
import { CountriesRepository } from './countries';
|
|
@@ -17,4 +18,4 @@ import { UserDataDeletionRequestsRepository } from './userDataDeletionRequests';
|
|
|
17
18
|
import { UserInvitationsRepository } from './userInvitations';
|
|
18
19
|
import { UserRatingRequestsRepository } from './userRatingRequests';
|
|
19
20
|
import { UsersRepository } from './users';
|
|
20
|
-
export { AlertRepository, AlertTypesRepository, AssetCategoriesRepository, BoundariesRepository, ClientsRepository, CountriesRepository, DeviceBehaviorsRepository, DevicesRepository, FirmwaresRepository, NotificationRecipientsRepository, PositionRepository, SecurityRepository, UserActivationsRepository, UserAppIncidentsRepository, UserConfigurationsRepository, UserDataDeletionRequestsRepository, UserInvitationsRepository, UserRatingRequestsRepository, UsersRepository, };
|
|
21
|
+
export { AlertRepository, AlertTypesRepository, AssetCategoriesRepository, BillingRepository, BoundariesRepository, ClientsRepository, CountriesRepository, DeviceBehaviorsRepository, DevicesRepository, FirmwaresRepository, NotificationRecipientsRepository, PositionRepository, SecurityRepository, UserActivationsRepository, UserAppIncidentsRepository, UserConfigurationsRepository, UserDataDeletionRequestsRepository, UserInvitationsRepository, UserRatingRequestsRepository, UsersRepository, };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface GetBillingsParams {
|
|
2
|
+
filters: {
|
|
3
|
+
imei?: string;
|
|
4
|
+
clientId?: number;
|
|
5
|
+
subscriptionId?: string;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export interface CreateBillingParams {
|
|
9
|
+
id?: number;
|
|
10
|
+
deviceId?: number;
|
|
11
|
+
imei?: string;
|
|
12
|
+
planId?: string;
|
|
13
|
+
subscriptionId?: string;
|
|
14
|
+
platform?: string;
|
|
15
|
+
status?: string;
|
|
16
|
+
subscriptionValue?: number;
|
|
17
|
+
subscriptionPeriodMonths?: number;
|
|
18
|
+
subscriptionValueMonthly?: number;
|
|
19
|
+
clientId?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface UpdateBillingParams {
|
|
22
|
+
filters: {
|
|
23
|
+
imei: string;
|
|
24
|
+
};
|
|
25
|
+
values: {
|
|
26
|
+
deviceId?: number;
|
|
27
|
+
planId?: string;
|
|
28
|
+
subscriptionId?: string;
|
|
29
|
+
platform?: string;
|
|
30
|
+
status?: string;
|
|
31
|
+
subscriptionValue?: number;
|
|
32
|
+
subscriptionPeriodMonths?: number;
|
|
33
|
+
subscriptionValueMonthly?: number;
|
|
34
|
+
clientId?: number;
|
|
35
|
+
};
|
|
36
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as Alerts from './alert';
|
|
2
2
|
import * as AlertTypes from './alertTypes';
|
|
3
|
+
import * as Billing from './billing';
|
|
3
4
|
import * as Boundaries from './boundaries';
|
|
4
5
|
import * as Clients from './clients';
|
|
5
6
|
import * as Countries from './countries';
|
|
@@ -17,4 +18,4 @@ import * as UserConfigurations from './userConfigurations';
|
|
|
17
18
|
import * as UserDataDeletionRequests from './userDataDeletionRequests';
|
|
18
19
|
import * as UserInvitations from './userInvitations';
|
|
19
20
|
import * as UserRatingRequests from './userRatingRequests';
|
|
20
|
-
export { Alerts, AlertTypes, Boundaries, Clients, Countries, DeviceBehaviors, Devices, Firmwares, Logger, NotificationRecipients, Positions, Security, Users, UserActivations, UserAppIncidents, UserConfigurations, UserDataDeletionRequests, UserInvitations, UserRatingRequests, };
|
|
21
|
+
export { Alerts, AlertTypes, Billing, Boundaries, Clients, Countries, DeviceBehaviors, Devices, Firmwares, Logger, NotificationRecipients, Positions, Security, Users, UserActivations, UserAppIncidents, UserConfigurations, UserDataDeletionRequests, UserInvitations, UserRatingRequests, };
|