@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
package/dist/index.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.AbyssBankingCore = exports.ADMIN_TOKEN_HEADER = exports.API_KEY_HEADER = void 0;
|
|
29
|
+
const axios_1 = __importDefault(require("axios"));
|
|
30
|
+
const axios_retry_1 = __importStar(require("axios-retry"));
|
|
31
|
+
__exportStar(require("./types"), exports);
|
|
32
|
+
__exportStar(require("./utils"), exports);
|
|
33
|
+
__exportStar(require("./api"), exports);
|
|
34
|
+
const DEFAULT_BASE_URL = 'https://banking-api.abyss-project.fr/api/';
|
|
35
|
+
exports.API_KEY_HEADER = 'abyss-banking-api-key';
|
|
36
|
+
exports.ADMIN_TOKEN_HEADER = 'abyss-admin-token';
|
|
37
|
+
const NUMBER_RETRY_API = 10;
|
|
38
|
+
const BASE_DELAY_BETWEEN_RETRY = 5000;
|
|
39
|
+
const RETRY_CODES = [
|
|
40
|
+
502,
|
|
41
|
+
503,
|
|
42
|
+
];
|
|
43
|
+
class AbyssBankingCore {
|
|
44
|
+
static enableAxiosRetry(axiosRetryConfig) {
|
|
45
|
+
(0, axios_retry_1.default)(AbyssBankingCore.axios, {
|
|
46
|
+
retries: NUMBER_RETRY_API,
|
|
47
|
+
retryDelay: (retryCount) => retryCount * BASE_DELAY_BETWEEN_RETRY,
|
|
48
|
+
retryCondition: (error) => {
|
|
49
|
+
var _a;
|
|
50
|
+
return (0, axios_retry_1.isNetworkOrIdempotentRequestError)(error) ||
|
|
51
|
+
RETRY_CODES.includes(((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) || 502);
|
|
52
|
+
},
|
|
53
|
+
...axiosRetryConfig,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
static setConfig(config) {
|
|
57
|
+
AbyssBankingCore.config = { ...AbyssBankingCore.config, ...config };
|
|
58
|
+
if (config.baseURL) {
|
|
59
|
+
AbyssBankingCore.axios.defaults.baseURL = config.baseURL;
|
|
60
|
+
}
|
|
61
|
+
if (config.token) {
|
|
62
|
+
AbyssBankingCore.axios.defaults.headers.common.Authorization = `Bearer ${config.token}`;
|
|
63
|
+
}
|
|
64
|
+
if (config.apiKey) {
|
|
65
|
+
AbyssBankingCore.axios.defaults.headers.common[exports.API_KEY_HEADER] = `${config.apiKey}`;
|
|
66
|
+
}
|
|
67
|
+
if (config.adminToken) {
|
|
68
|
+
AbyssBankingCore.axios.defaults.headers.common[exports.ADMIN_TOKEN_HEADER] = `${config.adminToken}`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
static getConfig() {
|
|
72
|
+
return AbyssBankingCore.config;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.AbyssBankingCore = AbyssBankingCore;
|
|
76
|
+
AbyssBankingCore.config = {
|
|
77
|
+
token: '',
|
|
78
|
+
apiKey: '',
|
|
79
|
+
apiKeyApplication: '',
|
|
80
|
+
applicationId: '',
|
|
81
|
+
adminToken: '',
|
|
82
|
+
baseURL: DEFAULT_BASE_URL,
|
|
83
|
+
};
|
|
84
|
+
AbyssBankingCore.axios = axios_1.default.create({ baseURL: `` });
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AggregatorType = void 0;
|
|
4
|
+
var AggregatorType;
|
|
5
|
+
(function (AggregatorType) {
|
|
6
|
+
AggregatorType["GOCARDLESS"] = "GOCARDLESS";
|
|
7
|
+
AggregatorType["DEMO_DATA_BANKING"] = "DEMO_DATA_BANKING";
|
|
8
|
+
})(AggregatorType = exports.AggregatorType || (exports.AggregatorType = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum ErrorType {
|
|
2
|
+
apiError = "api_error",
|
|
3
|
+
authError = "authentication_error",
|
|
4
|
+
resourceError = "resource_error"
|
|
5
|
+
}
|
|
6
|
+
export declare enum Code {
|
|
7
|
+
tokenFailure = "token_authentication_failure",
|
|
8
|
+
authenticationFailure = "authentication_credentials_failure",
|
|
9
|
+
accessNotAllowed = "access_not_allowed",
|
|
10
|
+
notFound = "not_found",
|
|
11
|
+
validationError = "resource_validation_error",
|
|
12
|
+
constraintError = "resource_constraint_error",
|
|
13
|
+
internalServerError = "internal_server_error",
|
|
14
|
+
serviceUnavailable = "service_unavailable",
|
|
15
|
+
invalidData = "invalid_data"
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Code = exports.ErrorType = void 0;
|
|
4
|
+
var ErrorType;
|
|
5
|
+
(function (ErrorType) {
|
|
6
|
+
ErrorType["apiError"] = "api_error";
|
|
7
|
+
ErrorType["authError"] = "authentication_error";
|
|
8
|
+
ErrorType["resourceError"] = "resource_error";
|
|
9
|
+
})(ErrorType = exports.ErrorType || (exports.ErrorType = {}));
|
|
10
|
+
var Code;
|
|
11
|
+
(function (Code) {
|
|
12
|
+
Code["tokenFailure"] = "token_authentication_failure";
|
|
13
|
+
Code["authenticationFailure"] = "authentication_credentials_failure";
|
|
14
|
+
Code["accessNotAllowed"] = "access_not_allowed";
|
|
15
|
+
Code["notFound"] = "not_found";
|
|
16
|
+
Code["validationError"] = "resource_validation_error";
|
|
17
|
+
Code["constraintError"] = "resource_constraint_error";
|
|
18
|
+
Code["internalServerError"] = "internal_server_error";
|
|
19
|
+
Code["serviceUnavailable"] = "service_unavailable";
|
|
20
|
+
Code["invalidData"] = "invalid_data";
|
|
21
|
+
})(Code = exports.Code || (exports.Code = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BankConnectionStatus = void 0;
|
|
4
|
+
var BankConnectionStatus;
|
|
5
|
+
(function (BankConnectionStatus) {
|
|
6
|
+
BankConnectionStatus["PENDING"] = "PENDING";
|
|
7
|
+
BankConnectionStatus["FAILED"] = "FAILED";
|
|
8
|
+
BankConnectionStatus["SUCCESS"] = "SUCCESS";
|
|
9
|
+
BankConnectionStatus["EXPIRED"] = "EXPIRED";
|
|
10
|
+
})(BankConnectionStatus = exports.BankConnectionStatus || (exports.BankConnectionStatus = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum CashAccountType {
|
|
2
|
+
'CACC' = "CACC",
|
|
3
|
+
'CARD' = "CARD",
|
|
4
|
+
'CASH' = "CASH",
|
|
5
|
+
'CHAR' = "CHAR",
|
|
6
|
+
'CISH' = "CISH",
|
|
7
|
+
'COMM' = "COMM",
|
|
8
|
+
'CPAC' = "CPAC",
|
|
9
|
+
'LLSV' = "LLSV",
|
|
10
|
+
'LOAN' = "LOAN",
|
|
11
|
+
'MGLD' = "MGLD",
|
|
12
|
+
'MOMA' = "MOMA",
|
|
13
|
+
'NREX' = "NREX",
|
|
14
|
+
'ODFT' = "ODFT",
|
|
15
|
+
'ONDP' = "ONDP",
|
|
16
|
+
'OTHR' = "OTHR",
|
|
17
|
+
'SACC' = "SACC",
|
|
18
|
+
'SLRY' = "SLRY",
|
|
19
|
+
'SVGS' = "SVGS",
|
|
20
|
+
'TAXE' = "TAXE",
|
|
21
|
+
'TRAN' = "TRAN",
|
|
22
|
+
'TRAS' = "TRAS",
|
|
23
|
+
'VACC' = "VACC",
|
|
24
|
+
'NFCA' = "NFCA",
|
|
25
|
+
'UNKNOWN' = "UNKNOWN"
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CashAccountType = void 0;
|
|
4
|
+
var CashAccountType;
|
|
5
|
+
(function (CashAccountType) {
|
|
6
|
+
CashAccountType["CACC"] = "CACC";
|
|
7
|
+
CashAccountType["CARD"] = "CARD";
|
|
8
|
+
CashAccountType["CASH"] = "CASH";
|
|
9
|
+
CashAccountType["CHAR"] = "CHAR";
|
|
10
|
+
CashAccountType["CISH"] = "CISH";
|
|
11
|
+
CashAccountType["COMM"] = "COMM";
|
|
12
|
+
CashAccountType["CPAC"] = "CPAC";
|
|
13
|
+
CashAccountType["LLSV"] = "LLSV";
|
|
14
|
+
CashAccountType["LOAN"] = "LOAN";
|
|
15
|
+
CashAccountType["MGLD"] = "MGLD";
|
|
16
|
+
CashAccountType["MOMA"] = "MOMA";
|
|
17
|
+
CashAccountType["NREX"] = "NREX";
|
|
18
|
+
CashAccountType["ODFT"] = "ODFT";
|
|
19
|
+
CashAccountType["ONDP"] = "ONDP";
|
|
20
|
+
CashAccountType["OTHR"] = "OTHR";
|
|
21
|
+
CashAccountType["SACC"] = "SACC";
|
|
22
|
+
CashAccountType["SLRY"] = "SLRY";
|
|
23
|
+
CashAccountType["SVGS"] = "SVGS";
|
|
24
|
+
CashAccountType["TAXE"] = "TAXE";
|
|
25
|
+
CashAccountType["TRAN"] = "TRAN";
|
|
26
|
+
CashAccountType["TRAS"] = "TRAS";
|
|
27
|
+
CashAccountType["VACC"] = "VACC";
|
|
28
|
+
CashAccountType["NFCA"] = "NFCA";
|
|
29
|
+
CashAccountType["UNKNOWN"] = "UNKNOWN";
|
|
30
|
+
})(CashAccountType = exports.CashAccountType || (exports.CashAccountType = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./api-error.enum"), exports);
|
|
14
|
+
__exportStar(require("./aggregator-type.enum"), exports);
|
|
15
|
+
__exportStar(require("./bank-connection-status.enum"), exports);
|
|
16
|
+
__exportStar(require("./cash-account-type.enum"), exports);
|
|
17
|
+
__exportStar(require("./period-configuration.enum"), exports);
|
|
18
|
+
__exportStar(require("./panel-component-type.enum"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum PanelComponentType {
|
|
2
|
+
ACCOUNT_BALANCE = "ACCOUNT_BALANCE",
|
|
3
|
+
ACCOUNT_CASH_POSITION = "ACCOUNT_CASH_POSITION",
|
|
4
|
+
SUM_PER_CATEGORY = "SUM_PER_CATEGORY",
|
|
5
|
+
SUM_PER_CATEGORY_PER_MONTH = "SUM_PER_CATEGORY_PER_MONTH",
|
|
6
|
+
TRANSACTION_PER_ACCOUNT = "TRANSACTION_PER_ACCOUNT",
|
|
7
|
+
TRANSACTION_PER_CATEGORY = "TRANSACTION_PER_CATEGORY",
|
|
8
|
+
TRANSACTION_PER_DAY = "TRANSACTION_PER_DAY",
|
|
9
|
+
TRANSACTION_TABLE = "TRANSACTION_TABLE",
|
|
10
|
+
PERIOD_REPORT = "PERIOD_REPORT",
|
|
11
|
+
MONTHLY_REPORT = "MONTHLY_REPORT"
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PanelComponentType = void 0;
|
|
4
|
+
var PanelComponentType;
|
|
5
|
+
(function (PanelComponentType) {
|
|
6
|
+
PanelComponentType["ACCOUNT_BALANCE"] = "ACCOUNT_BALANCE";
|
|
7
|
+
PanelComponentType["ACCOUNT_CASH_POSITION"] = "ACCOUNT_CASH_POSITION";
|
|
8
|
+
PanelComponentType["SUM_PER_CATEGORY"] = "SUM_PER_CATEGORY";
|
|
9
|
+
PanelComponentType["SUM_PER_CATEGORY_PER_MONTH"] = "SUM_PER_CATEGORY_PER_MONTH";
|
|
10
|
+
PanelComponentType["TRANSACTION_PER_ACCOUNT"] = "TRANSACTION_PER_ACCOUNT";
|
|
11
|
+
PanelComponentType["TRANSACTION_PER_CATEGORY"] = "TRANSACTION_PER_CATEGORY";
|
|
12
|
+
PanelComponentType["TRANSACTION_PER_DAY"] = "TRANSACTION_PER_DAY";
|
|
13
|
+
PanelComponentType["TRANSACTION_TABLE"] = "TRANSACTION_TABLE";
|
|
14
|
+
PanelComponentType["PERIOD_REPORT"] = "PERIOD_REPORT";
|
|
15
|
+
PanelComponentType["MONTHLY_REPORT"] = "MONTHLY_REPORT";
|
|
16
|
+
})(PanelComponentType = exports.PanelComponentType || (exports.PanelComponentType = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PeriodConfiguration = void 0;
|
|
4
|
+
var PeriodConfiguration;
|
|
5
|
+
(function (PeriodConfiguration) {
|
|
6
|
+
PeriodConfiguration["LAST_7_DAYS"] = "LAST_7_DAYS";
|
|
7
|
+
PeriodConfiguration["LAST_30_DAYS"] = "LAST_30_DAYS";
|
|
8
|
+
PeriodConfiguration["LAST_60_DAYS"] = "LAST_60_DAYS";
|
|
9
|
+
PeriodConfiguration["SINCE_START_OF_MONTH"] = "SINCE_START_OF_MONTH";
|
|
10
|
+
PeriodConfiguration["SINCE_START_OF_YEAR"] = "SINCE_START_OF_YEAR";
|
|
11
|
+
})(PeriodConfiguration = exports.PeriodConfiguration || (exports.PeriodConfiguration = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./enum"), exports);
|
|
14
|
+
__exportStar(require("./interface"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export * from './type-message/api-error';
|
|
2
|
+
export * from './type-message/response';
|
|
3
|
+
export * from './type-message/base-order';
|
|
4
|
+
export * from './type-message/base-paginate';
|
|
5
|
+
export * from './requests/abyss.admin.request';
|
|
6
|
+
export * from './requests/user.admin.request';
|
|
7
|
+
export * from './requests/user.request';
|
|
8
|
+
export * from './requests/banking.request';
|
|
9
|
+
export * from './requests/category.request';
|
|
10
|
+
export * from './requests/category.admin.request';
|
|
11
|
+
export * from './requests/banking.admin.request';
|
|
12
|
+
export * from './requests/categorization-rule.request';
|
|
13
|
+
export * from './requests/categorization-rule.admin.request';
|
|
14
|
+
export * from './requests/panel.request';
|
|
15
|
+
export * from './requests/panel.admin.request';
|
|
16
|
+
export * from './responses/abyss.admin.response';
|
|
17
|
+
export * from './responses/monitor.response';
|
|
18
|
+
export * from './responses/user.admin.response';
|
|
19
|
+
export * from './responses/user.response';
|
|
20
|
+
export * from './responses/banking.response';
|
|
21
|
+
export * from './responses/category.response';
|
|
22
|
+
export * from './responses/category.admin.response';
|
|
23
|
+
export * from './responses/banking.admin.response';
|
|
24
|
+
export * from './responses/categorization-rule.response';
|
|
25
|
+
export * from './responses/categorization-rule.admin.response';
|
|
26
|
+
export * from './responses/panel.response';
|
|
27
|
+
export * from './responses/panel.admin.response';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./type-message/api-error"), exports);
|
|
14
|
+
__exportStar(require("./type-message/response"), exports);
|
|
15
|
+
__exportStar(require("./type-message/base-order"), exports);
|
|
16
|
+
__exportStar(require("./type-message/base-paginate"), exports);
|
|
17
|
+
__exportStar(require("./requests/abyss.admin.request"), exports);
|
|
18
|
+
__exportStar(require("./requests/user.admin.request"), exports);
|
|
19
|
+
__exportStar(require("./requests/user.request"), exports);
|
|
20
|
+
__exportStar(require("./requests/banking.request"), exports);
|
|
21
|
+
__exportStar(require("./requests/category.request"), exports);
|
|
22
|
+
__exportStar(require("./requests/category.admin.request"), exports);
|
|
23
|
+
__exportStar(require("./requests/banking.admin.request"), exports);
|
|
24
|
+
__exportStar(require("./requests/categorization-rule.request"), exports);
|
|
25
|
+
__exportStar(require("./requests/categorization-rule.admin.request"), exports);
|
|
26
|
+
__exportStar(require("./requests/panel.request"), exports);
|
|
27
|
+
__exportStar(require("./requests/panel.admin.request"), exports);
|
|
28
|
+
__exportStar(require("./responses/abyss.admin.response"), exports);
|
|
29
|
+
__exportStar(require("./responses/monitor.response"), exports);
|
|
30
|
+
__exportStar(require("./responses/user.admin.response"), exports);
|
|
31
|
+
__exportStar(require("./responses/user.response"), exports);
|
|
32
|
+
__exportStar(require("./responses/banking.response"), exports);
|
|
33
|
+
__exportStar(require("./responses/category.response"), exports);
|
|
34
|
+
__exportStar(require("./responses/category.admin.response"), exports);
|
|
35
|
+
__exportStar(require("./responses/banking.admin.response"), exports);
|
|
36
|
+
__exportStar(require("./responses/categorization-rule.response"), exports);
|
|
37
|
+
__exportStar(require("./responses/categorization-rule.admin.response"), exports);
|
|
38
|
+
__exportStar(require("./responses/panel.response"), exports);
|
|
39
|
+
__exportStar(require("./responses/panel.admin.response"), exports);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { QueryPaginate } from '../type-message/base-paginate';
|
|
2
|
+
export declare type IListInstitutionBankingAdminQuery = {
|
|
3
|
+
countryCode: string;
|
|
4
|
+
};
|
|
5
|
+
export interface IConfirmRequisitionBankingAdminParams {
|
|
6
|
+
userId: string;
|
|
7
|
+
reference: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IListBankConnectionBankingAdminParams {
|
|
10
|
+
userId: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IGetBankConnectionBankingAdminParams {
|
|
13
|
+
bankConnectionId: string;
|
|
14
|
+
}
|
|
15
|
+
export interface IGetAccountTransactionBankingAdminParams {
|
|
16
|
+
accountTransactionId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IUpdateAccountTransactionBankingAdminParams {
|
|
19
|
+
accountTransactionId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IUpdateAccountTransactionBankingAdminBody {
|
|
22
|
+
comment?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare type IPaginateAccountTransactionBankingAdminQuery = {
|
|
25
|
+
description?: string;
|
|
26
|
+
currency?: string;
|
|
27
|
+
bankAccountId: string[];
|
|
28
|
+
categoryId?: string[];
|
|
29
|
+
before?: Date;
|
|
30
|
+
after?: Date;
|
|
31
|
+
onlyWithoutCategories?: boolean;
|
|
32
|
+
categorizationRuleId?: string;
|
|
33
|
+
order?: 'ASC' | 'DESC';
|
|
34
|
+
} & QueryPaginate;
|
|
35
|
+
export interface IUpdateBankAccountBankingAdminParams {
|
|
36
|
+
bankAccountId: string;
|
|
37
|
+
}
|
|
38
|
+
export interface IUpdateBankAccountBankingAdminBody {
|
|
39
|
+
isMasked?: boolean;
|
|
40
|
+
color?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ILoadDemoDataBankingAdminParams {
|
|
43
|
+
userId: string;
|
|
44
|
+
}
|
|
45
|
+
export interface IDeleteDemoDataBankingAdminParams {
|
|
46
|
+
userId: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { QueryPaginate } from '../type-message/base-paginate';
|
|
2
|
+
export interface ICreateRequisitionBankingBody {
|
|
3
|
+
institutionId: string;
|
|
4
|
+
redirectUrl: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IRenewRequisitionBankingParams {
|
|
7
|
+
bankConnectionId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IRenewRequisitionBankingBody {
|
|
10
|
+
redirectUrl: string;
|
|
11
|
+
}
|
|
12
|
+
export declare type IListInstitutionBankingQuery = {
|
|
13
|
+
countryCode: string;
|
|
14
|
+
};
|
|
15
|
+
export interface IConfirmRequisitionBankingParams {
|
|
16
|
+
reference: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IGetBankConnectionBankingParams {
|
|
19
|
+
bankConnectionId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IGetAccountTransactionBankingParams {
|
|
22
|
+
accountTransactionId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface IUpdateAccountTransactionBankingParams {
|
|
25
|
+
accountTransactionId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface IUpdateAccountTransactionBankingBody {
|
|
28
|
+
comment?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare type IPaginateAccountTransactionBankingQuery = {
|
|
31
|
+
description?: string;
|
|
32
|
+
currency?: string;
|
|
33
|
+
bankAccountId?: string[];
|
|
34
|
+
categoryId?: string[];
|
|
35
|
+
before?: Date;
|
|
36
|
+
after?: Date;
|
|
37
|
+
onlyWithoutCategories?: boolean;
|
|
38
|
+
categorizationRuleId?: string;
|
|
39
|
+
order?: 'ASC' | 'DESC';
|
|
40
|
+
} & QueryPaginate;
|
|
41
|
+
export interface IUpdateBankAccountBankingParams {
|
|
42
|
+
bankAccountId: string;
|
|
43
|
+
}
|
|
44
|
+
export interface IUpdateBankAccountBankingBody {
|
|
45
|
+
isMasked?: boolean;
|
|
46
|
+
color?: string;
|
|
47
|
+
commonName?: string | null;
|
|
48
|
+
}
|
|
49
|
+
export interface IGetTransactionPerCategoryBankingQuery {
|
|
50
|
+
bankAccountId?: string[];
|
|
51
|
+
before?: Date;
|
|
52
|
+
after?: Date;
|
|
53
|
+
}
|
|
54
|
+
export interface IGetSumTransactionPerBankAccountPerCategoryQuery {
|
|
55
|
+
bankAccountId: string[];
|
|
56
|
+
before?: Date;
|
|
57
|
+
after?: Date;
|
|
58
|
+
}
|
|
59
|
+
export interface IGetSumTransactionPerBankAccountPerCategoryPerMonthQuery {
|
|
60
|
+
bankAccountId?: string[];
|
|
61
|
+
before?: Date;
|
|
62
|
+
after?: Date;
|
|
63
|
+
}
|
|
64
|
+
export declare type IPaginateBankAccountHistoryBankingQuery = {
|
|
65
|
+
bankAccountId?: string[];
|
|
66
|
+
before?: Date;
|
|
67
|
+
after?: Date;
|
|
68
|
+
order?: 'ASC' | 'DESC';
|
|
69
|
+
} & QueryPaginate;
|
|
70
|
+
export declare type IListBankAccountHistoryBankingQuery = {
|
|
71
|
+
bankAccountId?: string[];
|
|
72
|
+
before?: Date;
|
|
73
|
+
after?: Date;
|
|
74
|
+
order?: 'ASC' | 'DESC';
|
|
75
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CategorizationRules } from '../../models/categorization-rule.model';
|
|
2
|
+
import { QueryPaginate } from '../type-message/base-paginate';
|
|
3
|
+
export declare type IPaginateCategorizationRuleAdminQuery = {
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
userId?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
} & QueryPaginate;
|
|
8
|
+
export interface IGetCategorizationRuleAdminParams {
|
|
9
|
+
categorizationRuleId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IDeleteCategorizationRuleAdminParams {
|
|
12
|
+
categorizationRuleId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ICreateCategorizationRuleAdminBody {
|
|
15
|
+
userId: string;
|
|
16
|
+
name: string;
|
|
17
|
+
description: string | null;
|
|
18
|
+
rules: CategorizationRules[];
|
|
19
|
+
isActive: boolean;
|
|
20
|
+
categoryIds: string[];
|
|
21
|
+
}
|
|
22
|
+
export interface IUpdateCategorizationRuleAdminParams {
|
|
23
|
+
categorizationRuleId: string;
|
|
24
|
+
}
|
|
25
|
+
export interface IUpdateCategorizationRuleAdminBody {
|
|
26
|
+
name?: string;
|
|
27
|
+
description?: string | null;
|
|
28
|
+
rules?: CategorizationRules[];
|
|
29
|
+
isActive?: boolean;
|
|
30
|
+
categoryIds?: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface IApplyCategorizationRuleAdminParams {
|
|
33
|
+
categorizationRuleId: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CategorizationRules } from '../../models/categorization-rule.model';
|
|
2
|
+
import { QueryPaginate } from '../type-message/base-paginate';
|
|
3
|
+
export declare type IPaginateCategorizationRuleQuery = {
|
|
4
|
+
name?: string;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
} & QueryPaginate;
|
|
7
|
+
export interface IGetCategorizationRuleParams {
|
|
8
|
+
categorizationRuleId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IDeleteCategorizationRuleParams {
|
|
11
|
+
categorizationRuleId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IApplyCategorizationRuleParams {
|
|
14
|
+
categorizationRuleId: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ICreateCategorizationRuleBody {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string | null;
|
|
19
|
+
rules: CategorizationRules[];
|
|
20
|
+
isActive: boolean;
|
|
21
|
+
categoryIds: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface IUpdateCategorizationRuleParams {
|
|
24
|
+
categorizationRuleId: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IUpdateCategorizationRuleBody {
|
|
27
|
+
name?: string;
|
|
28
|
+
description?: string | null;
|
|
29
|
+
rules?: CategorizationRules[];
|
|
30
|
+
isActive?: boolean;
|
|
31
|
+
categoryIds?: string[];
|
|
32
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { QueryPaginate } from '..';
|
|
2
|
+
export interface IDeleteCategoryAdminParams {
|
|
3
|
+
categoryId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ICreateCategoryAdminBody {
|
|
6
|
+
userId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
color: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IUpdateCategoryAdminParams {
|
|
11
|
+
categoryId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IUpdateCategoryAdminBody {
|
|
14
|
+
name?: string;
|
|
15
|
+
color?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare type IPaginateCategoryAdminQuery = {
|
|
18
|
+
userId?: string;
|
|
19
|
+
} & QueryPaginate;
|
|
20
|
+
export interface IGetCategoryAdminParams {
|
|
21
|
+
categoryId: string;
|
|
22
|
+
}
|