@spytecgps/nova-orm 0.0.91 → 0.0.92
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.
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { CanceledImeiResult, GetCanceledImeisParams } from '../../types/billing';
|
|
3
|
+
import { Logger } from '../../types/logger';
|
|
4
|
+
export declare const getCanceledImeis: (novaDataSource: NovaDataSource, params: GetCanceledImeisParams, logger: Logger) => Promise<CanceledImeiResult[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Billing, BillingCustomerBraintree, BillingDeviceHistory, BillingStatusHistoryBraintree, BillingSubscriptionBraintree, User } from '../../entities';
|
|
2
|
-
import { BillingSubscriptionChurnStatus, CreateBillingDeviceHistoryParams, CreateBillingParams, CreateBillingStatusHistoryBraintreeParams, GetBillingCustomerBraintreeByIdParams, GetBillingsParams, GetBillingSubscriptionsBraintreeParams, GetChurnStatusByClientIdParams, GetClientIdFromBraintreeCustomerParams, GetUserByBraintreeCustomerIdParams, UpdateBillingCustomerBraintreeParams, UpdateBillingParams, UpsertBillingCustomerBraintreeParams, UpsertBillingSubscriptionBraintreeParams } from '../../types/billing';
|
|
2
|
+
import { BillingSubscriptionChurnStatus, CanceledImeiResult, CreateBillingDeviceHistoryParams, CreateBillingParams, CreateBillingStatusHistoryBraintreeParams, GetBillingCustomerBraintreeByIdParams, GetBillingsParams, GetBillingSubscriptionsBraintreeParams, GetCanceledImeisParams, GetChurnStatusByClientIdParams, GetClientIdFromBraintreeCustomerParams, GetUserByBraintreeCustomerIdParams, UpdateBillingCustomerBraintreeParams, UpdateBillingParams, UpsertBillingCustomerBraintreeParams, UpsertBillingSubscriptionBraintreeParams } from '../../types/billing';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class BillingRepository extends BaseRepository {
|
|
5
5
|
/**
|
|
@@ -140,4 +140,16 @@ export declare class BillingRepository extends BaseRepository {
|
|
|
140
140
|
* @returns Whether the billing braintree subscription was upserted
|
|
141
141
|
*/
|
|
142
142
|
upsertBillingSubscriptionBraintree(params: UpsertBillingSubscriptionBraintreeParams): Promise<boolean>;
|
|
143
|
+
/**
|
|
144
|
+
* Get canceled imei
|
|
145
|
+
* @param {GetCanceledImeisParams} params containing information to get canceled imeis
|
|
146
|
+
* - params.filters.minCancellationDate: The min cancellation date
|
|
147
|
+
* - params.filters.maxCancellationDate: The max cancellation date
|
|
148
|
+
* - params.filters.canceledIn: which canceled status to check by ('carrier', 'device' or 'both')
|
|
149
|
+
* - params.filters.excludeB2B: whether to exclude devices from B2B clients
|
|
150
|
+
* - params.filters.excludeTest: whether to exclude devices from test clients
|
|
151
|
+
* - params.pagingOptions.pageSize: max elements to return
|
|
152
|
+
* @returns The list of canceled imeis
|
|
153
|
+
*/
|
|
154
|
+
getCanceledImeis(params: GetCanceledImeisParams): Promise<CanceledImeiResult[]>;
|
|
143
155
|
}
|
package/dist/types/billing.d.ts
CHANGED
|
@@ -148,3 +148,26 @@ export interface UpsertBillingSubscriptionBraintreeParams {
|
|
|
148
148
|
trialDurationUnit?: string | null;
|
|
149
149
|
trialPeriod?: boolean | null;
|
|
150
150
|
}
|
|
151
|
+
export interface GetCanceledImeisParams {
|
|
152
|
+
filters: {
|
|
153
|
+
minCancellationDate: Date;
|
|
154
|
+
maxCancellationDate: Date;
|
|
155
|
+
canceledIn: 'carrier' | 'device' | 'both';
|
|
156
|
+
excludeB2B: boolean;
|
|
157
|
+
excludeTest: boolean;
|
|
158
|
+
};
|
|
159
|
+
pagingOptions: {
|
|
160
|
+
pageSize: number | 100;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
export interface CanceledImeiResult {
|
|
164
|
+
imei: string;
|
|
165
|
+
iccid: string;
|
|
166
|
+
clientId: number;
|
|
167
|
+
clientTypeId: number;
|
|
168
|
+
subscriptionId: string;
|
|
169
|
+
createdAt: Date;
|
|
170
|
+
updatedAt: string;
|
|
171
|
+
iccidStatus: string;
|
|
172
|
+
carrier: string;
|
|
173
|
+
}
|