api 분리
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -11,9 +11,10 @@ import {
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
|
||||
export const allTransactionCancelInfo = (params: AllTransactionCancelInfoParams) => {
|
||||
return resultify(
|
||||
axios.post<AllTransactionCancelInfoResponse>(API_URL.allTransactionCancelInfo(), params),
|
||||
axios.post<AllTransactionCancelInfoResponse>(API_URL_TRANSACTION.allTransactionCancelInfo(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const allTransactionCancel = (params: AllTransactionCancelParams) => {
|
||||
return resultify(
|
||||
axios.post<AllTransactionCancelResponse>(API_URL.allTransactionCancel(), params),
|
||||
axios.post<AllTransactionCancelResponse>(API_URL_TRANSACTION.allTransactionCancel(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const allTransactionDetail = (params: AllTransactionDetailParams) => {
|
||||
return resultify(
|
||||
axios.post<DetailResponse>(API_URL.allTransactionDetail(), params),
|
||||
axios.post<DetailResponse>(API_URL_TRANSACTION.allTransactionDetail(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const allTransactionList = (params: AllTransactionListParams) => {
|
||||
return resultify(
|
||||
axios.post<AllTransactionListResponse>(API_URL.allTransactionList(), params),
|
||||
axios.post<AllTransactionListResponse>(API_URL_TRANSACTION.allTransactionList(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const allTransactionListSummary = (params: AllTransactionListSummaryParams) => {
|
||||
return resultify(
|
||||
axios.post<AllTransactionListSummaryResponse>(API_URL.allTransactionListSummary(), params),
|
||||
axios.post<AllTransactionListSummaryResponse>(API_URL_TRANSACTION.allTransactionListSummary(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const billingCharge = (params: BillingChargeParams) => {
|
||||
return resultify(
|
||||
axios.post<BillingChargeResponse>(API_URL.billingDetail(), params),
|
||||
axios.post<BillingChargeResponse>(API_URL_TRANSACTION.billingDetail(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const billingDetail = (params: BillingDetailParams) => {
|
||||
return resultify(
|
||||
axios.post<BillingDetailResponse>(API_URL.billingDetail(), params),
|
||||
axios.post<BillingDetailResponse>(API_URL_TRANSACTION.billingDetail(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const billingList = (params: BillingListParams) => {
|
||||
return resultify(
|
||||
axios.post<BillingListResponse>(API_URL.billingList(), params),
|
||||
axios.post<BillingListResponse>(API_URL_TRANSACTION.billingList(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const cashReceiptDetail = (params: CashReceiptDetailParams) => {
|
||||
return resultify(
|
||||
axios.post<DetailResponse>(API_URL.cashReceiptDetail(), params),
|
||||
axios.post<DetailResponse>(API_URL_TRANSACTION.cashReceiptDetail(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const cashReceiptList = (params: CashReceiptListParams) => {
|
||||
return resultify(
|
||||
axios.post<CashReceiptListResponse>(API_URL.cashReceiptList(), params),
|
||||
axios.post<CashReceiptListResponse>(API_URL_TRANSACTION.cashReceiptList(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const cashReceiptManualIssue = (params: CashReceiptManualIssueParams) => {
|
||||
return resultify(
|
||||
axios.post<CashReceiptManualIssueResponse>(API_URL.cashReceiptManualIssue(), params),
|
||||
axios.post<CashReceiptManualIssueResponse>(API_URL_TRANSACTION.cashReceiptManualIssue(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const cashReceiptPurposeUpdate = (params: CashReceiptPurposeUpdateParams) => {
|
||||
return resultify(
|
||||
axios.post<CashReceiptPurposeUpdateResponse>(API_URL.cashReceiptPurposeUpdate(), params),
|
||||
axios.post<CashReceiptPurposeUpdateResponse>(API_URL_TRANSACTION.cashReceiptPurposeUpdate(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const downloadConfirmation = (params: DownloadConfirmationParams) => {
|
||||
return resultify(
|
||||
axios.post<DownloadConfirmationResponse>(API_URL.downloadConfirmation(), params),
|
||||
axios.post<DownloadConfirmationResponse>(API_URL_TRANSACTION.downloadConfirmation(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const downloadExcel = (params: DownloadExcelParams) => {
|
||||
return resultify(
|
||||
axios.post<DownloadExcelResponse>(API_URL.downloadExcel(), params),
|
||||
axios.post<DownloadExcelResponse>(API_URL_TRANSACTION.downloadExcel(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const escrowDetail = (params: EscrowDetailParams) => {
|
||||
return resultify(
|
||||
axios.post<DetailResponse>(API_URL.escrowDetail(), params),
|
||||
axios.post<DetailResponse>(API_URL_TRANSACTION.escrowDetail(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const escrowList = (params: EscrowListParams) => {
|
||||
return resultify(
|
||||
axios.post<EscrowListResponse>(API_URL.escrowList(), params),
|
||||
axios.post<EscrowListResponse>(API_URL_TRANSACTION.escrowList(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { API_URL_TRANSACTION } from '@/shared/api/api-url-transaction';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
export const escrowMailResend = (params: EscrowMailResendParams) => {
|
||||
return resultify(
|
||||
axios.post<EscrowMailResendResponse>(API_URL.escrowMailResend(), params),
|
||||
axios.post<EscrowMailResendResponse>(API_URL_TRANSACTION.escrowMailResend(), params),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user