@abyss-project/banking 1.0.0 → 1.0.1

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 (67) hide show
  1. package/package.json +1 -1
  2. package/src/api/abyss.admin.api.ts +0 -16
  3. package/src/api/banking.admin.api.ts +0 -141
  4. package/src/api/banking.api.ts +0 -197
  5. package/src/api/categorization-rule.admin.api.ts +0 -80
  6. package/src/api/categorization-rule.api.ts +0 -80
  7. package/src/api/category.admin.api.ts +0 -63
  8. package/src/api/category.api.ts +0 -74
  9. package/src/api/index.ts +0 -12
  10. package/src/api/monitor.api.ts +0 -6
  11. package/src/api/panel.admin.api.ts +0 -57
  12. package/src/api/panel.api.ts +0 -45
  13. package/src/api/user.admin.api.ts +0 -44
  14. package/src/api/user.api.ts +0 -20
  15. package/src/index.ts +0 -72
  16. package/src/types/enum/aggregator-type.enum.ts +0 -4
  17. package/src/types/enum/api-error.enum.ts +0 -18
  18. package/src/types/enum/bank-connection-status.enum.ts +0 -6
  19. package/src/types/enum/cash-account-type.enum.ts +0 -54
  20. package/src/types/enum/index.ts +0 -7
  21. package/src/types/enum/panel-component-type.enum.ts +0 -12
  22. package/src/types/enum/period-configuration.enum.ts +0 -7
  23. package/src/types/index.ts +0 -2
  24. package/src/types/interface/api/index.ts +0 -29
  25. package/src/types/interface/api/requests/abyss.admin.request.ts +0 -3
  26. package/src/types/interface/api/requests/banking.admin.request.ts +0 -57
  27. package/src/types/interface/api/requests/banking.request.ts +0 -89
  28. package/src/types/interface/api/requests/categorization-rule.admin.request.ts +0 -40
  29. package/src/types/interface/api/requests/categorization-rule.request.ts +0 -38
  30. package/src/types/interface/api/requests/category.admin.request.ts +0 -27
  31. package/src/types/interface/api/requests/category.request.ts +0 -31
  32. package/src/types/interface/api/requests/panel.admin.request.ts +0 -28
  33. package/src/types/interface/api/requests/panel.request.ts +0 -27
  34. package/src/types/interface/api/requests/user.admin.request.ts +0 -20
  35. package/src/types/interface/api/requests/user.request.ts +0 -2
  36. package/src/types/interface/api/responses/abyss.admin.response.ts +0 -7
  37. package/src/types/interface/api/responses/banking.admin.response.ts +0 -73
  38. package/src/types/interface/api/responses/banking.response.ts +0 -119
  39. package/src/types/interface/api/responses/categorization-rule.admin.response.ts +0 -28
  40. package/src/types/interface/api/responses/categorization-rule.response.ts +0 -28
  41. package/src/types/interface/api/responses/category.admin.response.ts +0 -24
  42. package/src/types/interface/api/responses/category.response.ts +0 -39
  43. package/src/types/interface/api/responses/monitor.response.ts +0 -8
  44. package/src/types/interface/api/responses/panel.admin.response.ts +0 -24
  45. package/src/types/interface/api/responses/panel.response.ts +0 -24
  46. package/src/types/interface/api/responses/storage.admin.response.ts +0 -4
  47. package/src/types/interface/api/responses/user.admin.response.ts +0 -18
  48. package/src/types/interface/api/responses/user.response.ts +0 -16
  49. package/src/types/interface/api/type-message/api-error.ts +0 -9
  50. package/src/types/interface/api/type-message/base-order.ts +0 -4
  51. package/src/types/interface/api/type-message/base-paginate.ts +0 -11
  52. package/src/types/interface/api/type-message/response.ts +0 -6
  53. package/src/types/interface/index.ts +0 -15
  54. package/src/types/interface/models/account-transaction.model.ts +0 -53
  55. package/src/types/interface/models/aggregator-bank.model.ts +0 -15
  56. package/src/types/interface/models/aggregator-link.model.ts +0 -15
  57. package/src/types/interface/models/bank-account-history.model.ts +0 -14
  58. package/src/types/interface/models/bank-account.model.ts +0 -29
  59. package/src/types/interface/models/bank-connection.model.ts +0 -20
  60. package/src/types/interface/models/categorization-rule-category.model.ts +0 -14
  61. package/src/types/interface/models/categorization-rule.model.ts +0 -48
  62. package/src/types/interface/models/category.model.ts +0 -17
  63. package/src/types/interface/models/panel.model.ts +0 -135
  64. package/src/types/interface/models/transaction-category.model.ts +0 -17
  65. package/src/types/interface/models/user.model.ts +0 -16
  66. package/src/utils/error.utils.ts +0 -30
  67. package/src/utils/index.ts +0 -1
