taxtank-core 0.28.97 → 0.28.98
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 +2600 -2329
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/index.js +3 -1
- package/esm2015/lib/db/Models/abstract-model.js +2 -1
- package/esm2015/lib/db/Models/observable-model.js +10 -0
- package/esm2015/lib/db/Models/property/property.js +3 -3
- package/esm2015/lib/db/Models/sole/bas-report.js +3 -2
- package/esm2015/lib/functions/array/index.js +2 -1
- package/esm2015/lib/functions/array/to-array.js +7 -0
- package/esm2015/lib/interceptors/basiq-client-id.interceptor.js +3 -3
- package/esm2015/lib/interceptors/basiq-token.interceptor.js +3 -3
- package/esm2015/lib/interceptors/corelogic-interceptor.js +3 -3
- package/esm2015/lib/interceptors/financial-year-interceptor.js +3 -3
- package/esm2015/lib/interceptors/interceptors.module.js +4 -4
- package/esm2015/lib/interceptors/jwt-interceptor.js +3 -3
- package/esm2015/lib/interceptors/preloader.interceptor.js +3 -3
- package/esm2015/lib/interceptors/user-switcher-interceptor.js +3 -3
- package/esm2015/lib/models/event/app-event.js +12 -1
- package/esm2015/lib/models/property/property.js +3 -1
- package/esm2015/lib/services/account-setup/account-setup.service.js +6 -5
- package/esm2015/lib/services/affiliate/rewardful/rewardful.service.js +3 -3
- package/esm2015/lib/services/asset/assets.service.js +3 -3
- package/esm2015/lib/services/auth/auth.service.js +3 -3
- package/esm2015/lib/services/auth/jwt.service.js +3 -3
- package/esm2015/lib/services/bank/bank-account-calculation.service.js +3 -3
- package/esm2015/lib/services/bank/bank-transaction-calculation.service.js +3 -3
- package/esm2015/lib/services/event/event-dispatcher.service.js +15 -4
- package/esm2015/lib/services/event/sse.service.js +3 -3
- package/esm2015/lib/services/export/export-formatter.service.js +3 -3
- package/esm2015/lib/services/header-title/header-title.service.js +3 -3
- package/esm2015/lib/services/http/address/address.service.js +3 -3
- package/esm2015/lib/services/http/bank/bank-account/bank-account.service.js +5 -5
- package/esm2015/lib/services/http/bank/bank-connection/bank-connection.service.js +5 -5
- package/esm2015/lib/services/http/bank/bank-transaction/bank-transaction.service.js +5 -5
- package/esm2015/lib/services/http/bank/bank.service.js +5 -5
- package/esm2015/lib/services/http/bank/basiq/basiq-token.service.js +3 -3
- package/esm2015/lib/services/http/bank/basiq/basiq.service.js +5 -5
- package/esm2015/lib/services/http/chart-accounts/chart-accounts-depreciations/chart-accounts-depreciations.service.js +5 -5
- package/esm2015/lib/services/http/chart-accounts/chart-accounts.service.js +3 -3
- package/esm2015/lib/services/http/chat/chat.service.js +5 -5
- package/esm2015/lib/services/http/chat/message/message.service.js +5 -5
- package/esm2015/lib/services/http/chat/message-document/message-document.service.js +3 -3
- package/esm2015/lib/services/http/depreciation/depreciation-capital-project/depreciation-capital-project.service.js +3 -3
- package/esm2015/lib/services/http/depreciation/depreciation-receipt/depreciation-receipt.service.js +3 -3
- package/esm2015/lib/services/http/depreciation/depreciation.service.js +5 -5
- package/esm2015/lib/services/http/document/document-folder/document-folder.service.js +5 -5
- package/esm2015/lib/services/http/document/document.service.js +5 -5
- package/esm2015/lib/services/http/facebook/facebook.service.js +3 -3
- package/esm2015/lib/services/http/firm/client-income/client-income-types.service.js +3 -3
- package/esm2015/lib/services/http/firm/client-invite/client-invite.service.js +5 -5
- package/esm2015/lib/services/http/firm/client-movement/client-movement.service.js +5 -5
- package/esm2015/lib/services/http/firm/employee/employee.service.js +5 -5
- package/esm2015/lib/services/http/firm/employee-invite/employee-invite.service.js +5 -5
- package/esm2015/lib/services/http/firm/firm.service.js +3 -3
- package/esm2015/lib/services/http/firm/portfolio-report/client-portfolio-report.service.js +3 -3
- package/esm2015/lib/services/http/income-source/income-source-forecast/income-source-forecast.service.js +5 -5
- package/esm2015/lib/services/http/income-source/income-source.service.js +5 -5
- package/esm2015/lib/services/http/income-source/salary-forecast/salary-forecast.service.js +5 -5
- package/esm2015/lib/services/http/income-source/sole-forecast/sole-forecast.service.js +5 -5
- package/esm2015/lib/services/http/loan/borrowing-expense/borrowing-expense.service.js +3 -3
- package/esm2015/lib/services/http/loan/loan.service.js +5 -5
- package/esm2015/lib/services/http/property/property-category/property-category.service.js +5 -5
- package/esm2015/lib/services/http/property/property-category-movement/property-category-movement.service.js +5 -5
- package/esm2015/lib/services/http/property/property-document/property-document.service.js +5 -5
- package/esm2015/lib/services/http/property/property-sale/property-sale.service.js +5 -5
- package/esm2015/lib/services/http/property/property-sale/tax-exemption/tax-exemption.service.js +5 -5
- package/esm2015/lib/services/http/property/property-share/property-share.service.js +5 -5
- package/esm2015/lib/services/http/property/property.service.js +32 -49
- package/esm2015/lib/services/http/receipt/receipt.service.js +3 -3
- package/esm2015/lib/services/http/rest/http-method.type.js +2 -0
- package/esm2015/lib/services/http/rest/index.js +3 -1
- package/esm2015/lib/services/http/rest/rest-method.type.js +2 -0
- package/esm2015/lib/services/http/rest/rest-old.service.js +225 -0
- package/esm2015/lib/services/http/rest/rest.service.js +146 -149
- package/esm2015/lib/services/http/service-notification/service-notification.service.js +5 -5
- package/esm2015/lib/services/http/sole/bas-report/bas-report.service.js +5 -5
- package/esm2015/lib/services/http/sole/sole-business/sole-business.service.js +5 -5
- package/esm2015/lib/services/http/sole/sole-business-activity/sole-business-activity.service.js +5 -5
- package/esm2015/lib/services/http/sole/sole-business-loss/sole-business-loss-rules/sole-business-loss-offset-rule.service.js +5 -5
- package/esm2015/lib/services/http/sole/sole-business-loss/sole-business-loss.service.js +5 -5
- package/esm2015/lib/services/http/sole/sole-contact/sole-contact.service.js +5 -5
- package/esm2015/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.js +3 -3
- package/esm2015/lib/services/http/sole/sole-details/sole-details.service.js +3 -3
- package/esm2015/lib/services/http/sole/sole-invoice/sole-invoice.service.js +5 -5
- package/esm2015/lib/services/http/sole/sole-invoice-template/sole-invoice-template.service.js +5 -5
- package/esm2015/lib/services/http/subscription/service-price.service.js +5 -5
- package/esm2015/lib/services/http/subscription/subscription.service.js +3 -3
- package/esm2015/lib/services/http/tax-review/tax-review-history/tax-review-history.service.js +5 -5
- package/esm2015/lib/services/http/tax-review/tax-review.service.js +5 -5
- package/esm2015/lib/services/http/tax-summary/tax-summary.service.js +3 -3
- package/esm2015/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.js +5 -5
- package/esm2015/lib/services/http/transaction/transaction-receipt/transaction-receipt.service.js +3 -3
- package/esm2015/lib/services/http/transaction/transaction.service.js +5 -5
- package/esm2015/lib/services/http/tutorial-video/tutorial-video.service.js +3 -3
- package/esm2015/lib/services/http/user/occupation/occupation.service.js +3 -3
- package/esm2015/lib/services/http/user/user-event-setting/user-event-setting.service.js +5 -5
- package/esm2015/lib/services/http/user/user-event-type/user-event-type.service.js +5 -5
- package/esm2015/lib/services/http/user/user.service.js +3 -3
- package/esm2015/lib/services/http/user/users-invite/users-invite.service.js +5 -5
- package/esm2015/lib/services/http/vehicle/vehicle-claim-details.service.js +3 -3
- package/esm2015/lib/services/http/vehicle/vehicle-claim.service.js +5 -5
- package/esm2015/lib/services/http/vehicle/vehicle-logbook.service.js +5 -5
- package/esm2015/lib/services/http/vehicle/vehicle.service.js +5 -5
- package/esm2015/lib/services/intercom/intercom.service.js +3 -3
- package/esm2015/lib/services/pdf/pdf-from-dom-element/pdf-from-dom-element.service.js +3 -3
- package/esm2015/lib/services/pdf/pdf-from-table/pdf-from-data-table/pdf-from-data-table.service.js +3 -3
- package/esm2015/lib/services/pdf/pdf-from-table/pdf-from-html-table/pdf-from-html-table.service.js +3 -3
- package/esm2015/lib/services/pdf/pdf-from-table/pdf-from-table.service.js +3 -3
- package/esm2015/lib/services/preloader/preloader.service.js +3 -3
- package/esm2015/lib/services/property/corelogic/corelogic.service.js +3 -3
- package/esm2015/lib/services/property/equity-position-chart/equity-position-chart.service.js +3 -3
- package/esm2015/lib/services/property/property-calculation/property-calculation.service.js +3 -3
- package/esm2015/lib/services/report/property/property-transaction-report.service.js +5 -6
- package/esm2015/lib/services/toast/toast.service.js +3 -3
- package/esm2015/lib/services/transaction/transaction-calculation.service.js +3 -3
- package/esm2015/lib/services/user/user-switcher.service.js +3 -3
- package/esm2015/lib/services/vehicle/logbook-best-period.service.js +3 -3
- package/esm2015/lib/services/xlsx/xlsx.service.js +3 -3
- package/esm2015/lib/tt-core.module.js +4 -4
- package/fesm2015/taxtank-core.js +2247 -2012
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/index.d.ts +2 -0
- package/lib/db/Models/observable-model.d.ts +8 -0
- package/lib/db/Models/property/property.d.ts +2 -2
- package/lib/db/Models/sole/bas-report.d.ts +2 -1
- package/lib/functions/array/index.d.ts +1 -0
- package/lib/functions/array/to-array.d.ts +4 -0
- package/lib/models/event/app-event.d.ts +9 -0
- package/lib/models/property/property.d.ts +2 -0
- package/lib/services/event/event-dispatcher.service.d.ts +9 -1
- package/lib/services/http/bank/bank-account/bank-account.service.d.ts +1 -1
- package/lib/services/http/bank/bank-connection/bank-connection.service.d.ts +1 -1
- package/lib/services/http/bank/bank-transaction/bank-transaction.service.d.ts +1 -1
- package/lib/services/http/bank/bank.service.d.ts +1 -1
- package/lib/services/http/bank/basiq/basiq.service.d.ts +1 -1
- package/lib/services/http/chart-accounts/chart-accounts-depreciations/chart-accounts-depreciations.service.d.ts +1 -1
- package/lib/services/http/chat/chat.service.d.ts +1 -1
- package/lib/services/http/chat/message/message.service.d.ts +1 -1
- package/lib/services/http/depreciation/depreciation.service.d.ts +1 -1
- package/lib/services/http/document/document-folder/document-folder.service.d.ts +1 -1
- package/lib/services/http/document/document.service.d.ts +1 -1
- package/lib/services/http/firm/client-invite/client-invite.service.d.ts +1 -1
- package/lib/services/http/firm/client-movement/client-movement.service.d.ts +1 -1
- package/lib/services/http/firm/employee/employee.service.d.ts +1 -1
- package/lib/services/http/firm/employee-invite/employee-invite.service.d.ts +1 -1
- package/lib/services/http/income-source/income-source-forecast/income-source-forecast.service.d.ts +1 -1
- package/lib/services/http/income-source/income-source.service.d.ts +1 -1
- package/lib/services/http/income-source/salary-forecast/salary-forecast.service.d.ts +1 -1
- package/lib/services/http/income-source/sole-forecast/sole-forecast.service.d.ts +1 -1
- package/lib/services/http/loan/loan.service.d.ts +1 -1
- package/lib/services/http/property/property-category/property-category.service.d.ts +1 -1
- package/lib/services/http/property/property-category-movement/property-category-movement.service.d.ts +1 -1
- package/lib/services/http/property/property-document/property-document.service.d.ts +1 -1
- package/lib/services/http/property/property-sale/property-sale.service.d.ts +1 -1
- package/lib/services/http/property/property-sale/tax-exemption/tax-exemption.service.d.ts +1 -1
- package/lib/services/http/property/property-share/property-share.service.d.ts +1 -1
- package/lib/services/http/property/property.service.d.ts +8 -11
- package/lib/services/http/rest/http-method.type.d.ts +1 -0
- package/lib/services/http/rest/index.d.ts +2 -0
- package/lib/services/http/rest/rest-method.type.d.ts +1 -0
- package/lib/services/http/rest/rest-old.service.d.ts +110 -0
- package/lib/services/http/rest/rest.service.d.ts +71 -62
- package/lib/services/http/service-notification/service-notification.service.d.ts +1 -1
- package/lib/services/http/sole/bas-report/bas-report.service.d.ts +1 -1
- package/lib/services/http/sole/sole-business/sole-business.service.d.ts +1 -1
- package/lib/services/http/sole/sole-business-activity/sole-business-activity.service.d.ts +1 -1
- package/lib/services/http/sole/sole-business-loss/sole-business-loss-rules/sole-business-loss-offset-rule.service.d.ts +1 -1
- package/lib/services/http/sole/sole-business-loss/sole-business-loss.service.d.ts +1 -1
- package/lib/services/http/sole/sole-contact/sole-contact.service.d.ts +1 -1
- package/lib/services/http/sole/sole-invoice/sole-invoice.service.d.ts +1 -1
- package/lib/services/http/sole/sole-invoice-template/sole-invoice-template.service.d.ts +1 -1
- package/lib/services/http/subscription/service-price.service.d.ts +1 -1
- package/lib/services/http/tax-review/tax-review-history/tax-review-history.service.d.ts +1 -1
- package/lib/services/http/tax-review/tax-review.service.d.ts +1 -1
- package/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.d.ts +1 -1
- package/lib/services/http/transaction/transaction.service.d.ts +1 -1
- package/lib/services/http/user/user-event-setting/user-event-setting.service.d.ts +1 -1
- package/lib/services/http/user/user-event-type/user-event-type.service.d.ts +1 -1
- package/lib/services/http/user/users-invite/users-invite.service.d.ts +1 -1
- package/lib/services/http/vehicle/vehicle-claim.service.d.ts +1 -1
- package/lib/services/http/vehicle/vehicle-logbook.service.d.ts +1 -1
- package/lib/services/http/vehicle/vehicle.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RestMethod } from "../../services/http/rest";
|
|
2
|
+
import { AbstractModel } from "./abstract-model";
|
|
3
|
+
/**
|
|
4
|
+
* Model, which children should be listened via event dispatcher service ising automatic events
|
|
5
|
+
*/
|
|
6
|
+
export declare class ObservableModel extends AbstractModel {
|
|
7
|
+
static getEventName(method: RestMethod): string;
|
|
8
|
+
}
|
|
@@ -10,8 +10,8 @@ import { BankAccountProperty } from '../bank/bank-account-property';
|
|
|
10
10
|
import { PropertyDocument } from '../document/property-document';
|
|
11
11
|
import { Depreciation } from '../depreciation/depreciation';
|
|
12
12
|
import { PropertySubscription } from './property-subscription';
|
|
13
|
-
import {
|
|
14
|
-
export declare class Property extends
|
|
13
|
+
import { ObservableModel } from '../observable-model';
|
|
14
|
+
export declare class Property extends ObservableModel {
|
|
15
15
|
id?: number;
|
|
16
16
|
photo?: string;
|
|
17
17
|
purchasePrice?: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ObservableModel } from '../../db/Models/observable-model';
|
|
1
2
|
import { AppEventTypeEnum } from './app-event-type.enum';
|
|
2
3
|
/**
|
|
3
4
|
* any event happened in the app, which needs to be handled somehow (distributed to other part of the app)
|
|
@@ -7,3 +8,11 @@ export declare class AppEvent<T> {
|
|
|
7
8
|
payload: T;
|
|
8
9
|
constructor(type: AppEventTypeEnum, payload: T);
|
|
9
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* @TODO Alex (TT-1777): temp name, replace AppEvent or rename this class when all services refactored
|
|
13
|
+
*/
|
|
14
|
+
export declare class AppEvent2 {
|
|
15
|
+
name: string;
|
|
16
|
+
items: ObservableModel[];
|
|
17
|
+
constructor(name: string, items: ObservableModel[]);
|
|
18
|
+
}
|
|
@@ -14,6 +14,7 @@ import { PropertySale } from './property-sale/property-sale';
|
|
|
14
14
|
import { unitOfTime } from 'moment';
|
|
15
15
|
import { TransactionCollection } from '../../collections/transaction/transaction.collection';
|
|
16
16
|
import { DepreciationCollection } from '../../collections/depreciation.collection';
|
|
17
|
+
import { PropertyCollection } from '../../collections';
|
|
17
18
|
/**
|
|
18
19
|
* propertySale docs - https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4209508353/Property+Sold+button
|
|
19
20
|
*/
|
|
@@ -23,6 +24,7 @@ export declare class Property extends PropertyBase implements Photoable, Documen
|
|
|
23
24
|
* Any assets acquired before this day are CGT exempt (because the tax didn't exist before this date).
|
|
24
25
|
*/
|
|
25
26
|
static preCGTAssetDate: Date;
|
|
27
|
+
static collectionClass: typeof PropertyCollection;
|
|
26
28
|
contractDate: Date;
|
|
27
29
|
settlementDate: Date;
|
|
28
30
|
address: Address;
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import { AppEvent } from '../../models/event/app-event';
|
|
1
|
+
import { AppEvent, AppEvent2 } from '../../models/event/app-event';
|
|
2
2
|
import { AppEventTypeEnum } from '../../models/event/app-event-type.enum';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
+
import { ObservableModel } from '../../db/Models/observable-model';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* @TODO Alex (TT-1777): replace old logic with the new when all services ready
|
|
8
|
+
* @TODO Alex (TT-1777): rename old logic and keep it for custom events
|
|
9
|
+
*/
|
|
5
10
|
export declare class EventDispatcherService {
|
|
6
11
|
private eventSubject;
|
|
12
|
+
private eventSubject2;
|
|
7
13
|
/**
|
|
8
14
|
* subscription to specific event type
|
|
9
15
|
*/
|
|
10
16
|
on(eventType: AppEventTypeEnum | AppEventTypeEnum[]): Observable<any>;
|
|
17
|
+
on2(eventName: string): Observable<ObservableModel[]>;
|
|
11
18
|
/**
|
|
12
19
|
* deliver new event
|
|
13
20
|
*/
|
|
14
21
|
dispatch<T>(event: AppEvent<T>): void;
|
|
22
|
+
dispatch2(event: AppEvent2): void;
|
|
15
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<EventDispatcherService, never>;
|
|
16
24
|
static ɵprov: i0.ɵɵInjectableDeclaration<EventDispatcherService>;
|
|
17
25
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { BankAccount as BankAccountBase } from '../../../../db/Models/bank/bank-account';
|
|
3
|
-
import { RestService } from '../../rest/rest.service';
|
|
3
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
4
4
|
import { BankAccount } from '../../../../models/bank/bank-account';
|
|
5
5
|
import { IEventListener } from '../../../../interfaces/event-listener.interface';
|
|
6
6
|
import { BankConnection } from '../../../../models/bank/bank-connection';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { BankConnection as BankConnectionBase } from '../../../../db/Models/bank/bank-connection';
|
|
3
3
|
import { BankConnection } from '../../../../models/bank/bank-connection';
|
|
4
|
-
import { RestService } from '../../rest/rest.service';
|
|
4
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
5
5
|
import { IEventListener } from '../../../../interfaces/event-listener.interface';
|
|
6
6
|
import { UserEventTypeTypeEnum } from '../../../../db/Enums/user-event-type-type.enum';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BankTransaction as BankTransactionBase } from '../../../../db/Models/bank/bank-transaction';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { RestService } from '../../rest/rest.service';
|
|
3
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
4
4
|
import { BankTransaction } from '../../../../models/bank/bank-transaction';
|
|
5
5
|
import { IEventListener } from '../../../../interfaces/event-listener.interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Bank as BankBase } from '../../../db/Models/bank/bank';
|
|
2
2
|
import { Bank } from '../../../models/bank/bank';
|
|
3
|
-
import { RestService } from '../rest/rest.service';
|
|
3
|
+
import { RestService } from '../rest/rest-old.service';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { BankAccount as BankAccountBase } from '../../../../db/Models/bank/bank-account';
|
|
3
|
-
import { RestService } from '../../rest/rest.service';
|
|
3
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
4
4
|
import { IEventListener } from '../../../../interfaces/event-listener.interface';
|
|
5
5
|
import { HttpClient } from '@angular/common/http';
|
|
6
6
|
import { EventDispatcherService } from '../../../event/event-dispatcher.service';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RestService } from '../../rest/rest.service';
|
|
1
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
2
2
|
import { ChartAccountsDepreciation as ChartAccountsDepreciationBase } from '../../../../db/Models/chart-accounts/chart-accounts-depreciation';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { ChartAccountsDepreciation } from '../../../../models/chart-accounts/chart-accounts-depreciation';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Chat as ChatBase } from '../../../db/Models/firm/chat';
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
3
|
import { SseService } from '../../event/sse.service';
|
|
4
|
-
import { RestService } from '../rest/rest.service';
|
|
4
|
+
import { RestService } from '../rest/rest-old.service';
|
|
5
5
|
import { Chat } from '../../../models/chat/chat';
|
|
6
6
|
import { EventDispatcherService } from '../../event/event-dispatcher.service';
|
|
7
7
|
import { ToastService } from '../../toast/toast.service';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Message as MessageBase } from '../../../../db/Models/firm/message';
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
3
|
import { Message } from '../../../../models/chat/message';
|
|
4
|
-
import { RestService } from '../../rest/rest.service';
|
|
4
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
5
5
|
import { EventDispatcherService } from '../../../event/event-dispatcher.service';
|
|
6
6
|
import { SseService } from '../../../event/sse.service';
|
|
7
7
|
import { ToastService } from '../../../toast/toast.service';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { Depreciation as DepreciationBase } from '../../../db/Models/depreciation/depreciation';
|
|
3
|
-
import { RestService } from '../rest/rest.service';
|
|
3
|
+
import { RestService } from '../rest/rest-old.service';
|
|
4
4
|
import { Depreciation } from '../../../models/depreciation/depreciation';
|
|
5
5
|
import { HttpClient } from '@angular/common/http';
|
|
6
6
|
import { EventDispatcherService } from '../../event/event-dispatcher.service';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DocumentFolder as DocumentFolderBase } from '../../../../db/Models/document/document-folder';
|
|
2
2
|
import { Document } from '../../../../models/document/document';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import { RestService } from '../../rest/rest.service';
|
|
4
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
5
5
|
import { DocumentFolder } from '../../../../models/document/document-folder';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Document as DocumentBase } from '../../../db/Models/document/document';
|
|
2
2
|
import { Document } from '../../../models';
|
|
3
|
-
import { RestService } from '../rest/rest.service';
|
|
3
|
+
import { RestService } from '../rest/rest-old.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class DocumentService extends RestService<DocumentBase, Document> {
|
|
6
6
|
url: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { ClientInvite as ClientInviteBase } from '../../../../db/Models/firm/client-invite';
|
|
3
|
-
import { RestService } from '../../rest/rest.service';
|
|
3
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
4
4
|
import { ClientInvite } from '../../../../models/client/client-invite';
|
|
5
5
|
import { IEventListener } from "../../../../interfaces/event-listener.interface";
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -2,7 +2,7 @@ import { ClientMovement as ClientMovementBase } from '../../../../db/Models/firm
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ClientMovementCollection } from '../../../../collections/client-movement.collection';
|
|
4
4
|
import { FirmTypeEnum } from '../../../../db/Enums/firm-type.enum';
|
|
5
|
-
import { RestService } from '../../rest/rest.service';
|
|
5
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
6
6
|
import { ClientMovement } from '../../../../models/client/client-movement';
|
|
7
7
|
import { IEventListener } from '../../../../interfaces/event-listener.interface';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RestService } from '../../rest/rest.service';
|
|
1
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
2
2
|
import { User as UserBase } from '../../../../db/Models/user/user';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { User } from '../../../../models/user/user';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EmployeeInvite as EmployeeInviteBase } from '../../../../db/Models/firm/employee-invite';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { EmployeeInvite } from '../../../../models/employee/employee-invite';
|
|
4
|
-
import { RestService } from '../../rest/rest.service';
|
|
4
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class EmployeeInviteService extends RestService<EmployeeInviteBase, EmployeeInvite> {
|
|
7
7
|
url: string;
|
package/lib/services/http/income-source/income-source-forecast/income-source-forecast.service.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IncomeSourceForecast as IncomeSourceForecastBase } from '../../../../db/Models/incomeSource/income-source-forecast';
|
|
2
|
-
import { RestService } from '../../rest/rest.service';
|
|
2
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
3
3
|
import { IncomeSourceForecast } from '../../../../models/income-source/income-source-forecast';
|
|
4
4
|
import { IEventListener } from '../../../../interfaces/event-listener.interface';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable, ReplaySubject } from 'rxjs';
|
|
2
2
|
import { IncomeSource as IncomeSourceBase } from '../../../db/Models/incomeSource/income-source';
|
|
3
|
-
import { RestService } from '../rest/rest.service';
|
|
3
|
+
import { RestService } from '../rest/rest-old.service';
|
|
4
4
|
import { IncomeSourceType } from '../../../models/income-source/income-source-type';
|
|
5
5
|
import { SalaryForecast } from '../../../models/income-source/salary-forecast';
|
|
6
6
|
import { IncomeSourceTypeEnum } from '../../../db/Enums/income-source-type.enum';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SalaryForecast as SalaryForecastBase } from '../../../../db/Models/incomeSource/salary-forecast';
|
|
2
|
-
import { RestService } from '../../rest/rest.service';
|
|
2
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
3
3
|
import { SalaryForecast } from '../../../../models/income-source/salary-forecast';
|
|
4
4
|
import { IEventListener } from '../../../../interfaces/event-listener.interface';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SoleForecast as SoleForecastBase } from '../../../../db/Models/sole/sole-forecast';
|
|
2
|
-
import { RestService } from '../../rest/rest.service';
|
|
2
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
3
3
|
import { SoleForecast } from '../../../../models/income-source/sole-forecast';
|
|
4
4
|
import { IEventListener } from '../../../../interfaces/event-listener.interface';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { Loan as LoanBase } from '../../../db/Models/loan/loan';
|
|
3
|
-
import { RestService } from '../rest/rest.service';
|
|
3
|
+
import { RestService } from '../rest/rest-old.service';
|
|
4
4
|
import { Loan } from '../../../models/loan/loan';
|
|
5
5
|
import { LoanPayout } from '../../../models/loan/loan-payout';
|
|
6
6
|
import { IEventListener } from '../../../interfaces/event-listener.interface';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropertyCategory as PropertyCategoryBase } from '../../../../db/Models/property/property-category';
|
|
2
|
-
import { RestService } from '../../rest/rest.service';
|
|
2
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
3
3
|
import { PropertyCategory } from '../../../../models/property/property-category';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropertyCategoryMovement } from '../../../../models/property/property-category-movement';
|
|
2
2
|
import { PropertyCategoryMovement as PropertyCategoryMovementBase } from '../../../../db/Models/property/property-category-movement';
|
|
3
|
-
import { RestService } from '../../rest/rest.service';
|
|
3
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class PropertyCategoryMovementService extends RestService<PropertyCategoryMovementBase, PropertyCategoryMovement> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { PropertyDocument as PropertyDocumentBase } from '../../../../db/Models/document/property-document';
|
|
3
3
|
import { PropertyDocument } from '../../../../models/property/property-document';
|
|
4
|
-
import { RestService } from '../../rest/rest.service';
|
|
4
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
5
5
|
import { IEventListener } from '../../../../interfaces/event-listener.interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropertySale as PropertySaleBase } from '../../../../db/Models/property/property-sale/property-sale';
|
|
2
2
|
import { PropertySale } from '../../../../models/property/property-sale/property-sale';
|
|
3
|
-
import { RestService } from '../../rest/rest.service';
|
|
3
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class PropertySaleService extends RestService<PropertySaleBase, PropertySale> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RestService } from '../../../rest/rest.service';
|
|
1
|
+
import { RestService } from '../../../rest/rest-old.service';
|
|
2
2
|
import { TaxExemption as BaseTaxExemption } from '../../../../../db/Models/property/property-sale/tax-exemption';
|
|
3
3
|
import { TaxExemption } from '../../../../../models/property/property-sale/tax-exemption';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { PropertyShare as PropertyShareBase } from '../../../../db/Models/property/property-share';
|
|
3
3
|
import { PropertyShare } from '../../../../models/property/property-share';
|
|
4
|
-
import { RestService } from '../../rest/rest.service';
|
|
4
|
+
import { RestService } from '../../rest/rest-old.service';
|
|
5
5
|
import { IEventListener } from '../../../../interfaces/event-listener.interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class PropertyShareService extends RestService<PropertyShareBase, PropertyShare> implements IEventListener {
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { Property as PropertyBase } from '../../../db/Models/property/property';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { RestService } from '../rest/rest.service';
|
|
4
3
|
import { Property } from '../../../models/property/property';
|
|
5
4
|
import { IEventListener } from '../../../interfaces/event-listener.interface';
|
|
5
|
+
import { RestService } from '../rest/rest.service';
|
|
6
|
+
import { PropertyCollection } from '../../../collections';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* @Todo Alex remove functionality related to PropertyShare
|
|
10
|
+
* @TODO Alex (TT-1777): replace all event listeners with the new this.listen()
|
|
9
11
|
* Service for work with Property
|
|
10
12
|
*/
|
|
11
|
-
export declare class PropertyService extends RestService<PropertyBase, Property> implements IEventListener {
|
|
13
|
+
export declare class PropertyService extends RestService<PropertyBase, Property, PropertyCollection> implements IEventListener {
|
|
12
14
|
modelClass: typeof Property;
|
|
13
|
-
|
|
15
|
+
collectionClass: typeof PropertyCollection;
|
|
16
|
+
entityUrl: string;
|
|
17
|
+
post(property: Property): Observable<Property>;
|
|
14
18
|
listenEvents(): void;
|
|
15
19
|
/**
|
|
16
20
|
* Update cache when share invitation accepted
|
|
@@ -25,9 +29,7 @@ export declare class PropertyService extends RestService<PropertyBase, Property>
|
|
|
25
29
|
*/
|
|
26
30
|
private listenSalesAdded;
|
|
27
31
|
private listenSalesDeleted;
|
|
28
|
-
|
|
29
|
-
updateDepreciationCalculation(property: Property): Observable<Property>;
|
|
30
|
-
getByCategoryId(id: number): Observable<Property[]>;
|
|
32
|
+
updateDepreciationCalculation(property: Property): Observable<void>;
|
|
31
33
|
/**
|
|
32
34
|
* Activate deactivated property
|
|
33
35
|
*/
|
|
@@ -42,11 +44,6 @@ export declare class PropertyService extends RestService<PropertyBase, Property>
|
|
|
42
44
|
* @param photoFormData FormData with property photo image
|
|
43
45
|
*/
|
|
44
46
|
updatePhoto(property: Property, photoFormData: FormData): Observable<void>;
|
|
45
|
-
getByShareId(id: number): Observable<Property[]>;
|
|
46
|
-
/**
|
|
47
|
-
* Get list of active user's properties
|
|
48
|
-
*/
|
|
49
|
-
getActive(): Observable<Property[]>;
|
|
50
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<PropertyService, never>;
|
|
51
48
|
static ɵprov: i0.ɵɵInjectableDeclaration<PropertyService>;
|
|
52
49
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type HttpMethod = 'get' | 'post' | 'put' | 'delete';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type RestMethod = 'get' | 'post' | 'postBatch' | 'put' | 'putBatch' | 'delete' | 'deleteBatch';
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Observable, ReplaySubject } from 'rxjs';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { EventDispatcherService } from '../../event/event-dispatcher.service';
|
|
4
|
+
import { ToastService } from '../../toast/toast.service';
|
|
5
|
+
import { IEventListener } from '../../../interfaces/event-listener.interface';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Abstract base service that implements common services functionality
|
|
9
|
+
* and describe abstract methods/properties that have to be implemented in child services
|
|
10
|
+
* Model - entity service is working with
|
|
11
|
+
* BaseModel - base entity model that extends by Model
|
|
12
|
+
* @TODO TT-1777 Alex: remove when all services refactored
|
|
13
|
+
*/
|
|
14
|
+
export declare abstract class RestService<BaseModel, Model extends BaseModel> implements IEventListener {
|
|
15
|
+
protected http: HttpClient;
|
|
16
|
+
protected eventDispatcherService: EventDispatcherService;
|
|
17
|
+
protected environment: any;
|
|
18
|
+
protected toastService: ToastService;
|
|
19
|
+
abstract url: string;
|
|
20
|
+
abstract modelClass: any;
|
|
21
|
+
protected cache: Model[];
|
|
22
|
+
protected cacheSubject: ReplaySubject<Model[]>;
|
|
23
|
+
protected isHydra: boolean;
|
|
24
|
+
messageCreated: string;
|
|
25
|
+
messageCreatedBatch: string;
|
|
26
|
+
messageUpdated: string;
|
|
27
|
+
messageUpdatedBatch: string;
|
|
28
|
+
messageDeleted: string;
|
|
29
|
+
messageDeletedBatch: string;
|
|
30
|
+
constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any, toastService: ToastService);
|
|
31
|
+
/**
|
|
32
|
+
* get cached list of all instances
|
|
33
|
+
*/
|
|
34
|
+
get(): Observable<Model[]>;
|
|
35
|
+
/**
|
|
36
|
+
* get instance by id from cache
|
|
37
|
+
* @param id ID of required item
|
|
38
|
+
*/
|
|
39
|
+
findById(id: number): Observable<Model>;
|
|
40
|
+
find(id: number): Model;
|
|
41
|
+
/**
|
|
42
|
+
* add new instance and update cache
|
|
43
|
+
*/
|
|
44
|
+
private create;
|
|
45
|
+
/**
|
|
46
|
+
* @TODO Alex TT-1777 rename to post
|
|
47
|
+
*/
|
|
48
|
+
add(model: Model, shouldUpdateCache?: boolean): Observable<Model>;
|
|
49
|
+
/**
|
|
50
|
+
* @TODO Alex TT-1777 rename to upload
|
|
51
|
+
*/
|
|
52
|
+
postForm(file: File, params?: {
|
|
53
|
+
[key: string]: string;
|
|
54
|
+
}): Observable<Model>;
|
|
55
|
+
/**
|
|
56
|
+
* Add several new items
|
|
57
|
+
* @param models Array of new items for saving
|
|
58
|
+
* @param queryParams query parameters for request
|
|
59
|
+
* @TODO Alex TT-1777 rename to postBatch
|
|
60
|
+
*/
|
|
61
|
+
addBatch(models: Model[], queryParams?: object): Observable<Model[]>;
|
|
62
|
+
/**
|
|
63
|
+
* Update item
|
|
64
|
+
* @param model Existing instance for updating
|
|
65
|
+
* @param queryParams query parameters for request
|
|
66
|
+
* @TODO Alex TT-1777 rename to put
|
|
67
|
+
*/
|
|
68
|
+
update(model: Model, queryParams?: object): Observable<Model>;
|
|
69
|
+
/**
|
|
70
|
+
* Update several items
|
|
71
|
+
* @param models Array of items for updating
|
|
72
|
+
* @param queryParams query parameters for request
|
|
73
|
+
* TODO Alex TT-1777 rename to putBatch
|
|
74
|
+
*/
|
|
75
|
+
updateBatch(models: Model[], queryParams?: object): Observable<Model[]>;
|
|
76
|
+
/**
|
|
77
|
+
* delete instance of class
|
|
78
|
+
* @param model Class instance for deleting
|
|
79
|
+
*/
|
|
80
|
+
delete(model: Model): Observable<void>;
|
|
81
|
+
/**
|
|
82
|
+
* delete multiple instances of class
|
|
83
|
+
* @param models Class instances array for deleting
|
|
84
|
+
*/
|
|
85
|
+
deleteBatch(models: Model[]): Observable<void>;
|
|
86
|
+
/**
|
|
87
|
+
* clear service cache
|
|
88
|
+
*/
|
|
89
|
+
resetCache(): void;
|
|
90
|
+
/**
|
|
91
|
+
* get list of base class instances directly from backend
|
|
92
|
+
*/
|
|
93
|
+
protected fetch(): Observable<Model[]>;
|
|
94
|
+
/**
|
|
95
|
+
* Update cache subject with current cache array value
|
|
96
|
+
*/
|
|
97
|
+
protected updateCache(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Create new instance of class
|
|
100
|
+
* @param model The class for which you want to create an instance
|
|
101
|
+
* @param baseModel base model instance that we will use as constructor options
|
|
102
|
+
*/
|
|
103
|
+
protected createModelInstance(model: new (bm: BaseModel) => Model, baseModel: BaseModel): Model;
|
|
104
|
+
/**
|
|
105
|
+
* Method that call all listeners. Empty by default. Should be redefined by child services if required
|
|
106
|
+
*/
|
|
107
|
+
listenEvents(): void;
|
|
108
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RestService<any, any>, never>;
|
|
109
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RestService<any, any>>;
|
|
110
|
+
}
|