upd 26 Sep 2253
This commit is contained in:
parent
14ede77a16
commit
6acf3c7d72
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"LOGIN": {
|
||||
"path": "/api/auth/login",
|
||||
"path": "/api/v1/auth/login",
|
||||
"method": "POST",
|
||||
"expecte_success_status_code": 200,
|
||||
"expected_error_status_code": 401,
|
||||
"default_error_message": "Internal server error"
|
||||
},
|
||||
"AUTH": {
|
||||
"path": "/api/auth",
|
||||
"path": "/api/v1/auth",
|
||||
"sub": {
|
||||
"LOGIN":{
|
||||
"path": "/login"
|
||||
|
|
@ -15,6 +15,6 @@
|
|||
}
|
||||
},
|
||||
"CREATE_TRANSACTION": {
|
||||
"path": "/api/account/${var1}/transactions/${var2}"
|
||||
"path": "/api/v1/account/${var1}/transactions/${var2}"
|
||||
}
|
||||
}
|
||||
|
|
@ -96,7 +96,7 @@ const CommonNav: React.FC<AccountNavProps> = ({
|
|||
|
||||
const getAccountDetails = async () => {
|
||||
try {
|
||||
let res = await api.get('/api/user/accounts');
|
||||
let res = await api.get('/api/v1/user/accounts');
|
||||
let items = res?.data;
|
||||
|
||||
const cleanedData: AccountDataArray[] = items.map((item: any) => ({
|
||||
|
|
@ -179,7 +179,7 @@ const CommonNav: React.FC<AccountNavProps> = ({
|
|||
|
||||
const getUserDetails = async () => {
|
||||
try {
|
||||
let res = await api.get(`/api/user/details`);
|
||||
let res = await api.get(`/api/v1/user/details`);
|
||||
|
||||
const item = res?.data;
|
||||
if (item) {
|
||||
|
|
@ -249,7 +249,7 @@ const CommonNav: React.FC<AccountNavProps> = ({
|
|||
|
||||
const handleLogout = async () => {
|
||||
try {
|
||||
let res = await api.post('/api/auth/logout');
|
||||
let res = await api.post('/api/v1/auth/logout');
|
||||
if (res.status === 200) {
|
||||
sessionStorage.clear();
|
||||
setOpen(false);
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ const Account = () => {
|
|||
|
||||
// const getUserDetails = async () => {
|
||||
// try {
|
||||
// let res = await api.get('/api/user/details')
|
||||
// let res = await api.get('/api/v1/user/details')
|
||||
// let accountIDData = res?.data?.account?.id
|
||||
// setAccountID(accountIDData)
|
||||
// } catch (error) {
|
||||
|
|
@ -129,7 +129,7 @@ const Account = () => {
|
|||
};
|
||||
|
||||
try {
|
||||
const res = await api.get(`/api/accounts/${userData.account.id}/dashboard`, { params: payload });
|
||||
const res = await api.get(`/api/v1/accounts/${userData.account.id}/dashboard`, { params: payload });
|
||||
console.log("Dashboard Data:", res.data);
|
||||
const cardDataArray = mapApiDataToCards(res.data);
|
||||
setCards(cardDataArray);
|
||||
|
|
@ -157,7 +157,7 @@ const Account = () => {
|
|||
|
||||
// const getAccountDetails = async () => {
|
||||
// try {
|
||||
// let res = await api.get('/api/user/accounts')
|
||||
// let res = await api.get('/api/v1/user/accounts')
|
||||
// let items = res?.data
|
||||
// setAccountsData(items)
|
||||
// } catch (error) {
|
||||
|
|
@ -179,7 +179,7 @@ const Account = () => {
|
|||
email: data.email,
|
||||
role: data.role
|
||||
}
|
||||
let res = await api.post(`/api/accounts/${data.i_accountName}/invite`, payloadInvite)
|
||||
let res = await api.post(`/api/v1/accounts/${data.i_accountName}/invite`, payloadInvite)
|
||||
if (res?.data) {
|
||||
toast.success("Invite Sent Successfully...!", {
|
||||
position: "top-center",
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ const AccountNav: React.FC<AccountNavProps> = ({ accountName = null, transaction
|
|||
|
||||
const getAccountDetails = async () => {
|
||||
try {
|
||||
let res = await api.get('/api/user/accounts');
|
||||
let res = await api.get('/api/v1/user/accounts');
|
||||
let items = res?.data;
|
||||
|
||||
const cleanedData: AccountDataArray[] = items.map((item: any) => ({
|
||||
|
|
@ -141,7 +141,7 @@ const AccountNav: React.FC<AccountNavProps> = ({ accountName = null, transaction
|
|||
|
||||
const getUserDetails = async () => {
|
||||
try {
|
||||
let res = await api.get(`/api/user/details`);
|
||||
let res = await api.get(`/api/v1/user/details`);
|
||||
|
||||
const item = res?.data;
|
||||
if (item) {
|
||||
|
|
@ -214,7 +214,7 @@ const AccountNav: React.FC<AccountNavProps> = ({ accountName = null, transaction
|
|||
|
||||
const handleLogout = async () => {
|
||||
try {
|
||||
let res = await api.post('/api/auth/logout');
|
||||
let res = await api.post('/api/v1/auth/logout');
|
||||
if (res.status === 200) {
|
||||
sessionStorage.clear();
|
||||
setOpen(false);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ const Accounts = () => {
|
|||
|
||||
const fetchAccounts = async () => {
|
||||
try {
|
||||
const response = await api("/api/user/accounts");
|
||||
const response = await api("/api/v1/user/accounts");
|
||||
const data: AccountData[] = response.data || [];
|
||||
setAllAccounts(data);
|
||||
} catch (error) {
|
||||
|
|
@ -60,7 +60,7 @@ const Accounts = () => {
|
|||
const payloadAccount = {
|
||||
name: accountName
|
||||
}
|
||||
let res = await api.post(`/api/user/accounts`, payloadAccount)
|
||||
let res = await api.post(`/api/v1/user/accounts`, payloadAccount)
|
||||
if (res?.data) {
|
||||
toast.success("Account Add Successfully...!", {
|
||||
position: "top-center",
|
||||
|
|
@ -88,7 +88,7 @@ const Accounts = () => {
|
|||
|
||||
const handleAction = async (accountId: string, action: 'accept' | 'reject') => {
|
||||
try {
|
||||
let response = await api.post(`/api/accounts/${accountId}/accept/invite`)
|
||||
let response = await api.post(`/api/v1/accounts/${accountId}/accept/invite`)
|
||||
if (response.data.status === 202) {
|
||||
toast.success("Login Successful", {
|
||||
position: "top-center",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ const TransactionDataTable = ({ activeAccountId }) => {
|
|||
console.log("fetchTransactions")
|
||||
setLoading(true)
|
||||
try {
|
||||
const response = await api.get(`/api/accounts/${activeAccountId}/transactions?sortBy=lastModifiedAt desc`);
|
||||
const response = await api.get(`/api/v1/accounts/${activeAccountId}/transactions?sortBy=lastModifiedAt desc`);
|
||||
setTransactions(response.data || []);
|
||||
} catch (error) {
|
||||
console.error("Error fetching transactions:", error);
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ const LoginForm = ({ onSwitchToRegister }) => {
|
|||
|
||||
try {
|
||||
const res = await axios.post(
|
||||
`${import.meta.env.VITE_BASE_URI}/api/auth/login`,
|
||||
`${import.meta.env.VITE_BASE_URI}/api/v1/auth/login`,
|
||||
{ email: formData.email, password: formData.password },
|
||||
{
|
||||
withCredentials: true,
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ const OAuthGoogle: React.FC<OAuthGoogleProps> = ({ isLogin }) => {
|
|||
const token = response.credential;
|
||||
|
||||
|
||||
axios.get(`${import.meta.env.VITE_BASE_URI}/api/oauth2/authorization/google?token=${token}`, {
|
||||
axios.get(`${import.meta.env.VITE_BASE_URI}/api/v1/oauth2/authorization/google?token=${token}`, {
|
||||
headers: {
|
||||
"ngrok-skip-browser-warning": "69420",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ const RegisterForm = ({ onSwitchToLogin }) => {
|
|||
|
||||
try {
|
||||
const res = await axios.post(
|
||||
`${import.meta.env.VITE_BASE_URI}/api/auth/signup`,
|
||||
`${import.meta.env.VITE_BASE_URI}/api/v1/auth/signup`,
|
||||
{
|
||||
firstName: trimmedData.firstName,
|
||||
lastName: trimmedData.lastName,
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ const SignDocument = () => {
|
|||
}, [saved])
|
||||
|
||||
const fetchData = (isSign: boolean = false) => {
|
||||
axios.get(`${import.meta.env.VITE_BASE_URI}/api/sign/${recipientId}`,
|
||||
axios.get(`${import.meta.env.VITE_BASE_URI}/api/v1/sign/${recipientId}`,
|
||||
{
|
||||
headers:
|
||||
{ "ngrok-skip-browser-warning": "69420", }
|
||||
|
|
@ -436,9 +436,9 @@ const SignDocument = () => {
|
|||
// return;
|
||||
try {
|
||||
dispatch(showLoader("Signing ..."));
|
||||
await axios.put(`${import.meta.env.VITE_BASE_URI}/api/sign/${recipientId}/tags`, submitData, { headers: { "ngrok-skip-browser-warning": "69420", } })
|
||||
await axios.put(`${import.meta.env.VITE_BASE_URI}/api/v1/sign/${recipientId}/tags`, submitData, { headers: { "ngrok-skip-browser-warning": "69420", } })
|
||||
|
||||
const signRes = await axios.post(`${import.meta.env.VITE_BASE_URI}/api/sign/${recipientId}`, {}, { headers: { "ngrok-skip-browser-warning": "69420", } })
|
||||
const signRes = await axios.post(`${import.meta.env.VITE_BASE_URI}/api/v1/sign/${recipientId}`, {}, { headers: { "ngrok-skip-browser-warning": "69420", } })
|
||||
dispatch(hideLoader());
|
||||
if (signRes.status === 200) {
|
||||
dispatch(hideLoader());
|
||||
|
|
@ -487,7 +487,7 @@ const SignDocument = () => {
|
|||
|
||||
const fetchSignatureData = async (signatureId: string) => {
|
||||
try {
|
||||
const response = await axios.get(`${import.meta.env.VITE_BASE_URI}/api/sign/${recipientId}signatures/${signatureId}`, {
|
||||
const response = await axios.get(`${import.meta.env.VITE_BASE_URI}/api/v1/sign/${recipientId}signatures/${signatureId}`, {
|
||||
headers: { "ngrok-skip-browser-warning": "69420" }
|
||||
});
|
||||
if (response.status === 200) {
|
||||
|
|
@ -662,7 +662,7 @@ const SignDocument = () => {
|
|||
|
||||
const handleDeclineConfirm = async (reason: string, comments: string) => {
|
||||
try {
|
||||
await axios.post(`${import.meta.env.VITE_BASE_URI}/api/sign/decline/${recipientId}`, { reason: reason + ", " + comments });
|
||||
await axios.post(`${import.meta.env.VITE_BASE_URI}/api/v1/sign/decline/${recipientId}`, { reason: reason + ", " + comments });
|
||||
setSignerConsent((prev) => ({ ...prev, decline: true }));
|
||||
setRecSignStatus("DECLINED");
|
||||
setShowCompletionScreen(true);
|
||||
|
|
@ -670,7 +670,7 @@ const SignDocument = () => {
|
|||
}
|
||||
|
||||
const handleReassignConfirm = (data: { firstName: string; lastName: string; email: string; message: string }) => {
|
||||
axios.post(`${import.meta.env.VITE_BASE_URI}/api/sign/reassign/${recipientId}`, {
|
||||
axios.post(`${import.meta.env.VITE_BASE_URI}/api/v1/sign/reassign/${recipientId}`, {
|
||||
name: data.firstName ? data.firstName + " " + data.lastName : data.lastName,
|
||||
email: data.email,
|
||||
message: data.message,
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ const TagsCon: React.FC<TagsConProps> = ({
|
|||
(async () => {
|
||||
if ("id" in tag) {
|
||||
try {
|
||||
const response = await api.delete(`/api/sign/${recipientId}/tags/`, { data: [{ tagId: tag.id }] })
|
||||
const response = await api.delete(`/api/v1/sign/${recipientId}/tags/`, { data: [{ tagId: tag.id }] })
|
||||
if (response.status !== 200) throw "Tag Deletion error"
|
||||
} catch (err) {
|
||||
return;
|
||||
|
|
@ -244,7 +244,7 @@ const TagsCon: React.FC<TagsConProps> = ({
|
|||
if (saved.save) {
|
||||
if (saved.isDefaultAndClicked) {
|
||||
try {
|
||||
const res = await axios.post(`${import.meta.env.VITE_BASE_URI}/api/sign/${recipientId}/signatures`, {
|
||||
const res = await axios.post(`${import.meta.env.VITE_BASE_URI}/api/v1/sign/${recipientId}/signatures`, {
|
||||
signatureId: saved.signatureId,
|
||||
tagId: id
|
||||
}, { headers: { "ngrok-skip-browser-warning": "69420", } })
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ interface TermsModalProps {
|
|||
const TermsModal: React.FC<TermsModalProps> = ({ showTerms, setShowTerms, recipientId }) => {
|
||||
|
||||
const onAccept = () => {
|
||||
axios.put(`${import.meta.env.VITE_BASE_URI}/api/sign/accept/${recipientId}`, { headers: { "ngrok-skip-browser-warning": "69420" } })
|
||||
axios.put(`${import.meta.env.VITE_BASE_URI}/api/v1/sign/accept/${recipientId}`, { headers: { "ngrok-skip-browser-warning": "69420" } })
|
||||
.then(response => {
|
||||
setShowTerms(false);
|
||||
console.log(response, "Accept");
|
||||
|
|
@ -24,7 +24,7 @@ const TermsModal: React.FC<TermsModalProps> = ({ showTerms, setShowTerms, recipi
|
|||
});
|
||||
};
|
||||
const onDecline = () => {
|
||||
axios.put(`${import.meta.env.VITE_BASE_URI}/api/sign/declinerecipientId=${recipientId}`, { headers: { "ngrok-skip-browser-warning": "69420" } })
|
||||
axios.put(`${import.meta.env.VITE_BASE_URI}/api/v1/sign/declinerecipientId=${recipientId}`, { headers: { "ngrok-skip-browser-warning": "69420" } })
|
||||
.then(response => {
|
||||
setShowTerms(false);
|
||||
console.log(response, "Decline");
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const Contacts = () => {
|
|||
const fetchContacts = async () => {
|
||||
setLoading(true)
|
||||
try {
|
||||
const res = await api.get(`/api/accounts/${activeAccountId}/contacts`);
|
||||
const res = await api.get(`/api/v1/accounts/${activeAccountId}/contacts`);
|
||||
setContacts(res.data.content || []);
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch contacts:', error);
|
||||
|
|
@ -55,7 +55,7 @@ const Contacts = () => {
|
|||
const handleDelete = async (contactId) => {
|
||||
|
||||
try {
|
||||
let res = await api.delete(`/api/accounts/${activeAccountId}/contacts/${contactId}`)
|
||||
let res = await api.delete(`/api/v1/accounts/${activeAccountId}/contacts/${contactId}`)
|
||||
if (res?.data) {
|
||||
toast.error("Contact delete successfully!", {
|
||||
position: "top-center",
|
||||
|
|
@ -87,9 +87,9 @@ const Contacts = () => {
|
|||
let res;
|
||||
setCreateAndInviteLoader(true);
|
||||
if (type === 'Edit') {
|
||||
res = await api.put(`/api/accounts/${activeAccountId}/contacts`, [data])
|
||||
res = await api.put(`/api/v1/accounts/${activeAccountId}/contacts`, [data])
|
||||
} else {
|
||||
res = await api.post(`/api/accounts/${activeAccountId}/contacts`, [data]);
|
||||
res = await api.post(`/api/v1/accounts/${activeAccountId}/contacts`, [data]);
|
||||
}
|
||||
if (res.status === 200) {
|
||||
toast.success('Contact created successfully!', {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const SendForSign: React.FC<Props> = ({ showSideBar }) => {
|
|||
|
||||
const handleStartSectionClick = (signType: SignTypeEnum) => {
|
||||
|
||||
api.post(`/api/accounts/${defaultAccountId}/transactions`)
|
||||
api.post(`/api/v1/accounts/${defaultAccountId}/transactions`)
|
||||
.then(res => {
|
||||
if (res.status === 200 || res.status === 201) {
|
||||
dispatch(updateTransactionStatus(TRANSACTION_STATUS_ENUMS.TRANSACTION_INITIATED));
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const SideBar: React.FC<SideBarProps> = ({ showSideBar, setShowSideBar, isMobile
|
|||
|
||||
const handleLogoutConfirm = async () => {
|
||||
try {
|
||||
await axios.post(`${import.meta.env.VITE_BASE_URI}/api/auth/logout`,
|
||||
await axios.post(`${import.meta.env.VITE_BASE_URI}/api/v1/auth/logout`,
|
||||
{},
|
||||
{
|
||||
withCredentials: true,
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ const Home = () => {
|
|||
};
|
||||
|
||||
try {
|
||||
const res = await api.get(`/api/accounts/${userData.account.id}/dashboard`, { params: payload });
|
||||
const res = await api.get(`/api/v1/accounts/${userData.account.id}/dashboard`, { params: payload });
|
||||
setDashboardData(res.data);
|
||||
|
||||
const cardDataArray = mapApiDataToCards(res.data);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const StartNow = () => {
|
|||
|
||||
const subject = filesToUpload[0].name ? filesToUpload[0].name : "Untitled"
|
||||
|
||||
const transactionRes = await api.post(`/api/accounts/${userData.account?.id}/transactions`, { subject });
|
||||
const transactionRes = await api.post(`/api/v1/accounts/${userData.account?.id}/transactions`, { subject });
|
||||
const transactionId = transactionRes.data.id
|
||||
|
||||
const formData = new FormData();
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ const StartSection = () => {
|
|||
|
||||
const handleStartSectionClick = (link: string) => {
|
||||
// if ("buttonText" in card && card.buttonText === "Start Now") {
|
||||
// api.post(`/api/accounts/${defaultAccountId}/transactions`)
|
||||
// api.post(`/api/v1/accounts/${defaultAccountId}/transactions`)
|
||||
// .then(res => {
|
||||
// if (res.status === 200 || res.status === 201) {
|
||||
// dispatch(updateTransactionStatus(TRANSACTION_STATUS_ENUMS.TRANSACTION_INITIATED));
|
||||
|
|
@ -76,7 +76,7 @@ const StartSection = () => {
|
|||
|
||||
// useEffect(() => {
|
||||
// try {
|
||||
// axios.get(`${import.meta.env.VITE_BASE_URI}/api/dashboard`, {"withCredentials": true, "ngrok-skip-browser-warning": "69420"}).then((res) => {
|
||||
// axios.get(`${import.meta.env.VITE_BASE_URI}/api/v1/dashboard`, {"withCredentials": true, "ngrok-skip-browser-warning": "69420"}).then((res) => {
|
||||
// console.log(res)
|
||||
// })
|
||||
// } catch (error) {
|
||||
|
|
|
|||
|
|
@ -258,9 +258,9 @@ const DocumentSubmissionOptions = () => {
|
|||
// Step 1: Fetch transaction status
|
||||
useEffect(() => {
|
||||
const fetchTransaction = async () => {
|
||||
// /api/accounts/{accountId}/transactions/{trxId}
|
||||
// /api/v1/accounts/{accountId}/transactions/{trxId}
|
||||
try {
|
||||
const res = await api.get(`/api/accounts/${accountId}/transactions/${transactionId}`);
|
||||
const res = await api.get(`/api/v1/accounts/${accountId}/transactions/${transactionId}`);
|
||||
if (res?.data) {
|
||||
setStatus(res?.data?.status);
|
||||
setTransactionData(res?.data)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ const AdvancedOptions: React.FC<AdvancedOptionsProps> = ({ accountId, setShowAdv
|
|||
debugger
|
||||
console.log(changes)
|
||||
|
||||
await api.put(`/api/accounts/${accountId}/transactions/${transactionDetails.id}`, {
|
||||
await api.put(`/api/v1/accounts/${accountId}/transactions/${transactionDetails.id}`, {
|
||||
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ const DocumentCard: React.FC<DocumentCardProps> = ({ id, name, isCompleted, tran
|
|||
let lastUpdate = 0;
|
||||
const delay = 1000;
|
||||
|
||||
const docProgSSE = new EventSource(`http://10.10.1.99:8083/api/progress/${id}`);
|
||||
const docProgSSE = new EventSource(`http://10.10.1.99:8083/api/v1/progress/${id}`);
|
||||
|
||||
docProgSSE.addEventListener('progress', (event) => {
|
||||
const jsonData = JSON.parse(event.data);
|
||||
|
|
@ -97,7 +97,7 @@ const DocumentCard: React.FC<DocumentCardProps> = ({ id, name, isCompleted, tran
|
|||
console.error("Missing document ID, account ID, or transaction ID");
|
||||
return;
|
||||
}
|
||||
const res = await api.delete(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/documents/${docId}`)
|
||||
const res = await api.delete(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/documents/${docId}`)
|
||||
if (res.status === 202) {
|
||||
dispatch(deleteDocument(docId));
|
||||
setDocumentDel({ docId: null, isDel: false });
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const MessageCon: React.FC<MessageConIntProps> = ({ transactionTemplateToggle, a
|
|||
|
||||
const fetchEmailDetails = async () => {
|
||||
try {
|
||||
const res = await api.get(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`);
|
||||
const res = await api.get(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`);
|
||||
|
||||
if (transactionTemplateToggle === TRANSACTION_TEMPLATE_TOGGLE.TEMPLATES) {
|
||||
setTemplateName(res.data.name)
|
||||
|
|
@ -45,7 +45,7 @@ const MessageCon: React.FC<MessageConIntProps> = ({ transactionTemplateToggle, a
|
|||
}
|
||||
|
||||
const handleMessageSaveClick = async () => {
|
||||
await api.put(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`, {
|
||||
await api.put(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`, {
|
||||
name: templateName,
|
||||
subject: emailDtls.subject, message: emailDtls.message,
|
||||
status: "CREATED"
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ const ProcessStepOne = () => {
|
|||
useEffect(() => {
|
||||
(async () => {
|
||||
try {
|
||||
const res = await api.get(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`);
|
||||
const res = await api.get(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`);
|
||||
setTransactionDetails(res.data)
|
||||
|
||||
if (transactionTemplateToggle === TRANSACTION_TEMPLATE_TOGGLE.TEMPLATES) {
|
||||
|
|
@ -226,9 +226,9 @@ const ProcessStepOne = () => {
|
|||
order: index,
|
||||
}));
|
||||
|
||||
await api.patch(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/documents`, { "documents": documentsData });
|
||||
await api.patch(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/documents`, { "documents": documentsData });
|
||||
|
||||
await api.get(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/documents?include_pages=true`).then(res => {
|
||||
await api.get(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/documents?include_pages=true`).then(res => {
|
||||
if (res.status === 200) {
|
||||
dispatch(setDocuments(res.data));
|
||||
}
|
||||
|
|
@ -237,7 +237,7 @@ const ProcessStepOne = () => {
|
|||
});
|
||||
|
||||
dispatch(showLoader("Processing Message..."));
|
||||
await api.put(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`, {
|
||||
await api.put(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`, {
|
||||
name: templateName,
|
||||
subject: emailDtls.subject, message: emailDtls.message,
|
||||
status: "CREATED"
|
||||
|
|
@ -312,7 +312,7 @@ const ProcessStepOne = () => {
|
|||
}]
|
||||
|
||||
try {
|
||||
const basePath = `/api/accounts/${accountId}/transactions/${transactionId}/recipients`;
|
||||
const basePath = `/api/v1/accounts/${accountId}/transactions/${transactionId}/recipients`;
|
||||
const res = await api.post(basePath, recipientsDataTemp)
|
||||
recipientId = res.data[0].id;
|
||||
} catch (error) {
|
||||
|
|
@ -336,7 +336,7 @@ const ProcessStepOne = () => {
|
|||
dispatch(showLoader("Processing eSignature..."));
|
||||
(async () => {
|
||||
try {
|
||||
await api.put(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`, { status: "SENT" })
|
||||
await api.put(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`, { status: "SENT" })
|
||||
if(accountId && transactionId) signSessionRedirect(accountId, transactionId, recipientId);
|
||||
dispatch(hideLoader());
|
||||
} catch (err) {
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ const RecipientAddCard = ({ transactionTemplateToggle, editRecipient, editCase,
|
|||
|
||||
if (!hasFetchedInitial) {
|
||||
try {
|
||||
const res = await api.get(`/api/accounts/${activeAccountId}/contacts?pageSize=10`);
|
||||
const res = await api.get(`/api/v1/accounts/${activeAccountId}/contacts?pageSize=10`);
|
||||
const contacts = res.data?.content || [];
|
||||
setCachedContacts([...contacts]);
|
||||
setFilteredContacts(contacts);
|
||||
|
|
@ -327,7 +327,7 @@ const RecipientAddCard = ({ transactionTemplateToggle, editRecipient, editCase,
|
|||
|
||||
setLastQuery(inputValue);
|
||||
api
|
||||
.get(`/api/accounts/${activeAccountId}/contacts?pageSize=5&${activeField}=${inputValue}`)
|
||||
.get(`/api/v1/accounts/${activeAccountId}/contacts?pageSize=5&${activeField}=${inputValue}`)
|
||||
.then((res) => {
|
||||
console.log(res, "Printing RES")
|
||||
const fetched = res.data?.content || [];
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ const RecipientsCon: React.FC<RecipientsConIntProps> = ({ transactionTemplateTog
|
|||
}]
|
||||
|
||||
try {
|
||||
const basePath = `/api/accounts/${accountId}/transactions/${transactionId}/recipients`;
|
||||
const basePath = `/api/v1/accounts/${accountId}/transactions/${transactionId}/recipients`;
|
||||
const res = await api.post(basePath, recipientsDataTemp)
|
||||
recipientId = res.data[0].id;
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ transactionSaving
|
|||
if (fetchedTags.includes(recipient.id)) return false;
|
||||
fetchedTags.push(recipient.id)
|
||||
return true
|
||||
}).map((recipient) => api.get(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/recipients/${recipient.id}/tags`));
|
||||
}).map((recipient) => api.get(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/recipients/${recipient.id}/tags`));
|
||||
|
||||
if (!requests.length) return
|
||||
|
||||
|
|
@ -203,7 +203,7 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ transactionSaving
|
|||
}));
|
||||
|
||||
return api.put(
|
||||
`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/recipients/${recipientId}/tags`,
|
||||
`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/recipients/${recipientId}/tags`,
|
||||
updatedTagsWithNavOrder
|
||||
);
|
||||
});
|
||||
|
|
@ -241,7 +241,7 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ transactionSaving
|
|||
// return
|
||||
// SENDING Transaction - START
|
||||
if (!save) {
|
||||
const res = await api.put(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`, { status: "SENT" })
|
||||
const res = await api.put(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`, { status: "SENT" })
|
||||
dispatch(hideLoader())
|
||||
}
|
||||
// SENDING Transaction - END
|
||||
|
|
@ -460,7 +460,7 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ transactionSaving
|
|||
|
||||
|
||||
const handleLazyLoad = (docId: string, pageId: string) => {
|
||||
api.get(`http://10.10.1.99:8083/api/${accountId}/transactions/${transactionId}/documents/${docId}/pages/${pageId}`).then(res => {
|
||||
api.get(`http://10.10.1.99:8083/api/v1/${accountId}/transactions/${transactionId}/documents/${docId}/pages/${pageId}`).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
|
|
@ -513,7 +513,7 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ transactionSaving
|
|||
draggable="false"
|
||||
width={page.width}
|
||||
height={page.height}
|
||||
// src={`http://10.10.1.99:8083/api/accounts/${accountId}/transactions/${transactionId}/documents/${doc.id}/pages/${page.id}`}
|
||||
// src={`http://10.10.1.99:8083/api/v1/accounts/${accountId}/transactions/${transactionId}/documents/${doc.id}/pages/${page.id}`}
|
||||
src={page.src}
|
||||
loading='lazy'
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ const DroppedItemsTagsCon = forwardRef(({
|
|||
(async () => {
|
||||
if ("id" in tag) {
|
||||
try {
|
||||
const response = await api.delete(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/recipients/${recipientId}/tags/${tag.id}`)
|
||||
const response = await api.delete(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/recipients/${recipientId}/tags/${tag.id}`)
|
||||
if (response.status !== 200) throw "Tag Deletion error"
|
||||
} catch (err) {
|
||||
console.error("Tag Deletion error")
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ const FieldList: React.FC<FieldListProps> = ({ color, recipientId, recipientIndx
|
|||
|
||||
useEffect(() => {
|
||||
axios
|
||||
.get(`${import.meta.env.VITE_BASE_URI}/api/accounts/${accountId}/tags`, {
|
||||
.get(`${import.meta.env.VITE_BASE_URI}/api/v1/accounts/${accountId}/tags`, {
|
||||
headers: {
|
||||
"ngrok-skip-browser-warning": "69420",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ const Setting = () => {
|
|||
const getAccountList = async () => {
|
||||
setAccountOptionsLoading(true);
|
||||
try {
|
||||
const res = await api.get('/api/user/accounts');
|
||||
const res = await api.get('/api/v1/user/accounts');
|
||||
if (res?.data) {
|
||||
setAccountOptions(res.data);
|
||||
}
|
||||
|
|
@ -350,7 +350,7 @@ const Setting = () => {
|
|||
const payloadAccount = {
|
||||
name: data.accountName
|
||||
}
|
||||
res = await api.post(`/api/user/accounts`, payloadAccount)
|
||||
res = await api.post(`/api/v1/user/accounts`, payloadAccount)
|
||||
if (res.status === 201) {
|
||||
toastMesaage = `${action.toUpperCase()} Created Successfull...!`
|
||||
}
|
||||
|
|
@ -359,7 +359,7 @@ const Setting = () => {
|
|||
email: data.email,
|
||||
role: data.role
|
||||
}
|
||||
res = await api.post(`/api/accounts/${data.i_accountName}/invite`, payloadInvite)
|
||||
res = await api.post(`/api/v1/accounts/${data.i_accountName}/invite`, payloadInvite)
|
||||
toastMesaage = "Invite Successfull...!"
|
||||
}
|
||||
|
||||
|
|
@ -390,7 +390,7 @@ const Setting = () => {
|
|||
const handleContactSubmit = async (data: ContactData) => {
|
||||
try {
|
||||
setCreateAndInviteLoader(true);
|
||||
const res = await api.post(`/api/accounts/${activeAccountId}/contacts`, [data]);
|
||||
const res = await api.post(`/api/v1/accounts/${activeAccountId}/contacts`, [data]);
|
||||
if (res.status === 200) {
|
||||
toast.success('Contact created successfully!', {
|
||||
position: "top-center",
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ const AddSignatureModal: React.FC<AddSignatureModalProps> = ({
|
|||
...payload,
|
||||
signatureId: editingSignature.id
|
||||
};
|
||||
res = await api.put(`/api/user/signatures`, updatePayload);
|
||||
res = await api.put(`/api/v1/user/signatures`, updatePayload);
|
||||
|
||||
// toast.success("Signature Updated Successfully", {
|
||||
// position: "top-center",
|
||||
|
|
@ -250,7 +250,7 @@ const AddSignatureModal: React.FC<AddSignatureModalProps> = ({
|
|||
// });
|
||||
} else {
|
||||
// Create new signature
|
||||
res = await api.post(`/api/user/signatures`, payload);
|
||||
res = await api.post(`/api/v1/user/signatures`, payload);
|
||||
|
||||
// toast.success("Signature Created Successfully", {
|
||||
// position: "top-center",
|
||||
|
|
@ -426,7 +426,7 @@ const AddSignatureModal: React.FC<AddSignatureModalProps> = ({
|
|||
|
||||
const getUserDetails = async () => {
|
||||
try {
|
||||
let res = await api.get(`/api/user/details`);
|
||||
let res = await api.get(`/api/v1/user/details`);
|
||||
|
||||
let currUser = res?.data;
|
||||
setUser(currUser);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ const SignatureManager: React.FC = () => {
|
|||
const getAllSignatures = async () => {
|
||||
setLoading(true)
|
||||
try {
|
||||
let res = await api.get("/api/user/signatures")
|
||||
let res = await api.get("/api/v1/user/signatures")
|
||||
let signatureData = res?.data
|
||||
setSignatures(signatureData)
|
||||
} catch (error) {
|
||||
|
|
@ -70,7 +70,7 @@ const SignatureManager: React.FC = () => {
|
|||
if (!id) return;
|
||||
setLoading(true)
|
||||
try {
|
||||
let res = await api.delete(`/api/user/signatures/${id}`)
|
||||
let res = await api.delete(`/api/v1/user/signatures/${id}`)
|
||||
// toast.success("Signature Delete Successfull", {
|
||||
// position: "top-center",
|
||||
// autoClose: 500,
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ const ClientSignCon: React.FC<ClientSignConProps> = ({
|
|||
// Getting Signatures - START
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
const res = await axios.get(`${import.meta.env.VITE_BASE_URI}/api/sign/${recipientId}/signatures`, {
|
||||
const res = await axios.get(`${import.meta.env.VITE_BASE_URI}/api/v1/sign/${recipientId}/signatures`, {
|
||||
headers: {
|
||||
"ngrok-skip-browser-warning": "69420"
|
||||
}
|
||||
|
|
@ -273,7 +273,7 @@ const ClientSignCon: React.FC<ClientSignConProps> = ({
|
|||
// ...payload,
|
||||
// signatureId: editingSignature.id
|
||||
// };
|
||||
// res = await axios.put(`${import.meta.env.VITE_BASE_URI}/api/user/signatures`, updatePayload);
|
||||
// res = await axios.put(`${import.meta.env.VITE_BASE_URI}/api/v1/user/signatures`, updatePayload);
|
||||
// console.log("handleUpdate", res);
|
||||
|
||||
// toast.success("Signature Updated Successfully", {
|
||||
|
|
@ -289,7 +289,7 @@ const ClientSignCon: React.FC<ClientSignConProps> = ({
|
|||
// });
|
||||
// } else {
|
||||
// Create new signature
|
||||
let res = await axios.post(`${import.meta.env.VITE_BASE_URI}/api/sign/${recipientId}/signatures`,
|
||||
let res = await axios.post(`${import.meta.env.VITE_BASE_URI}/api/v1/sign/${recipientId}/signatures`,
|
||||
payload,
|
||||
{
|
||||
headers: {
|
||||
|
|
@ -780,7 +780,7 @@ const ClientSignCon: React.FC<ClientSignConProps> = ({
|
|||
};
|
||||
const getUserDetails = async () => {
|
||||
try {
|
||||
// let res = await axios.get(`/api/user/details`, {
|
||||
// let res = await axios.get(`/api/v1/user/details`, {
|
||||
// headers: {
|
||||
// "ngrok-skip-browser-warning": "69420",
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ interface SignatureConProps {
|
|||
const SignatureCon: React.FC<SignatureConProps> = ({ recipientId, openSign, setOpenSign, savedSignature, setSavedSignature }) => {
|
||||
|
||||
const handleSaveSignature = (signatureDataUrl: string) => {
|
||||
axios.post(`${import.meta.env.VITE_BASE_URI}/api/sign/${recipientId}/signatures`,
|
||||
axios.post(`${import.meta.env.VITE_BASE_URI}/api/v1/sign/${recipientId}/signatures`,
|
||||
{
|
||||
signature: signatureDataUrl,
|
||||
initials: signatureDataUrl,
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const TemplateTable = () => {
|
|||
const getAllTemplates = async () => {
|
||||
setLoading(true)
|
||||
try {
|
||||
let res = await api.get(`/api/accounts/${activeAccountId}/templates?sortBy=lastModifiedAt desc`)
|
||||
let res = await api.get(`/api/v1/accounts/${activeAccountId}/templates?sortBy=lastModifiedAt desc`)
|
||||
let templateData = res?.data
|
||||
setTemplates(templateData)
|
||||
} catch (error) {
|
||||
|
|
@ -88,7 +88,7 @@ const TemplateTable = () => {
|
|||
enableSignatureIdStamping: item.enableSignatureIdStamping,
|
||||
templateId: item.id,
|
||||
};
|
||||
let res = await api.post(`/api/accounts/${activeAccountId}/transactions`, payload)
|
||||
let res = await api.post(`/api/v1/accounts/${activeAccountId}/transactions`, payload)
|
||||
|
||||
// /process-step-one/:accountId/:transactionId
|
||||
navigate(`/process-step-one/${activeAccountId}/${res?.data?.id}?useTemplate=true`);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const Templates = () => {
|
|||
|
||||
const handleAddTemplate = async () => {
|
||||
try {
|
||||
const res = await api.post(`/api/accounts/${activeAccountId}/templates`);
|
||||
const res = await api.post(`/api/v1/accounts/${activeAccountId}/templates`);
|
||||
navigate(`/process-step-one/${activeAccountId}/template/${res.data.id}`)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ const AuditModal: React.FC<AuditModalProps> = ({ closeModal }) => {
|
|||
const getAuditDetails = async () => {
|
||||
// setLoading(true)
|
||||
try {
|
||||
let res = await api.get(`/api/accounts/${accountId}/transactions/${transactionId}/audit?lang=${userDetails.language || ''}`)
|
||||
// let res = await api.get(`/api/accounts/${accountId}/transactions/${transactionId}/audit?lang=hi`)
|
||||
let res = await api.get(`/api/v1/accounts/${accountId}/transactions/${transactionId}/audit?lang=${userDetails.language || ''}`)
|
||||
// let res = await api.get(`/api/v1/accounts/${accountId}/transactions/${transactionId}/audit?lang=hi`)
|
||||
if (res?.status === 200) {
|
||||
// console.log(res?.data?.events)
|
||||
let auditResponse = res?.data?.events
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ const TransactionView = () => {
|
|||
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const [res1, res2] = await Promise.all([api.get(`/api/accounts/${accountId}/transactions/${transactionId}`),
|
||||
api.get(`/api/accounts/${accountId}/transactions/${transactionId}/recipients`)])
|
||||
const [res1, res2] = await Promise.all([api.get(`/api/v1/accounts/${accountId}/transactions/${transactionId}`),
|
||||
api.get(`/api/v1/accounts/${accountId}/transactions/${transactionId}/recipients`)])
|
||||
setTransactionDetails({ transaction: res1.data, recipients: res2.data });
|
||||
} catch (error) {
|
||||
console.error("Error Gettign Transaction and its Recipient: ", error.message)
|
||||
|
|
@ -96,7 +96,7 @@ const TransactionView = () => {
|
|||
|
||||
const fetchDocuments = async () => {
|
||||
try {
|
||||
const res = await api.get(`/api/accounts/${accountId}/transactions/${transactionId}/documents`)
|
||||
const res = await api.get(`/api/v1/accounts/${accountId}/transactions/${transactionId}/documents`)
|
||||
if (res?.status === 200) {
|
||||
let resDoc = res?.data
|
||||
setDocumentsData(resDoc)
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ api.interceptors.response.use(
|
|||
if (!isRefreshing) {
|
||||
isRefreshing = true;
|
||||
// Attempt to refresh the token
|
||||
const refreshResponse = await api.patch("/api/auth/refresh");
|
||||
const refreshResponse = await api.patch("/api/v1/auth/refresh");
|
||||
if (refreshResponse.status === 200) {
|
||||
isRefreshing = false;
|
||||
// Retry the original request
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { AccountData } from "../utlity/types";
|
|||
|
||||
const fetchAccounts = async () => {
|
||||
try {
|
||||
const response = await api("/api/user/accounts");
|
||||
const response = await api("/api/v1/user/accounts");
|
||||
const data: AccountData[] = response.data || [];
|
||||
// setAllAccounts(data);
|
||||
return data;
|
||||
|
|
@ -16,7 +16,7 @@ const fetchAccounts = async () => {
|
|||
const fetchAccountData = async (accountId: string) => {
|
||||
try {
|
||||
if (!accountId) return null;
|
||||
const response = await api.get(`/api/accounts/${accountId}`);
|
||||
const response = await api.get(`/api/v1/accounts/${accountId}`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error("Error fetching account data:", error);
|
||||
|
|
@ -27,7 +27,7 @@ const fetchAccountData = async (accountId: string) => {
|
|||
const fetchTransactionData = async (accountId: string, transactionId: string) => {
|
||||
try {
|
||||
if (!accountId || !transactionId) return null;
|
||||
const response = await api.get(`/api/accounts/${accountId}/transactions/${transactionId}`);
|
||||
const response = await api.get(`/api/v1/accounts/${accountId}/transactions/${transactionId}`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error("Error fetching account data:", error);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export const fetchDocuments = createAsyncThunk<
|
|||
const toggle = state.selectedRecipients.transactionTemplateToggle;
|
||||
|
||||
const response = await api.get(
|
||||
`/api/accounts/${accountId}/${toggle}/${transactionId}/documents?include_pages=true`
|
||||
`/api/v1/accounts/${accountId}/${toggle}/${transactionId}/documents?include_pages=true`
|
||||
);
|
||||
|
||||
const data = response.data as Document[];
|
||||
|
|
@ -131,7 +131,7 @@ export const uploadDocuments = createAsyncThunk<
|
|||
|
||||
try {
|
||||
const res = await api.post(
|
||||
`/api/accounts/${accountId}/${toggle}/${transactionId}/documents`,
|
||||
`/api/v1/accounts/${accountId}/${toggle}/${transactionId}/documents`,
|
||||
file,
|
||||
{
|
||||
headers: {
|
||||
|
|
@ -185,7 +185,7 @@ export const handleMultipleTransactionThunk = createAsyncThunk<
|
|||
const currentFile = formData.getAll("file")[i] as File;
|
||||
|
||||
dispatch(showLoader(`Creating Transaction ${i + 1} ...`));
|
||||
const transactionRes = await api.post(`/api/accounts/${accountId}/transactions`, { "subject": currentFile.name });
|
||||
const transactionRes = await api.post(`/api/v1/accounts/${accountId}/transactions`, { "subject": currentFile.name });
|
||||
const transactionId = transactionRes.data.id
|
||||
dispatch(showLoader('Uploading documents...'));
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ export const handleMultipleTransactionThunk = createAsyncThunk<
|
|||
|
||||
try {
|
||||
const res = await api.post(
|
||||
`/api/accounts/${accountId}/${toggle}/${transactionId}/documents`,
|
||||
`/api/v1/accounts/${accountId}/${toggle}/${transactionId}/documents`,
|
||||
file,
|
||||
{
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ export const addRecipientAsync = createAsyncThunk<
|
|||
const updateRecipientsData = recipientsData.filter(recipient => recipient.id !== null);
|
||||
const createRecipientsData = recipientsData.filter(recipient => recipient.id == null);
|
||||
|
||||
const basePath = `/api/accounts/${accountId}/${toggle}/${transactionId}/recipients`;
|
||||
const basePath = `/api/v1/accounts/${accountId}/${toggle}/${transactionId}/recipients`;
|
||||
|
||||
const resUpdate = updateRecipientsData.length
|
||||
? await api.put(basePath, updateRecipientsData)
|
||||
|
|
@ -101,7 +101,7 @@ export const removeRecipientAsync = createAsyncThunk<
|
|||
const state = getState() as { selectedRecipients: SelectedRecipientInt };
|
||||
const toggle = state.selectedRecipients.transactionTemplateToggle;
|
||||
|
||||
const basePath = `/api/accounts/${accountId}/${toggle}/${transactionId}/recipients`;
|
||||
const basePath = `/api/v1/accounts/${accountId}/${toggle}/${transactionId}/recipients`;
|
||||
|
||||
// return
|
||||
if (recipientId) {
|
||||
|
|
@ -127,7 +127,7 @@ export const fetchRecipients = createAsyncThunk<
|
|||
const state = getState() as { selectedRecipients: SelectedRecipientInt };
|
||||
const toggle = state.selectedRecipients.transactionTemplateToggle;
|
||||
|
||||
const basePath = `/api/accounts/${accountId}/${toggle}/${transactionId}/recipients`;
|
||||
const basePath = `/api/v1/accounts/${accountId}/${toggle}/${transactionId}/recipients`;
|
||||
const response = await api.get(basePath);
|
||||
|
||||
let data = response.data as Recipient[];
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ const initialState: UserState = {
|
|||
export const fetchUserDetails = createAsyncThunk<UserState, void, { rejectValue: string }>
|
||||
("user/fetchUserDetails", async (_, { rejectWithValue }) => {
|
||||
try {
|
||||
const response = await api.get("/api/user/details");
|
||||
const response = await api.get("/api/v1/user/details");
|
||||
return response.data;
|
||||
} catch (error: any) {
|
||||
return rejectWithValue(
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import api from "../config/api";
|
|||
// Accepts: type = 'archived' | 'combined' | 'certificate' | documentId (number or string)
|
||||
const downloadDocumentUtils = async (accountId: string, transactionId: string, type: string, includeCertificate: string | null = null) => {
|
||||
let documentId = type;
|
||||
let url = `/api/accounts/${accountId}/transactions/${transactionId}/documents/${documentId}`;
|
||||
let url = `/api/v1/accounts/${accountId}/transactions/${transactionId}/documents/${documentId}`;
|
||||
if (includeCertificate !== null) {
|
||||
url = url + includeCertificate;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import api from "../config/api";
|
||||
|
||||
const signSessionRedirect = async (accountId: string, transactionId: string, recipientId: string) => {
|
||||
const session = await api.get(`/api/accounts/${accountId}/transactions/${transactionId}/recipients/${recipientId}/create_session`)
|
||||
const session = await api.get(`/api/v1/accounts/${accountId}/transactions/${transactionId}/recipients/${recipientId}/create_session`)
|
||||
window.location.href = session.data.url;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue