@spytecgps/nova-orm 1.4.61 → 1.4.63

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.
@@ -1,5 +1,5 @@
1
- import { Billing, BillingCustomerBraintree, BillingDeviceHistory, BillingDeviceTypePlan, BillingHubspotPaymentLog, BillingPlans, BillingStatusHistoryBraintree, BillingSubscriptionBraintree, Magento2Plan, User } from '../../entities';
2
- import { BillingSubscriptionChurnStatus, BraintreePastDueSubscription, CanceledImeiResult, CreateBillingDeviceHistoryParams, CreateBillingHubspotPaymentLogParams, CreateBillingParams, CreateBillingStatusHistoryBraintreeParams, GetBillingCustomerBraintreeByIdParams, GetBillingDeviceTypePlansParams, GetBillingPlanResult, GetBillingPlansParams, GetBillingsParams, GetBillingSubscriptionsBraintreeParams, GetBraintreePastDueSubscriptionParams, GetCanceledImeisParams, GetChurnStatusByClientIdParams, GetClientIdFromBraintreeCustomerParams, GetMagentoPlanParams, GetUserByBraintreeCustomerIdParams, UpdateBillingCustomerBraintreeParams, UpdateBillingParams, UpsertBillingCustomerBraintreeParams, UpsertBillingDeviceTypePlanParams, UpsertBillingPlanParams, UpsertBillingSubscriptionBraintreeParams } from '../../types/billing';
1
+ import { Billing, BillingCustomerBraintree, BillingDeviceHistory, BillingHubspotPaymentLog, BillingStatusHistoryBraintree, BillingSubscriptionBraintree, Magento2Plan, User } from '../../entities';
2
+ import { BillingSubscriptionChurnStatus, BraintreePastDueSubscription, CanceledImeiResult, CreateBillingDeviceHistoryParams, CreateBillingHubspotPaymentLogParams, CreateBillingParams, CreateBillingStatusHistoryBraintreeParams, GetBillingCustomerBraintreeByIdParams, GetBillingsParams, GetBillingSubscriptionsBraintreeParams, GetBraintreePastDueSubscriptionParams, GetCanceledImeisParams, GetChurnStatusByClientIdParams, GetClientIdFromBraintreeCustomerParams, GetMagentoPlanParams, GetUserByBraintreeCustomerIdParams, UpdateBillingCustomerBraintreeParams, UpdateBillingParams, UpsertBillingCustomerBraintreeParams, UpsertBillingSubscriptionBraintreeParams } from '../../types/billing';
3
3
  import { BaseRepository } from '../baseRepository';
