@spytecgps/nova-orm 0.0.74 → 0.0.76

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 { BillingCustomerBraintree } from '../../entities';
2
+ import { NovaDataSource } from '../../novaDataSource';
3
+ import { GetBillingCustomerBraintreeByIdParams } from '../../types/billing';
4
+ import { Logger } from '../../types/logger';
5
+ export declare const getBillingCustomerBraintreeById: (novaDataSource: NovaDataSource, params: GetBillingCustomerBraintreeByIdParams, logger: Logger) => Promise<BillingCustomerBraintree>;
@@ -0,0 +1,4 @@
1
+ import { NovaDataSource } from '../../novaDataSource';
2
+ import { GetClientIdFromBraintreeCustomerParams } from '../../types/billing';
3
+ import { Logger } from '../../types/logger';
4
+ export declare const getClientIdFromBraintreeCustomer: (novaDataSource: NovaDataSource, params: GetClientIdFromBraintreeCustomerParams, logger: Logger) => Promise<number>;
@@ -1,5 +1,5 @@
1
- import { Billing } from '../../entities';
2
- import { CreateBillingParams, GetBillingsParams, UpdateBillingParams } from '../../types/billing';
1
+ import { Billing, BillingCustomerBraintree } from '../../entities';
2
+ import { CreateBillingParams, 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
  /**
@@ -47,4 +47,46 @@ export declare class BillingRepository extends BaseRepository {
47
47
  * Whether the billing was updated or not
48
48
  */
49
49
  updateBilling(params: UpdateBillingParams): Promise<boolean>;
50
+ /**
51
+ * Get clientId from braintree customer
52
+ * @param {GetClientIdFromBraintreeCustomerParams} params containing information to get clientId from braintree customer
53
+ * - params.filters.customerId: The braintree customer id
54
+ * @returns The clientId
55
+ */
56
+ getClientIdFromBraintreeCustomer(params: GetClientIdFromBraintreeCustomerParams): Promise<number>;
57
+ /**
58
+ * Get billing customer braintree by id
59
+ * @param {GetBillingCustomerBraintreeByIdParams} params containing information to get billing customer braintree by id
60
+ * - params.filters.id: The billing customer braintree id
61
+ * @returns The billing customer braintree information
62
+ */
63
+ getBillingCustomerBraintreeById(params: GetBillingCustomerBraintreeByIdParams): Promise<BillingCustomerBraintree>;
64
+ /**
65
+ * Update billing customer braintree
66
+ * @param {UpdateBillingCustomerBraintreeParams} params containing information to update billing customer braintree
67
+ * - params.filters.id: The billing customer braintree id
68
+ * One of the following parameters is required:
69
+ * - params.values.firstName: The billing customer braintree firstName
70
+ * - params.values.lastName: The billing customer braintree lastName
71
+ * - params.values.company: The billing customer braintree company
72
+ * - params.values.email: The billing customer braintree email
73
+ * - params.values.phone: The billing customer braintree phone
74
+ * - params.values.churnStatus: The billing customer braintree churnStatus
75
+ * @returns Whether the billing customer braintree was updated or not
76
+ */
77
+ updateBillingCustomerBraintree(params: UpdateBillingCustomerBraintreeParams): Promise<boolean>;
78
+ /**
79
+ * Upsert billing customer braintree
80
+ * @param {UpsertBillingCustomerBraintreeParams} params containing information to upsert billing customer braintree
81
+ * If the billing customer braintree exists, it will be updated, otherwise it will be created.
82
+ * - params.id: The billing customer braintree id
83
+ * One of the following parameters is required:
84
+ * - params.firstName: The billing customer braintree firstName
85
+ * - params.lastName: The billing customer braintree lastName
86
+ * - params.company: The billing customer braintree company
87
+ * - params.email: The billing customer braintree email
88
+ * - params.phone: The billing customer braintree phone
89
+ * @returns The upserted billing customer braintree information
90
+ */
91
+ upsertBillingCustomerBraintree(params: UpsertBillingCustomerBraintreeParams): Promise<BillingCustomerBraintree>;
50
92
  }
@@ -0,0 +1,4 @@
1
+ import { NovaDataSource } from '../../novaDataSource';
2
+ import { UpdateBillingCustomerBraintreeParams } from '../../types/billing';
3
+ import { Logger } from '../../types/logger';
4
+ export declare const updateBillingCustomerBraintree: (novaDataSource: NovaDataSource, params: UpdateBillingCustomerBraintreeParams, logger: Logger) => Promise<boolean>;
@@ -0,0 +1,5 @@
1
+ import { BillingCustomerBraintree } from '../../entities';
2
+ import { NovaDataSource } from '../../novaDataSource';
3
+ import { UpsertBillingCustomerBraintreeParams } from '../../types/billing';
4
+ import { Logger } from '../../types/logger';
5
+ export declare const upsertBillingCustomerBraintree: (novaDataSource: NovaDataSource, params: UpsertBillingCustomerBraintreeParams, logger: Logger) => Promise<BillingCustomerBraintree>;
@@ -24,6 +24,7 @@ export declare class UserConfigurationsRepository extends BaseRepository {
24
24
  * - dataSourceTypeId: The user data source type id, optional
25
25
  * - homepage: The user homepage, optional
26
26
  * - temperatureUnits: The user temperature units, optional
27
+ * - addressFormat: The user address format, optional
27
28
  * @returns The created user configuration
28
29
  */
29
30
  createUserConfiguration(params: CreateUserConfigurationParams): Promise<UserConfiguration>;
@@ -42,6 +43,7 @@ export declare class UserConfigurationsRepository extends BaseRepository {
42
43
  * - values.dataSourceTypeId: The user data source type id, optional
43
44
  * - values.homepage: The user homepage, optional
44
45
  * - values.temperatureUnits: The user temperature units, optional
46
+ * - values.addressFormat: The user address format, optional
45
47
  * @returns Whether the user configuration was updated
46
48
  */
47
49
  updateUserConfiguration(params: UpdateUserConfigurationParams): Promise<boolean>;
@@ -34,3 +34,34 @@ export interface UpdateBillingParams {
34
34
  clientId?: number;
35
35
  };
36
36
  }
37
+ export interface GetClientIdFromBraintreeCustomerParams {
38
+ filters: {
39
+ customerId: string;
40
+ };
41
+ }
42
+ export interface GetBillingCustomerBraintreeByIdParams {
43
+ filters: {
44
+ id: string;
45
+ };
46
+ }
47
+ export interface UpdateBillingCustomerBraintreeParams {
48
+ filters: {
49
+ id: string;
50
+ };
51
+ values: {
52
+ firstName?: string;
53
+ lastName?: string;
54
+ company?: string;
55
+ email?: string;
56
+ phone?: string;
57
+ churnStatus?: string;
58
+ };
59
+ }
60
+ export interface UpsertBillingCustomerBraintreeParams {
61
+ id: string;
62
+ firstName?: string;
63
+ lastName?: string;
64
+ company?: string;
65
+ email?: string;
66
+ phone?: string;
67
+ }
@@ -16,6 +16,7 @@ export interface CreateUserConfigurationParams {
16
16
  dataSourceTypeId?: number;
17
17
  homepage?: string;
18
18
  temperatureUnits?: string;
19
+ addressFormat?: string;
19
20
  }
20
21
  export interface UpdateUserConfigurationParams {
21
22
  filters: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",