taxtank-core 0.29.18 → 0.29.20
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 +1012 -943
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/subscription/service-price.collection.js +38 -1
- package/esm2015/lib/db/Enums/subscription/service-price-type.enum.js +6 -3
- package/esm2015/lib/db/Models/subscription/service-price.js +1 -1
- package/esm2015/lib/models/service-subscription/service-product.js +2 -1
- package/esm2015/lib/models/service-subscription/service-subscription.js +9 -1
- package/esm2015/lib/services/http/subscription/service-subscription/subscription.service.js +6 -6
- package/fesm2015/taxtank-core.js +800 -755
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/subscription/service-price.collection.d.ts +10 -0
- package/lib/db/Enums/subscription/service-price-type.enum.d.ts +5 -2
- package/lib/db/Models/subscription/service-price.d.ts +1 -0
- package/lib/models/service-subscription/service-product.d.ts +1 -0
- package/lib/models/service-subscription/service-subscription.d.ts +3 -0
- package/lib/services/http/subscription/service-subscription/subscription.service.d.ts +2 -3
- package/package.json +1 -1
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { Collection } from '../collection';
|
|
2
2
|
import { ServicePrice } from '../../models';
|
|
3
|
+
/**
|
|
4
|
+
* @TODO vik refactor
|
|
5
|
+
*/
|
|
3
6
|
export declare class ServicePriceCollection extends Collection<ServicePrice> {
|
|
4
7
|
getActive(): this;
|
|
8
|
+
get monthly(): this;
|
|
9
|
+
get monthlyPackage(): this;
|
|
10
|
+
get monthlyPackageSum(): number;
|
|
11
|
+
get annual(): this;
|
|
12
|
+
get annualPackage(): this;
|
|
13
|
+
get annualPackageSum(): number;
|
|
14
|
+
getProperty(isAnnual: boolean, isPackage: boolean): ServicePrice;
|
|
5
15
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ServiceProduct as BaseServiceProduct } from '../../db/Models/subscription/service-product';
|
|
2
2
|
export declare class ServiceProduct extends BaseServiceProduct {
|
|
3
|
+
static quantity: number;
|
|
3
4
|
isProperties(): boolean;
|
|
4
5
|
isWorkTank(): boolean;
|
|
5
6
|
isSoleTank(): boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ServiceSubscription as ServiceSubscriptionBase } from '../../db/Models/subscription/service-subscription';
|
|
2
2
|
import { ServiceSubscriptionItem } from './service-subscription-item';
|
|
3
3
|
import { ServiceProduct } from './service-product';
|
|
4
|
+
import { SubscriptionItemCollection } from '../../collections';
|
|
4
5
|
export declare class ServiceSubscription extends ServiceSubscriptionBase {
|
|
5
6
|
startDate: Date;
|
|
6
7
|
endDate: Date;
|
|
@@ -24,6 +25,7 @@ export declare class ServiceSubscription extends ServiceSubscriptionBase {
|
|
|
24
25
|
isTrialExpired(): boolean;
|
|
25
26
|
isTrialExpiring(): boolean;
|
|
26
27
|
isRenewable(): boolean;
|
|
28
|
+
getItems(): SubscriptionItemCollection;
|
|
27
29
|
/**
|
|
28
30
|
* @TODO move to collection
|
|
29
31
|
*/
|
|
@@ -46,6 +48,7 @@ export declare class ServiceSubscription extends ServiceSubscriptionBase {
|
|
|
46
48
|
*/
|
|
47
49
|
hasItem(itemToCheck: ServiceSubscriptionItem): boolean;
|
|
48
50
|
hasProduct(product: ServiceProduct): boolean;
|
|
51
|
+
isPackage(): boolean;
|
|
49
52
|
/**
|
|
50
53
|
* Recommended number of properties to buy,
|
|
51
54
|
* based on the property service product and the number of properties the user has
|
|
@@ -2,7 +2,6 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ServiceSubscription } from '../../../../models/service-subscription/service-subscription';
|
|
4
4
|
import { EventDispatcherService, SseService } from '../../../event';
|
|
5
|
-
import { ServiceSubscriptionItem } from '../../../../models/service-subscription/service-subscription-item';
|
|
6
5
|
import { ToastService } from '../../../toast';
|
|
7
6
|
import { RestMethod, RestService } from '../../rest';
|
|
8
7
|
import { ServiceSubscription as ServiceSubscriptionBase } from '../../../../db/Models';
|
|
@@ -38,11 +37,11 @@ export declare class SubscriptionService extends RestService<ServiceSubscription
|
|
|
38
37
|
/**
|
|
39
38
|
* Get difference between current subscription and selected new subscription
|
|
40
39
|
*/
|
|
41
|
-
getProrationCost(
|
|
40
|
+
getProrationCost(subscription: ServiceSubscription): Observable<number>;
|
|
42
41
|
/**
|
|
43
42
|
* Change subscription plan
|
|
44
43
|
*/
|
|
45
|
-
changeSubscription(
|
|
44
|
+
changeSubscription(subscription: ServiceSubscription): Observable<object>;
|
|
46
45
|
private listenSubscriptions;
|
|
47
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionService, never>;
|
|
48
47
|
static ɵprov: i0.ɵɵInjectableDeclaration<SubscriptionService>;
|