@abyss-project/banking 1.0.0
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/.eslintrc.js +34 -0
- package/README.md +2 -0
- package/dist/api/abyss.admin.api.d.ts +2 -0
- package/dist/api/abyss.admin.api.js +8 -0
- package/dist/api/banking.admin.api.d.ts +13 -0
- package/dist/api/banking.admin.api.js +52 -0
- package/dist/api/banking.api.d.ts +18 -0
- package/dist/api/banking.api.js +76 -0
- package/dist/api/categorization-rule.admin.api.d.ts +7 -0
- package/dist/api/categorization-rule.admin.api.js +28 -0
- package/dist/api/categorization-rule.api.d.ts +7 -0
- package/dist/api/categorization-rule.api.js +28 -0
- package/dist/api/category.admin.api.d.ts +6 -0
- package/dist/api/category.admin.api.js +27 -0
- package/dist/api/category.api.d.ts +9 -0
- package/dist/api/category.api.js +34 -0
- package/dist/api/index.d.ts +12 -0
- package/dist/api/index.js +24 -0
- package/dist/api/monitor.api.d.ts +2 -0
- package/dist/api/monitor.api.js +8 -0
- package/dist/api/panel.admin.api.d.ts +6 -0
- package/dist/api/panel.admin.api.js +27 -0
- package/dist/api/panel.api.d.ts +6 -0
- package/dist/api/panel.api.js +28 -0
- package/dist/api/user.admin.api.d.ts +5 -0
- package/dist/api/user.admin.api.js +23 -0
- package/dist/api/user.api.d.ts +4 -0
- package/dist/api/user.api.js +17 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +84 -0
- package/dist/types/enum/aggregator-type.enum.d.ts +4 -0
- package/dist/types/enum/aggregator-type.enum.js +8 -0
- package/dist/types/enum/api-error.enum.d.ts +16 -0
- package/dist/types/enum/api-error.enum.js +21 -0
- package/dist/types/enum/bank-connection-status.enum.d.ts +6 -0
- package/dist/types/enum/bank-connection-status.enum.js +10 -0
- package/dist/types/enum/cash-account-type.enum.d.ts +26 -0
- package/dist/types/enum/cash-account-type.enum.js +30 -0
- package/dist/types/enum/index.d.ts +6 -0
- package/dist/types/enum/index.js +18 -0
- package/dist/types/enum/panel-component-type.enum.d.ts +12 -0
- package/dist/types/enum/panel-component-type.enum.js +16 -0
- package/dist/types/enum/period-configuration.enum.d.ts +7 -0
- package/dist/types/enum/period-configuration.enum.js +11 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +14 -0
- package/dist/types/interface/api/index.d.ts +27 -0
- package/dist/types/interface/api/index.js +39 -0
- package/dist/types/interface/api/requests/abyss.admin.request.d.ts +3 -0
- package/dist/types/interface/api/requests/abyss.admin.request.js +2 -0
- package/dist/types/interface/api/requests/banking.admin.request.d.ts +47 -0
- package/dist/types/interface/api/requests/banking.admin.request.js +2 -0
- package/dist/types/interface/api/requests/banking.request.d.ts +75 -0
- package/dist/types/interface/api/requests/banking.request.js +2 -0
- package/dist/types/interface/api/requests/categorization-rule.admin.request.d.ts +34 -0
- package/dist/types/interface/api/requests/categorization-rule.admin.request.js +2 -0
- package/dist/types/interface/api/requests/categorization-rule.request.d.ts +32 -0
- package/dist/types/interface/api/requests/categorization-rule.request.js +2 -0
- package/dist/types/interface/api/requests/category.admin.request.d.ts +22 -0
- package/dist/types/interface/api/requests/category.admin.request.js +2 -0
- package/dist/types/interface/api/requests/category.request.d.ts +26 -0
- package/dist/types/interface/api/requests/category.request.js +2 -0
- package/dist/types/interface/api/requests/panel.admin.request.d.ts +23 -0
- package/dist/types/interface/api/requests/panel.admin.request.js +2 -0
- package/dist/types/interface/api/requests/panel.request.d.ts +22 -0
- package/dist/types/interface/api/requests/panel.request.js +2 -0
- package/dist/types/interface/api/requests/user.admin.request.d.ts +15 -0
- package/dist/types/interface/api/requests/user.admin.request.js +2 -0
- package/dist/types/interface/api/requests/user.request.d.ts +2 -0
- package/dist/types/interface/api/requests/user.request.js +2 -0
- package/dist/types/interface/api/responses/abyss.admin.response.d.ts +6 -0
- package/dist/types/interface/api/responses/abyss.admin.response.js +2 -0
- package/dist/types/interface/api/responses/banking.admin.response.d.ts +48 -0
- package/dist/types/interface/api/responses/banking.admin.response.js +2 -0
- package/dist/types/interface/api/responses/banking.response.d.ts +86 -0
- package/dist/types/interface/api/responses/banking.response.js +2 -0
- package/dist/types/interface/api/responses/categorization-rule.admin.response.d.ts +22 -0
- package/dist/types/interface/api/responses/categorization-rule.admin.response.js +2 -0
- package/dist/types/interface/api/responses/categorization-rule.response.d.ts +22 -0
- package/dist/types/interface/api/responses/categorization-rule.response.js +2 -0
- package/dist/types/interface/api/responses/category.admin.response.d.ts +19 -0
- package/dist/types/interface/api/responses/category.admin.response.js +2 -0
- package/dist/types/interface/api/responses/category.response.d.ts +32 -0
- package/dist/types/interface/api/responses/category.response.js +2 -0
- package/dist/types/interface/api/responses/monitor.response.d.ts +7 -0
- package/dist/types/interface/api/responses/monitor.response.js +2 -0
- package/dist/types/interface/api/responses/panel.admin.response.d.ts +19 -0
- package/dist/types/interface/api/responses/panel.admin.response.js +2 -0
- package/dist/types/interface/api/responses/panel.response.d.ts +19 -0
- package/dist/types/interface/api/responses/panel.response.js +2 -0
- package/dist/types/interface/api/responses/storage.admin.response.d.ts +3 -0
- package/dist/types/interface/api/responses/storage.admin.response.js +2 -0
- package/dist/types/interface/api/responses/user.admin.response.d.ts +14 -0
- package/dist/types/interface/api/responses/user.admin.response.js +2 -0
- package/dist/types/interface/api/responses/user.response.d.ts +13 -0
- package/dist/types/interface/api/responses/user.response.js +2 -0
- package/dist/types/interface/api/type-message/api-error.d.ts +8 -0
- package/dist/types/interface/api/type-message/api-error.js +2 -0
- package/dist/types/interface/api/type-message/base-order.d.ts +4 -0
- package/dist/types/interface/api/type-message/base-order.js +2 -0
- package/dist/types/interface/api/type-message/base-paginate.d.ts +10 -0
- package/dist/types/interface/api/type-message/base-paginate.js +2 -0
- package/dist/types/interface/api/type-message/response.d.ts +5 -0
- package/dist/types/interface/api/type-message/response.js +2 -0
- package/dist/types/interface/index.d.ts +13 -0
- package/dist/types/interface/index.js +25 -0
- package/dist/types/interface/models/account-transaction.model.d.ts +46 -0
- package/dist/types/interface/models/account-transaction.model.js +2 -0
- package/dist/types/interface/models/aggregator-bank.model.d.ts +12 -0
- package/dist/types/interface/models/aggregator-bank.model.js +2 -0
- package/dist/types/interface/models/aggregator-link.model.d.ts +12 -0
- package/dist/types/interface/models/aggregator-link.model.js +2 -0
- package/dist/types/interface/models/bank-account-history.model.d.ts +11 -0
- package/dist/types/interface/models/bank-account-history.model.js +2 -0
- package/dist/types/interface/models/bank-account-transaction.model.d.ts +14 -0
- package/dist/types/interface/models/bank-account-transaction.model.js +2 -0
- package/dist/types/interface/models/bank-account.model.d.ts +26 -0
- package/dist/types/interface/models/bank-account.model.js +2 -0
- package/dist/types/interface/models/bank-connection.model.d.ts +17 -0
- package/dist/types/interface/models/bank-connection.model.js +2 -0
- package/dist/types/interface/models/categorization-rule-category.model.d.ts +11 -0
- package/dist/types/interface/models/categorization-rule-category.model.js +2 -0
- package/dist/types/interface/models/categorization-rule.model.d.ts +44 -0
- package/dist/types/interface/models/categorization-rule.model.js +2 -0
- package/dist/types/interface/models/category.model.d.ts +14 -0
- package/dist/types/interface/models/category.model.js +2 -0
- package/dist/types/interface/models/panel.model.d.ts +108 -0
- package/dist/types/interface/models/panel.model.js +2 -0
- package/dist/types/interface/models/transaction-category.model.d.ts +14 -0
- package/dist/types/interface/models/transaction-category.model.js +2 -0
- package/dist/types/interface/models/user.model.d.ts +13 -0
- package/dist/types/interface/models/user.model.js +2 -0
- package/dist/utils/error.utils.d.ts +15 -0
- package/dist/utils/error.utils.js +24 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +13 -0
- package/package.json +48 -0
- package/src/api/abyss.admin.api.ts +16 -0
- package/src/api/banking.admin.api.ts +141 -0
- package/src/api/banking.api.ts +197 -0
- package/src/api/categorization-rule.admin.api.ts +80 -0
- package/src/api/categorization-rule.api.ts +80 -0
- package/src/api/category.admin.api.ts +63 -0
- package/src/api/category.api.ts +74 -0
- package/src/api/index.ts +12 -0
- package/src/api/monitor.api.ts +6 -0
- package/src/api/panel.admin.api.ts +57 -0
- package/src/api/panel.api.ts +45 -0
- package/src/api/user.admin.api.ts +44 -0
- package/src/api/user.api.ts +20 -0
- package/src/index.ts +72 -0
- package/src/types/enum/aggregator-type.enum.ts +4 -0
- package/src/types/enum/api-error.enum.ts +18 -0
- package/src/types/enum/bank-connection-status.enum.ts +6 -0
- package/src/types/enum/cash-account-type.enum.ts +54 -0
- package/src/types/enum/index.ts +7 -0
- package/src/types/enum/panel-component-type.enum.ts +12 -0
- package/src/types/enum/period-configuration.enum.ts +7 -0
- package/src/types/index.ts +2 -0
- package/src/types/interface/api/index.ts +29 -0
- package/src/types/interface/api/requests/abyss.admin.request.ts +3 -0
- package/src/types/interface/api/requests/banking.admin.request.ts +57 -0
- package/src/types/interface/api/requests/banking.request.ts +89 -0
- package/src/types/interface/api/requests/categorization-rule.admin.request.ts +40 -0
- package/src/types/interface/api/requests/categorization-rule.request.ts +38 -0
- package/src/types/interface/api/requests/category.admin.request.ts +27 -0
- package/src/types/interface/api/requests/category.request.ts +31 -0
- package/src/types/interface/api/requests/panel.admin.request.ts +28 -0
- package/src/types/interface/api/requests/panel.request.ts +27 -0
- package/src/types/interface/api/requests/user.admin.request.ts +20 -0
- package/src/types/interface/api/requests/user.request.ts +2 -0
- package/src/types/interface/api/responses/abyss.admin.response.ts +7 -0
- package/src/types/interface/api/responses/banking.admin.response.ts +73 -0
- package/src/types/interface/api/responses/banking.response.ts +119 -0
- package/src/types/interface/api/responses/categorization-rule.admin.response.ts +28 -0
- package/src/types/interface/api/responses/categorization-rule.response.ts +28 -0
- package/src/types/interface/api/responses/category.admin.response.ts +24 -0
- package/src/types/interface/api/responses/category.response.ts +39 -0
- package/src/types/interface/api/responses/monitor.response.ts +8 -0
- package/src/types/interface/api/responses/panel.admin.response.ts +24 -0
- package/src/types/interface/api/responses/panel.response.ts +24 -0
- package/src/types/interface/api/responses/storage.admin.response.ts +4 -0
- package/src/types/interface/api/responses/user.admin.response.ts +18 -0
- package/src/types/interface/api/responses/user.response.ts +16 -0
- package/src/types/interface/api/type-message/api-error.ts +9 -0
- package/src/types/interface/api/type-message/base-order.ts +4 -0
- package/src/types/interface/api/type-message/base-paginate.ts +11 -0
- package/src/types/interface/api/type-message/response.ts +6 -0
- package/src/types/interface/index.ts +15 -0
- package/src/types/interface/models/account-transaction.model.ts +53 -0
- package/src/types/interface/models/aggregator-bank.model.ts +15 -0
- package/src/types/interface/models/aggregator-link.model.ts +15 -0
- package/src/types/interface/models/bank-account-history.model.ts +14 -0
- package/src/types/interface/models/bank-account.model.ts +29 -0
- package/src/types/interface/models/bank-connection.model.ts +20 -0
- package/src/types/interface/models/categorization-rule-category.model.ts +14 -0
- package/src/types/interface/models/categorization-rule.model.ts +48 -0
- package/src/types/interface/models/category.model.ts +17 -0
- package/src/types/interface/models/panel.model.ts +135 -0
- package/src/types/interface/models/transaction-category.model.ts +17 -0
- package/src/types/interface/models/user.model.ts +16 -0
- package/src/utils/error.utils.ts +30 -0
- package/src/utils/index.ts +1 -0
- package/tsconfig.json +105 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BasePaginate,
|
|
3
|
+
IAccountTransaction,
|
|
4
|
+
IAggregatorBank,
|
|
5
|
+
IAggregatorLink,
|
|
6
|
+
IBankAccount,
|
|
7
|
+
IBankAccountHistory,
|
|
8
|
+
IBankConnection,
|
|
9
|
+
IResponse,
|
|
10
|
+
} from '../..';
|
|
11
|
+
|
|
12
|
+
export interface IListConnectionBankingData {
|
|
13
|
+
aggregatorLink: IAggregatorLink[];
|
|
14
|
+
}
|
|
15
|
+
export type IListConnectionBankingResponse = IResponse<IListConnectionBankingData>;
|
|
16
|
+
|
|
17
|
+
export interface IGetBankConnectionBankingData {
|
|
18
|
+
bankConnection: IBankConnection;
|
|
19
|
+
}
|
|
20
|
+
export type IGetBankConnectionBankingResponse = IResponse<IGetBankConnectionBankingData>;
|
|
21
|
+
|
|
22
|
+
export interface IListInstitutionBankingData {
|
|
23
|
+
institution: {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
countries: string[];
|
|
27
|
+
logoUrl: string;
|
|
28
|
+
bic: string;
|
|
29
|
+
transactionTotalDays: string;
|
|
30
|
+
}[];
|
|
31
|
+
}
|
|
32
|
+
export type IListInstitutionBankingResponse = IResponse<IListInstitutionBankingData>;
|
|
33
|
+
|
|
34
|
+
export interface IListBankBankingData {
|
|
35
|
+
aggregatorBank: IAggregatorBank[];
|
|
36
|
+
}
|
|
37
|
+
export type IListBankBankingResponse = IResponse<IListBankBankingData>;
|
|
38
|
+
|
|
39
|
+
export interface ICreateRequisitionBankingData {
|
|
40
|
+
connectionLink: string;
|
|
41
|
+
}
|
|
42
|
+
export type ICreateRequisitionBankingResponse = IResponse<ICreateRequisitionBankingData>;
|
|
43
|
+
|
|
44
|
+
export interface IRenewRequisitionBankingData {
|
|
45
|
+
connectionLink: string;
|
|
46
|
+
}
|
|
47
|
+
export type IRenewRequisitionBankingResponse = IResponse<IRenewRequisitionBankingData>;
|
|
48
|
+
|
|
49
|
+
export interface IConfirmRequisitionBankingData {
|
|
50
|
+
bankConnection: IBankConnection;
|
|
51
|
+
}
|
|
52
|
+
export type IConfirmRequisitionBankingResponse = IResponse<IConfirmRequisitionBankingData>;
|
|
53
|
+
|
|
54
|
+
export type IPaginateAccountTransactionBankingResponse = IResponse<
|
|
55
|
+
BasePaginate<IAccountTransaction>
|
|
56
|
+
>;
|
|
57
|
+
|
|
58
|
+
export interface IGetAccountTransactionBankingData {
|
|
59
|
+
accountTransaction: IAccountTransaction;
|
|
60
|
+
}
|
|
61
|
+
export type IGetAccountTransactionBankingResponse = IResponse<IGetAccountTransactionBankingData>;
|
|
62
|
+
|
|
63
|
+
export interface IUpdateAccountTransactionBankingData {
|
|
64
|
+
accountTransaction: IAccountTransaction;
|
|
65
|
+
}
|
|
66
|
+
export type IUpdateAccountTransactionBankingResponse =
|
|
67
|
+
IResponse<IUpdateAccountTransactionBankingData>;
|
|
68
|
+
|
|
69
|
+
export interface IUpdateBankAccountBankingData {
|
|
70
|
+
bankAccount: IBankAccount;
|
|
71
|
+
}
|
|
72
|
+
export type IUpdateBankAccountBankingResponse = IResponse<IUpdateBankAccountBankingData>;
|
|
73
|
+
|
|
74
|
+
export interface ILoadDemoDataBankingData {
|
|
75
|
+
aggregatorLink: IAggregatorLink;
|
|
76
|
+
}
|
|
77
|
+
export type ILoadDemoDataBankingResponse = IResponse<ILoadDemoDataBankingData>;
|
|
78
|
+
|
|
79
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
80
|
+
export interface IDeleteDemoDataBankingData {}
|
|
81
|
+
export type IDeleteDemoDataBankingResponse = IResponse<IDeleteDemoDataBankingData>;
|
|
82
|
+
|
|
83
|
+
export interface IGetTransactionPerCategoryBankingData {
|
|
84
|
+
analytics: {
|
|
85
|
+
bankAccountId: string;
|
|
86
|
+
transactionCount: number;
|
|
87
|
+
}[];
|
|
88
|
+
}
|
|
89
|
+
export type IGetTransactionPerCategoryBankingResponse =
|
|
90
|
+
IResponse<IGetTransactionPerCategoryBankingData>;
|
|
91
|
+
|
|
92
|
+
export interface IGetSumTransactionPerBankAccountPerCategoryBankingData {
|
|
93
|
+
analytics: {
|
|
94
|
+
bankAccountId: string;
|
|
95
|
+
categories: {
|
|
96
|
+
categoryId: string | null;
|
|
97
|
+
transactionCount: number;
|
|
98
|
+
transactionSum: number;
|
|
99
|
+
transactions: {
|
|
100
|
+
id: string;
|
|
101
|
+
amount: number;
|
|
102
|
+
date: Date;
|
|
103
|
+
description: string;
|
|
104
|
+
comment: string | null;
|
|
105
|
+
}[];
|
|
106
|
+
}[];
|
|
107
|
+
}[];
|
|
108
|
+
}
|
|
109
|
+
export type IGetSumTransactionPerBankAccountPerCategoryBankingResponse =
|
|
110
|
+
IResponse<IGetSumTransactionPerBankAccountPerCategoryBankingData>;
|
|
111
|
+
|
|
112
|
+
export type IPaginateBankAccountHistoryBankingResponse = IResponse<
|
|
113
|
+
BasePaginate<IBankAccountHistory>
|
|
114
|
+
>;
|
|
115
|
+
|
|
116
|
+
export interface IListBankAccountHistoryBankingData {
|
|
117
|
+
bankAccountHistory: IBankAccountHistory[];
|
|
118
|
+
}
|
|
119
|
+
export type IListBankAccountHistoryBankingResponse = IResponse<IListBankAccountHistoryBankingData>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ICategorizationRule } from '../../models/categorization-rule.model';
|
|
2
|
+
import { BasePaginate } from '../type-message/base-paginate';
|
|
3
|
+
import { IResponse } from '../type-message/response';
|
|
4
|
+
|
|
5
|
+
export interface IGetCategorizationRuleAdminData {
|
|
6
|
+
categorizationRule: ICategorizationRule;
|
|
7
|
+
}
|
|
8
|
+
export type IGetCategorizationRuleAdminResponse = IResponse<IGetCategorizationRuleAdminData>;
|
|
9
|
+
|
|
10
|
+
export type IPaginateCategorizationRuleAdminResponse = IResponse<BasePaginate<ICategorizationRule>>;
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
13
|
+
export interface IDeleteCategorizationRuleAdminData {}
|
|
14
|
+
export type IDeleteCategorizationRuleAdminResponse = IResponse<IDeleteCategorizationRuleAdminData>;
|
|
15
|
+
|
|
16
|
+
export interface ICreateCategorizationRuleAdminData {
|
|
17
|
+
categorizationRule: ICategorizationRule;
|
|
18
|
+
}
|
|
19
|
+
export type ICreateCategorizationRuleAdminResponse = IResponse<ICreateCategorizationRuleAdminData>;
|
|
20
|
+
|
|
21
|
+
export interface IUpdateCategorizationRuleAdminData {
|
|
22
|
+
categorizationRule: ICategorizationRule;
|
|
23
|
+
}
|
|
24
|
+
export type IUpdateCategorizationRuleAdminResponse = IResponse<IUpdateCategorizationRuleAdminData>;
|
|
25
|
+
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
27
|
+
export interface IApplyCategorizationRuleAdminData {}
|
|
28
|
+
export type IApplyCategorizationRuleAdminResponse = IResponse<IApplyCategorizationRuleAdminData>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ICategorizationRule } from '../../models/categorization-rule.model';
|
|
2
|
+
import { BasePaginate } from '../type-message/base-paginate';
|
|
3
|
+
import { IResponse } from '../type-message/response';
|
|
4
|
+
|
|
5
|
+
export interface IGetCategorizationRuleData {
|
|
6
|
+
categorizationRule: ICategorizationRule;
|
|
7
|
+
}
|
|
8
|
+
export type IGetCategorizationRuleResponse = IResponse<IGetCategorizationRuleData>;
|
|
9
|
+
|
|
10
|
+
export type IPaginateCategorizationRuleResponse = IResponse<BasePaginate<ICategorizationRule>>;
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
13
|
+
export interface IDeleteCategorizationRuleData {}
|
|
14
|
+
export type IDeleteCategorizationRuleResponse = IResponse<IDeleteCategorizationRuleData>;
|
|
15
|
+
|
|
16
|
+
export interface ICreateCategorizationRuleData {
|
|
17
|
+
categorizationRule: ICategorizationRule;
|
|
18
|
+
}
|
|
19
|
+
export type ICreateCategorizationRuleResponse = IResponse<ICreateCategorizationRuleData>;
|
|
20
|
+
|
|
21
|
+
export interface IUpdateCategorizationRuleData {
|
|
22
|
+
categorizationRule: ICategorizationRule;
|
|
23
|
+
}
|
|
24
|
+
export type IUpdateCategorizationRuleResponse = IResponse<IUpdateCategorizationRuleData>;
|
|
25
|
+
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
27
|
+
export interface IApplyCategorizationRuleData {}
|
|
28
|
+
export type IApplyCategorizationRuleResponse = IResponse<IApplyCategorizationRuleData>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ICategory } from '../../models/category.model';
|
|
2
|
+
import { BasePaginate } from '../type-message/base-paginate';
|
|
3
|
+
import { IResponse } from '../type-message/response';
|
|
4
|
+
|
|
5
|
+
export interface IGetCategoryAdminData {
|
|
6
|
+
category: ICategory;
|
|
7
|
+
}
|
|
8
|
+
export type IGetCategoryAdminResponse = IResponse<IGetCategoryAdminData>;
|
|
9
|
+
|
|
10
|
+
export type IPaginateCategoryAdminResponse = IResponse<BasePaginate<ICategory>>;
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
13
|
+
export interface IDeleteCategoryAdminData {}
|
|
14
|
+
export type IDeleteCategoryAdminResponse = IResponse<IDeleteCategoryAdminData>;
|
|
15
|
+
|
|
16
|
+
export interface ICreateCategoryAdminData {
|
|
17
|
+
category: ICategory;
|
|
18
|
+
}
|
|
19
|
+
export type ICreateCategoryAdminResponse = IResponse<ICreateCategoryAdminData>;
|
|
20
|
+
|
|
21
|
+
export interface IUpdateCategoryAdminData {
|
|
22
|
+
category: ICategory;
|
|
23
|
+
}
|
|
24
|
+
export type IUpdateCategoryAdminResponse = IResponse<IUpdateCategoryAdminData>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ICategory } from '../../models/category.model';
|
|
2
|
+
import { ITransactionCategory } from '../../models/transaction-category.model';
|
|
3
|
+
import { IResponse } from '../type-message/response';
|
|
4
|
+
|
|
5
|
+
export interface IListCategoryData {
|
|
6
|
+
category: ICategory[];
|
|
7
|
+
}
|
|
8
|
+
export type IListCategoryResponse = IResponse<IListCategoryData>;
|
|
9
|
+
|
|
10
|
+
export interface IListAnalyticsCategoryData {
|
|
11
|
+
categories: {
|
|
12
|
+
transactionCount: number;
|
|
13
|
+
category: ICategory;
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
export type IListAnalyticsCategoryResponse = IResponse<IListAnalyticsCategoryData>;
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
19
|
+
export interface IRemoveCategoryData {}
|
|
20
|
+
export type IRemoveCategoryResponse = IResponse<IRemoveCategoryData>;
|
|
21
|
+
|
|
22
|
+
export interface IAddCategoryData {
|
|
23
|
+
transactionCategory: ITransactionCategory;
|
|
24
|
+
}
|
|
25
|
+
export type IAddCategoryResponse = IResponse<IAddCategoryData>;
|
|
26
|
+
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
28
|
+
export interface IDeleteCategoryData {}
|
|
29
|
+
export type IDeleteCategoryResponse = IResponse<IDeleteCategoryData>;
|
|
30
|
+
|
|
31
|
+
export interface ICreateCategoryData {
|
|
32
|
+
category: ICategory;
|
|
33
|
+
}
|
|
34
|
+
export type ICreateCategoryResponse = IResponse<ICreateCategoryData>;
|
|
35
|
+
|
|
36
|
+
export interface IUpdateCategoryData {
|
|
37
|
+
category: ICategory;
|
|
38
|
+
}
|
|
39
|
+
export type IUpdateCategoryResponse = IResponse<IUpdateCategoryData>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IPanel } from '../../models/panel.model';
|
|
2
|
+
import { BasePaginate } from '../type-message/base-paginate';
|
|
3
|
+
import { IResponse } from '../type-message/response';
|
|
4
|
+
|
|
5
|
+
export interface IGetPanelAdminData {
|
|
6
|
+
panel: IPanel;
|
|
7
|
+
}
|
|
8
|
+
export type IGetPanelAdminResponse = IResponse<IGetPanelAdminData>;
|
|
9
|
+
|
|
10
|
+
export type IPaginatePanelAdminResponse = IResponse<BasePaginate<IPanel>>;
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
13
|
+
export interface IDeletePanelAdminData {}
|
|
14
|
+
export type IDeletePanelAdminResponse = IResponse<IDeletePanelAdminData>;
|
|
15
|
+
|
|
16
|
+
export interface ICreatePanelAdminData {
|
|
17
|
+
panel: IPanel;
|
|
18
|
+
}
|
|
19
|
+
export type ICreatePanelAdminResponse = IResponse<ICreatePanelAdminData>;
|
|
20
|
+
|
|
21
|
+
export interface IUpdatePanelAdminData {
|
|
22
|
+
panel: IPanel;
|
|
23
|
+
}
|
|
24
|
+
export type IUpdatePanelAdminResponse = IResponse<IUpdatePanelAdminData>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IPanel } from '../../models/panel.model';
|
|
2
|
+
import { BasePaginate } from '../type-message/base-paginate';
|
|
3
|
+
import { IResponse } from '../type-message/response';
|
|
4
|
+
|
|
5
|
+
export interface IGetPanelData {
|
|
6
|
+
panel: IPanel;
|
|
7
|
+
}
|
|
8
|
+
export type IGetPanelResponse = IResponse<IGetPanelData>;
|
|
9
|
+
|
|
10
|
+
export type IPaginatePanelResponse = IResponse<BasePaginate<IPanel>>;
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
13
|
+
export interface IDeletePanelData {}
|
|
14
|
+
export type IDeletePanelResponse = IResponse<IDeletePanelData>;
|
|
15
|
+
|
|
16
|
+
export interface ICreatePanelData {
|
|
17
|
+
panel: IPanel;
|
|
18
|
+
}
|
|
19
|
+
export type ICreatePanelResponse = IResponse<ICreatePanelData>;
|
|
20
|
+
|
|
21
|
+
export interface IUpdatePanelData {
|
|
22
|
+
panel: IPanel;
|
|
23
|
+
}
|
|
24
|
+
export type IUpdatePanelResponse = IResponse<IUpdatePanelData>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BasePaginate, IResponse, IUser } from '../..';
|
|
2
|
+
|
|
3
|
+
export interface IGetUserAdminData {
|
|
4
|
+
user: IUser;
|
|
5
|
+
}
|
|
6
|
+
export type IGetUserAdminResponse = IResponse<IGetUserAdminData>;
|
|
7
|
+
|
|
8
|
+
export type IPaginateUserAdminResponse = IResponse<BasePaginate<IUser>>;
|
|
9
|
+
|
|
10
|
+
export interface IUpdateUserAdminData {
|
|
11
|
+
user: IUser;
|
|
12
|
+
}
|
|
13
|
+
export type IUpdateUserAdminResponse = IResponse<IUpdateUserAdminData>;
|
|
14
|
+
|
|
15
|
+
export interface IResetApiKeyUserAdminData {
|
|
16
|
+
user: IUser;
|
|
17
|
+
}
|
|
18
|
+
export type IResetApiKeyUserAdminResponse = IResponse<IResetApiKeyUserAdminData>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IResponse, IUser } from '../..';
|
|
2
|
+
|
|
3
|
+
export interface IMeUserData {
|
|
4
|
+
user: IUser;
|
|
5
|
+
}
|
|
6
|
+
export type IMeUserResponse = IResponse<IMeUserData>;
|
|
7
|
+
|
|
8
|
+
export interface IResetApiKeyUserData {
|
|
9
|
+
user: IUser;
|
|
10
|
+
}
|
|
11
|
+
export type IResetApiKeyUserResponse = IResponse<IResetApiKeyUserData>;
|
|
12
|
+
|
|
13
|
+
export interface IUpdateUserData {
|
|
14
|
+
user: IUser;
|
|
15
|
+
}
|
|
16
|
+
export type IUpdateUserResponse = IResponse<IUpdateUserData>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './models/user.model';
|
|
2
|
+
export * from './models/aggregator-link.model';
|
|
3
|
+
export * from './models/bank-connection.model';
|
|
4
|
+
export * from './models/bank-account.model';
|
|
5
|
+
export * from './models/bank-account-history.model';
|
|
6
|
+
export * from './models/account-transaction.model';
|
|
7
|
+
export * from './models/aggregator-bank.model';
|
|
8
|
+
export * from './models/category.model';
|
|
9
|
+
export * from './models/transaction-category.model';
|
|
10
|
+
export * from './models/categorization-rule.model';
|
|
11
|
+
export * from './models/categorization-rule-category.model';
|
|
12
|
+
export * from './models/panel.model';
|
|
13
|
+
|
|
14
|
+
// API Request
|
|
15
|
+
export * from './api';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { IBankAccount } from './bank-account.model';
|
|
2
|
+
import { ITransactionCategory } from './transaction-category.model';
|
|
3
|
+
|
|
4
|
+
export type AccountTransactionMetadata = {
|
|
5
|
+
debtorAgent?: string;
|
|
6
|
+
debtorName?: string;
|
|
7
|
+
debtorAccount?: unknown;
|
|
8
|
+
|
|
9
|
+
additionalDataStructured?: unknown;
|
|
10
|
+
additionalInformation?: string;
|
|
11
|
+
additionalInformationStructured?: string;
|
|
12
|
+
bankTransactionCode?: string;
|
|
13
|
+
proprietaryBankTransactionCode?: string;
|
|
14
|
+
currencyExchange?: unknown;
|
|
15
|
+
ultimateCreditor?: string;
|
|
16
|
+
ultimateDebtor?: string;
|
|
17
|
+
|
|
18
|
+
// Note(Mehdi): Already existing in model but possibly not visible
|
|
19
|
+
internalTransactionId?: string;
|
|
20
|
+
transactionId?: string;
|
|
21
|
+
bookingDate?: string;
|
|
22
|
+
bookingDateTime?: string;
|
|
23
|
+
valueDate?: string;
|
|
24
|
+
valueDateTime?: string;
|
|
25
|
+
remittanceInformationUnstructured?: string;
|
|
26
|
+
remittanceInformationUnstructuredArray?: string[];
|
|
27
|
+
remittanceInformationStructured?: string;
|
|
28
|
+
remittanceInformationStructuredArray?: string[];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export interface IAccountTransaction {
|
|
32
|
+
id?: string;
|
|
33
|
+
date: Date;
|
|
34
|
+
amount: number;
|
|
35
|
+
currency: string;
|
|
36
|
+
description: string;
|
|
37
|
+
comment: string | null;
|
|
38
|
+
aggregatorTransactionId: string;
|
|
39
|
+
bankAccountId: string;
|
|
40
|
+
mandateId: string | null;
|
|
41
|
+
merchantCategoryCode: string | null;
|
|
42
|
+
entryReference: string | null;
|
|
43
|
+
endToEndId: string | null;
|
|
44
|
+
purposeCode: string | null;
|
|
45
|
+
checkId: string | null;
|
|
46
|
+
metadata: AccountTransactionMetadata;
|
|
47
|
+
updatedAt?: Date;
|
|
48
|
+
createdAt?: Date;
|
|
49
|
+
|
|
50
|
+
// Associations
|
|
51
|
+
bankAccount?: IBankAccount;
|
|
52
|
+
transactionCategory?: ITransactionCategory[];
|
|
53
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AggregatorType } from '../../enum';
|
|
2
|
+
|
|
3
|
+
export interface IAggregatorBank {
|
|
4
|
+
id?: string;
|
|
5
|
+
aggregatorType: AggregatorType;
|
|
6
|
+
aggregatorBankId: string;
|
|
7
|
+
logoUrl: string;
|
|
8
|
+
name: string;
|
|
9
|
+
bic: string;
|
|
10
|
+
countries: string[];
|
|
11
|
+
updatedAt?: Date;
|
|
12
|
+
createdAt?: Date;
|
|
13
|
+
|
|
14
|
+
// Associations
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AggregatorType } from '../../enum';
|
|
2
|
+
import { IBankConnection } from './bank-connection.model';
|
|
3
|
+
import { IUser } from './user.model';
|
|
4
|
+
|
|
5
|
+
export interface IAggregatorLink {
|
|
6
|
+
id?: string;
|
|
7
|
+
type: AggregatorType;
|
|
8
|
+
userId: string;
|
|
9
|
+
updatedAt?: Date;
|
|
10
|
+
createdAt?: Date;
|
|
11
|
+
|
|
12
|
+
// Associations
|
|
13
|
+
user?: IUser;
|
|
14
|
+
bankConnection?: IBankConnection[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IBankAccount } from './bank-account.model';
|
|
2
|
+
|
|
3
|
+
export interface IBankAccountHistory {
|
|
4
|
+
id?: string;
|
|
5
|
+
expectedBalance: number;
|
|
6
|
+
availableBalance: number;
|
|
7
|
+
date: Date;
|
|
8
|
+
bankAccountId: string;
|
|
9
|
+
updatedAt?: Date;
|
|
10
|
+
createdAt?: Date;
|
|
11
|
+
|
|
12
|
+
// Associations
|
|
13
|
+
bankAccount?: IBankAccount;
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
|
|
6
|
+
export interface IBankAccount {
|
|
7
|
+
id?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
commonName: string | null;
|
|
10
|
+
ownerName: string | null;
|
|
11
|
+
currency: string;
|
|
12
|
+
iban: string;
|
|
13
|
+
color: string;
|
|
14
|
+
cashAccountType: CashAccountType;
|
|
15
|
+
expectedBalance: number;
|
|
16
|
+
availableBalance: number;
|
|
17
|
+
aggregatorAccountId: string;
|
|
18
|
+
aggregatorCreatedAt: Date;
|
|
19
|
+
bankConnectionId: string;
|
|
20
|
+
lastRefresh: Date | null;
|
|
21
|
+
isMasked: boolean;
|
|
22
|
+
updatedAt?: Date;
|
|
23
|
+
createdAt?: Date;
|
|
24
|
+
|
|
25
|
+
// Associations
|
|
26
|
+
bankConnection?: IBankConnection;
|
|
27
|
+
accountTransaction?: IAccountTransaction[];
|
|
28
|
+
bankAccountHistory?: IBankAccountHistory[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BankConnectionStatus } from '../../enum';
|
|
2
|
+
import { IAggregatorLink } from './aggregator-link.model';
|
|
3
|
+
import { IBankAccount } from './bank-account.model';
|
|
4
|
+
|
|
5
|
+
export interface IBankConnection {
|
|
6
|
+
id?: string;
|
|
7
|
+
aggregatorConnectionId: string;
|
|
8
|
+
aggregatorAgreementId: string;
|
|
9
|
+
aggregatorBankId: string; // Note(Mehdi): InstitutionId
|
|
10
|
+
aggregatorLinkId: string;
|
|
11
|
+
status: BankConnectionStatus;
|
|
12
|
+
lastRefresh: Date | null;
|
|
13
|
+
confirmedAt: Date | null;
|
|
14
|
+
updatedAt?: Date;
|
|
15
|
+
createdAt?: Date;
|
|
16
|
+
|
|
17
|
+
// Associations
|
|
18
|
+
aggregatorLink?: IAggregatorLink;
|
|
19
|
+
bankAccount?: IBankAccount[];
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ICategorizationRule } from './categorization-rule.model';
|
|
2
|
+
import { ICategory } from './category.model';
|
|
3
|
+
|
|
4
|
+
export interface ICategorizationRuleCategory {
|
|
5
|
+
id?: string;
|
|
6
|
+
categoryId: string;
|
|
7
|
+
categorizationRuleId: string;
|
|
8
|
+
updatedAt?: Date;
|
|
9
|
+
createdAt?: Date;
|
|
10
|
+
|
|
11
|
+
// Associations
|
|
12
|
+
category?: ICategory;
|
|
13
|
+
categorizationRule?: ICategorizationRule;
|
|
14
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
|
|
6
|
+
export interface ICategorizationRule {
|
|
7
|
+
id?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string | null;
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
rules: CategorizationRules[]; // Note(Mehdi): Category is assigned if at least one of rules is true
|
|
12
|
+
userId: string;
|
|
13
|
+
updatedAt?: Date;
|
|
14
|
+
createdAt?: Date;
|
|
15
|
+
deletedAt?: Date;
|
|
16
|
+
|
|
17
|
+
// Associations
|
|
18
|
+
user?: IUser;
|
|
19
|
+
transactionCategory?: ITransactionCategory[];
|
|
20
|
+
category?: ICategory[];
|
|
21
|
+
categorizationRuleCategory?: ICategorizationRuleCategory[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type CategorizationRules = {
|
|
25
|
+
label?: {
|
|
26
|
+
shouldEq?: string;
|
|
27
|
+
shouldContains?: string[];
|
|
28
|
+
shouldNotContains?: string[];
|
|
29
|
+
shouldStartsWith?: string[];
|
|
30
|
+
shouldNotStartsWith?: string[];
|
|
31
|
+
shouldEndsWith?: string[];
|
|
32
|
+
shouldNotEndsWith?: string[];
|
|
33
|
+
};
|
|
34
|
+
amount?: {
|
|
35
|
+
min?: number | null;
|
|
36
|
+
minOrEq?: number | null;
|
|
37
|
+
max?: number | null;
|
|
38
|
+
maxOrEq?: number | null;
|
|
39
|
+
};
|
|
40
|
+
date?: {
|
|
41
|
+
before?: Date | null;
|
|
42
|
+
after?: Date | null;
|
|
43
|
+
dayOfMonth?: number[] | null; // Note(Mehdi): One of array
|
|
44
|
+
dayOfWeek?: number[] | null; // Note(Mehdi): One of array
|
|
45
|
+
month?: number[] | null; // Note(Mehdi): One of array
|
|
46
|
+
year?: number[] | null; // Note(Mehdi): One of array
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ICategorizationRule } from './categorization-rule.model';
|
|
2
|
+
import { ITransactionCategory } from './transaction-category.model';
|
|
3
|
+
import { IUser } from './user.model';
|
|
4
|
+
|
|
5
|
+
export interface ICategory {
|
|
6
|
+
id?: string;
|
|
7
|
+
name: string;
|
|
8
|
+
color: string;
|
|
9
|
+
userId: string;
|
|
10
|
+
updatedAt?: Date;
|
|
11
|
+
createdAt?: Date;
|
|
12
|
+
|
|
13
|
+
// Associations
|
|
14
|
+
user?: IUser;
|
|
15
|
+
transactionCategory?: ITransactionCategory[];
|
|
16
|
+
categorizationRule?: ICategorizationRule[];
|
|
17
|
+
}
|