taxtank-core 0.29.17 → 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 +131 -28
- package/bundles/taxtank-core.umd.js.map +1 -1
- 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/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/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/fesm2015/taxtank-core.js +100 -24
- 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/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/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/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
|
}
|
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
|
|
@@ -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>;
|