upd 26 Sep 2253

This commit is contained in:
=bhagwanSingh 2025-09-26 22:53:50 +05:30
parent 14ede77a16
commit 6acf3c7d72
44 changed files with 99 additions and 99 deletions

View File

@ -1,13 +1,13 @@
{ {
"LOGIN": { "LOGIN": {
"path": "/api/auth/login", "path": "/api/v1/auth/login",
"method": "POST", "method": "POST",
"expecte_success_status_code": 200, "expecte_success_status_code": 200,
"expected_error_status_code": 401, "expected_error_status_code": 401,
"default_error_message": "Internal server error" "default_error_message": "Internal server error"
}, },
"AUTH": { "AUTH": {
"path": "/api/auth", "path": "/api/v1/auth",
"sub": { "sub": {
"LOGIN":{ "LOGIN":{
"path": "/login" "path": "/login"
@ -15,6 +15,6 @@
} }
}, },
"CREATE_TRANSACTION": { "CREATE_TRANSACTION": {
"path": "/api/account/${var1}/transactions/${var2}" "path": "/api/v1/account/${var1}/transactions/${var2}"
} }
} }

View File

@ -96,7 +96,7 @@ const CommonNav: React.FC<AccountNavProps> = ({
const getAccountDetails = async () => { const getAccountDetails = async () => {
try { try {
let res = await api.get('/api/user/accounts'); let res = await api.get('/api/v1/user/accounts');
let items = res?.data; let items = res?.data;
const cleanedData: AccountDataArray[] = items.map((item: any) => ({ const cleanedData: AccountDataArray[] = items.map((item: any) => ({
@ -179,7 +179,7 @@ const CommonNav: React.FC<AccountNavProps> = ({
const getUserDetails = async () => { const getUserDetails = async () => {
try { try {
let res = await api.get(`/api/user/details`); let res = await api.get(`/api/v1/user/details`);
const item = res?.data; const item = res?.data;
if (item) { if (item) {
@ -249,7 +249,7 @@ const CommonNav: React.FC<AccountNavProps> = ({
const handleLogout = async () => { const handleLogout = async () => {
try { try {
let res = await api.post('/api/auth/logout'); let res = await api.post('/api/v1/auth/logout');
if (res.status === 200) { if (res.status === 200) {
sessionStorage.clear(); sessionStorage.clear();
setOpen(false); setOpen(false);

View File

@ -82,7 +82,7 @@ const Account = () => {
// const getUserDetails = async () => { // const getUserDetails = async () => {
// try { // try {
// let res = await api.get('/api/user/details') // let res = await api.get('/api/v1/user/details')
// let accountIDData = res?.data?.account?.id // let accountIDData = res?.data?.account?.id
// setAccountID(accountIDData) // setAccountID(accountIDData)
// } catch (error) { // } catch (error) {
@ -129,7 +129,7 @@ const Account = () => {
}; };
try { 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); console.log("Dashboard Data:", res.data);
const cardDataArray = mapApiDataToCards(res.data); const cardDataArray = mapApiDataToCards(res.data);
setCards(cardDataArray); setCards(cardDataArray);
@ -157,7 +157,7 @@ const Account = () => {
// const getAccountDetails = async () => { // const getAccountDetails = async () => {
// try { // try {
// let res = await api.get('/api/user/accounts') // let res = await api.get('/api/v1/user/accounts')
// let items = res?.data // let items = res?.data
// setAccountsData(items) // setAccountsData(items)
// } catch (error) { // } catch (error) {
@ -179,7 +179,7 @@ const Account = () => {
email: data.email, email: data.email,
role: data.role 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) { if (res?.data) {
toast.success("Invite Sent Successfully...!", { toast.success("Invite Sent Successfully...!", {
position: "top-center", position: "top-center",

View File

@ -64,7 +64,7 @@ const AccountNav: React.FC<AccountNavProps> = ({ accountName = null, transaction
const getAccountDetails = async () => { const getAccountDetails = async () => {
try { try {
let res = await api.get('/api/user/accounts'); let res = await api.get('/api/v1/user/accounts');
let items = res?.data; let items = res?.data;
const cleanedData: AccountDataArray[] = items.map((item: any) => ({ const cleanedData: AccountDataArray[] = items.map((item: any) => ({
@ -141,7 +141,7 @@ const AccountNav: React.FC<AccountNavProps> = ({ accountName = null, transaction
const getUserDetails = async () => { const getUserDetails = async () => {
try { try {
let res = await api.get(`/api/user/details`); let res = await api.get(`/api/v1/user/details`);
const item = res?.data; const item = res?.data;
if (item) { if (item) {
@ -214,7 +214,7 @@ const AccountNav: React.FC<AccountNavProps> = ({ accountName = null, transaction
const handleLogout = async () => { const handleLogout = async () => {
try { try {
let res = await api.post('/api/auth/logout'); let res = await api.post('/api/v1/auth/logout');
if (res.status === 200) { if (res.status === 200) {
sessionStorage.clear(); sessionStorage.clear();
setOpen(false); setOpen(false);

View File

@ -39,7 +39,7 @@ const Accounts = () => {
const fetchAccounts = async () => { const fetchAccounts = async () => {
try { try {
const response = await api("/api/user/accounts"); const response = await api("/api/v1/user/accounts");
const data: AccountData[] = response.data || []; const data: AccountData[] = response.data || [];
setAllAccounts(data); setAllAccounts(data);
} catch (error) { } catch (error) {
@ -60,7 +60,7 @@ const Accounts = () => {
const payloadAccount = { const payloadAccount = {
name: accountName name: accountName
} }
let res = await api.post(`/api/user/accounts`, payloadAccount) let res = await api.post(`/api/v1/user/accounts`, payloadAccount)
if (res?.data) { if (res?.data) {
toast.success("Account Add Successfully...!", { toast.success("Account Add Successfully...!", {
position: "top-center", position: "top-center",
@ -88,7 +88,7 @@ const Accounts = () => {
const handleAction = async (accountId: string, action: 'accept' | 'reject') => { const handleAction = async (accountId: string, action: 'accept' | 'reject') => {
try { 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) { if (response.data.status === 202) {
toast.success("Login Successful", { toast.success("Login Successful", {
position: "top-center", position: "top-center",

View File

@ -52,7 +52,7 @@ const TransactionDataTable = ({ activeAccountId }) => {
console.log("fetchTransactions") console.log("fetchTransactions")
setLoading(true) setLoading(true)
try { 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 || []); setTransactions(response.data || []);
} catch (error) { } catch (error) {
console.error("Error fetching transactions:", error); console.error("Error fetching transactions:", error);

View File

@ -104,7 +104,7 @@ const LoginForm = ({ onSwitchToRegister }) => {
try { try {
const res = await axios.post( 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 }, { email: formData.email, password: formData.password },
{ {
withCredentials: true, withCredentials: true,

View File

@ -28,7 +28,7 @@ const OAuthGoogle: React.FC<OAuthGoogleProps> = ({ isLogin }) => {
const token = response.credential; 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: { headers: {
"ngrok-skip-browser-warning": "69420", "ngrok-skip-browser-warning": "69420",
} }

View File

@ -204,7 +204,7 @@ const RegisterForm = ({ onSwitchToLogin }) => {
try { try {
const res = await axios.post( 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, firstName: trimmedData.firstName,
lastName: trimmedData.lastName, lastName: trimmedData.lastName,

View File

@ -327,7 +327,7 @@ const SignDocument = () => {
}, [saved]) }, [saved])
const fetchData = (isSign: boolean = false) => { 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: headers:
{ "ngrok-skip-browser-warning": "69420", } { "ngrok-skip-browser-warning": "69420", }
@ -436,9 +436,9 @@ const SignDocument = () => {
// return; // return;
try { try {
dispatch(showLoader("Signing ...")); 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()); dispatch(hideLoader());
if (signRes.status === 200) { if (signRes.status === 200) {
dispatch(hideLoader()); dispatch(hideLoader());
@ -487,7 +487,7 @@ const SignDocument = () => {
const fetchSignatureData = async (signatureId: string) => { const fetchSignatureData = async (signatureId: string) => {
try { 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" } headers: { "ngrok-skip-browser-warning": "69420" }
}); });
if (response.status === 200) { if (response.status === 200) {
@ -662,7 +662,7 @@ const SignDocument = () => {
const handleDeclineConfirm = async (reason: string, comments: string) => { const handleDeclineConfirm = async (reason: string, comments: string) => {
try { 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 })); setSignerConsent((prev) => ({ ...prev, decline: true }));
setRecSignStatus("DECLINED"); setRecSignStatus("DECLINED");
setShowCompletionScreen(true); setShowCompletionScreen(true);
@ -670,7 +670,7 @@ const SignDocument = () => {
} }
const handleReassignConfirm = (data: { firstName: string; lastName: string; email: string; message: string }) => { 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, name: data.firstName ? data.firstName + " " + data.lastName : data.lastName,
email: data.email, email: data.email,
message: data.message, message: data.message,

View File

@ -139,7 +139,7 @@ const TagsCon: React.FC<TagsConProps> = ({
(async () => { (async () => {
if ("id" in tag) { if ("id" in tag) {
try { 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" if (response.status !== 200) throw "Tag Deletion error"
} catch (err) { } catch (err) {
return; return;
@ -244,7 +244,7 @@ const TagsCon: React.FC<TagsConProps> = ({
if (saved.save) { if (saved.save) {
if (saved.isDefaultAndClicked) { if (saved.isDefaultAndClicked) {
try { 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, signatureId: saved.signatureId,
tagId: id tagId: id
}, { headers: { "ngrok-skip-browser-warning": "69420", } }) }, { headers: { "ngrok-skip-browser-warning": "69420", } })

View File

@ -12,7 +12,7 @@ interface TermsModalProps {
const TermsModal: React.FC<TermsModalProps> = ({ showTerms, setShowTerms, recipientId }) => { const TermsModal: React.FC<TermsModalProps> = ({ showTerms, setShowTerms, recipientId }) => {
const onAccept = () => { 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 => { .then(response => {
setShowTerms(false); setShowTerms(false);
console.log(response, "Accept"); console.log(response, "Accept");
@ -24,7 +24,7 @@ const TermsModal: React.FC<TermsModalProps> = ({ showTerms, setShowTerms, recipi
}); });
}; };
const onDecline = () => { 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 => { .then(response => {
setShowTerms(false); setShowTerms(false);
console.log(response, "Decline"); console.log(response, "Decline");

View File

@ -29,7 +29,7 @@ const Contacts = () => {
const fetchContacts = async () => { const fetchContacts = async () => {
setLoading(true) setLoading(true)
try { try {
const res = await api.get(`/api/accounts/${activeAccountId}/contacts`); const res = await api.get(`/api/v1/accounts/${activeAccountId}/contacts`);
setContacts(res.data.content || []); setContacts(res.data.content || []);
} catch (error) { } catch (error) {
console.error('Failed to fetch contacts:', error); console.error('Failed to fetch contacts:', error);
@ -55,7 +55,7 @@ const Contacts = () => {
const handleDelete = async (contactId) => { const handleDelete = async (contactId) => {
try { 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) { if (res?.data) {
toast.error("Contact delete successfully!", { toast.error("Contact delete successfully!", {
position: "top-center", position: "top-center",
@ -87,9 +87,9 @@ const Contacts = () => {
let res; let res;
setCreateAndInviteLoader(true); setCreateAndInviteLoader(true);
if (type === 'Edit') { if (type === 'Edit') {
res = await api.put(`/api/accounts/${activeAccountId}/contacts`, [data]) res = await api.put(`/api/v1/accounts/${activeAccountId}/contacts`, [data])
} else { } else {
res = await api.post(`/api/accounts/${activeAccountId}/contacts`, [data]); res = await api.post(`/api/v1/accounts/${activeAccountId}/contacts`, [data]);
} }
if (res.status === 200) { if (res.status === 200) {
toast.success('Contact created successfully!', { toast.success('Contact created successfully!', {

View File

@ -38,7 +38,7 @@ const SendForSign: React.FC<Props> = ({ showSideBar }) => {
const handleStartSectionClick = (signType: SignTypeEnum) => { const handleStartSectionClick = (signType: SignTypeEnum) => {
api.post(`/api/accounts/${defaultAccountId}/transactions`) api.post(`/api/v1/accounts/${defaultAccountId}/transactions`)
.then(res => { .then(res => {
if (res.status === 200 || res.status === 201) { if (res.status === 200 || res.status === 201) {
dispatch(updateTransactionStatus(TRANSACTION_STATUS_ENUMS.TRANSACTION_INITIATED)); dispatch(updateTransactionStatus(TRANSACTION_STATUS_ENUMS.TRANSACTION_INITIATED));

View File

@ -38,7 +38,7 @@ const SideBar: React.FC<SideBarProps> = ({ showSideBar, setShowSideBar, isMobile
const handleLogoutConfirm = async () => { const handleLogoutConfirm = async () => {
try { 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, withCredentials: true,

View File

@ -82,7 +82,7 @@ const Home = () => {
}; };
try { 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); setDashboardData(res.data);
const cardDataArray = mapApiDataToCards(res.data); const cardDataArray = mapApiDataToCards(res.data);

View File

@ -32,7 +32,7 @@ const StartNow = () => {
const subject = filesToUpload[0].name ? filesToUpload[0].name : "Untitled" 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 transactionId = transactionRes.data.id
const formData = new FormData(); const formData = new FormData();

View File

@ -61,7 +61,7 @@ const StartSection = () => {
const handleStartSectionClick = (link: string) => { const handleStartSectionClick = (link: string) => {
// if ("buttonText" in card && card.buttonText === "Start Now") { // if ("buttonText" in card && card.buttonText === "Start Now") {
// api.post(`/api/accounts/${defaultAccountId}/transactions`) // api.post(`/api/v1/accounts/${defaultAccountId}/transactions`)
// .then(res => { // .then(res => {
// if (res.status === 200 || res.status === 201) { // if (res.status === 200 || res.status === 201) {
// dispatch(updateTransactionStatus(TRANSACTION_STATUS_ENUMS.TRANSACTION_INITIATED)); // dispatch(updateTransactionStatus(TRANSACTION_STATUS_ENUMS.TRANSACTION_INITIATED));
@ -76,7 +76,7 @@ const StartSection = () => {
// useEffect(() => { // useEffect(() => {
// try { // 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) // console.log(res)
// }) // })
// } catch (error) { // } catch (error) {

View File

@ -258,9 +258,9 @@ const DocumentSubmissionOptions = () => {
// Step 1: Fetch transaction status // Step 1: Fetch transaction status
useEffect(() => { useEffect(() => {
const fetchTransaction = async () => { const fetchTransaction = async () => {
// /api/accounts/{accountId}/transactions/{trxId} // /api/v1/accounts/{accountId}/transactions/{trxId}
try { 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) { if (res?.data) {
setStatus(res?.data?.status); setStatus(res?.data?.status);
setTransactionData(res?.data) setTransactionData(res?.data)

View File

@ -62,7 +62,7 @@ const AdvancedOptions: React.FC<AdvancedOptionsProps> = ({ accountId, setShowAdv
debugger debugger
console.log(changes) console.log(changes)
await api.put(`/api/accounts/${accountId}/transactions/${transactionDetails.id}`, { await api.put(`/api/v1/accounts/${accountId}/transactions/${transactionDetails.id}`, {
}) })
} }

View File

@ -40,7 +40,7 @@ const DocumentCard: React.FC<DocumentCardProps> = ({ id, name, isCompleted, tran
let lastUpdate = 0; let lastUpdate = 0;
const delay = 1000; 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) => { docProgSSE.addEventListener('progress', (event) => {
const jsonData = JSON.parse(event.data); 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"); console.error("Missing document ID, account ID, or transaction ID");
return; 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) { if (res.status === 202) {
dispatch(deleteDocument(docId)); dispatch(deleteDocument(docId));
setDocumentDel({ docId: null, isDel: false }); setDocumentDel({ docId: null, isDel: false });

View File

@ -29,7 +29,7 @@ const MessageCon: React.FC<MessageConIntProps> = ({ transactionTemplateToggle, a
const fetchEmailDetails = async () => { const fetchEmailDetails = async () => {
try { 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) { if (transactionTemplateToggle === TRANSACTION_TEMPLATE_TOGGLE.TEMPLATES) {
setTemplateName(res.data.name) setTemplateName(res.data.name)
@ -45,7 +45,7 @@ const MessageCon: React.FC<MessageConIntProps> = ({ transactionTemplateToggle, a
} }
const handleMessageSaveClick = async () => { const handleMessageSaveClick = async () => {
await api.put(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`, { await api.put(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`, {
name: templateName, name: templateName,
subject: emailDtls.subject, message: emailDtls.message, subject: emailDtls.subject, message: emailDtls.message,
status: "CREATED" status: "CREATED"

View File

@ -110,7 +110,7 @@ const ProcessStepOne = () => {
useEffect(() => { useEffect(() => {
(async () => { (async () => {
try { 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) setTransactionDetails(res.data)
if (transactionTemplateToggle === TRANSACTION_TEMPLATE_TOGGLE.TEMPLATES) { if (transactionTemplateToggle === TRANSACTION_TEMPLATE_TOGGLE.TEMPLATES) {
@ -226,9 +226,9 @@ const ProcessStepOne = () => {
order: index, 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) { if (res.status === 200) {
dispatch(setDocuments(res.data)); dispatch(setDocuments(res.data));
} }
@ -237,7 +237,7 @@ const ProcessStepOne = () => {
}); });
dispatch(showLoader("Processing Message...")); dispatch(showLoader("Processing Message..."));
await api.put(`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`, { await api.put(`/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}`, {
name: templateName, name: templateName,
subject: emailDtls.subject, message: emailDtls.message, subject: emailDtls.subject, message: emailDtls.message,
status: "CREATED" status: "CREATED"
@ -312,7 +312,7 @@ const ProcessStepOne = () => {
}] }]
try { 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) const res = await api.post(basePath, recipientsDataTemp)
recipientId = res.data[0].id; recipientId = res.data[0].id;
} catch (error) { } catch (error) {
@ -336,7 +336,7 @@ const ProcessStepOne = () => {
dispatch(showLoader("Processing eSignature...")); dispatch(showLoader("Processing eSignature..."));
(async () => { (async () => {
try { 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); if(accountId && transactionId) signSessionRedirect(accountId, transactionId, recipientId);
dispatch(hideLoader()); dispatch(hideLoader());
} catch (err) { } catch (err) {

View File

@ -273,7 +273,7 @@ const RecipientAddCard = ({ transactionTemplateToggle, editRecipient, editCase,
if (!hasFetchedInitial) { if (!hasFetchedInitial) {
try { 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 || []; const contacts = res.data?.content || [];
setCachedContacts([...contacts]); setCachedContacts([...contacts]);
setFilteredContacts(contacts); setFilteredContacts(contacts);
@ -327,7 +327,7 @@ const RecipientAddCard = ({ transactionTemplateToggle, editRecipient, editCase,
setLastQuery(inputValue); setLastQuery(inputValue);
api api
.get(`/api/accounts/${activeAccountId}/contacts?pageSize=5&${activeField}=${inputValue}`) .get(`/api/v1/accounts/${activeAccountId}/contacts?pageSize=5&${activeField}=${inputValue}`)
.then((res) => { .then((res) => {
console.log(res, "Printing RES") console.log(res, "Printing RES")
const fetched = res.data?.content || []; const fetched = res.data?.content || [];

View File

@ -106,7 +106,7 @@ const RecipientsCon: React.FC<RecipientsConIntProps> = ({ transactionTemplateTog
}] }]
try { 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) const res = await api.post(basePath, recipientsDataTemp)
recipientId = res.data[0].id; recipientId = res.data[0].id;
} catch (error) { } catch (error) {

View File

@ -113,7 +113,7 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ transactionSaving
if (fetchedTags.includes(recipient.id)) return false; if (fetchedTags.includes(recipient.id)) return false;
fetchedTags.push(recipient.id) fetchedTags.push(recipient.id)
return true 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 if (!requests.length) return
@ -203,7 +203,7 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ transactionSaving
})); }));
return api.put( return api.put(
`/api/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/recipients/${recipientId}/tags`, `/api/v1/accounts/${accountId}/${transactionTemplateToggle}/${transactionId}/recipients/${recipientId}/tags`,
updatedTagsWithNavOrder updatedTagsWithNavOrder
); );
}); });
@ -241,7 +241,7 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ transactionSaving
// return // return
// SENDING Transaction - START // SENDING Transaction - START
if (!save) { 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()) dispatch(hideLoader())
} }
// SENDING Transaction - END // SENDING Transaction - END
@ -460,7 +460,7 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ transactionSaving
const handleLazyLoad = (docId: string, pageId: string) => { 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) console.log(res)
}) })
} }
@ -513,7 +513,7 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ transactionSaving
draggable="false" draggable="false"
width={page.width} width={page.width}
height={page.height} 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} src={page.src}
loading='lazy' loading='lazy'
/> />

View File

@ -60,7 +60,7 @@ const DroppedItemsTagsCon = forwardRef(({
(async () => { (async () => {
if ("id" in tag) { if ("id" in tag) {
try { 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" if (response.status !== 200) throw "Tag Deletion error"
} catch (err) { } catch (err) {
console.error("Tag Deletion error") console.error("Tag Deletion error")

View File

@ -120,7 +120,7 @@ const FieldList: React.FC<FieldListProps> = ({ color, recipientId, recipientIndx
useEffect(() => { useEffect(() => {
axios 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: { headers: {
"ngrok-skip-browser-warning": "69420", "ngrok-skip-browser-warning": "69420",
} }

View File

@ -162,7 +162,7 @@ const Setting = () => {
const getAccountList = async () => { const getAccountList = async () => {
setAccountOptionsLoading(true); setAccountOptionsLoading(true);
try { try {
const res = await api.get('/api/user/accounts'); const res = await api.get('/api/v1/user/accounts');
if (res?.data) { if (res?.data) {
setAccountOptions(res.data); setAccountOptions(res.data);
} }
@ -350,7 +350,7 @@ const Setting = () => {
const payloadAccount = { const payloadAccount = {
name: data.accountName name: data.accountName
} }
res = await api.post(`/api/user/accounts`, payloadAccount) res = await api.post(`/api/v1/user/accounts`, payloadAccount)
if (res.status === 201) { if (res.status === 201) {
toastMesaage = `${action.toUpperCase()} Created Successfull...!` toastMesaage = `${action.toUpperCase()} Created Successfull...!`
} }
@ -359,7 +359,7 @@ const Setting = () => {
email: data.email, email: data.email,
role: data.role 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...!" toastMesaage = "Invite Successfull...!"
} }
@ -390,7 +390,7 @@ const Setting = () => {
const handleContactSubmit = async (data: ContactData) => { const handleContactSubmit = async (data: ContactData) => {
try { try {
setCreateAndInviteLoader(true); 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) { if (res.status === 200) {
toast.success('Contact created successfully!', { toast.success('Contact created successfully!', {
position: "top-center", position: "top-center",

View File

@ -235,7 +235,7 @@ const AddSignatureModal: React.FC<AddSignatureModalProps> = ({
...payload, ...payload,
signatureId: editingSignature.id 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", { // toast.success("Signature Updated Successfully", {
// position: "top-center", // position: "top-center",
@ -250,7 +250,7 @@ const AddSignatureModal: React.FC<AddSignatureModalProps> = ({
// }); // });
} else { } else {
// Create new signature // 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", { // toast.success("Signature Created Successfully", {
// position: "top-center", // position: "top-center",
@ -426,7 +426,7 @@ const AddSignatureModal: React.FC<AddSignatureModalProps> = ({
const getUserDetails = async () => { const getUserDetails = async () => {
try { try {
let res = await api.get(`/api/user/details`); let res = await api.get(`/api/v1/user/details`);
let currUser = res?.data; let currUser = res?.data;
setUser(currUser); setUser(currUser);

View File

@ -42,7 +42,7 @@ const SignatureManager: React.FC = () => {
const getAllSignatures = async () => { const getAllSignatures = async () => {
setLoading(true) setLoading(true)
try { try {
let res = await api.get("/api/user/signatures") let res = await api.get("/api/v1/user/signatures")
let signatureData = res?.data let signatureData = res?.data
setSignatures(signatureData) setSignatures(signatureData)
} catch (error) { } catch (error) {
@ -70,7 +70,7 @@ const SignatureManager: React.FC = () => {
if (!id) return; if (!id) return;
setLoading(true) setLoading(true)
try { 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", { // toast.success("Signature Delete Successfull", {
// position: "top-center", // position: "top-center",
// autoClose: 500, // autoClose: 500,

View File

@ -154,7 +154,7 @@ const ClientSignCon: React.FC<ClientSignConProps> = ({
// Getting Signatures - START // Getting Signatures - START
useEffect(() => { useEffect(() => {
(async () => { (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: { headers: {
"ngrok-skip-browser-warning": "69420" "ngrok-skip-browser-warning": "69420"
} }
@ -273,7 +273,7 @@ const ClientSignCon: React.FC<ClientSignConProps> = ({
// ...payload, // ...payload,
// signatureId: editingSignature.id // 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); // console.log("handleUpdate", res);
// toast.success("Signature Updated Successfully", { // toast.success("Signature Updated Successfully", {
@ -289,7 +289,7 @@ const ClientSignCon: React.FC<ClientSignConProps> = ({
// }); // });
// } else { // } else {
// Create new signature // 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, payload,
{ {
headers: { headers: {
@ -780,7 +780,7 @@ const ClientSignCon: React.FC<ClientSignConProps> = ({
}; };
const getUserDetails = async () => { const getUserDetails = async () => {
try { try {
// let res = await axios.get(`/api/user/details`, { // let res = await axios.get(`/api/v1/user/details`, {
// headers: { // headers: {
// "ngrok-skip-browser-warning": "69420", // "ngrok-skip-browser-warning": "69420",
// } // }

View File

@ -14,7 +14,7 @@ interface SignatureConProps {
const SignatureCon: React.FC<SignatureConProps> = ({ recipientId, openSign, setOpenSign, savedSignature, setSavedSignature }) => { const SignatureCon: React.FC<SignatureConProps> = ({ recipientId, openSign, setOpenSign, savedSignature, setSavedSignature }) => {
const handleSaveSignature = (signatureDataUrl: string) => { 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, signature: signatureDataUrl,
initials: signatureDataUrl, initials: signatureDataUrl,

View File

@ -25,7 +25,7 @@ const TemplateTable = () => {
const getAllTemplates = async () => { const getAllTemplates = async () => {
setLoading(true) setLoading(true)
try { 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 let templateData = res?.data
setTemplates(templateData) setTemplates(templateData)
} catch (error) { } catch (error) {
@ -88,7 +88,7 @@ const TemplateTable = () => {
enableSignatureIdStamping: item.enableSignatureIdStamping, enableSignatureIdStamping: item.enableSignatureIdStamping,
templateId: item.id, 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 // /process-step-one/:accountId/:transactionId
navigate(`/process-step-one/${activeAccountId}/${res?.data?.id}?useTemplate=true`); navigate(`/process-step-one/${activeAccountId}/${res?.data?.id}?useTemplate=true`);

View File

@ -32,7 +32,7 @@ const Templates = () => {
const handleAddTemplate = async () => { const handleAddTemplate = async () => {
try { 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}`) navigate(`/process-step-one/${activeAccountId}/template/${res.data.id}`)
} catch (error) { } catch (error) {
console.log(error) console.log(error)

View File

@ -49,8 +49,8 @@ const AuditModal: React.FC<AuditModalProps> = ({ closeModal }) => {
const getAuditDetails = async () => { const getAuditDetails = async () => {
// setLoading(true) // setLoading(true)
try { try {
let res = await api.get(`/api/accounts/${accountId}/transactions/${transactionId}/audit?lang=${userDetails.language || ''}`) let res = await api.get(`/api/v1/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=hi`)
if (res?.status === 200) { if (res?.status === 200) {
// console.log(res?.data?.events) // console.log(res?.data?.events)
let auditResponse = res?.data?.events let auditResponse = res?.data?.events

View File

@ -82,8 +82,8 @@ const TransactionView = () => {
const fetchData = async () => { const fetchData = async () => {
try { try {
const [res1, res2] = await Promise.all([api.get(`/api/accounts/${accountId}/transactions/${transactionId}`), const [res1, res2] = await Promise.all([api.get(`/api/v1/accounts/${accountId}/transactions/${transactionId}`),
api.get(`/api/accounts/${accountId}/transactions/${transactionId}/recipients`)]) api.get(`/api/v1/accounts/${accountId}/transactions/${transactionId}/recipients`)])
setTransactionDetails({ transaction: res1.data, recipients: res2.data }); setTransactionDetails({ transaction: res1.data, recipients: res2.data });
} catch (error) { } catch (error) {
console.error("Error Gettign Transaction and its Recipient: ", error.message) console.error("Error Gettign Transaction and its Recipient: ", error.message)
@ -96,7 +96,7 @@ const TransactionView = () => {
const fetchDocuments = async () => { const fetchDocuments = async () => {
try { 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) { if (res?.status === 200) {
let resDoc = res?.data let resDoc = res?.data
setDocumentsData(resDoc) setDocumentsData(resDoc)

View File

@ -74,7 +74,7 @@ api.interceptors.response.use(
if (!isRefreshing) { if (!isRefreshing) {
isRefreshing = true; isRefreshing = true;
// Attempt to refresh the token // 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) { if (refreshResponse.status === 200) {
isRefreshing = false; isRefreshing = false;
// Retry the original request // Retry the original request

View File

@ -4,7 +4,7 @@ import { AccountData } from "../utlity/types";
const fetchAccounts = async () => { const fetchAccounts = async () => {
try { try {
const response = await api("/api/user/accounts"); const response = await api("/api/v1/user/accounts");
const data: AccountData[] = response.data || []; const data: AccountData[] = response.data || [];
// setAllAccounts(data); // setAllAccounts(data);
return data; return data;
@ -16,7 +16,7 @@ const fetchAccounts = async () => {
const fetchAccountData = async (accountId: string) => { const fetchAccountData = async (accountId: string) => {
try { try {
if (!accountId) return null; if (!accountId) return null;
const response = await api.get(`/api/accounts/${accountId}`); const response = await api.get(`/api/v1/accounts/${accountId}`);
return response.data; return response.data;
} catch (error) { } catch (error) {
console.error("Error fetching account data:", error); console.error("Error fetching account data:", error);
@ -27,7 +27,7 @@ const fetchAccountData = async (accountId: string) => {
const fetchTransactionData = async (accountId: string, transactionId: string) => { const fetchTransactionData = async (accountId: string, transactionId: string) => {
try { try {
if (!accountId || !transactionId) return null; 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; return response.data;
} catch (error) { } catch (error) {
console.error("Error fetching account data:", error); console.error("Error fetching account data:", error);

View File

@ -65,7 +65,7 @@ export const fetchDocuments = createAsyncThunk<
const toggle = state.selectedRecipients.transactionTemplateToggle; const toggle = state.selectedRecipients.transactionTemplateToggle;
const response = await api.get( 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[]; const data = response.data as Document[];
@ -131,7 +131,7 @@ export const uploadDocuments = createAsyncThunk<
try { try {
const res = await api.post( const res = await api.post(
`/api/accounts/${accountId}/${toggle}/${transactionId}/documents`, `/api/v1/accounts/${accountId}/${toggle}/${transactionId}/documents`,
file, file,
{ {
headers: { headers: {
@ -185,7 +185,7 @@ export const handleMultipleTransactionThunk = createAsyncThunk<
const currentFile = formData.getAll("file")[i] as File; const currentFile = formData.getAll("file")[i] as File;
dispatch(showLoader(`Creating Transaction ${i + 1} ...`)); 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 const transactionId = transactionRes.data.id
dispatch(showLoader('Uploading documents...')); dispatch(showLoader('Uploading documents...'));
@ -213,7 +213,7 @@ export const handleMultipleTransactionThunk = createAsyncThunk<
try { try {
const res = await api.post( const res = await api.post(
`/api/accounts/${accountId}/${toggle}/${transactionId}/documents`, `/api/v1/accounts/${accountId}/${toggle}/${transactionId}/documents`,
file, file,
{ {
headers: { headers: {

View File

@ -73,7 +73,7 @@ export const addRecipientAsync = createAsyncThunk<
const updateRecipientsData = recipientsData.filter(recipient => recipient.id !== null); const updateRecipientsData = recipientsData.filter(recipient => recipient.id !== null);
const createRecipientsData = 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 const resUpdate = updateRecipientsData.length
? await api.put(basePath, updateRecipientsData) ? await api.put(basePath, updateRecipientsData)
@ -101,7 +101,7 @@ export const removeRecipientAsync = createAsyncThunk<
const state = getState() as { selectedRecipients: SelectedRecipientInt }; const state = getState() as { selectedRecipients: SelectedRecipientInt };
const toggle = state.selectedRecipients.transactionTemplateToggle; const toggle = state.selectedRecipients.transactionTemplateToggle;
const basePath = `/api/accounts/${accountId}/${toggle}/${transactionId}/recipients`; const basePath = `/api/v1/accounts/${accountId}/${toggle}/${transactionId}/recipients`;
// return // return
if (recipientId) { if (recipientId) {
@ -127,7 +127,7 @@ export const fetchRecipients = createAsyncThunk<
const state = getState() as { selectedRecipients: SelectedRecipientInt }; const state = getState() as { selectedRecipients: SelectedRecipientInt };
const toggle = state.selectedRecipients.transactionTemplateToggle; 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); const response = await api.get(basePath);
let data = response.data as Recipient[]; let data = response.data as Recipient[];

View File

@ -42,7 +42,7 @@ const initialState: UserState = {
export const fetchUserDetails = createAsyncThunk<UserState, void, { rejectValue: string }> export const fetchUserDetails = createAsyncThunk<UserState, void, { rejectValue: string }>
("user/fetchUserDetails", async (_, { rejectWithValue }) => { ("user/fetchUserDetails", async (_, { rejectWithValue }) => {
try { try {
const response = await api.get("/api/user/details"); const response = await api.get("/api/v1/user/details");
return response.data; return response.data;
} catch (error: any) { } catch (error: any) {
return rejectWithValue( return rejectWithValue(

View File

@ -3,7 +3,7 @@ import api from "../config/api";
// Accepts: type = 'archived' | 'combined' | 'certificate' | documentId (number or string) // Accepts: type = 'archived' | 'combined' | 'certificate' | documentId (number or string)
const downloadDocumentUtils = async (accountId: string, transactionId: string, type: string, includeCertificate: string | null = null) => { const downloadDocumentUtils = async (accountId: string, transactionId: string, type: string, includeCertificate: string | null = null) => {
let documentId = type; 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) { if (includeCertificate !== null) {
url = url + includeCertificate; url = url + includeCertificate;
} }

View File

@ -1,7 +1,7 @@
import api from "../config/api"; import api from "../config/api";
const signSessionRedirect = async (accountId: string, transactionId: string, recipientId: string) => { 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; window.location.href = session.data.url;
return; return;
} }