4
4
  export declare class BillingRepository extends BaseRepository {
5
5
  /**
@@ -178,35 +178,6 @@ export declare class BillingRepository extends BaseRepository {
178
178
  * @returns The created billing hubspot payment log information
179
179
  */
180
180
  createBillingHubspotPaymentLog(params: CreateBillingHubspotPaymentLogParams): Promise<BillingHubspotPaymentLog>;
181
- /**
182
- * Upsert billing plan
183
- * @param {UpsertBillingPlanParams} params containing information to upsert billing plan
184
- * @returns The upserted billing plan information
185
- */
186
- upsertBillingPlans(params: UpsertBillingPlanParams): Promise<BillingPlans>;
187
- /**
188
- * Upsert billing device type plan
189
- * @param {UpsertBillingDeviceTypePlanParams} params containing information to upsert billing device type plan
190
- * @returns The upserted billing device type plan information
191
- */
192
- upsertBillingDeviceTypePlan(params: UpsertBillingDeviceTypePlanParams): Promise<BillingDeviceTypePlan>;
193
- /**
194
- * Get billing device type plans
195
- * @param {GetBillingDeviceTypePlansParams} params containing information to get billing device type plans
196
- * - params.planId: The planId
197
- * @returns The billing device type plans
198
- */
199
- getBillingDeviceTypePlans(params: GetBillingDeviceTypePlansParams): Promise<BillingDeviceTypePlan[]>;
200
- /**
201
- * Get Billing Plans
202
- * @param {GetBillingPlansParams} params containing information to get billing plans
203
- * - params.deviceTypeId: The deviceTypeId
204
- * - params.targetCustomer: The targetCustomer
205
- * - params.status: The status
206
- * - params.date: The date
207
- * @returns The billing plans
208
- */
209
- getBillingPlans(params: GetBillingPlansParams): Promise<GetBillingPlanResult[]>;
210
181
  /**
211
182
  * Get Braintree Past Due Subscriptions
212
183
  * @param {GetBraintreePastDueSubscriptionParams} params containing information to get Braintree Past Due Subscriptions
@@ -233,70 +233,6 @@ export interface CreateBillingHubspotPaymentLogParams {
233
233
  totalTaxes?: number | null;
234
234
  updatedByUserId?: string | null;
235
235
  }
236
- export type UpsertBillingPlanParamsStatus = 'active' | 'disabled' | 'draft';
237
- export type UpsertBillingPlanParamsTagetConsumer = 'consumer' | 'enterprise' | 'any';
238
- export type UpsertBillingPlanParamsTrialDurationUnit = 'day' | 'month' | null;
239
- export interface UpsertBillingPlanParams {
240
- planId: string;
241
- targetCustomer: UpsertBillingPlanParamsTagetConsumer;
242
- code: string;
243
- status: UpsertBillingPlanParamsStatus;
244
- platform: string;
245
- billingFrequency: number;
246
- contractLength: number;
247
- numberOfBillingCycles?: number | null;
248
- description?: string | null;
249
- name: string;
250
- price: string;
251
- trialDuration?: number | null;
252
- trialDurationUnit?: UpsertBillingPlanParamsTrialDurationUnit;
253
- trialPeriod?: boolean | null;
254
- createdAt: Date;
255
- updatedAt: Date;
256
- addOns?: Record<string, any>[] | null;
257
- discounts?: Record<string, any>[] | null;
258
- startDate?: Date | null;
259
- endDate?: Date | null;
260
- }
261
- export interface UpsertBillingDeviceTypePlanParams {
262
- deviceTypeId: number;
263
- planId: string;
264
- deviceTypeModel?: string;
265
- deviceType?: string | null;
266
- createdAt?: Date;
267
- status: UpsertBillingPlanParamsStatus;
268
- }
269
- export interface GetBillingDeviceTypePlansParams extends BaseSelectQueryParams {
270
- planId: string;
271
- }
272
- export interface GetBillingPlansParams extends BaseSelectQueryParams {
273
- deviceTypeId: number;
274
- targetCustomer: string;
275
- status: string;
276
- date: string | null;
277
- sortField?: 'planId' | 'billingFrequency' | 'price' | 'createdAt';
278
- sortOrder?: 'ASC' | 'DESC';
279
- }
280
- export interface GetBillingPlanResult {
281
- deviceTypeId: number;
282
- planId: string;
283
- deviceType: string;
284
- deviceTypeModel: string;
285
- targetCustomer: 'consumer' | 'enterprise' | 'any';
286
- plan: string;
287
- platform: string;
288
- billingFrequency: number;
289
- contractLength: number;
290
- description: string;
291
- price: string;
292
- createdAt: Date;
293
- addOns: Record<string, any>[];
294
- discounts: Record<string, any>[];
295
- startDate: Date | null;
296
- endDate: Date | null;
297
- imageUrl: string;
298
- productName: string;
299
- }
300
236
  export interface GetBraintreePastDueSubscriptionParams extends BaseSelectQueryParams {
301
237
  filters: {
302
238
  numberOfPastDueDays: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "1.4.61",
3
+ "version": "1.4.63",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,5 +0,0 @@
1
- import { BillingDeviceTypePlan } from '../../entities';
2
- import { NovaDataSource } from '../../novaDataSource';
3
- import { GetBillingDeviceTypePlansParams } from '../../types/billing';
4
- import { Logger } from '../../types/logger';
5
- export declare const getBillingDeviceTypePlans: (novaDataSource: NovaDataSource, params: GetBillingDeviceTypePlansParams, logger: Logger) => Promise<BillingDeviceTypePlan[]>;
@@ -1,4 +0,0 @@
1
- import { NovaDataSource } from '../../novaDataSource';
2
- import { GetBillingPlanResult, GetBillingPlansParams } from '../../types/billing';
3
- import { Logger } from '../../types/logger';
4
- export declare const getBillingPlans: (novaDataSource: NovaDataSource, params: GetBillingPlansParams, logger: Logger) => Promise<GetBillingPlanResult[]>;
@@ -1,5 +0,0 @@
1
- import { BillingDeviceTypePlan } from '../../entities';
2
- import { NovaDataSource } from '../../novaDataSource';
3
- import { UpsertBillingDeviceTypePlanParams } from '../../types/billing';
4
- import { Logger } from '../../types/logger';
5
- export declare const upsertBillingDeviceTypePlan: (novaDataSource: NovaDataSource, params: UpsertBillingDeviceTypePlanParams, logger: Logger) => Promise<BillingDeviceTypePlan>;
@@ -1,5 +0,0 @@
1
- import { BillingPlans } from '../../entities';
2
- import { NovaDataSource } from '../../novaDataSource';
3
- import { UpsertBillingPlanParams } from '../../types/billing';
4
- import { Logger } from '../../types/logger';
5
- export declare const upsertBillingPlans: (novaDataSource: NovaDataSource, params: UpsertBillingPlanParams, logger: Logger) => Promise<BillingPlans>;