@spytecgps/nova-orm 0.0.76 → 0.0.78
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 +5 -0
- package/dist/entities/billingStatusHistoryBraintree.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/repositories/billing/createBillingDeviceHistory.d.ts +5 -0
- package/dist/repositories/billing/createBillingStatusHistoryBraintree.d.ts +5 -0
- package/dist/repositories/billing/index.d.ts +25 -2
- package/dist/types/billing.d.ts +27 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BillingDeviceHistory } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { CreateBillingDeviceHistoryParams } from '../../types/billing';
|
|
4
|
+
import { Logger } from '../../types/logger';
|
|
5
|
+
export declare const createBillingDeviceHistory: (novaDataSource: NovaDataSource, params: CreateBillingDeviceHistoryParams, logger: Logger) => Promise<BillingDeviceHistory>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BillingStatusHistoryBraintree } from '../../entities';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { CreateBillingStatusHistoryBraintreeParams } from '../../types/billing';
|
|
4
|
+
import { Logger } from '../../types/logger';
|
|
5
|
+
export declare const createBillingStatusHistoryBraintree: (novaDataSource: NovaDataSource, params: CreateBillingStatusHistoryBraintreeParams, logger: Logger) => Promise<BillingStatusHistoryBraintree[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Billing, BillingCustomerBraintree } from '../../entities';
|
|
2
|
-
import { CreateBillingParams, GetBillingCustomerBraintreeByIdParams, GetBillingsParams, GetClientIdFromBraintreeCustomerParams, UpdateBillingCustomerBraintreeParams, UpdateBillingParams, UpsertBillingCustomerBraintreeParams } from '../../types/billing';
|
|
1
|
+
import { Billing, BillingCustomerBraintree, BillingDeviceHistory, BillingStatusHistoryBraintree } from '../../entities';
|
|
2
|
+
import { CreateBillingDeviceHistoryParams, CreateBillingParams, CreateBillingStatusHistoryBraintreeParams, GetBillingCustomerBraintreeByIdParams, GetBillingsParams, GetClientIdFromBraintreeCustomerParams, UpdateBillingCustomerBraintreeParams, UpdateBillingParams, UpsertBillingCustomerBraintreeParams } from '../../types/billing';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class BillingRepository extends BaseRepository {
|
|
5
5
|
/**
|
|
@@ -89,4 +89,27 @@ export declare class BillingRepository extends BaseRepository {
|
|
|
89
89
|
* @returns The upserted billing customer braintree information
|
|
90
90
|
*/
|
|
91
91
|
upsertBillingCustomerBraintree(params: UpsertBillingCustomerBraintreeParams): Promise<BillingCustomerBraintree>;
|
|
92
|
+
/**
|
|
93
|
+
* Create billing status history braintree
|
|
94
|
+
* @param {CreateBillingStatusHistoryBraintreeParams} params containing information to create billing status history braintree
|
|
95
|
+
* - params.subscriptionId: The subscriptionId, required
|
|
96
|
+
* - params.subscriptionHistories: The subscriptionHistories to create. At least one is required.
|
|
97
|
+
* @returns The created billing status history braintree information
|
|
98
|
+
*/
|
|
99
|
+
createBillingStatusHistoryBraintree(params: CreateBillingStatusHistoryBraintreeParams): Promise<BillingStatusHistoryBraintree[]>;
|
|
100
|
+
/**
|
|
101
|
+
* Create billing device history
|
|
102
|
+
* @param {CreateBillingDeviceHistoryParams} params containing information to create billing device history
|
|
103
|
+
* One of the following parameters is required:
|
|
104
|
+
* - params.id: The billing device history id
|
|
105
|
+
* - params.deviceId: The deviceId
|
|
106
|
+
* - params.clientId: The clientId
|
|
107
|
+
* - params.subscriptionId: The subscriptionId
|
|
108
|
+
* - params.imei: The imei
|
|
109
|
+
* - params.planId: The planId
|
|
110
|
+
* - params.platform: The platform
|
|
111
|
+
* - params.status: The status
|
|
112
|
+
* @returns The created billing device history information
|
|
113
|
+
*/
|
|
114
|
+
createBillingDeviceHistory(params: CreateBillingDeviceHistoryParams): Promise<BillingDeviceHistory>;
|
|
92
115
|
}
|
package/dist/types/billing.d.ts
CHANGED
|
@@ -3,6 +3,11 @@ export interface GetBillingsParams {
|
|
|
3
3
|
imei?: string;
|
|
4
4
|
clientId?: number;
|
|
5
5
|
subscriptionId?: string;
|
|
6
|
+
status?: string;
|
|
7
|
+
};
|
|
8
|
+
projectionOptions?: {
|
|
9
|
+
withClient?: boolean;
|
|
10
|
+
withPlan?: boolean;
|
|
6
11
|
};
|
|
7
12
|
}
|
|
8
13
|
export interface CreateBillingParams {
|
|
@@ -65,3 +70,25 @@ export interface UpsertBillingCustomerBraintreeParams {
|
|
|
65
70
|
email?: string;
|
|
66
71
|
phone?: string;
|
|
67
72
|
}
|
|
73
|
+
export interface CreateBillingStatusHistoryBraintreeParams {
|
|
74
|
+
subscriptionId: string;
|
|
75
|
+
subscriptionHistories: {
|
|
76
|
+
id?: number;
|
|
77
|
+
status?: string;
|
|
78
|
+
balance?: number;
|
|
79
|
+
price?: number;
|
|
80
|
+
currencyIsoCode?: string;
|
|
81
|
+
planId?: string;
|
|
82
|
+
timestamp?: string;
|
|
83
|
+
}[];
|
|
84
|
+
}
|
|
85
|
+
export interface CreateBillingDeviceHistoryParams {
|
|
86
|
+
id?: number;
|
|
87
|
+
clientId?: number;
|
|
88
|
+
deviceId?: number;
|
|
89
|
+
imei?: string;
|
|
90
|
+
planId?: string;
|
|
91
|
+
subscriptionId?: string;
|
|
92
|
+
platform?: string;
|
|
93
|
+
status?: string;
|
|
94
|
+
}
|