Skip to content

Commit

Permalink
feat: multiple connections selection for proof request (#826)
Browse files Browse the repository at this point in the history
* feat: multiple connections selection for proof request

Signed-off-by: pranalidhanavade <[email protected]>

* feat:support to multiple connection while sending proof request

Signed-off-by: pranalidhanavade <[email protected]>

* fix: remove unneccessary code

Signed-off-by: pranalidhanavade <[email protected]>

* fix: sonarcloud issues

Signed-off-by: pranalidhanavade <[email protected]>

* fix: sonarlint issues

Signed-off-by: pranalidhanavade <[email protected]>

* fix: fixed sonarlint issues

Signed-off-by: pranalidhanavade <[email protected]>

* fix: fixed sonarlint issues

Signed-off-by: pranalidhanavade <[email protected]>

* [Deno Deploy] Update .github/workflows/deploy.yml

* [Deno Deploy] Update .github/workflows/deploy.yml

* feat: changes in proof request payload API

Signed-off-by: pranalidhanavade <[email protected]>

* feat: sonarlint issues

Signed-off-by: pranalidhanavade <[email protected]>

* feat: sonarlint issues

Signed-off-by: pranalidhanavade <[email protected]>

* feat: sonarcloud issues

Signed-off-by: pranalidhanavade <[email protected]>

* feat: sonarcloud issue in connection list

Signed-off-by: pranalidhanavade <[email protected]>

* feat: API route changes for multiple connections API

Signed-off-by: pranalidhanavade <[email protected]>

* fix: comments on PR

Signed-off-by: pranalidhanavade <[email protected]>

---------

Signed-off-by: pranalidhanavade <[email protected]>
Co-authored-by: deno-deploy[bot] <75045203+deno-deploy[bot]@users.noreply.github.com>
  • Loading branch information
pranalidhanavade and deno-deploy[bot] authored Dec 26, 2024
1 parent b008606 commit be5eb15
Show file tree
Hide file tree
Showing 13 changed files with 536 additions and 153 deletions.
20 changes: 19 additions & 1 deletion src/api/verification.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IssueCredential, RequestType } from '../common/enums';
import { APIVersion, type IssueCredential, type RequestType } from '../common/enums';
import { apiRoutes } from '../config/apiRoutes';
import { storageKeys } from '../config/CommonConstant';
import { getHeaderConfigs } from '../config/GetHeaderConfigs';
Expand All @@ -23,6 +23,24 @@ export const verifyCredential = async (payload: object, requestType:RequestType)
}
};


export const verifyCredentialV2 = async (payload: object, requestType:RequestType) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);
const url = `${APIVersion.version_v2}${apiRoutes.organizations.root}/${orgId}${apiRoutes.Verification.verifyCredential}?requestType=${requestType}`;
const axiosPayload = {
url,
payload,
config: await getHeaderConfigs(),
};

try {
return await axiosPost(axiosPayload);
} catch (error) {
const err = error as Error;
return err?.message;
}
};

export const createOobProofRequest = async (payload: object, requestType: RequestType) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);
const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Verification.oobProofRequest}?requestType=${requestType}`;
Expand Down
4 changes: 4 additions & 0 deletions src/common/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,8 @@ export enum Environment {
PROD = 'PROD',
DEV = 'DEV',
QA = 'QA'
}

export enum APIVersion {
version_v2 = '/v2'
}
4 changes: 2 additions & 2 deletions src/commonComponents/datatable/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface TableHeader {
width?: string;
}

export interface TableData {
export interface ITableData {
clickId?: string | null;
data: Data[];
}
Expand All @@ -20,7 +20,7 @@ export interface Data {

export interface IDataTable {
header: TableHeader[];
data: TableData[];
data: ITableData[];
loading: boolean;
onInputChange: (e: ChangeEvent<HTMLInputElement>) => void;
refresh: () => void;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Issuance/Connections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,4 @@ useEffect(() => {
);
};

export default Connections;
export default Connections;
Loading

0 comments on commit be5eb15

Please sign in to comment.