taxtank-core 0.29.15 → 0.29.18
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/bundles/taxtank-core.umd.js +151 -32
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/report/property/property-report-item-depreciation.collection.js +2 -2
- package/esm2015/lib/collections/subscription/index.js +4 -1
- package/esm2015/lib/collections/subscription/service-price.collection.js +7 -0
- package/esm2015/lib/collections/subscription/service-product.collection.js +8 -0
- package/esm2015/lib/collections/subscription/service-subscription.collection.js +17 -1
- package/esm2015/lib/collections/subscription/subscription-item.collection.js +4 -1
- package/esm2015/lib/db/Models/user/client-income-types.js +3 -3
- package/esm2015/lib/models/endpoint/endpoints.const.js +3 -1
- package/esm2015/lib/models/index.js +2 -1
- package/esm2015/lib/models/service-subscription/index.js +6 -0
- package/esm2015/lib/models/service-subscription/service-product.js +6 -1
- package/esm2015/lib/models/service-subscription/service-subscription.js +12 -2
- package/esm2015/lib/services/http/property/property.service.js +1 -2
- package/esm2015/lib/services/http/rest/rest.service.js +2 -2
- package/esm2015/lib/services/http/subscription/index.js +2 -1
- package/esm2015/lib/services/http/subscription/service-price/service-price.service.js +8 -5
- package/esm2015/lib/services/http/subscription/service-product/service-product.service.js +24 -0
- package/esm2015/lib/services/http/subscription/service-subscription/subscription.service.js +10 -2
- package/esm2015/lib/services/http/user/user.service.js +17 -1
- package/fesm2015/taxtank-core.js +119 -28
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/subscription/index.d.ts +3 -0
- package/lib/collections/subscription/service-price.collection.d.ts +5 -0
- package/lib/collections/subscription/service-product.collection.d.ts +5 -0
- package/lib/collections/subscription/service-subscription.collection.d.ts +4 -0
- package/lib/collections/subscription/subscription-item.collection.d.ts +2 -1
- package/lib/db/Models/user/client-income-types.d.ts +2 -2
- package/lib/models/index.d.ts +1 -0
- package/lib/models/service-subscription/index.d.ts +5 -0
- package/lib/models/service-subscription/service-subscription.d.ts +4 -0
- package/lib/services/http/rest/rest.service.d.ts +1 -1
- package/lib/services/http/subscription/index.d.ts +1 -0
- package/lib/services/http/subscription/service-price/service-price.service.d.ts +9 -6
- package/lib/services/http/subscription/service-product/service-product.service.d.ts +14 -0
- package/lib/services/http/subscription/service-subscription/subscription.service.d.ts +1 -0
- package/lib/services/http/user/user.service.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Collection } from '../collection';
|
|
2
2
|
import { ServiceSubscription } from '../../models/service-subscription/service-subscription';
|
|
3
3
|
import { SubscriptionItemCollection } from './subscription-item.collection';
|
|
4
|
+
import { Dictionary, ServiceProduct } from '../../models';
|
|
4
5
|
export declare class ServiceSubscriptionCollection extends Collection<ServiceSubscription> {
|
|
5
6
|
getActive(): this;
|
|
6
7
|
getTrials(): this;
|
|
@@ -9,4 +10,7 @@ export declare class ServiceSubscriptionCollection extends Collection<ServiceSub
|
|
|
9
10
|
getPaid(): this;
|
|
10
11
|
getActivePaid(): ServiceSubscription;
|
|
11
12
|
getItems(): SubscriptionItemCollection;
|
|
13
|
+
groupByProduct(products: Collection<ServiceProduct>): Dictionary<ServiceSubscription>;
|
|
14
|
+
findByProduct(product: ServiceProduct): ServiceSubscription;
|
|
15
|
+
hasPropertyTank(): boolean;
|
|
12
16
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Collection } from '../collection';
|
|
2
|
-
import { ServiceSubscriptionItem } from '../../models
|
|
2
|
+
import { ServiceProduct, ServiceSubscriptionItem } from '../../models';
|
|
3
3
|
export declare class SubscriptionItemCollection extends Collection<ServiceSubscriptionItem> {
|
|
4
4
|
get propertiesItem(): ServiceSubscriptionItem;
|
|
5
5
|
get propertyQuantity(): number;
|
|
6
|
+
hasProduct(product: ServiceProduct): boolean;
|
|
6
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClientDetails } from './client-details';
|
|
2
|
-
import {
|
|
3
|
-
export declare class ClientIncomeTypes extends
|
|
2
|
+
import { ObservableModel } from '../observable-model';
|
|
3
|
+
export declare class ClientIncomeTypes extends ObservableModel {
|
|
4
4
|
salary?: boolean;
|
|
5
5
|
property?: boolean;
|
|
6
6
|
sole?: boolean;
|
package/lib/models/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ServiceSubscription as ServiceSubscriptionBase } from '../../db/Models/subscription/service-subscription';
|
|
2
2
|
import { ServiceSubscriptionItem } from './service-subscription-item';
|
|
3
|
+
import { ServiceProduct } from './service-product';
|
|
3
4
|
export declare class ServiceSubscription extends ServiceSubscriptionBase {
|
|
4
5
|
startDate: Date;
|
|
5
6
|
endDate: Date;
|
|
6
7
|
items: ServiceSubscriptionItem[];
|
|
7
8
|
lastTrialDays: number;
|
|
8
9
|
get isTrial(): boolean;
|
|
10
|
+
get isPaid(): boolean;
|
|
9
11
|
get price(): number;
|
|
10
12
|
/**
|
|
11
13
|
* get title of subscription
|
|
@@ -27,6 +29,7 @@ export declare class ServiceSubscription extends ServiceSubscriptionBase {
|
|
|
27
29
|
*/
|
|
28
30
|
get workTankItem(): ServiceSubscriptionItem;
|
|
29
31
|
get soleTankItem(): ServiceSubscriptionItem;
|
|
32
|
+
get propertyTankItem(): ServiceSubscriptionItem;
|
|
30
33
|
hasPropertyTank(): boolean;
|
|
31
34
|
hasWorkTank(): boolean;
|
|
32
35
|
/**
|
|
@@ -42,6 +45,7 @@ export declare class ServiceSubscription extends ServiceSubscriptionBase {
|
|
|
42
45
|
* Check if current subscription has provided subscription item
|
|
43
46
|
*/
|
|
44
47
|
hasItem(itemToCheck: ServiceSubscriptionItem): boolean;
|
|
48
|
+
hasProduct(product: ServiceProduct): boolean;
|
|
45
49
|
/**
|
|
46
50
|
* Recommended number of properties to buy,
|
|
47
51
|
* based on the property service product and the number of properties the user has
|
|
@@ -115,7 +115,7 @@ export declare abstract class RestService<BaseModel extends AbstractModel, Model
|
|
|
115
115
|
/**
|
|
116
116
|
* Subscribe to http events and run callback.
|
|
117
117
|
* CSE - Cleint Sent Events
|
|
118
|
-
* @param
|
|
118
|
+
* @param modelClass
|
|
119
119
|
* @param methods The list of http methods should be listened for
|
|
120
120
|
* @param callback The function to be called when event triggered
|
|
121
121
|
*/
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { ServicePrice as ServicePriceBase } from '../../../../db/Models
|
|
2
|
-
import { ServicePrice } from '../../../../models
|
|
3
|
-
import { RestService } from '../../rest
|
|
1
|
+
import { ServicePrice as ServicePriceBase } from '../../../../db/Models';
|
|
2
|
+
import { ServicePrice } from '../../../../models';
|
|
3
|
+
import { RestMethod, RestService } from '../../rest';
|
|
4
|
+
import { ServicePriceCollection } from '../../../../collections';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
6
7
|
* Service that handling banks logic
|
|
7
8
|
*/
|
|
8
|
-
export declare class ServicePriceService extends RestService<ServicePriceBase, ServicePrice> {
|
|
9
|
+
export declare class ServicePriceService extends RestService<ServicePriceBase, ServicePrice, ServicePriceCollection> {
|
|
10
|
+
protected endpointUri: string;
|
|
9
11
|
modelClass: typeof ServicePrice;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
isApiPlatform: boolean;
|
|
13
|
+
collectionClass: typeof ServicePriceCollection;
|
|
14
|
+
disabledMethods: RestMethod[];
|
|
12
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<ServicePriceService, never>;
|
|
13
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<ServicePriceService>;
|
|
14
17
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RestMethod, RestService } from '../../rest';
|
|
2
|
+
import { ServiceProduct as ServiceProductBase } from '../../../../db/Models';
|
|
3
|
+
import { ServiceProduct } from '../../../../models';
|
|
4
|
+
import { ServiceProductCollection } from '../../../../collections';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class ServiceProductService extends RestService<ServiceProductBase, ServiceProduct, ServiceProductCollection> {
|
|
7
|
+
collectionClass: typeof ServiceProductCollection;
|
|
8
|
+
modelClass: typeof ServiceProduct;
|
|
9
|
+
protected endpointUri: string;
|
|
10
|
+
disabledMethods: RestMethod[];
|
|
11
|
+
isApiPlatform: boolean;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ServiceProductService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ServiceProductService>;
|
|
14
|
+
}
|
|
@@ -23,6 +23,7 @@ export declare class SubscriptionService extends RestService<ServiceSubscription
|
|
|
23
23
|
collectionClass: typeof ServiceSubscriptionCollection;
|
|
24
24
|
disabledMethods: RestMethod[];
|
|
25
25
|
constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, sseService: SseService, toastService: ToastService, environment: any);
|
|
26
|
+
startTrial(subscription: ServiceSubscription): Observable<ServiceSubscription>;
|
|
26
27
|
getActive(): Observable<ServiceSubscriptionCollection>;
|
|
27
28
|
getTrials(): Observable<ServiceSubscriptionCollection>;
|
|
28
29
|
getActiveTrials(): Observable<ServiceSubscriptionCollection>;
|
|
@@ -4,6 +4,8 @@ import { User } from '../../../models';
|
|
|
4
4
|
import { EventDispatcherService, SseService } from '../../event';
|
|
5
5
|
import { JwtService } from '../../auth';
|
|
6
6
|
import { IEventListener } from '../../../interfaces';
|
|
7
|
+
import { ObservableModel } from '../../../db/Models';
|
|
8
|
+
import { HttpMethod } from '../rest';
|
|
7
9
|
import * as i0 from "@angular/core";
|
|
8
10
|
/**
|
|
9
11
|
* Service to work with user
|
|
@@ -81,6 +83,15 @@ export declare class UserService implements IEventListener {
|
|
|
81
83
|
* capital losses updates on property sale
|
|
82
84
|
*/
|
|
83
85
|
private listenPropertySale;
|
|
86
|
+
/**
|
|
87
|
+
* @TODO remove when the class refactored on RestService
|
|
88
|
+
* Subscribe to http events and run callback.
|
|
89
|
+
* CSE - Cleint Sent Events
|
|
90
|
+
* @param modelClass
|
|
91
|
+
* @param methods The list of http methods should be listened for
|
|
92
|
+
* @param callback The function to be called when event triggered
|
|
93
|
+
*/
|
|
94
|
+
protected listenCSE(modelClass: typeof ObservableModel, methods: HttpMethod[], callback: Function): void;
|
|
84
95
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
|
|
85
96
|
static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
|
|
86
97
|
}
|