@spytecgps/nova-orm 0.0.76 → 0.0.77

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,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
  }
@@ -65,3 +65,25 @@ export interface UpsertBillingCustomerBraintreeParams {
65
65
  email?: string;
66
66
  phone?: string;
67
67
  }
68
+ export interface CreateBillingStatusHistoryBraintreeParams {
69
+ subscriptionId: string;
70
+ subscriptionHistories: {
71
+ id?: number;
72
+ status?: string;
73
+ balance?: number;
74
+ price?: number;
75
+ currencyIsoCode?: string;
76
+ planId?: string;
77
+ timestamp?: string;
78
+ }[];
79
+ }
80
+ export interface CreateBillingDeviceHistoryParams {
81
+ id?: number;
82
+ clientId?: number;
83
+ deviceId?: number;
84
+ imei?: string;
85
+ planId?: string;
86
+ subscriptionId?: string;
87
+ platform?: string;
88
+ status?: string;
89
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "0.0.76",
3
+ "version": "0.0.77",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",