@@ -1,57 +0,0 @@
1
- import {
2
- AbyssBankingCore,
3
- ICreatePanelAdminBody,
4
- ICreatePanelAdminResponse,
5
- IDeletePanelAdminParams,
6
- IDeletePanelAdminResponse,
7
- IGetPanelAdminParams,
8
- IGetPanelAdminResponse,
9
- IPaginatePanelAdminQuery,
10
- IPaginatePanelAdminResponse,
11
- IUpdatePanelAdminBody,
12
- IUpdatePanelAdminParams,
13
- IUpdatePanelAdminResponse,
14
- } from '..';
15
-
16
- export const getPanelAdmin = async (
17
- params: IGetPanelAdminParams,
18
- ): Promise<IGetPanelAdminResponse> => {
19
- return (await AbyssBankingCore.axios.get<IGetPanelAdminResponse>(`panel/admin/${params.panelId}`))
20
- .data;
21
- };
22
-
23
- export const paginatePanelAdmin = async (
24
- query: IPaginatePanelAdminQuery,
25
- ): Promise<IPaginatePanelAdminResponse> => {
26
- return (
27
- await AbyssBankingCore.axios.get<IPaginatePanelAdminResponse>(`panel/admin/paginate`, {
28
- params: query,
29
- })
30
- ).data;
31
- };
32
-
33
- export const deletePanelAdmin = async (
34
- params: IDeletePanelAdminParams,
35
- ): Promise<IDeletePanelAdminResponse> => {
36
- return (
37
- await AbyssBankingCore.axios.delete<IDeletePanelAdminResponse>(`panel/admin/${params.panelId}`)
38
- ).data;
39
- };
40
-
41
- export const createPanelAdmin = async (
42
- body: ICreatePanelAdminBody,
43
- ): Promise<ICreatePanelAdminResponse> => {
44
- return (await AbyssBankingCore.axios.post<ICreatePanelAdminResponse>(`panel/admin`, body)).data;
45
- };
46
-
47
- export const updatePanelAdmin = async (
48
- params: IUpdatePanelAdminParams,
49
- body: IUpdatePanelAdminBody,
50
- ): Promise<IUpdatePanelAdminResponse> => {
51
- return (
52
- await AbyssBankingCore.axios.put<IUpdatePanelAdminResponse>(
53
- `panel/admin/${params.panelId}`,
54
- body,
55
- )
56
- ).data;
57
- };
@@ -1,45 +0,0 @@
1
- import {
2
- AbyssBankingCore,
3
- ICreatePanelBody,
4
- ICreatePanelResponse,
5
- IDeletePanelParams,
6
- IDeletePanelResponse,
7
- IGetPanelParams,
8
- IGetPanelResponse,
9
- IPaginatePanelQuery,
10
- IPaginatePanelResponse,
11
- IUpdatePanelBody,
12
- IUpdatePanelParams,
13
- IUpdatePanelResponse,
14
- } from '..';
15
-
16
- export const getPanel = async (params: IGetPanelParams): Promise<IGetPanelResponse> => {
17
- return (await AbyssBankingCore.axios.get<IGetPanelResponse>(`panel/${params.panelId}`)).data;
18
- };
19
-
20
- export const paginatePanel = async (
21
- query: IPaginatePanelQuery,
22
- ): Promise<IPaginatePanelResponse> => {
23
- return (
24
- await AbyssBankingCore.axios.get<IPaginatePanelResponse>(`panel/paginate`, {
25
- params: query,
26
- })
27
- ).data;
28
- };
29
-
30
- export const deletePanel = async (params: IDeletePanelParams): Promise<IDeletePanelResponse> => {
31
- return (await AbyssBankingCore.axios.delete<IDeletePanelResponse>(`panel/${params.panelId}`))
32
- .data;
33
- };
34
-
35
- export const createPanel = async (body: ICreatePanelBody): Promise<ICreatePanelResponse> => {
36
- return (await AbyssBankingCore.axios.post<ICreatePanelResponse>(`panel`, body)).data;
37
- };
38
-
39
- export const updatePanel = async (
40
- params: IUpdatePanelParams,
41
- body: IUpdatePanelBody,
42
- ): Promise<IUpdatePanelResponse> => {
43
- return (await AbyssBankingCore.axios.put<IUpdatePanelResponse>(`panel/${params.panelId}`, body))
44
- .data;
45
- };
@@ -1,44 +0,0 @@
1
- import {
2
- IGetUserAdminParams,
3
- IGetUserAdminResponse,
4
- IUpdateUserAdminParams,
5
- IUpdateUserAdminResponse,
6
- IUpdateUserAdminBody,
7
- IPaginateUserAdminResponse,
8
- IPaginateUserAdminQuery,
9
- IResetApiKeyUserAdminResponse,
10
- IResetApiKeyUserAdminParams,
11
- AbyssBankingCore,
12
- } from '..';
13
-
14
- export const getUserAdmin = async (params: IGetUserAdminParams): Promise<IGetUserAdminResponse> => {
15
- return (await AbyssBankingCore.axios.get<IGetUserAdminResponse>(`user/admin/${params.userId}`))
16
- .data;
17
- };
18
-
19
- export const resetApiKeyUserAdmin = async (
20
- params: IResetApiKeyUserAdminParams,
21
- ): Promise<IResetApiKeyUserAdminResponse> => {
22
- return (
23
- await AbyssBankingCore.axios.post<IResetApiKeyUserAdminResponse>(`user/admin/${params.userId}`)
24
- ).data;
25
- };
26
-
27
- export const paginateUserAdmin = async (
28
- query: IPaginateUserAdminQuery,
29
- ): Promise<IPaginateUserAdminResponse> => {
30
- return (
31
- await AbyssBankingCore.axios.get<IPaginateUserAdminResponse>(`user/admin/paginate`, {
32
- params: query,
33
- })
34
- ).data;
35
- };
36
-
37
- export const updateUserAdmin = async (
38
- params: IUpdateUserAdminParams,
39
- body: IUpdateUserAdminBody,
40
- ): Promise<IUpdateUserAdminResponse> => {
41
- return (
42
- await AbyssBankingCore.axios.put<IUpdateUserAdminResponse>(`user/admin/${params.userId}`, body)
43
- ).data;
44
- };
@@ -1,20 +0,0 @@
1
- import {
2
- IMeUserResponse,
3
- IUpdateUserBody,
4
- IUpdateUserResponse,
5
- IResetApiKeyUserResponse,
6
- AbyssBankingCore,
7
- } from '..';
8
-
9
- export const meUser = async (): Promise<IMeUserResponse> => {
10
- return (await AbyssBankingCore.axios.get<IMeUserResponse>(`user/me`)).data;
11
- };
12
-
13
- export const updateUser = async (body: IUpdateUserBody): Promise<IUpdateUserResponse> => {
14
- return (await AbyssBankingCore.axios.put<IUpdateUserResponse>(`user/me`, body)).data;
15
- };
16
-
17
- export const resetApiKeyUser = async (): Promise<IResetApiKeyUserResponse> => {
18
- return (await AbyssBankingCore.axios.post<IResetApiKeyUserResponse>(`user/me/reset-api-key`))
19
- .data;
20
- };
package/src/index.ts DELETED
@@ -1,72 +0,0 @@
1
- import axios from 'axios';
2
- import axiosRetry, { IAxiosRetryConfig, isNetworkOrIdempotentRequestError } from 'axios-retry';
3
-
4
- export * from './types';
5
- export * from './utils';
6
- export * from './api';
7
-
8
- const DEFAULT_BASE_URL = 'https://banking-api.abyss-project.fr/api/';
9
-
10
- export const API_KEY_HEADER = 'abyss-banking-api-key';
11
- export const ADMIN_TOKEN_HEADER = 'abyss-admin-token';
12
-
13
- const NUMBER_RETRY_API = 10;
14
- const BASE_DELAY_BETWEEN_RETRY = 5000;
15
- const RETRY_CODES = [
16
- 502, // Note(Mehdi): Bad Gateway
17
- 503, // Note(Mehdi): Service Unavailable
18
- ];
19
-
20
- type CoreConfig = {
21
- token?: string;
22
- apiKey?: string;
23
- adminToken?: string;
24
- baseURL?: string;
25
- };
26
-
27
- export class AbyssBankingCore {
28
- private static config = {
29
- token: '',
30
- apiKey: '',
31
- apiKeyApplication: '',
32
- applicationId: '',
33
- adminToken: '',
34
- baseURL: DEFAULT_BASE_URL,
35
- };
36
- static axios = axios.create({ baseURL: `` });
37
-
38
- public static enableAxiosRetry(axiosRetryConfig?: IAxiosRetryConfig): void {
39
- axiosRetry(AbyssBankingCore.axios, {
40
- retries: NUMBER_RETRY_API,
41
- retryDelay: (retryCount) => retryCount * BASE_DELAY_BETWEEN_RETRY,
42
- retryCondition: (error) =>
43
- isNetworkOrIdempotentRequestError(error) ||
44
- RETRY_CODES.includes(error.response?.status || 502),
45
- ...axiosRetryConfig,
46
- });
47
- }
48
-
49
- public static setConfig(config: CoreConfig): void {
50
- AbyssBankingCore.config = { ...AbyssBankingCore.config, ...config };
51
-
52
- if (config.baseURL) {
53
- AbyssBankingCore.axios.defaults.baseURL = config.baseURL;
54
- }
55
-
56
- if (config.token) {
57
- AbyssBankingCore.axios.defaults.headers.common.Authorization = `Bearer ${config.token}`;
58
- }
59
-
60
- if (config.apiKey) {
61
- AbyssBankingCore.axios.defaults.headers.common[API_KEY_HEADER] = `${config.apiKey}`;
62
- }
63
-
64
- if (config.adminToken) {
65
- AbyssBankingCore.axios.defaults.headers.common[ADMIN_TOKEN_HEADER] = `${config.adminToken}`;
66
- }
67
- }
68
-
69
- public static getConfig(): CoreConfig {
70
- return AbyssBankingCore.config;
71
- }
72
- }
@@ -1,4 +0,0 @@
1
- export enum AggregatorType {
2
- GOCARDLESS = 'GOCARDLESS',
3
- DEMO_DATA_BANKING = 'DEMO_DATA_BANKING',
4
- }
@@ -1,18 +0,0 @@
1
- export enum ErrorType {
2
- apiError = 'api_error',
3
- authError = 'authentication_error',
4
- resourceError = 'resource_error',
5
- }
6
-
7
- export enum Code {
8
- // HTTP Error
9
- tokenFailure = 'token_authentication_failure',
10
- authenticationFailure = 'authentication_credentials_failure',
11
- accessNotAllowed = 'access_not_allowed',
12
- notFound = 'not_found',
13
- validationError = 'resource_validation_error',
14
- constraintError = 'resource_constraint_error',
15
- internalServerError = 'internal_server_error',
16
- serviceUnavailable = 'service_unavailable',
17
- invalidData = 'invalid_data',
18
- }
@@ -1,6 +0,0 @@
1
- export enum BankConnectionStatus {
2
- PENDING = 'PENDING',
3
- FAILED = 'FAILED',
4
- SUCCESS = 'SUCCESS',
5
- EXPIRED = 'EXPIRED',
6
- }
@@ -1,54 +0,0 @@
1
- /**
2
- External code sets can be downloaded from www.iso20022.org.
3
-
4
- CACC Account used to post debits and credits when no specific account has been nominated.
5
- CARD Account used for credit card payments.
6
- CASH Account used for the payment of cash.
7
- CHAR Account used for charges if different from the account for payment.
8
- CISH Account used for payment of income if different from the current cash account
9
- COMM Account used for commission if different from the account for payment.
10
- CPAC Account used to post settlement debit and credit entries on behalf of a designated Clearing Participant.
11
- LLSV Account used for savings with special interest and withdrawal terms.
12
- LOAN Account used for loans.
13
- MGLD Account used for a marginal lending facility.
14
- MOMA Account used for money markets if different from the cash account.
15
- NREX Account used for non-resident external.
16
- ODFT Account is used for overdrafts.
17
- ONDP Account used for overnight deposits.
18
- OTHR Account not otherwise specified.
19
- SACC Account used to post debit and credit entries, as a result of transactions cleared and settled through a specific clearing and settlement system.
20
- SLRY Accounts used for salary payments.
21
- SVGS Account used for savings.
22
- TAXE Account used for taxes if different from the account for payment.
23
- TRAN A transacting account is the most basic type of bank account that you can get. The main difference between transaction and cheque accounts is that you usually do not get a cheque book with your transacting account and neither are you offered an overdraft facility.
24
- TRAS Account used for trading if different from the current cash account.
25
- VACC Account created virtually to facilitate collection and reconciliation.
26
- NFCA Non-Resident Individual / Entity Foreign Current held domestically.
27
- */
28
-
29
- export enum CashAccountType {
30
- 'CACC' = 'CACC',
31
- 'CARD' = 'CARD',
32
- 'CASH' = 'CASH',
33
- 'CHAR' = 'CHAR',
34
- 'CISH' = 'CISH',
35
- 'COMM' = 'COMM',
36
- 'CPAC' = 'CPAC',
37
- 'LLSV' = 'LLSV',
38
- 'LOAN' = 'LOAN',
39
- 'MGLD' = 'MGLD',
40
- 'MOMA' = 'MOMA',
41
- 'NREX' = 'NREX',
42
- 'ODFT' = 'ODFT',
43
- 'ONDP' = 'ONDP',
44
- 'OTHR' = 'OTHR',
45
- 'SACC' = 'SACC',
46
- 'SLRY' = 'SLRY',
47
- 'SVGS' = 'SVGS',
48
- 'TAXE' = 'TAXE',
49
- 'TRAN' = 'TRAN',
50
- 'TRAS' = 'TRAS',
51
- 'VACC' = 'VACC',
52
- 'NFCA' = 'NFCA',
53
- 'UNKNOWN' = 'UNKNOWN',
54
- }
@@ -1,7 +0,0 @@
1
- export * from './api-error.enum';
2
-
3
- export * from './aggregator-type.enum';
4
- export * from './bank-connection-status.enum';
5
- export * from './cash-account-type.enum';
6
- export * from './period-configuration.enum';
7
- export * from './panel-component-type.enum';
@@ -1,12 +0,0 @@
1
- export 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
- }
@@ -1,7 +0,0 @@
1
- export enum PeriodConfiguration {
2
- LAST_7_DAYS = 'LAST_7_DAYS',
3
- LAST_30_DAYS = 'LAST_30_DAYS',
4
- LAST_60_DAYS = 'LAST_60_DAYS',
5
- SINCE_START_OF_MONTH = 'SINCE_START_OF_MONTH',
6
- SINCE_START_OF_YEAR = 'SINCE_START_OF_YEAR',
7
- }
@@ -1,2 +0,0 @@
1
- export * from './enum';
2
- export * from './interface';
@@ -1,29 +0,0 @@
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
-
6
- export * from './requests/abyss.admin.request';
7
- export * from './requests/user.admin.request';
8
- export * from './requests/user.request';
9
- export * from './requests/banking.request';
10
- export * from './requests/category.request';
11
- export * from './requests/category.admin.request';
12
- export * from './requests/banking.admin.request';
13
- export * from './requests/categorization-rule.request';
14
- export * from './requests/categorization-rule.admin.request';
15
- export * from './requests/panel.request';
16
- export * from './requests/panel.admin.request';
17
-
18
- export * from './responses/abyss.admin.response';
19
- export * from './responses/monitor.response';
20
- export * from './responses/user.admin.response';
21
- export * from './responses/user.response';
22
- export * from './responses/banking.response';
23
- export * from './responses/category.response';
24
- export * from './responses/category.admin.response';
25
- export * from './responses/banking.admin.response';
26
- export * from './responses/categorization-rule.response';
27
- export * from './responses/categorization-rule.admin.response';
28
- export * from './responses/panel.response';
29
- export * from './responses/panel.admin.response';
@@ -1,3 +0,0 @@
1
- export interface IActivateUserServiceAbyssAdminBody {
2
- userId: string;
3
- }
@@ -1,57 +0,0 @@
1
- import { QueryPaginate } from '../type-message/base-paginate';
2
-
3
- export type IListInstitutionBankingAdminQuery = {
4
- countryCode: string;
5
- };
6
-
7
- export interface IConfirmRequisitionBankingAdminParams {
8
- userId: string;
9
- reference: string;
10
- }
11
-
12
- export interface IListBankConnectionBankingAdminParams {
13
- userId: string;
14
- }
15
-
16
- export interface IGetBankConnectionBankingAdminParams {
17
- bankConnectionId: string;
18
- }
19
-
20
- export interface IGetAccountTransactionBankingAdminParams {
21
- accountTransactionId: string;
22
- }
23
-
24
- export interface IUpdateAccountTransactionBankingAdminParams {
25
- accountTransactionId: string;
26
- }
27
- export interface IUpdateAccountTransactionBankingAdminBody {
28
- comment?: string;
29
- }
30
-
31
- export type IPaginateAccountTransactionBankingAdminQuery = {
32
- description?: string;
33
- currency?: string;
34
- bankAccountId: string[];
35
- categoryId?: string[];
36
- before?: Date;
37
- after?: Date;
38
- onlyWithoutCategories?: boolean;
39
- categorizationRuleId?: string;
40
- order?: 'ASC' | 'DESC';
41
- } & QueryPaginate;
42
-
43
- export interface IUpdateBankAccountBankingAdminParams {
44
- bankAccountId: string;
45
- }
46
- export interface IUpdateBankAccountBankingAdminBody {
47
- isMasked?: boolean;
48
- color?: string;
49
- }
50
-
51
- export interface ILoadDemoDataBankingAdminParams {
52
- userId: string;
53
- }
54
-
55
- export interface IDeleteDemoDataBankingAdminParams {
56
- userId: string;
57
- }
@@ -1,89 +0,0 @@
1
- import { QueryPaginate } from '../type-message/base-paginate';
2
-
3
- export interface ICreateRequisitionBankingBody {
4
- institutionId: string;
5
- redirectUrl: string;
6
- }
7
-
8
- export interface IRenewRequisitionBankingParams {
9
- bankConnectionId: string;
10
- }
11
- export interface IRenewRequisitionBankingBody {
12
- redirectUrl: string;
13
- }
14
-
15
- export type IListInstitutionBankingQuery = {
16
- countryCode: string;
17
- };
18
-
19
- export interface IConfirmRequisitionBankingParams {
20
- reference: string;
21
- }
22
-
23
- export interface IGetBankConnectionBankingParams {
24
- bankConnectionId: string;
25
- }
26
-
27
- export interface IGetAccountTransactionBankingParams {
28
- accountTransactionId: string;
29
- }
30
-
31
- export interface IUpdateAccountTransactionBankingParams {
32
- accountTransactionId: string;
33
- }
34
- export interface IUpdateAccountTransactionBankingBody {
35
- comment?: string;
36
- }
37
-
38
- export type IPaginateAccountTransactionBankingQuery = {
39
- description?: string;
40
- currency?: string;
41
- bankAccountId?: string[];
42
- categoryId?: string[];
43
- before?: Date;
44
- after?: Date;
45
- onlyWithoutCategories?: boolean;
46
- categorizationRuleId?: string;
47
- order?: 'ASC' | 'DESC';
48
- } & QueryPaginate;
49
-
50
- export interface IUpdateBankAccountBankingParams {
51
- bankAccountId: string;
52
- }
53
- export interface IUpdateBankAccountBankingBody {
54
- isMasked?: boolean;
55
- color?: string;
56
- commonName?: string | null;
57
- }
58
-
59
- export interface IGetTransactionPerCategoryBankingQuery {
60
- bankAccountId?: string[];
61
- before?: Date;
62
- after?: Date;
63
- }
64
-
65
- export interface IGetSumTransactionPerBankAccountPerCategoryQuery {
66
- bankAccountId: string[];
67
- before?: Date;
68
- after?: Date;
69
- }
70
-
71
- export interface IGetSumTransactionPerBankAccountPerCategoryPerMonthQuery {
72
- bankAccountId?: string[];
73
- before?: Date;
74
- after?: Date;
75
- }
76
-
77
- export type IPaginateBankAccountHistoryBankingQuery = {
78
- bankAccountId?: string[];
79
- before?: Date;
80
- after?: Date;
81
- order?: 'ASC' | 'DESC';
82
- } & QueryPaginate;
83
-
84
- export type IListBankAccountHistoryBankingQuery = {
85
- bankAccountId?: string[];
86
- before?: Date;
87
- after?: Date;
88
- order?: 'ASC' | 'DESC';
89
- };
@@ -1,40 +0,0 @@
1
- import { CategorizationRules } from '../../models/categorization-rule.model';
2
- import { QueryPaginate } from '../type-message/base-paginate';
3
-
4
- export type IPaginateCategorizationRuleAdminQuery = {
5
- isActive?: boolean;
6
- userId?: string;
7
- name?: string;
8
- } & QueryPaginate;
9
-
10
- export interface IGetCategorizationRuleAdminParams {
11
- categorizationRuleId: string;
12
- }
13
-
14
- export interface IDeleteCategorizationRuleAdminParams {
15
- categorizationRuleId: string;
16
- }
17
-
18
- export interface ICreateCategorizationRuleAdminBody {
19
- userId: string;
20
- name: string;
21
- description: string | null;
22
- rules: CategorizationRules[];
23
- isActive: boolean;
24
- categoryIds: string[];
25
- }
26
-
27
- export interface IUpdateCategorizationRuleAdminParams {
28
- categorizationRuleId: string;
29
- }
30
- export interface IUpdateCategorizationRuleAdminBody {
31
- name?: string;
32
- description?: string | null;
33
- rules?: CategorizationRules[];
34
- isActive?: boolean;
35
- categoryIds?: string[];
36
- }
37
-
38
- export interface IApplyCategorizationRuleAdminParams {
39
- categorizationRuleId: string;
40
- }
@@ -1,38 +0,0 @@
1
- import { CategorizationRules } from '../../models/categorization-rule.model';
2
- import { QueryPaginate } from '../type-message/base-paginate';
3
-
4
- export type IPaginateCategorizationRuleQuery = {
5
- name?: string;
6
- isActive?: boolean;
7
- } & QueryPaginate;
8
-
9
- export interface IGetCategorizationRuleParams {
10
- categorizationRuleId: string;
11
- }
12
-
13
- export interface IDeleteCategorizationRuleParams {
14
- categorizationRuleId: string;
15
- }
16
-
17
- export interface IApplyCategorizationRuleParams {
18
- categorizationRuleId: string;
19
- }
20
-
21
- export interface ICreateCategorizationRuleBody {
22
- name: string;
23
- description: string | null;
24
- rules: CategorizationRules[];
25
- isActive: boolean;
26
- categoryIds: string[];
27
- }
28
-
29
- export interface IUpdateCategorizationRuleParams {
30
- categorizationRuleId: string;
31
- }
32
- export interface IUpdateCategorizationRuleBody {
33
- name?: string;
34
- description?: string | null;
35
- rules?: CategorizationRules[];
36
- isActive?: boolean;
37
- categoryIds?: string[];
38
- }
@@ -1,27 +0,0 @@
1
- import { QueryPaginate } from '..';
2
-
3
- export interface IDeleteCategoryAdminParams {
4
- categoryId: string;
5
- }
6
-
7
- export interface ICreateCategoryAdminBody {
8
- userId: string;
9
- name: string;
10
- color: string;
11
- }
12
-
13
- export interface IUpdateCategoryAdminParams {
14
- categoryId: string;
15
- }
16
- export interface IUpdateCategoryAdminBody {
17
- name?: string;
18
- color?: string;
19
- }
20
-
21
- export type IPaginateCategoryAdminQuery = {
22
- userId?: string;
23
- } & QueryPaginate;
24
-
25
- export interface IGetCategoryAdminParams {
26
- categoryId: string;
27
- }
@@ -1,31 +0,0 @@
1
- export interface IRemoveCategoryParams {
2
- transactionCategoryId: string;
3
- }
4
-
5
- export interface IAddCategoryParams {
6
- categoryId: string;
7
- accountTransactionId: string;
8
- }
9
-
10
- export interface IDeleteCategoryParams {
11
- categoryId: string;
12
- }
13
-
14
- export interface ICreateCategoryBody {
15
- name: string;
16
- color: string;
17
- }
18
-
19
- export interface IUpdateCategoryParams {
20
- categoryId: string;
21
- }
22
- export interface IUpdateCategoryBody {
23
- name?: string;
24
- color?: string;
25
- }
26
-
27
- export interface IListAnalyticsCategoryQuery {
28
- bankAccountId?: string[];
29
- before?: Date;
30
- after?: Date;
31
- }