diff --git a/src/api/Agent.ts b/src/api/Agent.ts index b4a38eb61..ac6c1d14b 100644 --- a/src/api/Agent.ts +++ b/src/api/Agent.ts @@ -3,7 +3,7 @@ import { apiRoutes } from "../config/apiRoutes"; import { getFromLocalStorage } from "./Auth"; import { storageKeys } from "../config/CommonConstant"; -export const getAgentHealth = async (orgId:number) => { +export const getAgentHealth = async (orgId:string) => { const token = await getFromLocalStorage(storageKeys.TOKEN) const details = { url: `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Agent.checkAgentHealth}`, diff --git a/src/api/BulkIssuance.ts b/src/api/BulkIssuance.ts index da12a915e..64f18a7dd 100644 --- a/src/api/BulkIssuance.ts +++ b/src/api/BulkIssuance.ts @@ -40,7 +40,7 @@ export const DownloadCsvTemplate = async (credDefId: string) => { } }; -export const uploadCsvFile = async (payload: {file: Uint8Array | Blob}, credefId: string) => { +export const uploadCsvFile = async (payload: {file: Uint8Array | Blob, fileName:string}, credefId: string) => { const orgId = await getFromLocalStorage(storageKeys.ORG_ID); const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Issuance.bulk.uploadCsv}?credDefId=${credefId}`; diff --git a/src/api/Schema.ts b/src/api/Schema.ts index a86d4b49a..1372d2f48 100644 --- a/src/api/Schema.ts +++ b/src/api/Schema.ts @@ -49,7 +49,7 @@ export const getAllSchemasByOrgId = async ({ search, itemPerPage, page }: GetAll } } -export const addSchema = async (payload: createSchema, orgId: number) => { +export const addSchema = async (payload: createSchema, orgId: string) => { const token = await getFromLocalStorage(storageKeys.TOKEN) const details = { url: `${apiRoutes.organizations.root}/${orgId}${apiRoutes.schema.create}`, @@ -72,7 +72,7 @@ export const addSchema = async (payload: createSchema, orgId: number) => { } } -export const getSchemaById = async (schemaId: string, orgId: number) => { +export const getSchemaById = async (schemaId: string, orgId: string) => { const token = await getFromLocalStorage(storageKeys.TOKEN) const details = { url: `${apiRoutes.organizations.root}/${orgId}${apiRoutes.schema.getSchemaById}/${schemaId}`, @@ -94,7 +94,7 @@ export const getSchemaById = async (schemaId: string, orgId: number) => { } } -export const createCredentialDefinition = async (payload: createCredDeffFieldName, orgId:number) => { +export const createCredentialDefinition = async (payload: createCredDeffFieldName, orgId:string) => { const token = await getFromLocalStorage(storageKeys.TOKEN) const details = { url: `${apiRoutes.organizations.root}/${orgId}${apiRoutes.schema.createCredentialDefinition}`, @@ -118,7 +118,7 @@ export const createCredentialDefinition = async (payload: createCredDeffFieldNam } } -export const getCredDeffById = async (schemaId: string, orgId: number) => { +export const getCredDeffById = async (schemaId: string, orgId: string) => { const token = await getFromLocalStorage(storageKeys.TOKEN) const details = { url: `${apiRoutes.organizations.root}/${orgId}${apiRoutes.schema.getCredDefBySchemaId}/${schemaId}/cred-defs`, diff --git a/src/api/ecosystem.ts b/src/api/ecosystem.ts index 770edd9c9..e72275f56 100644 --- a/src/api/ecosystem.ts +++ b/src/api/ecosystem.ts @@ -10,7 +10,7 @@ interface CreateEcosystemPayload { description: string; logo: string; tags?: string; - userId: number; + userId: string; autoEndorsement: boolean; } @@ -105,7 +105,7 @@ export const getEndorsementList = async ( export const createSchemaRequest = async ( data: object, endorsementId: string, - orgId: number, + orgId: string, ) => { const url = `${apiRoutes.Ecosystem.root}/${endorsementId}/${orgId}${apiRoutes.Ecosystem.endorsements.createSchemaRequest}`; const payload = data; @@ -126,7 +126,7 @@ export const createSchemaRequest = async ( export const createCredDefRequest = async ( data: object, ecosystemId: string, - orgId: number, + orgId: string, ) => { const url = `${apiRoutes.Ecosystem.root}/${ecosystemId}/${orgId}${apiRoutes.Ecosystem.endorsements.createCredDefRequest}`; const payload = data; diff --git a/src/api/invitations.ts b/src/api/invitations.ts index 47bfbd2d5..c687945e0 100644 --- a/src/api/invitations.ts +++ b/src/api/invitations.ts @@ -43,7 +43,7 @@ export const createInvitations = async (invitationList: Array) => { const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.organizations.invitations}` const payload = { invitations: invitationList, - orgId: Number(orgId) + orgId: orgId } const token = await getFromLocalStorage(storageKeys.TOKEN) @@ -233,7 +233,7 @@ export const getEcosystemInvitations = async (pageNumber: number, pageSize: numb } // Accept/ Reject Invitations -export const acceptRejectEcosystemInvitations = async (invitationId: string, orgId: number, status: string, orgName: string, orgDid: string) => { +export const acceptRejectEcosystemInvitations = async (invitationId: string, orgId: string, status: string, orgName: string, orgDid: string) => { const url = `${apiRoutes.Ecosystem.root}/${orgId}${apiRoutes.Ecosystem.invitations}/${invitationId}` @@ -265,12 +265,12 @@ export const acceptRejectEcosystemInvitations = async (invitationId: string, org } } -export const acceptRejectInvitations = async (invitationId: number, orgId: number, status: string) => { +export const acceptRejectInvitations = async (invitationId: string, orgId: string, status: string) => { const url = `${apiRoutes.users.invitations}/${invitationId}` const payload = { - orgId: Number(orgId), + orgId: orgId, status } const token = await getFromLocalStorage(storageKeys.TOKEN) @@ -296,7 +296,7 @@ export const acceptRejectInvitations = async (invitationId: number, orgId: numbe } } -export const deleteEcosystemInvitations = async (invitationId: number) => { +export const deleteEcosystemInvitations = async (invitationId: string) => { const ecosystemId = await getFromLocalStorage(storageKeys.ECOSYSTEM_ID); const orgId = await getFromLocalStorage(storageKeys.ORG_ID) diff --git a/src/api/organization.ts b/src/api/organization.ts index 236e7450e..818be26e5 100644 --- a/src/api/organization.ts +++ b/src/api/organization.ts @@ -138,7 +138,7 @@ export const getOrgDashboard = async (orgId: string) => { } } -export const spinupDedicatedAgent = async (data: object, orgId:number) => { +export const spinupDedicatedAgent = async (data: object, orgId:string) => { const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Agent.agentDedicatedSpinup}` const payload = data @@ -166,7 +166,7 @@ export const spinupDedicatedAgent = async (data: object, orgId:number) => { } } -export const spinupSharedAgent = async (data: object, orgId:number) => { +export const spinupSharedAgent = async (data: object, orgId:string) => { const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Agent.agentSharedSpinup}` const payload = data @@ -247,7 +247,7 @@ export const getOrganizationUsers = async (pageNumber: number, pageSize: number, } // Edit user roles -export const editOrganizationUserRole = async (userId: number, roles: number[]) => { +export const editOrganizationUserRole = async (userId: string, roles: string[]) => { const orgId = await getFromLocalStorage(storageKeys.ORG_ID) @@ -284,7 +284,7 @@ export const createConnection = async (orgName: string) => { label: orgName, multiUseInvitation: true, autoAcceptConnection: true, - orgId: Number(orgId) + orgId: orgId } const payload = data diff --git a/src/commonComponents/AgentHealth.tsx b/src/commonComponents/AgentHealth.tsx index fc3bb9b39..58a135ccf 100644 --- a/src/commonComponents/AgentHealth.tsx +++ b/src/commonComponents/AgentHealth.tsx @@ -29,7 +29,7 @@ const AgentHealth = () => { const organizationId = await getFromLocalStorage(storageKeys.ORG_ID); setCheckOrgExist(Number(organizationId)) if (Number(organizationId) !== 0) { - const agentData = await getAgentHealth(Number(organizationId)); + const agentData = await getAgentHealth(organizationId); const { data } = agentData as AxiosResponse; if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) { setAgentHealthDetails(data?.data); diff --git a/src/components/CreateEcosystemOrgModal/index.tsx b/src/components/CreateEcosystemOrgModal/index.tsx index b06b3f8b5..a3840d1ef 100644 --- a/src/components/CreateEcosystemOrgModal/index.tsx +++ b/src/components/CreateEcosystemOrgModal/index.tsx @@ -10,7 +10,7 @@ import { storageKeys, } from '../../config/CommonConstant'; import { calculateSize, dataURItoBlob } from '../../utils/CompressImage'; -import { useEffect, useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { AlertComponent } from '../AlertComponent'; import type { AxiosResponse } from 'axios'; import { asset } from '../../lib/data.js'; @@ -186,7 +186,7 @@ const CreateEcosystemOrgModal = (props: IProps) => { description: values.description, logo: (logoImage?.imagePreviewUrl as string) || '', tags: '', - userId: Number(user_data?.id), + userId: user_data?.id, orgName: orgDetails?.orgName, orgDid: orgDetails?.orgDid, autoEndorsement: autoEndorse, @@ -516,4 +516,4 @@ const CreateEcosystemOrgModal = (props: IProps) => { return <>{renderEcosystemModal()}; }; -export default CreateEcosystemOrgModal; +export default CreateEcosystemOrgModal; \ No newline at end of file diff --git a/src/components/Ecosystem/Endorsement/index.tsx b/src/components/Ecosystem/Endorsement/index.tsx index 4dfe76fce..05fc2cead 100644 --- a/src/components/Ecosystem/Endorsement/index.tsx +++ b/src/components/Ecosystem/Endorsement/index.tsx @@ -42,7 +42,7 @@ interface IEndorsementList { status: string; type: string; ecosystemOrgs: { - orgId: number; + orgId: string; }; requestPayload: string; responsePayload: string; diff --git a/src/components/Ecosystem/interfaces/index.ts b/src/components/Ecosystem/interfaces/index.ts index cdf99b631..479f2f950 100644 --- a/src/components/Ecosystem/interfaces/index.ts +++ b/src/components/Ecosystem/interfaces/index.ts @@ -14,12 +14,12 @@ export interface IEcosystem { } export interface Ecosystem { - id: number + id: string createDateTime: string - createdBy: number + createdBy: string lastChangedDateTime: string + lastChangedBy: string autoEndorsement:boolean - lastChangedBy: number name: string description: string logoUrl: string diff --git a/src/components/EcosystemInvite/EcoSystemReceivedInvitations.tsx b/src/components/EcosystemInvite/EcoSystemReceivedInvitations.tsx index 41e68e165..5f1da3f67 100644 --- a/src/components/EcosystemInvite/EcoSystemReceivedInvitations.tsx +++ b/src/components/EcosystemInvite/EcoSystemReceivedInvitations.tsx @@ -40,9 +40,9 @@ export interface EcosystemInvitation { ecosystem: { name: string; logoUrl: string; }; id: string createDateTime: string - createdBy: number + createdBy: string lastChangedDateTime: string - lastChangedBy: number + lastChangedBy: string deletedAt: any userId: string orgId: string @@ -60,7 +60,7 @@ const ReceivedInvitations = () => { const [error, setError] = useState(null); const [organizationsList, setOrganizationsList] = useState | null>(null); const [currentPage, setCurrentPage] = useState(initialPageState); - const [selectedId, setSelectedId] = useState(); + const [selectedId, setSelectedId] = useState(''); const [searchText, setSearchText] = useState(''); const [invitationsData, setInvitationsData] = useState | null>(null); const [getOrgError, setGetOrgError] = useState(null); @@ -154,7 +154,7 @@ const ReceivedInvitations = () => { if (orgDid) { const response = await acceptRejectEcosystemInvitations( invite.id, - Number(selectedId), + selectedId, status, orgName, orgDid @@ -222,7 +222,7 @@ const ReceivedInvitations = () => { const getOrgId = async () => { const orgId = await getFromLocalStorage(storageKeys.ORG_ID); if (orgId) { - setSelectedId(Number(orgId)); + setSelectedId(orgId); } }; diff --git a/src/components/EcosystemInvite/SentInvitations.tsx b/src/components/EcosystemInvite/SentInvitations.tsx index eecbb3069..ccd2c3179 100644 --- a/src/components/EcosystemInvite/SentInvitations.tsx +++ b/src/components/EcosystemInvite/SentInvitations.tsx @@ -66,7 +66,7 @@ const SentInvitations = () => { setLoading(false); }; - const deletInvitations = async (invitationId: number) => { + const deletInvitations = async (invitationId: string) => { const response = await deleteEcosystemInvitations(invitationId); const { data } = response as AxiosResponse; diff --git a/src/components/Issuance/BulkIssuance.tsx b/src/components/Issuance/BulkIssuance.tsx index 46e0845cd..043cab0ef 100644 --- a/src/components/Issuance/BulkIssuance.tsx +++ b/src/components/Issuance/BulkIssuance.tsx @@ -232,6 +232,7 @@ const BulkIssuance = () => { await setToLocalStorage(storageKeys.SOCKET_ID, clientId) const payload = { file: binaryData, + fileName: file?.name || "Not available" }; await wait(500); @@ -305,6 +306,7 @@ const BulkIssuance = () => { setIsFileUploaded(false); setUploadedFileName(''); setUploadedFile(null); + setUploadMessage(null) }; const handleDrop = (e: { @@ -447,7 +449,7 @@ const BulkIssuance = () => {
-
+