taxtank-core 0.8.2 → 0.8.3

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,14 +1,16 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
- import { Observable, ReplaySubject } from 'rxjs';
2
+ import { BehaviorSubject, Observable, ReplaySubject } from 'rxjs';
3
3
  import { ServiceSubscriptionCollection } from '../../collections/service-subscription.collection';
4
4
  import { ServiceSubscription } from '../../models/service-subscription/service-subscription';
5
5
  import { ServicePayment } from '../../models/service-subscription/service-payment';
6
6
  import { EventDispatcherService } from '../event/event-dispatcher.service';
7
7
  import { ServiceSubscriptionItem } from '../../models/service-subscription/service-subscription-item';
8
+ import { SseService } from '../event/sse.service';
8
9
  import * as i0 from "@angular/core";
9
10
  export declare class SubscriptionService {
10
11
  private http;
11
12
  private eventDispatcherService;
13
+ private sseService;
12
14
  private environment;
13
15
  _serviceSubscription: ServiceSubscription;
14
16
  serviceSubscriptionSubject: ReplaySubject<ServiceSubscription>;
@@ -17,8 +19,10 @@ export declare class SubscriptionService {
17
19
  stripe: any;
18
20
  servicePaymentsSubject: ReplaySubject<ServicePayment[]>;
19
21
  _servicePayments: ServicePayment[];
20
- constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any);
21
- getSubscription(): Observable<ServiceSubscription>;
22
+ subscriptionChangeSubject: BehaviorSubject<ServiceSubscription>;
23
+ constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, sseService: SseService, environment: any);
24
+ listenEvents(): void;
25
+ getSubscription(force?: boolean): Observable<ServiceSubscription>;
22
26
  /**
23
27
  * @TODO right now we have only monthly prices, the function should be refactored to support other options in future
24
28
  *
@@ -41,7 +45,8 @@ export declare class SubscriptionService {
41
45
  /**
42
46
  * Change subscription plan
43
47
  */
44
- changeSubscription(items: ServiceSubscriptionItem[]): Observable<void>;
48
+ changeSubscription(items: ServiceSubscriptionItem[]): Observable<object>;
49
+ private listenSubscriptions;
45
50
  static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionService, never>;
46
51
  static ɵprov: i0.ɵɵInjectableDeclaration<SubscriptionService>;
47
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",