@spytecgps/nova-orm 0.0.157 → 0.0.159

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, BillingHubspotPaymentLog, BillingStatusHistoryBraintree, BillingSubscriptionBraintree, Magento2Plan, User } from '../../entities';
2
- import { BillingSubscriptionChurnStatus, CanceledImeiResult, CreateBillingDeviceHistoryParams, CreateBillingHubspotPaymentLogParams, CreateBillingParams, CreateBillingStatusHistoryBraintreeParams, GetBillingCustomerBraintreeByIdParams, GetBillingsParams, GetBillingSubscriptionsBraintreeParams, GetCanceledImeisParams, GetChurnStatusByClientIdParams, GetClientIdFromBraintreeCustomerParams, GetMagentoPlanParams, GetUserByBraintreeCustomerIdParams, UpdateBillingCustomerBraintreeParams, UpdateBillingParams, UpsertBillingCustomerBraintreeParams, UpsertBillingSubscriptionBraintreeParams } from '../../types/billing';
1
+ import { Billing, BillingCustomerBraintree, BillingDeviceHistory, BillingHubspotPaymentLog, BillingKlarnaCustomer, BillingKlarnaOrder, BillingStatusHistoryBraintree, BillingSubscriptionBraintree, Magento2Plan, User } from '../../entities';
2
+ import { BillingSubscriptionChurnStatus, CanceledImeiResult, CreateBillingDeviceHistoryParams, CreateBillingHubspotPaymentLogParams, CreateBillingParams, CreateBillingStatusHistoryBraintreeParams, GetBillingCustomerBraintreeByIdParams, GetBillingsParams, GetBillingSubscriptionsBraintreeParams, GetCanceledImeisParams, GetChurnStatusByClientIdParams, GetClientIdFromBraintreeCustomerParams, GetMagentoPlanParams, GetUserByBraintreeCustomerIdParams, UpdateBillingCustomerBraintreeParams, UpdateBillingParams, UpsertBillingCustomerBraintreeParams, UpsertBillingKlarnaCustomerParams, UpsertBillingKlarnaOrderParams, UpsertBillingSubscriptionBraintreeParams } from '../../types/billing';
3
3
  import { BaseRepository } from '../baseRepository';
4
4
  export declare class BillingRepository extends BaseRepository {
5
5
  /**
@@ -178,4 +178,16 @@ 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 klarna customer
183
+ * @param {UpsertBillingKlarnaCustomerParams} params containing information to upsert billing klarna customer
184
+ * @returns The upserted billing klarna customer information
185
+ */
186
+ upsertBillingKlarnaCustomer(params: UpsertBillingKlarnaCustomerParams): Promise<BillingKlarnaCustomer>;
187
+ /**
188
+ * Upsert billing klarna order
189
+ * @param {UpsertBillingKlarnaOrderParams} params containing information to upsert billing klarna order
190
+ * @returns The upserted billing klarna order information
191
+ */
192
+ upsertBillingKlarnaOrder(params: UpsertBillingKlarnaOrderParams): Promise<BillingKlarnaOrder>;
181
193
  }
@@ -0,0 +1,5 @@
1
+ import { BillingKlarnaCustomer } from '../../entities';
2
+ import { NovaDataSource } from '../../novaDataSource';
3
+ import { UpsertBillingKlarnaCustomerParams } from '../../types/billing';
4
+ import { Logger } from '../../types/logger';
5
+ export declare const upsertBillingKlarnaCustomer: (novaDataSource: NovaDataSource, params: UpsertBillingKlarnaCustomerParams, logger: Logger) => Promise<BillingKlarnaCustomer>;
@@ -0,0 +1,5 @@
1
+ import { BillingKlarnaOrder } from '../../entities';
2
+ import { NovaDataSource } from '../../novaDataSource';
3
+ import { UpsertBillingKlarnaOrderParams } from '../../types/billing';
4
+ import { Logger } from '../../types/logger';
5
+ export declare const upsertBillingKlarnaOrder: (novaDataSource: NovaDataSource, params: UpsertBillingKlarnaOrderParams, logger: Logger) => Promise<BillingKlarnaOrder>;
@@ -227,3 +227,34 @@ export interface CreateBillingHubspotPaymentLogParams {
227
227
  totalTaxes?: number | null;
228
228
  updatedByUserId?: string | null;
229
229
  }
230
+ export interface UpsertBillingKlarnaCustomerParams {
231
+ id: string;
232
+ firstName?: string | null;
233
+ lastName?: string | null;
234
+ billingEmail?: string | null;
235
+ shippingEmail?: string | null;
236
+ streetAddress?: string | null;
237
+ city?: string | null;
238
+ region?: string | null;
239
+ country?: string | null;
240
+ postalCode?: string | null;
241
+ phone?: string | null;
242
+ createdAt?: Date | null;
243
+ }
244
+ export interface UpsertBillingKlarnaOrderParams {
245
+ id: string;
246
+ klarnaCustomerId: string;
247
+ planId?: string | null;
248
+ createdAt?: Date | null;
249
+ subscriptionStart?: Date | null;
250
+ subscriptionEnd?: Date | null;
251
+ nextBillingDate?: Date | null;
252
+ subscriptionValue?: number | null;
253
+ status?: string | null;
254
+ paymentType?: string | null;
255
+ discounts?: object | null;
256
+ addons?: object | null;
257
+ nextBillingPeriodAmount?: number | null;
258
+ paymentMethodToken?: string | null;
259
+ deviceId?: string | null;
260
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "0.0.157",
3
+ "version": "0.0.159",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",