@abyss-project/banking 1.0.2 → 1.0.4

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.
Files changed (135) hide show
  1. package/dist/api/abyss.admin.api.d.ts +2 -2
  2. package/dist/api/abyss.admin.api.js +8 -8
  3. package/dist/api/banking.admin.api.d.ts +13 -13
  4. package/dist/api/banking.admin.api.js +52 -52
  5. package/dist/api/banking.api.d.ts +20 -18
  6. package/dist/api/banking.api.js +86 -76
  7. package/dist/api/categorization-rule.admin.api.d.ts +7 -7
  8. package/dist/api/categorization-rule.admin.api.js +28 -28
  9. package/dist/api/categorization-rule.api.d.ts +7 -7
  10. package/dist/api/categorization-rule.api.js +28 -28
  11. package/dist/api/category.admin.api.d.ts +6 -6
  12. package/dist/api/category.admin.api.js +27 -27
  13. package/dist/api/category.api.d.ts +9 -9
  14. package/dist/api/category.api.js +34 -34
  15. package/dist/api/index.d.ts +12 -12
  16. package/dist/api/index.js +28 -24
  17. package/dist/api/monitor.api.d.ts +2 -2
  18. package/dist/api/monitor.api.js +8 -8
  19. package/dist/api/panel.admin.api.d.ts +6 -6
  20. package/dist/api/panel.admin.api.js +27 -27
  21. package/dist/api/panel.api.d.ts +6 -6
  22. package/dist/api/panel.api.js +28 -28
  23. package/dist/api/user.admin.api.d.ts +5 -5
  24. package/dist/api/user.admin.api.js +23 -23
  25. package/dist/api/user.api.d.ts +4 -4
  26. package/dist/api/user.api.js +17 -17
  27. package/dist/index.d.ts +19 -19
  28. package/dist/index.js +90 -86
  29. package/dist/types/enum/aggregator-type.enum.d.ts +4 -4
  30. package/dist/types/enum/aggregator-type.enum.js +8 -8
  31. package/dist/types/enum/api-error.enum.d.ts +16 -16
  32. package/dist/types/enum/api-error.enum.js +21 -21
  33. package/dist/types/enum/bank-connection-status.enum.d.ts +6 -6
  34. package/dist/types/enum/bank-connection-status.enum.js +10 -10
  35. package/dist/types/enum/cash-account-type.enum.d.ts +26 -26
  36. package/dist/types/enum/cash-account-type.enum.js +30 -30
  37. package/dist/types/enum/index.d.ts +6 -6
  38. package/dist/types/enum/index.js +22 -18
  39. package/dist/types/enum/panel-component-type.enum.d.ts +16 -12
  40. package/dist/types/enum/panel-component-type.enum.js +20 -16
  41. package/dist/types/enum/period-configuration.enum.d.ts +7 -7
  42. package/dist/types/enum/period-configuration.enum.js +11 -11
  43. package/dist/types/index.d.ts +2 -2
  44. package/dist/types/index.js +18 -14
  45. package/dist/types/interface/api/index.d.ts +27 -27
  46. package/dist/types/interface/api/index.js +43 -39
  47. package/dist/types/interface/api/requests/abyss.admin.request.d.ts +3 -3
  48. package/dist/types/interface/api/requests/abyss.admin.request.js +2 -2
  49. package/dist/types/interface/api/requests/banking.admin.request.d.ts +47 -47
  50. package/dist/types/interface/api/requests/banking.admin.request.js +2 -2
  51. package/dist/types/interface/api/requests/banking.request.d.ts +83 -75
  52. package/dist/types/interface/api/requests/banking.request.js +2 -2
  53. package/dist/types/interface/api/requests/categorization-rule.admin.request.d.ts +34 -34
  54. package/dist/types/interface/api/requests/categorization-rule.admin.request.js +2 -2
  55. package/dist/types/interface/api/requests/categorization-rule.request.d.ts +32 -32
  56. package/dist/types/interface/api/requests/categorization-rule.request.js +2 -2
  57. package/dist/types/interface/api/requests/category.admin.request.d.ts +22 -22
  58. package/dist/types/interface/api/requests/category.admin.request.js +2 -2
  59. package/dist/types/interface/api/requests/category.request.d.ts +26 -26
  60. package/dist/types/interface/api/requests/category.request.js +2 -2
  61. package/dist/types/interface/api/requests/panel.admin.request.d.ts +23 -23
  62. package/dist/types/interface/api/requests/panel.admin.request.js +2 -2
  63. package/dist/types/interface/api/requests/panel.request.d.ts +22 -22
  64. package/dist/types/interface/api/requests/panel.request.js +2 -2
  65. package/dist/types/interface/api/requests/user.admin.request.d.ts +15 -15
  66. package/dist/types/interface/api/requests/user.admin.request.js +2 -2
  67. package/dist/types/interface/api/requests/user.request.d.ts +2 -2
  68. package/dist/types/interface/api/requests/user.request.js +2 -2
  69. package/dist/types/interface/api/responses/abyss.admin.response.d.ts +6 -6
  70. package/dist/types/interface/api/responses/abyss.admin.response.js +2 -2
  71. package/dist/types/interface/api/responses/banking.admin.response.d.ts +48 -48
  72. package/dist/types/interface/api/responses/banking.admin.response.js +2 -2
  73. package/dist/types/interface/api/responses/banking.response.d.ts +112 -86
  74. package/dist/types/interface/api/responses/banking.response.js +2 -2
  75. package/dist/types/interface/api/responses/categorization-rule.admin.response.d.ts +22 -22
  76. package/dist/types/interface/api/responses/categorization-rule.admin.response.js +2 -2
  77. package/dist/types/interface/api/responses/categorization-rule.response.d.ts +22 -22
  78. package/dist/types/interface/api/responses/categorization-rule.response.js +2 -2
  79. package/dist/types/interface/api/responses/category.admin.response.d.ts +19 -19
  80. package/dist/types/interface/api/responses/category.admin.response.js +2 -2
  81. package/dist/types/interface/api/responses/category.response.d.ts +32 -32
  82. package/dist/types/interface/api/responses/category.response.js +2 -2
  83. package/dist/types/interface/api/responses/monitor.response.d.ts +7 -7
  84. package/dist/types/interface/api/responses/monitor.response.js +2 -2
  85. package/dist/types/interface/api/responses/panel.admin.response.d.ts +19 -19
  86. package/dist/types/interface/api/responses/panel.admin.response.js +2 -2
  87. package/dist/types/interface/api/responses/panel.response.d.ts +19 -19
  88. package/dist/types/interface/api/responses/panel.response.js +2 -2
  89. package/dist/types/interface/api/responses/storage.admin.response.d.ts +3 -3
  90. package/dist/types/interface/api/responses/storage.admin.response.js +2 -2
  91. package/dist/types/interface/api/responses/user.admin.response.d.ts +14 -14
  92. package/dist/types/interface/api/responses/user.admin.response.js +2 -2
  93. package/dist/types/interface/api/responses/user.response.d.ts +13 -13
  94. package/dist/types/interface/api/responses/user.response.js +2 -2
  95. package/dist/types/interface/api/type-message/api-error.d.ts +8 -8
  96. package/dist/types/interface/api/type-message/api-error.js +2 -2
  97. package/dist/types/interface/api/type-message/base-order.d.ts +4 -4
  98. package/dist/types/interface/api/type-message/base-order.js +2 -2
  99. package/dist/types/interface/api/type-message/base-paginate.d.ts +10 -10
  100. package/dist/types/interface/api/type-message/base-paginate.js +2 -2
  101. package/dist/types/interface/api/type-message/response.d.ts +5 -5
  102. package/dist/types/interface/api/type-message/response.js +2 -2
  103. package/dist/types/interface/index.d.ts +13 -13
  104. package/dist/types/interface/index.js +29 -25
  105. package/dist/types/interface/models/account-transaction.model.d.ts +46 -46
  106. package/dist/types/interface/models/account-transaction.model.js +2 -2
  107. package/dist/types/interface/models/aggregator-bank.model.d.ts +12 -12
  108. package/dist/types/interface/models/aggregator-bank.model.js +2 -2
  109. package/dist/types/interface/models/aggregator-link.model.d.ts +12 -12
  110. package/dist/types/interface/models/aggregator-link.model.js +2 -2
  111. package/dist/types/interface/models/bank-account-history.model.d.ts +11 -11
  112. package/dist/types/interface/models/bank-account-history.model.js +2 -2
  113. package/dist/types/interface/models/bank-account.model.d.ts +26 -26
  114. package/dist/types/interface/models/bank-account.model.js +2 -2
  115. package/dist/types/interface/models/bank-connection.model.d.ts +17 -17
  116. package/dist/types/interface/models/bank-connection.model.js +2 -2
  117. package/dist/types/interface/models/categorization-rule-category.model.d.ts +11 -11
  118. package/dist/types/interface/models/categorization-rule-category.model.js +2 -2
  119. package/dist/types/interface/models/categorization-rule.model.d.ts +44 -44
  120. package/dist/types/interface/models/categorization-rule.model.js +2 -2
  121. package/dist/types/interface/models/category.model.d.ts +14 -14
  122. package/dist/types/interface/models/category.model.js +2 -2
  123. package/dist/types/interface/models/panel.model.d.ts +121 -108
  124. package/dist/types/interface/models/panel.model.js +2 -2
  125. package/dist/types/interface/models/transaction-category.model.d.ts +14 -14
  126. package/dist/types/interface/models/transaction-category.model.js +2 -2
  127. package/dist/types/interface/models/user.model.d.ts +13 -13
  128. package/dist/types/interface/models/user.model.js +2 -2
  129. package/dist/utils/error.utils.d.ts +15 -15
  130. package/dist/utils/error.utils.js +24 -24
  131. package/dist/utils/index.d.ts +1 -1
  132. package/dist/utils/index.js +17 -13
  133. package/package.json +5 -6
  134. package/dist/types/interface/models/bank-account-transaction.model.d.ts +0 -14
  135. package/dist/types/interface/models/bank-account-transaction.model.js +0 -2
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +1,12 @@
1
- import { AggregatorType } from '../../enum';
2
- export interface IAggregatorBank {
3
- id?: string;
4
- aggregatorType: AggregatorType;
5
- aggregatorBankId: string;
6
- logoUrl: string;
7
- name: string;
8
- bic: string;
9
- countries: string[];
10
- updatedAt?: Date;
11
- createdAt?: Date;
12
- }
1
+ import { AggregatorType } from '../../enum';
2
+ export interface IAggregatorBank {
3
+ id?: string;
4
+ aggregatorType: AggregatorType;
5
+ aggregatorBankId: string;
6
+ logoUrl: string;
7
+ name: string;
8
+ bic: string;
9
+ countries: string[];
10
+ updatedAt?: Date;
11
+ createdAt?: Date;
12
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +1,12 @@
1
- import { AggregatorType } from '../../enum';
2
- import { IBankConnection } from './bank-connection.model';
3
- import { IUser } from './user.model';
4
- export interface IAggregatorLink {
5
- id?: string;
6
- type: AggregatorType;
7
- userId: string;
8
- updatedAt?: Date;
9
- createdAt?: Date;
10
- user?: IUser;
11
- bankConnection?: IBankConnection[];
12
- }
1
+ import { AggregatorType } from '../../enum';
2
+ import { IBankConnection } from './bank-connection.model';
3
+ import { IUser } from './user.model';
4
+ export interface IAggregatorLink {
5
+ id?: string;
6
+ type: AggregatorType;
7
+ userId: string;
8
+ updatedAt?: Date;
9
+ createdAt?: Date;
10
+ user?: IUser;
11
+ bankConnection?: IBankConnection[];
12
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +1,11 @@
1
- import { IBankAccount } from './bank-account.model';
2
- export interface IBankAccountHistory {
3
- id?: string;
4
- expectedBalance: number;
5
- availableBalance: number;
6
- date: Date;
7
- bankAccountId: string;
8
- updatedAt?: Date;
9
- createdAt?: Date;
10
- bankAccount?: IBankAccount;
11
- }
1
+ import { IBankAccount } from './bank-account.model';
2
+ export interface IBankAccountHistory {
3
+ id?: string;
4
+ expectedBalance: number;
5
+ availableBalance: number;
6
+ date: Date;
7
+ bankAccountId: string;
8
+ updatedAt?: Date;
9
+ createdAt?: Date;
10
+ bankAccount?: IBankAccount;
11
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,26 +1,26 @@
1
- import { CashAccountType } from '../../enum';
2
- import { IAccountTransaction } from './account-transaction.model';
3
- import { IBankAccountHistory } from './bank-account-history.model';
4
- import { IBankConnection } from './bank-connection.model';
5
- export interface IBankAccount {
6
- id?: string;
7
- name: string;
8
- commonName: string | null;
9
- ownerName: string | null;
10
- currency: string;
11
- iban: string;
12
- color: string;
13
- cashAccountType: CashAccountType;
14
- expectedBalance: number;
15
- availableBalance: number;
16
- aggregatorAccountId: string;
17
- aggregatorCreatedAt: Date;
18
- bankConnectionId: string;
19
- lastRefresh: Date | null;
20
- isMasked: boolean;
21
- updatedAt?: Date;
22
- createdAt?: Date;
23
- bankConnection?: IBankConnection;
24
- accountTransaction?: IAccountTransaction[];
25
- bankAccountHistory?: IBankAccountHistory[];
26
- }
1
+ import { CashAccountType } from '../../enum';
2
+ import { IAccountTransaction } from './account-transaction.model';
3
+ import { IBankAccountHistory } from './bank-account-history.model';
4
+ import { IBankConnection } from './bank-connection.model';
5
+ export interface IBankAccount {
6
+ id?: string;
7
+ name: string;
8
+ commonName: string | null;
9
+ ownerName: string | null;
10
+ currency: string;
11
+ iban: string;
12
+ color: string;
13
+ cashAccountType: CashAccountType;
14
+ expectedBalance: number;
15
+ availableBalance: number;
16
+ aggregatorAccountId: string;
17
+ aggregatorCreatedAt: Date;
18
+ bankConnectionId: string;
19
+ lastRefresh: Date | null;
20
+ isMasked: boolean;
21
+ updatedAt?: Date;
22
+ createdAt?: Date;
23
+ bankConnection?: IBankConnection;
24
+ accountTransaction?: IAccountTransaction[];
25
+ bankAccountHistory?: IBankAccountHistory[];
26
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,17 +1,17 @@
1
- import { BankConnectionStatus } from '../../enum';
2
- import { IAggregatorLink } from './aggregator-link.model';
3
- import { IBankAccount } from './bank-account.model';
4
- export interface IBankConnection {
5
- id?: string;
6
- aggregatorConnectionId: string;
7
- aggregatorAgreementId: string;
8
- aggregatorBankId: string;
9
- aggregatorLinkId: string;
10
- status: BankConnectionStatus;
11
- lastRefresh: Date | null;
12
- confirmedAt: Date | null;
13
- updatedAt?: Date;
14
- createdAt?: Date;
15
- aggregatorLink?: IAggregatorLink;
16
- bankAccount?: IBankAccount[];
17
- }
1
+ import { BankConnectionStatus } from '../../enum';
2
+ import { IAggregatorLink } from './aggregator-link.model';
3
+ import { IBankAccount } from './bank-account.model';
4
+ export interface IBankConnection {
5
+ id?: string;
6
+ aggregatorConnectionId: string;
7
+ aggregatorAgreementId: string;
8
+ aggregatorBankId: string;
9
+ aggregatorLinkId: string;
10
+ status: BankConnectionStatus;
11
+ lastRefresh: Date | null;
12
+ confirmedAt: Date | null;
13
+ updatedAt?: Date;
14
+ createdAt?: Date;
15
+ aggregatorLink?: IAggregatorLink;
16
+ bankAccount?: IBankAccount[];
17
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +1,11 @@
1
- import { ICategorizationRule } from './categorization-rule.model';
2
- import { ICategory } from './category.model';
3
- export interface ICategorizationRuleCategory {
4
- id?: string;
5
- categoryId: string;
6
- categorizationRuleId: string;
7
- updatedAt?: Date;
8
- createdAt?: Date;
9
- category?: ICategory;
10
- categorizationRule?: ICategorizationRule;
11
- }
1
+ import { ICategorizationRule } from './categorization-rule.model';
2
+ import { ICategory } from './category.model';
3
+ export interface ICategorizationRuleCategory {
4
+ id?: string;
5
+ categoryId: string;
6
+ categorizationRuleId: string;
7
+ updatedAt?: Date;
8
+ createdAt?: Date;
9
+ category?: ICategory;
10
+ categorizationRule?: ICategorizationRule;
11
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,44 +1,44 @@
1
- import { ICategorizationRuleCategory } from './categorization-rule-category.model';
2
- import { ICategory } from './category.model';
3
- import { ITransactionCategory } from './transaction-category.model';
4
- import { IUser } from './user.model';
5
- export interface ICategorizationRule {
6
- id?: string;
7
- name: string;
8
- description: string | null;
9
- isActive: boolean;
10
- rules: CategorizationRules[];
11
- userId: string;
12
- updatedAt?: Date;
13
- createdAt?: Date;
14
- deletedAt?: Date;
15
- user?: IUser;
16
- transactionCategory?: ITransactionCategory[];
17
- category?: ICategory[];
18
- categorizationRuleCategory?: ICategorizationRuleCategory[];
19
- }
20
- export declare type CategorizationRules = {
21
- label?: {
22
- shouldEq?: string;
23
- shouldContains?: string[];
24
- shouldNotContains?: string[];
25
- shouldStartsWith?: string[];
26
- shouldNotStartsWith?: string[];
27
- shouldEndsWith?: string[];
28
- shouldNotEndsWith?: string[];
29
- };
30
- amount?: {
31
- min?: number | null;
32
- minOrEq?: number | null;
33
- max?: number | null;
34
- maxOrEq?: number | null;
35
- };
36
- date?: {
37
- before?: Date | null;
38
- after?: Date | null;
39
- dayOfMonth?: number[] | null;
40
- dayOfWeek?: number[] | null;
41
- month?: number[] | null;
42
- year?: number[] | null;
43
- };
44
- };
1
+ import { ICategorizationRuleCategory } from './categorization-rule-category.model';
2
+ import { ICategory } from './category.model';
3
+ import { ITransactionCategory } from './transaction-category.model';
4
+ import { IUser } from './user.model';
5
+ export interface ICategorizationRule {
6
+ id?: string;
7
+ name: string;
8
+ description: string | null;
9
+ isActive: boolean;
10
+ rules: CategorizationRules[];
11
+ userId: string;
12
+ updatedAt?: Date;
13
+ createdAt?: Date;
14
+ deletedAt?: Date;
15
+ user?: IUser;
16
+ transactionCategory?: ITransactionCategory[];
17
+ category?: ICategory[];
18
+ categorizationRuleCategory?: ICategorizationRuleCategory[];
19
+ }
20
+ export type CategorizationRules = {
21
+ label?: {
22
+ shouldEq?: string;
23
+ shouldContains?: string[];
24
+ shouldNotContains?: string[];
25
+ shouldStartsWith?: string[];
26
+ shouldNotStartsWith?: string[];
27
+ shouldEndsWith?: string[];
28
+ shouldNotEndsWith?: string[];
29
+ };
30
+ amount?: {
31
+ min?: number | null;
32
+ minOrEq?: number | null;
33
+ max?: number | null;
34
+ maxOrEq?: number | null;
35
+ };
36
+ date?: {
37
+ before?: Date | null;
38
+ after?: Date | null;
39
+ dayOfMonth?: number[] | null;
40
+ dayOfWeek?: number[] | null;
41
+ month?: number[] | null;
42
+ year?: number[] | null;
43
+ };
44
+ };
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,14 +1,14 @@
1
- import { ICategorizationRule } from './categorization-rule.model';
2
- import { ITransactionCategory } from './transaction-category.model';
3
- import { IUser } from './user.model';
4
- export interface ICategory {
5
- id?: string;
6
- name: string;
7
- color: string;
8
- userId: string;
9
- updatedAt?: Date;
10
- createdAt?: Date;
11
- user?: IUser;
12
- transactionCategory?: ITransactionCategory[];
13
- categorizationRule?: ICategorizationRule[];
14
- }
1
+ import { ICategorizationRule } from './categorization-rule.model';
2
+ import { ITransactionCategory } from './transaction-category.model';
3
+ import { IUser } from './user.model';
4
+ export interface ICategory {
5
+ id?: string;
6
+ name: string;
7
+ color: string;
8
+ userId: string;
9
+ updatedAt?: Date;
10
+ createdAt?: Date;
11
+ user?: IUser;
12
+ transactionCategory?: ITransactionCategory[];
13
+ categorizationRule?: ICategorizationRule[];
14
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,108 +1,121 @@
1
- import { PeriodConfiguration } from '../../enum';
2
- import { PanelComponentType } from '../../enum/panel-component-type.enum';
3
- import { IUser } from './user.model';
4
- export interface IPanel {
5
- id?: string;
6
- name: string;
7
- composition: PanelComposition;
8
- userId: string;
9
- updatedAt?: Date;
10
- createdAt?: Date;
11
- user?: IUser;
12
- }
13
- export declare type PanelComposition = {
14
- shouldIncludeHeaderCards: boolean;
15
- config: PanelComponentConfig;
16
- elements: {
17
- id: string;
18
- title?: string;
19
- config: PanelComponentConfig;
20
- components: PanelComponent[];
21
- layout: {
22
- width: number;
23
- };
24
- }[];
25
- };
26
- export declare type PanelComponent = {
27
- id: string;
28
- config: PanelComponentConfig;
29
- title?: string;
30
- layout: {
31
- width: number;
32
- };
33
- } & (AccountBalancePanelComponent | AccountCashPositionPanelComponent | SumPerCategoryPanelComponent | SumPerCategoryPerMonthPanelComponent | TransactionPerAccountPanelComponent | TransactionPerCategoryPanelComponent | TransactionPerDayPanelComponent | TransactionTablePanelComponent | PeriodReportPanelComponent | MonthlyReportPanelComponent);
34
- export declare type PanelComponentConfig = {
35
- period: {
36
- startDate: Date | null;
37
- endDate: Date | null;
38
- shouldSyncWithRemote: boolean;
39
- periodConfiguration: PeriodConfiguration | null;
40
- };
41
- bankAccount: {
42
- selectedIds: string[] | null;
43
- shouldSyncWithRemote: boolean;
44
- };
45
- currency: {
46
- singleCurrency: string | null;
47
- multipleCurrency: string[] | null;
48
- shouldSyncWithRemote: boolean;
49
- };
50
- transaction: {
51
- shouldIncludeUnCategorized: boolean;
52
- shouldSyncWithRemote: boolean;
53
- categories: {
54
- filterCategories: string[] | null;
55
- shouldSyncWithRemote: boolean;
56
- };
57
- };
58
- menu: {
59
- enableSelectSingleCurrency: boolean;
60
- enableSelectMultipleCurrency: boolean;
61
- enableSelectDate: boolean;
62
- enableSelectCategories: boolean;
63
- enableSelectBankAccountIds: boolean;
64
- enableSelectUnCategorized: boolean;
65
- };
66
- };
67
- export declare type AccountBalancePanelComponent = {
68
- type: PanelComponentType.ACCOUNT_BALANCE;
69
- shouldDisplaySelectCurrency?: boolean;
70
- shouldDisplaySelectBankAccounts?: boolean;
71
- };
72
- export declare type AccountCashPositionPanelComponent = {
73
- type: PanelComponentType.ACCOUNT_CASH_POSITION;
74
- shouldDisplayTable?: boolean;
75
- };
76
- export declare type SumPerCategoryPanelComponent = {
77
- type: PanelComponentType.SUM_PER_CATEGORY;
78
- shouldStack?: boolean;
79
- shouldDisplayCountTransaction?: boolean;
80
- };
81
- export declare type SumPerCategoryPerMonthPanelComponent = {
82
- type: PanelComponentType.SUM_PER_CATEGORY_PER_MONTH;
83
- shouldStack?: boolean;
84
- shouldDisplayTable?: boolean;
85
- shouldDisplayCountTransaction?: boolean;
86
- shouldGroupByCategoryByDefault?: boolean;
87
- shouldDisplaySpeedUpByDefault?: boolean;
88
- };
89
- export declare type TransactionPerAccountPanelComponent = {
90
- type: PanelComponentType.TRANSACTION_PER_ACCOUNT;
91
- };
92
- export declare type TransactionPerCategoryPanelComponent = {
93
- type: PanelComponentType.TRANSACTION_PER_CATEGORY;
94
- shouldDisplaySumTransaction?: boolean;
95
- };
96
- export declare type TransactionPerDayPanelComponent = {
97
- type: PanelComponentType.TRANSACTION_PER_DAY;
98
- };
99
- export declare type TransactionTablePanelComponent = {
100
- type: PanelComponentType.TRANSACTION_TABLE;
101
- };
102
- export declare type PeriodReportPanelComponent = {
103
- type: PanelComponentType.PERIOD_REPORT;
104
- shouldDisplaySelectBankAccounts?: boolean;
105
- };
106
- export declare type MonthlyReportPanelComponent = {
107
- type: PanelComponentType.MONTHLY_REPORT;
108
- };
1
+ import { PeriodConfiguration } from '../../enum';
2
+ import { PanelComponentType } from '../../enum/panel-component-type.enum';
3
+ import { IUser } from './user.model';
4
+ export interface IPanel {
5
+ id?: string;
6
+ name: string;
7
+ composition: PanelComposition;
8
+ userId: string;
9
+ updatedAt?: Date;
10
+ createdAt?: Date;
11
+ user?: IUser;
12
+ }
13
+ export type PanelComposition = {
14
+ shouldIncludeHeaderCards: boolean;
15
+ config: PanelComponentConfig;
16
+ elements: {
17
+ id: string;
18
+ title?: string;
19
+ config: PanelComponentConfig;
20
+ components: PanelComponent[];
21
+ layout: {
22
+ width: number;
23
+ };
24
+ }[];
25
+ };
26
+ export type PanelComponent = {
27
+ id: string;
28
+ config: PanelComponentConfig;
29
+ title?: string;
30
+ layout: {
31
+ width: number;
32
+ };
33
+ } & (AccountBalancePanelComponent | AccountCashPositionPanelComponent | SumPerCategoryPanelComponent | SumPerCategoryPerMonthPanelComponent | TransactionPerAccountPanelComponent | TransactionPerCategoryPanelComponent | TransactionPerDayPanelComponent | TransactionTablePanelComponent | PeriodReportPanelComponent | MonthlyReportPanelComponent | MonthlyEvolutionPanelComponent | CashPositionComparisonPanelComponent | TopOutcomesPanelComponent | TopIncomesPanelComponent);
34
+ export type PanelComponentConfig = {
35
+ period: {
36
+ startDate: Date | null;
37
+ endDate: Date | null;
38
+ shouldSyncWithRemote: boolean;
39
+ periodConfiguration: PeriodConfiguration | null;
40
+ };
41
+ bankAccount: {
42
+ selectedIds: string[] | null;
43
+ shouldSyncWithRemote: boolean;
44
+ };
45
+ currency: {
46
+ singleCurrency: string | null;
47
+ multipleCurrency: string[] | null;
48
+ shouldSyncWithRemote: boolean;
49
+ };
50
+ transaction: {
51
+ shouldIncludeUnCategorized: boolean;
52
+ shouldSyncWithRemote: boolean;
53
+ categories: {
54
+ filterCategories: string[] | null;
55
+ shouldSyncWithRemote: boolean;
56
+ };
57
+ };
58
+ menu: {
59
+ enableSelectSingleCurrency: boolean;
60
+ enableSelectMultipleCurrency: boolean;
61
+ enableSelectDate: boolean;
62
+ enableSelectCategories: boolean;
63
+ enableSelectBankAccountIds: boolean;
64
+ enableSelectSingleBankAccountId?: boolean;
65
+ enableSelectUnCategorized: boolean;
66
+ };
67
+ };
68
+ export type AccountBalancePanelComponent = {
69
+ type: PanelComponentType.ACCOUNT_BALANCE;
70
+ shouldDisplaySelectCurrency?: boolean;
71
+ shouldDisplaySelectBankAccounts?: boolean;
72
+ };
73
+ export type AccountCashPositionPanelComponent = {
74
+ type: PanelComponentType.ACCOUNT_CASH_POSITION;
75
+ shouldDisplayTable?: boolean;
76
+ };
77
+ export type SumPerCategoryPanelComponent = {
78
+ type: PanelComponentType.SUM_PER_CATEGORY;
79
+ shouldStack?: boolean;
80
+ shouldDisplayCountTransaction?: boolean;
81
+ };
82
+ export type SumPerCategoryPerMonthPanelComponent = {
83
+ type: PanelComponentType.SUM_PER_CATEGORY_PER_MONTH;
84
+ shouldStack?: boolean;
85
+ shouldDisplayTable?: boolean;
86
+ shouldDisplayCountTransaction?: boolean;
87
+ shouldGroupByCategoryByDefault?: boolean;
88
+ shouldDisplaySpeedUpByDefault?: boolean;
89
+ };
90
+ export type TransactionPerAccountPanelComponent = {
91
+ type: PanelComponentType.TRANSACTION_PER_ACCOUNT;
92
+ };
93
+ export type TransactionPerCategoryPanelComponent = {
94
+ type: PanelComponentType.TRANSACTION_PER_CATEGORY;
95
+ shouldDisplaySumTransaction?: boolean;
96
+ };
97
+ export type TransactionPerDayPanelComponent = {
98
+ type: PanelComponentType.TRANSACTION_PER_DAY;
99
+ };
100
+ export type TransactionTablePanelComponent = {
101
+ type: PanelComponentType.TRANSACTION_TABLE;
102
+ };
103
+ export type PeriodReportPanelComponent = {
104
+ type: PanelComponentType.PERIOD_REPORT;
105
+ shouldDisplaySelectBankAccounts?: boolean;
106
+ };
107
+ export type MonthlyReportPanelComponent = {
108
+ type: PanelComponentType.MONTHLY_REPORT;
109
+ };
110
+ export type MonthlyEvolutionPanelComponent = {
111
+ type: PanelComponentType.MONTHLY_EVOLUTION;
112
+ };
113
+ export type CashPositionComparisonPanelComponent = {
114
+ type: PanelComponentType.CASH_POSITION_COMPARISON;
115
+ };
116
+ export type TopOutcomesPanelComponent = {
117
+ type: PanelComponentType.TOP_OUTCOMES;
118
+ };
119
+ export type TopIncomesPanelComponent = {
120
+ type: PanelComponentType.TOP_INCOMES;
121
+ };
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,14 +1,14 @@
1
- import { IAccountTransaction } from './account-transaction.model';
2
- import { ICategorizationRule } from './categorization-rule.model';
3
- import { ICategory } from './category.model';
4
- export interface ITransactionCategory {
5
- id?: string;
6
- categoryId: string;
7
- accountTransactionId: string;
8
- categorizationRuleId: string | null;
9
- updatedAt?: Date;
10
- createdAt?: Date;
11
- accountTransaction?: IAccountTransaction;
12
- category?: ICategory;
13
- categorizationRule?: ICategorizationRule | null;
14
- }
1
+ import { IAccountTransaction } from './account-transaction.model';
2
+ import { ICategorizationRule } from './categorization-rule.model';
3
+ import { ICategory } from './category.model';
4
+ export interface ITransactionCategory {
5
+ id?: string;
6
+ categoryId: string;
7
+ accountTransactionId: string;
8
+ categorizationRuleId: string | null;
9
+ updatedAt?: Date;
10
+ createdAt?: Date;
11
+ accountTransaction?: IAccountTransaction;
12
+ category?: ICategory;
13
+ categorizationRule?: ICategorizationRule | null;
14
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });