@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,197 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AbyssBankingCore,
|
|
3
|
+
IConfirmRequisitionBankingParams,
|
|
4
|
+
IConfirmRequisitionBankingResponse,
|
|
5
|
+
ICreateRequisitionBankingBody,
|
|
6
|
+
ICreateRequisitionBankingResponse,
|
|
7
|
+
IListInstitutionBankingResponse,
|
|
8
|
+
IListInstitutionBankingQuery,
|
|
9
|
+
IListConnectionBankingResponse,
|
|
10
|
+
IListBankBankingResponse,
|
|
11
|
+
IGetBankConnectionBankingResponse,
|
|
12
|
+
IGetBankConnectionBankingParams,
|
|
13
|
+
IRenewRequisitionBankingParams,
|
|
14
|
+
IRenewRequisitionBankingResponse,
|
|
15
|
+
IRenewRequisitionBankingBody,
|
|
16
|
+
IPaginateAccountTransactionBankingQuery,
|
|
17
|
+
IPaginateAccountTransactionBankingResponse,
|
|
18
|
+
IGetAccountTransactionBankingParams,
|
|
19
|
+
IGetAccountTransactionBankingResponse,
|
|
20
|
+
IUpdateBankAccountBankingParams,
|
|
21
|
+
IUpdateBankAccountBankingBody,
|
|
22
|
+
IUpdateBankAccountBankingResponse,
|
|
23
|
+
ILoadDemoDataBankingResponse,
|
|
24
|
+
IDeleteDemoDataBankingResponse,
|
|
25
|
+
IGetTransactionPerCategoryBankingQuery,
|
|
26
|
+
IGetTransactionPerCategoryBankingResponse,
|
|
27
|
+
IGetSumTransactionPerBankAccountPerCategoryQuery,
|
|
28
|
+
IGetSumTransactionPerBankAccountPerCategoryBankingResponse,
|
|
29
|
+
IPaginateBankAccountHistoryBankingQuery,
|
|
30
|
+
IPaginateBankAccountHistoryBankingResponse,
|
|
31
|
+
IListBankAccountHistoryBankingQuery,
|
|
32
|
+
IListBankAccountHistoryBankingResponse,
|
|
33
|
+
IUpdateAccountTransactionBankingParams,
|
|
34
|
+
IUpdateAccountTransactionBankingBody,
|
|
35
|
+
} from '..';
|
|
36
|
+
|
|
37
|
+
export const listConnectionBanking = async (): Promise<IListConnectionBankingResponse> => {
|
|
38
|
+
return (
|
|
39
|
+
await AbyssBankingCore.axios.get<IListConnectionBankingResponse>(`banking/connection/list`)
|
|
40
|
+
).data;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const getBankConnectionBanking = async (
|
|
44
|
+
params: IGetBankConnectionBankingParams,
|
|
45
|
+
): Promise<IGetBankConnectionBankingResponse> => {
|
|
46
|
+
return (
|
|
47
|
+
await AbyssBankingCore.axios.get<IGetBankConnectionBankingResponse>(
|
|
48
|
+
`banking/connection/${params.bankConnectionId}`,
|
|
49
|
+
)
|
|
50
|
+
).data;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const listBankBanking = async (): Promise<IListBankBankingResponse> => {
|
|
54
|
+
return (await AbyssBankingCore.axios.get<IListBankBankingResponse>(`banking/bank/list`)).data;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const listInstitutionBanking = async (
|
|
58
|
+
query: IListInstitutionBankingQuery,
|
|
59
|
+
): Promise<IListInstitutionBankingResponse> => {
|
|
60
|
+
return (
|
|
61
|
+
await AbyssBankingCore.axios.get<IListInstitutionBankingResponse>(`banking/institution/list`, {
|
|
62
|
+
params: query,
|
|
63
|
+
})
|
|
64
|
+
).data;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const createRequisitionBanking = async (
|
|
68
|
+
body: ICreateRequisitionBankingBody,
|
|
69
|
+
): Promise<ICreateRequisitionBankingResponse> => {
|
|
70
|
+
return (
|
|
71
|
+
await AbyssBankingCore.axios.post<ICreateRequisitionBankingResponse>(
|
|
72
|
+
`banking/requisition/create`,
|
|
73
|
+
body,
|
|
74
|
+
)
|
|
75
|
+
).data;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const confirmRequisitionBanking = async (
|
|
79
|
+
params: IConfirmRequisitionBankingParams,
|
|
80
|
+
): Promise<IConfirmRequisitionBankingResponse> => {
|
|
81
|
+
return (
|
|
82
|
+
await AbyssBankingCore.axios.post<IConfirmRequisitionBankingResponse>(
|
|
83
|
+
`banking/requisition/confirm/${params.reference}`,
|
|
84
|
+
)
|
|
85
|
+
).data;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const renewRequisitionBanking = async (
|
|
89
|
+
params: IRenewRequisitionBankingParams,
|
|
90
|
+
body: IRenewRequisitionBankingBody,
|
|
91
|
+
): Promise<IRenewRequisitionBankingResponse> => {
|
|
92
|
+
return (
|
|
93
|
+
await AbyssBankingCore.axios.post<IRenewRequisitionBankingResponse>(
|
|
94
|
+
`banking/requisition/${params.bankConnectionId}/renew`,
|
|
95
|
+
body,
|
|
96
|
+
)
|
|
97
|
+
).data;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const paginateAccountTransactionBanking = async (
|
|
101
|
+
query: IPaginateAccountTransactionBankingQuery,
|
|
102
|
+
): Promise<IPaginateAccountTransactionBankingResponse> => {
|
|
103
|
+
return (
|
|
104
|
+
await AbyssBankingCore.axios.get<IPaginateAccountTransactionBankingResponse>(
|
|
105
|
+
`banking/transaction/paginate`,
|
|
106
|
+
{ params: query },
|
|
107
|
+
)
|
|
108
|
+
).data;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const getAccountTransactionBanking = async (
|
|
112
|
+
params: IGetAccountTransactionBankingParams,
|
|
113
|
+
): Promise<IGetAccountTransactionBankingResponse> => {
|
|
114
|
+
return (
|
|
115
|
+
await AbyssBankingCore.axios.get<IGetAccountTransactionBankingResponse>(
|
|
116
|
+
`banking/transaction/${params.accountTransactionId}`,
|
|
117
|
+
)
|
|
118
|
+
).data;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export const updateAccountTransactionBanking = async (
|
|
122
|
+
params: IUpdateAccountTransactionBankingParams,
|
|
123
|
+
body: IUpdateAccountTransactionBankingBody,
|
|
124
|
+
): Promise<IGetAccountTransactionBankingResponse> => {
|
|
125
|
+
return (
|
|
126
|
+
await AbyssBankingCore.axios.put<IGetAccountTransactionBankingResponse>(
|
|
127
|
+
`banking/transaction/${params.accountTransactionId}`,
|
|
128
|
+
body,
|
|
129
|
+
)
|
|
130
|
+
).data;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export const updateBankAccountBanking = async (
|
|
134
|
+
params: IUpdateBankAccountBankingParams,
|
|
135
|
+
body: IUpdateBankAccountBankingBody,
|
|
136
|
+
): Promise<IUpdateBankAccountBankingResponse> => {
|
|
137
|
+
return (
|
|
138
|
+
await AbyssBankingCore.axios.put<IUpdateBankAccountBankingResponse>(
|
|
139
|
+
`banking/account/${params.bankAccountId}`,
|
|
140
|
+
body,
|
|
141
|
+
)
|
|
142
|
+
).data;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export const loadDemoDataBanking = async (): Promise<ILoadDemoDataBankingResponse> => {
|
|
146
|
+
return (await AbyssBankingCore.axios.post<ILoadDemoDataBankingResponse>(`banking/demo-data`))
|
|
147
|
+
.data;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export const deleteDemoDataBanking = async (): Promise<IDeleteDemoDataBankingResponse> => {
|
|
151
|
+
return (await AbyssBankingCore.axios.delete<IDeleteDemoDataBankingResponse>(`banking/demo-data`))
|
|
152
|
+
.data;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export const getTransactionPerCategoryBanking = async (
|
|
156
|
+
query: IGetTransactionPerCategoryBankingQuery,
|
|
157
|
+
): Promise<IGetTransactionPerCategoryBankingResponse> => {
|
|
158
|
+
return (
|
|
159
|
+
await AbyssBankingCore.axios.get<IGetTransactionPerCategoryBankingResponse>(
|
|
160
|
+
`banking/transaction-per-category`,
|
|
161
|
+
{ params: query },
|
|
162
|
+
)
|
|
163
|
+
).data;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export const getSumTransactionPerBankAccountPerCategoryBanking = async (
|
|
167
|
+
query: IGetSumTransactionPerBankAccountPerCategoryQuery,
|
|
168
|
+
): Promise<IGetSumTransactionPerBankAccountPerCategoryBankingResponse> => {
|
|
169
|
+
return (
|
|
170
|
+
await AbyssBankingCore.axios.get<IGetSumTransactionPerBankAccountPerCategoryBankingResponse>(
|
|
171
|
+
`banking/sum-transaction-per-bank-account-category`,
|
|
172
|
+
{ params: query },
|
|
173
|
+
)
|
|
174
|
+
).data;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
export const paginateBankAccountHistoryBanking = async (
|
|
178
|
+
query: IPaginateBankAccountHistoryBankingQuery,
|
|
179
|
+
): Promise<IPaginateBankAccountHistoryBankingResponse> => {
|
|
180
|
+
return (
|
|
181
|
+
await AbyssBankingCore.axios.get<IPaginateBankAccountHistoryBankingResponse>(
|
|
182
|
+
`banking/bank-account-history/paginate`,
|
|
183
|
+
{ params: query },
|
|
184
|
+
)
|
|
185
|
+
).data;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export const listBankAccountHistoryBanking = async (
|
|
189
|
+
query: IListBankAccountHistoryBankingQuery,
|
|
190
|
+
): Promise<IListBankAccountHistoryBankingResponse> => {
|
|
191
|
+
return (
|
|
192
|
+
await AbyssBankingCore.axios.get<IListBankAccountHistoryBankingResponse>(
|
|
193
|
+
`banking/bank-account-history/list`,
|
|
194
|
+
{ params: query },
|
|
195
|
+
)
|
|
196
|
+
).data;
|
|
197
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AbyssBankingCore,
|
|
3
|
+
IApplyCategorizationRuleAdminParams,
|
|
4
|
+
IApplyCategorizationRuleAdminResponse,
|
|
5
|
+
ICreateCategorizationRuleAdminBody,
|
|
6
|
+
ICreateCategorizationRuleAdminResponse,
|
|
7
|
+
IDeleteCategorizationRuleAdminParams,
|
|
8
|
+
IDeleteCategorizationRuleAdminResponse,
|
|
9
|
+
IGetCategorizationRuleAdminParams,
|
|
10
|
+
IGetCategorizationRuleAdminResponse,
|
|
11
|
+
IPaginateCategorizationRuleAdminQuery,
|
|
12
|
+
IPaginateCategorizationRuleAdminResponse,
|
|
13
|
+
IUpdateCategorizationRuleAdminBody,
|
|
14
|
+
IUpdateCategorizationRuleAdminParams,
|
|
15
|
+
IUpdateCategorizationRuleAdminResponse,
|
|
16
|
+
} from '..';
|
|
17
|
+
|
|
18
|
+
export const getCategorizationRuleAdmin = async (
|
|
19
|
+
params: IGetCategorizationRuleAdminParams,
|
|
20
|
+
): Promise<IGetCategorizationRuleAdminResponse> => {
|
|
21
|
+
return (
|
|
22
|
+
await AbyssBankingCore.axios.get<IGetCategorizationRuleAdminResponse>(
|
|
23
|
+
`categorization-rule/admin/${params.categorizationRuleId}`,
|
|
24
|
+
)
|
|
25
|
+
).data;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const applyCategorizationRuleAdmin = async (
|
|
29
|
+
params: IApplyCategorizationRuleAdminParams,
|
|
30
|
+
): Promise<IApplyCategorizationRuleAdminResponse> => {
|
|
31
|
+
return (
|
|
32
|
+
await AbyssBankingCore.axios.post<IApplyCategorizationRuleAdminResponse>(
|
|
33
|
+
`categorization-rule/admin/${params.categorizationRuleId}/apply`,
|
|
34
|
+
)
|
|
35
|
+
).data;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const paginateCategorizationRuleAdmin = async (
|
|
39
|
+
query: IPaginateCategorizationRuleAdminQuery,
|
|
40
|
+
): Promise<IPaginateCategorizationRuleAdminResponse> => {
|
|
41
|
+
return (
|
|
42
|
+
await AbyssBankingCore.axios.get<IPaginateCategorizationRuleAdminResponse>(
|
|
43
|
+
`categorization-rule/admin/paginate`,
|
|
44
|
+
{ params: query },
|
|
45
|
+
)
|
|
46
|
+
).data;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const deleteCategorizationRuleAdmin = async (
|
|
50
|
+
params: IDeleteCategorizationRuleAdminParams,
|
|
51
|
+
): Promise<IDeleteCategorizationRuleAdminResponse> => {
|
|
52
|
+
return (
|
|
53
|
+
await AbyssBankingCore.axios.delete<IDeleteCategorizationRuleAdminResponse>(
|
|
54
|
+
`categorization-rule/admin/${params.categorizationRuleId}`,
|
|
55
|
+
)
|
|
56
|
+
).data;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const createCategorizationRuleAdmin = async (
|
|
60
|
+
body: ICreateCategorizationRuleAdminBody,
|
|
61
|
+
): Promise<ICreateCategorizationRuleAdminResponse> => {
|
|
62
|
+
return (
|
|
63
|
+
await AbyssBankingCore.axios.post<ICreateCategorizationRuleAdminResponse>(
|
|
64
|
+
`categorization-rule/admin`,
|
|
65
|
+
body,
|
|
66
|
+
)
|
|
67
|
+
).data;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const updateCategorizationRuleAdmin = async (
|
|
71
|
+
params: IUpdateCategorizationRuleAdminParams,
|
|
72
|
+
body: IUpdateCategorizationRuleAdminBody,
|
|
73
|
+
): Promise<IUpdateCategorizationRuleAdminResponse> => {
|
|
74
|
+
return (
|
|
75
|
+
await AbyssBankingCore.axios.put<IUpdateCategorizationRuleAdminResponse>(
|
|
76
|
+
`categorization-rule/admin/${params.categorizationRuleId}`,
|
|
77
|
+
body,
|
|
78
|
+
)
|
|
79
|
+
).data;
|
|
80
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AbyssBankingCore,
|
|
3
|
+
IApplyCategorizationRuleParams,
|
|
4
|
+
IApplyCategorizationRuleResponse,
|
|
5
|
+
ICreateCategorizationRuleBody,
|
|
6
|
+
ICreateCategorizationRuleResponse,
|
|
7
|
+
IDeleteCategorizationRuleParams,
|
|
8
|
+
IDeleteCategorizationRuleResponse,
|
|
9
|
+
IGetCategorizationRuleParams,
|
|
10
|
+
IGetCategorizationRuleResponse,
|
|
11
|
+
IPaginateCategorizationRuleQuery,
|
|
12
|
+
IPaginateCategorizationRuleResponse,
|
|
13
|
+
IUpdateCategorizationRuleBody,
|
|
14
|
+
IUpdateCategorizationRuleParams,
|
|
15
|
+
IUpdateCategorizationRuleResponse,
|
|
16
|
+
} from '..';
|
|
17
|
+
|
|
18
|
+
export const getCategorizationRule = async (
|
|
19
|
+
params: IGetCategorizationRuleParams,
|
|
20
|
+
): Promise<IGetCategorizationRuleResponse> => {
|
|
21
|
+
return (
|
|
22
|
+
await AbyssBankingCore.axios.get<IGetCategorizationRuleResponse>(
|
|
23
|
+
`categorization-rule/${params.categorizationRuleId}`,
|
|
24
|
+
)
|
|
25
|
+
).data;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const applyCategorizationRule = async (
|
|
29
|
+
params: IApplyCategorizationRuleParams,
|
|
30
|
+
): Promise<IApplyCategorizationRuleResponse> => {
|
|
31
|
+
return (
|
|
32
|
+
await AbyssBankingCore.axios.post<IApplyCategorizationRuleResponse>(
|
|
33
|
+
`categorization-rule/${params.categorizationRuleId}/apply`,
|
|
34
|
+
)
|
|
35
|
+
).data;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const paginateCategorizationRule = async (
|
|
39
|
+
query: IPaginateCategorizationRuleQuery,
|
|
40
|
+
): Promise<IPaginateCategorizationRuleResponse> => {
|
|
41
|
+
return (
|
|
42
|
+
await AbyssBankingCore.axios.get<IPaginateCategorizationRuleResponse>(
|
|
43
|
+
`categorization-rule/paginate`,
|
|
44
|
+
{ params: query },
|
|
45
|
+
)
|
|
46
|
+
).data;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const deleteCategorizationRule = async (
|
|
50
|
+
params: IDeleteCategorizationRuleParams,
|
|
51
|
+
): Promise<IDeleteCategorizationRuleResponse> => {
|
|
52
|
+
return (
|
|
53
|
+
await AbyssBankingCore.axios.delete<IDeleteCategorizationRuleResponse>(
|
|
54
|
+
`categorization-rule/${params.categorizationRuleId}`,
|
|
55
|
+
)
|
|
56
|
+
).data;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const createCategorizationRule = async (
|
|
60
|
+
body: ICreateCategorizationRuleBody,
|
|
61
|
+
): Promise<ICreateCategorizationRuleResponse> => {
|
|
62
|
+
return (
|
|
63
|
+
await AbyssBankingCore.axios.post<ICreateCategorizationRuleResponse>(
|
|
64
|
+
`categorization-rule`,
|
|
65
|
+
body,
|
|
66
|
+
)
|
|
67
|
+
).data;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const updateCategorizationRule = async (
|
|
71
|
+
params: IUpdateCategorizationRuleParams,
|
|
72
|
+
body: IUpdateCategorizationRuleBody,
|
|
73
|
+
): Promise<IUpdateCategorizationRuleResponse> => {
|
|
74
|
+
return (
|
|
75
|
+
await AbyssBankingCore.axios.put<IUpdateCategorizationRuleResponse>(
|
|
76
|
+
`categorization-rule/${params.categorizationRuleId}`,
|
|
77
|
+
body,
|
|
78
|
+
)
|
|
79
|
+
).data;
|
|
80
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { AbyssBankingCore } from '..';
|
|
2
|
+
import {
|
|
3
|
+
IGetCategoryAdminParams,
|
|
4
|
+
IGetCategoryAdminResponse,
|
|
5
|
+
IPaginateCategoryAdminQuery,
|
|
6
|
+
IPaginateCategoryAdminResponse,
|
|
7
|
+
IDeleteCategoryAdminResponse,
|
|
8
|
+
IDeleteCategoryAdminParams,
|
|
9
|
+
ICreateCategoryAdminBody,
|
|
10
|
+
ICreateCategoryAdminResponse,
|
|
11
|
+
IUpdateCategoryAdminBody,
|
|
12
|
+
IUpdateCategoryAdminParams,
|
|
13
|
+
IUpdateCategoryAdminResponse,
|
|
14
|
+
} from '../types';
|
|
15
|
+
|
|
16
|
+
export const getCategoryAdmin = async (
|
|
17
|
+
params: IGetCategoryAdminParams,
|
|
18
|
+
): Promise<IGetCategoryAdminResponse> => {
|
|
19
|
+
return (
|
|
20
|
+
await AbyssBankingCore.axios.get<IGetCategoryAdminResponse>(
|
|
21
|
+
`category/admin/${params.categoryId}`,
|
|
22
|
+
)
|
|
23
|
+
).data;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const paginateCategoryAdmin = async (
|
|
27
|
+
query: IPaginateCategoryAdminQuery,
|
|
28
|
+
): Promise<IPaginateCategoryAdminResponse> => {
|
|
29
|
+
return (
|
|
30
|
+
await AbyssBankingCore.axios.get<IPaginateCategoryAdminResponse>(`category/admin/paginate`, {
|
|
31
|
+
params: query,
|
|
32
|
+
})
|
|
33
|
+
).data;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const deleteCategoryAdmin = async (
|
|
37
|
+
params: IDeleteCategoryAdminParams,
|
|
38
|
+
): Promise<IDeleteCategoryAdminResponse> => {
|
|
39
|
+
return (
|
|
40
|
+
await AbyssBankingCore.axios.delete<IDeleteCategoryAdminResponse>(
|
|
41
|
+
`category/admin/${params.categoryId}`,
|
|
42
|
+
)
|
|
43
|
+
).data;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const createCategoryAdmin = async (
|
|
47
|
+
body: ICreateCategoryAdminBody,
|
|
48
|
+
): Promise<ICreateCategoryAdminResponse> => {
|
|
49
|
+
return (await AbyssBankingCore.axios.post<ICreateCategoryAdminResponse>(`category/admin`, body))
|
|
50
|
+
.data;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const updateCategoryAdmin = async (
|
|
54
|
+
params: IUpdateCategoryAdminParams,
|
|
55
|
+
body: IUpdateCategoryAdminBody,
|
|
56
|
+
): Promise<IUpdateCategoryAdminResponse> => {
|
|
57
|
+
return (
|
|
58
|
+
await AbyssBankingCore.axios.put<IUpdateCategoryAdminResponse>(
|
|
59
|
+
`category/admin/${params.categoryId}`,
|
|
60
|
+
body,
|
|
61
|
+
)
|
|
62
|
+
).data;
|
|
63
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { AbyssBankingCore } from '..';
|
|
2
|
+
import {
|
|
3
|
+
IListCategoryResponse,
|
|
4
|
+
IRemoveCategoryResponse,
|
|
5
|
+
IAddCategoryResponse,
|
|
6
|
+
IDeleteCategoryResponse,
|
|
7
|
+
ICreateCategoryResponse,
|
|
8
|
+
IUpdateCategoryResponse,
|
|
9
|
+
IListAnalyticsCategoryResponse,
|
|
10
|
+
} from '../types';
|
|
11
|
+
import {
|
|
12
|
+
IRemoveCategoryParams,
|
|
13
|
+
IAddCategoryParams,
|
|
14
|
+
IDeleteCategoryParams,
|
|
15
|
+
ICreateCategoryBody,
|
|
16
|
+
IUpdateCategoryParams,
|
|
17
|
+
IUpdateCategoryBody,
|
|
18
|
+
IListAnalyticsCategoryQuery,
|
|
19
|
+
} from '../types/interface/api/requests/category.request';
|
|
20
|
+
|
|
21
|
+
export const listCategory = async (): Promise<IListCategoryResponse> => {
|
|
22
|
+
return (await AbyssBankingCore.axios.get<IListCategoryResponse>(`category/list`)).data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const listAnalyticsCategory = async (
|
|
26
|
+
query: IListAnalyticsCategoryQuery,
|
|
27
|
+
): Promise<IListAnalyticsCategoryResponse> => {
|
|
28
|
+
return (
|
|
29
|
+
await AbyssBankingCore.axios.get<IListAnalyticsCategoryResponse>(`category/list/analytics`, {
|
|
30
|
+
params: query,
|
|
31
|
+
})
|
|
32
|
+
).data;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const removeCategory = async (
|
|
36
|
+
params: IRemoveCategoryParams,
|
|
37
|
+
): Promise<IRemoveCategoryResponse> => {
|
|
38
|
+
return (
|
|
39
|
+
await AbyssBankingCore.axios.delete<IRemoveCategoryResponse>(
|
|
40
|
+
`category/transaction/${params.transactionCategoryId}`,
|
|
41
|
+
)
|
|
42
|
+
).data;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const addCategory = async (params: IAddCategoryParams): Promise<IAddCategoryResponse> => {
|
|
46
|
+
return (
|
|
47
|
+
await AbyssBankingCore.axios.post<IAddCategoryResponse>(
|
|
48
|
+
`category/${params.categoryId}/transaction/${params.accountTransactionId}`,
|
|
49
|
+
)
|
|
50
|
+
).data;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const deleteCategory = async (
|
|
54
|
+
params: IDeleteCategoryParams,
|
|
55
|
+
): Promise<IDeleteCategoryResponse> => {
|
|
56
|
+
return (
|
|
57
|
+
await AbyssBankingCore.axios.delete<IDeleteCategoryResponse>(`category/${params.categoryId}`)
|
|
58
|
+
).data;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const createCategory = async (
|
|
62
|
+
body: ICreateCategoryBody,
|
|
63
|
+
): Promise<ICreateCategoryResponse> => {
|
|
64
|
+
return (await AbyssBankingCore.axios.post<ICreateCategoryResponse>(`category`, body)).data;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const updateCategory = async (
|
|
68
|
+
params: IUpdateCategoryParams,
|
|
69
|
+
body: IUpdateCategoryBody,
|
|
70
|
+
): Promise<IUpdateCategoryResponse> => {
|
|
71
|
+
return (
|
|
72
|
+
await AbyssBankingCore.axios.put<IUpdateCategoryResponse>(`category/${params.categoryId}`, body)
|
|
73
|
+
).data;
|
|
74
|
+
};
|
package/src/api/index.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './abyss.admin.api';
|
|
2
|
+
export * from './user.admin.api';
|
|
3
|
+
export * from './user.api';
|
|
4
|
+
export * from './monitor.api';
|
|
5
|
+
export * from './banking.admin.api';
|
|
6
|
+
export * from './banking.api';
|
|
7
|
+
export * from './category.admin.api';
|
|
8
|
+
export * from './category.api';
|
|
9
|
+
export * from './categorization-rule.admin.api';
|
|
10
|
+
export * from './categorization-rule.api';
|
|
11
|
+
export * from './panel.api';
|
|
12
|
+
export * from './panel.admin.api';
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
};
|