Skip to content

Commit

Permalink
merge: changes from DEV environment to QA environment (#716)
Browse files Browse the repository at this point in the history
* [Deno Deploy] Update .github/workflows/deploy.yml

* feat: support no ledger (#689)

* wip: implemented ui for method selection

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

* wip: modified no ledger screen

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

* feat: modified ui for create did popup

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

* refactor: worked on error handling

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

* fix: validations on create did popup

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

* refactor: mapping function

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

* fix: resolved sonarlint issues

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

* fix: input box issues

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

* refactor: handled role wise conditions

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

* fix: resolved code duplication errors

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

* fix: enum values

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

---------

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

* fixed CSS and avatar issues (#696)

* fix:css issues

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

* fix:sonarcloud issues

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

---------

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

* feat: support no ledger (#697)

* wip: implemented ui for method selection

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

* wip: modified no ledger screen

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

* feat: modified ui for create did popup

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

* refactor: worked on error handling

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

* fix: validations on create did popup

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

* refactor: mapping function

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

* fix: resolved sonarlint issues

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

* fix: input box issues

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

* refactor: handled role wise conditions

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

* fix: resolved code duplication errors

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

* fix: enum values

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

* fix: added loading chnages

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

* fix: ledgerconfig object changes

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

* fix: resolved type errors

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

---------

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

* refactor: responsiveness of the component (#699)

* wip: implemented ui for method selection

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

* wip: modified no ledger screen

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

* feat: modified ui for create did popup

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

* refactor: worked on error handling

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

* fix: validations on create did popup

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

* refactor: mapping function

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

* fix: resolved sonarlint issues

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

* fix: input box issues

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

* refactor: handled role wise conditions

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

* fix: resolved code duplication errors

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

* fix: enum values

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

* fix: added loading chnages

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

* fix: ledgerconfig object changes

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

* fix: resolved type errors

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

* refactor: modified responsiveness of the component

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

---------

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

* feat: manage keycloak client

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

* refactor: updated env sample file

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

* fix: error messages issue from create organization and create ecosystem modals. (#698)

* fix:css issues

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

* fix:sonarcloud issues

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

* fix:clear error on pop-up close

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

---------

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

* fix: css issues (#704)

* refactor: parameter name

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

* refactor: added query parameter

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

* fix: remove unnecessary code

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

* fix: query param issue

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

* fix: css issues

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

---------

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

* feat: add passkey warning message for unsupported devices (#706)

* feat: add passkey warning message for unsupported devices

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

* feat: add passkey warning message for unsupported devices

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

* feat: add passkey warning message for unsupported devices

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

* fix: removed commnets

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

* feat: add passkey warning message for unsupported devices

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

* feat: add passkey warning message for unsupported devices

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

---------

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

* Feat/passkey warning messages (#707)

* feat: add passkey warning message for unsupported devices

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

* feat: add passkey warning message for unsupported devices

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

* feat: add passkey warning message for unsupported devices

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

* fix: removed commnets

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

* feat: add passkey warning message for unsupported devices

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

* feat: add passkey warning message for unsupported devices

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

* feat: add passkey warning message for unsupported devices

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

---------

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

* feat: dedicated agent workflow (#693)

* feat:Working on dedicated agent workflow

Signed-off-by: rohit.shitre <[email protected]>

* feat/dedicated agent ui form

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

* feat/ conditional rendering of forms

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

* feat:add support for  dedicated agent

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

* feat:dedicated agent workflow integration

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

* feat:dedicated agent workflow integration

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

* feat:dedicated agent workflow integration

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

* feat:dedicated agent workflow integration

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

* feat:dedicated agent workflow integration

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

* fix: sonarcloud issues

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

* fix: sonarcloud issues

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

* fix: sonarcloud issues

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

* fix: sonarcloud issues

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

* feat:dedicated agent workflow ui

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

* feat:dedicated agent workflow

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

* fix:sonarcloud issues

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

* fix: duplication issue of sonarcloud

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

* fix: duplication code issue of sonarcloud

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

* fix: duplication code issue of sonarcloud

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

* fix: sonarlint issues

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

* fix: sonarlint duplication issue

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

* feat:dedicated agent workflow

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

* fixed:sonarcloud issues

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

* fixed:sonarcloud issues

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

* fix: removed consoles

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

* feat: support for dedicated agent

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

* fix: removed consoles

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

* fix: removed consoles

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

* fix: removed consoles

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

* fix: formik validations

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

* fix:dedicated agent formik validations

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

* fix: yup formik validations

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

* fix: static values from enum

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

---------

Signed-off-by: rohit.shitre <[email protected]>
Signed-off-by: pranalidhanavade <[email protected]>
Co-authored-by: rohit.shitre <[email protected]>

* fix: formik validations for dedicated agent workflow (#708)

* feat:Working on dedicated agent workflow

Signed-off-by: rohit.shitre <[email protected]>

* feat/dedicated agent ui form

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

* feat/ conditional rendering of forms

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

* feat:add support for  dedicated agent

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

* feat:dedicated agent workflow integration

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

* feat:dedicated agent workflow integration

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

* feat:dedicated agent workflow integration

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

* feat:dedicated agent workflow integration

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

* feat:dedicated agent workflow integration

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

* fix: sonarcloud issues

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

* fix: sonarcloud issues

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

* fix: sonarcloud issues

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

* fix: sonarcloud issues

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

* feat:dedicated agent workflow ui

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

* feat:dedicated agent workflow

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

* fix:sonarcloud issues

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

* fix: duplication issue of sonarcloud

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

* fix: duplication code issue of sonarcloud

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

* fix: duplication code issue of sonarcloud

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

* fix: sonarlint issues

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

* fix: sonarlint duplication issue

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

* feat:dedicated agent workflow

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

* fixed:sonarcloud issues

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

* fixed:sonarcloud issues

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

* fix: removed consoles

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

* feat: support for dedicated agent

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

* fix: removed consoles

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

* fix: removed consoles

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

* fix: removed consoles

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

* fix: formik validations

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

* fix:dedicated agent formik validations

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

* fix: yup formik validations

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

* fix: static values from enum

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

* fix: polygon formik validation error

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

* fix: sonarcloud issues

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

* fix: sonarcloud issues

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

---------

Signed-off-by: rohit.shitre <[email protected]>
Signed-off-by: pranalidhanavade <[email protected]>
Co-authored-by: rohit.shitre <[email protected]>

* fix: create did button restrictions (#710)

* refactor: parameter name

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

* refactor: added query parameter

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

* fix: remove unnecessary code

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

* fix: query param issue

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

* fix: css issues

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

* fix: create did button restrictions

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

---------

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

* feat: changed schema payload (#711)

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

* feat/delete wallet and organization (#712)

* feat: delete organization and wallet

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

* feat: delete org and wallet

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

* feat: added custom card component for delet card

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

* fix: removed consoles

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

* fix: removed unused code

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

* changes in delete organization svg image

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

* changes in delete organization svg image

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

* fix: resolved comments on pull request

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

* feat: added custom message for ecosystem lead role

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

* feat: added interfaces into interface file

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

* fix: resolved comments on pull request

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

---------

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

* fix: custom-avatar-css-issues (#714)

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

* feat: delete wallet and organization (#715)

* feat: delete organization and wallet

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

* feat: delete org and wallet

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

* feat: added custom card component for delet card

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

* fix: removed consoles

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

* fix: removed unused code

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

* changes in delete organization svg image

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

* changes in delete organization svg image

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

* fix: resolved comments on pull request

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

* feat: added custom message for ecosystem lead role

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

* feat: added interfaces into interface file

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

* fix: resolved comments on pull request

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

* fix: dark mode css issues

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

---------

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

* refactor: added query parameter in get all schemas API (#713)

* refactor: modified bulk issuance payload

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

* refactor: added query parameter in get all schemas API

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

---------

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

---------

Signed-off-by: bhavanakarwade <[email protected]>
Signed-off-by: pranalidhanavade <[email protected]>
Signed-off-by: rohit.shitre <[email protected]>
Signed-off-by: tipusinghaw <[email protected]>
Co-authored-by: deno-deploy[bot] <75045203+deno-deploy[bot]@users.noreply.github.com>
Co-authored-by: pranalidhanavade <[email protected]>
Co-authored-by: shitrerohit <[email protected]>
Co-authored-by: rohit.shitre <[email protected]>
Co-authored-by: tipusinghaw <[email protected]>
  • Loading branch information
6 people authored Jun 27, 2024
1 parent c599a02 commit 2ffdbaa
Show file tree
Hide file tree
Showing 45 changed files with 1,591 additions and 270 deletions.
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ PUBLIC_CRYPTO_PRIVATE_KEY=

PUBLIC_SHOW_NAME_AS_LOGO= # Please provide true if you want to give platform name with logo

PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_ID= # Please sepcify your client id
PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_SECRETE= # Please specify your client secrete

PUBLIC_PLATFORM_NAME= # Please specify your paltform name
PUBLIC_PLATFORM_LOGO= # Please specify your logo file link
PUBLIC_POWERED_BY= # Please specify your powered by org name
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions public/images/delete_button_image.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/images/sign-warning-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 23 additions & 2 deletions src/api/Agent.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { axiosGet, axiosPost } from "../services/apiRequests";
import { axiosDelete, axiosGet, axiosPost } from "../services/apiRequests";
import { apiRoutes } from "../config/apiRoutes";
import { getFromLocalStorage } from "./Auth";
import { storageKeys } from "../config/CommonConstant";
import { getHeaderConfigs } from "../config/GetHeaderConfigs";

export const getLedgerConfig = async () => {
const token = await getFromLocalStorage(storageKeys.TOKEN)
Expand Down Expand Up @@ -111,4 +112,24 @@ export const getLedgersPlatformUrl = async (indyNamespace: string) => {
const err = error as Error
return err?.message
}
}
}


export const deleteOrganizationWallet = async (
) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);

const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Agent.deleteWallet}`;

const axiosPayload = {
url,
config: await getHeaderConfigs(),
};

try {
return await axiosDelete(axiosPayload);
} catch (error) {
const err = error as Error;
return err?.message;
}
};
2 changes: 2 additions & 0 deletions src/api/Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import type { AstroCookies } from 'astro'

export interface UserSignUpData {
email: string,
clientId: string,
clientSecret: string
}
export interface AddPasswordDetails {
email:string
Expand Down
8 changes: 4 additions & 4 deletions src/api/Schema.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import type { GetAllSchemaListParameter, createCredDeffFieldName, createSchema } from "../components/Resources/Schema/interfaces";
import type { GetAllSchemaListParameter, createCredDeffFieldName } from "../components/Resources/Schema/interfaces";
import { axiosGet, axiosPost } from "../services/apiRequests";

import { apiRoutes } from "../config/apiRoutes";
import { getFromLocalStorage } from "./Auth";
import { storageKeys } from "../config/CommonConstant";
import { getHeaderConfigs } from "../config/GetHeaderConfigs";

export const getAllSchemas = async ({itemPerPage, page, allSearch }: GetAllSchemaListParameter) => {
export const getAllSchemas = async ({itemPerPage, page, allSearch }: GetAllSchemaListParameter, schemaType?: string) => {
const token = await getFromLocalStorage(storageKeys.TOKEN)
const ledgerId = await getFromLocalStorage(storageKeys.LEDGER_ID)

const details = {
url: `${apiRoutes.Platform.getAllSchemaFromPlatform}?pageSize=${itemPerPage}&searchByText=${allSearch}&pageNumber=${page}&ledgerId=${ledgerId}`,
url: `${apiRoutes.Platform.getAllSchemaFromPlatform}?pageSize=${itemPerPage}&searchByText=${allSearch}&pageNumber=${page}&ledgerId=${ledgerId}&schemaType=${schemaType}`,
config: {
headers: {
'Content-type': 'application/json',
Expand Down Expand Up @@ -52,7 +52,7 @@ export const getAllSchemasByOrgId = async ({ search, itemPerPage, page }: GetAll
}
}

export const createSchemas = async (payload: createSchema, orgId: string) => {
export const createSchemas = async (payload: any, orgId: string) => {
const token = await getFromLocalStorage(storageKeys.TOKEN)
const details = {
url: `${apiRoutes.organizations.root}/${orgId}${apiRoutes.schema.create}`,
Expand Down
23 changes: 22 additions & 1 deletion src/api/connection.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { apiRoutes } from '../config/apiRoutes';
import { storageKeys } from '../config/CommonConstant';
import { getHeaderConfigs } from '../config/GetHeaderConfigs';
import { axiosGet } from '../services/apiRequests';
import { axiosDelete, axiosGet } from '../services/apiRequests';
import { getFromLocalStorage } from './Auth';
export interface IConnectionListAPIParameter {
itemPerPage: number;
Expand Down Expand Up @@ -34,3 +34,24 @@ export const getConnectionsByOrg = async ({
return err?.message;
}
};


export const deleteConnectionRecords = async (
) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);

const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.organizations.deleteConnections}`;

const axiosPayload = {
url,
config: await getHeaderConfigs(),
};

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

22 changes: 21 additions & 1 deletion src/api/ecosystem.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { axiosGet, axiosPost, axiosPut } from '../services/apiRequests';
import { axiosDelete, axiosGet, axiosPost, axiosPut } from '../services/apiRequests';

import { apiRoutes } from '../config/apiRoutes';
import { getFromLocalStorage } from './Auth';
Expand Down Expand Up @@ -282,3 +282,23 @@ export const addOrganizationInEcosystem = async (
return err?.message;
}
};

export const deleteOrganizationFromEcosystem = async (
) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);

const url = `${apiRoutes.Ecosystem.root}/${orgId}${apiRoutes.Ecosystem.deleteOrgFromEcosystem}`;


const axiosPayload = {
url,
config: await getHeaderConfigs(),
};

try {
return await axiosDelete(axiosPayload);
} catch (error) {
const err = error as Error;
return err?.message;
}
};
23 changes: 22 additions & 1 deletion src/api/issuance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { storageKeys } from '../config/CommonConstant';
import {
getHeaderConfigs
} from '../config/GetHeaderConfigs';
import { axiosGet, axiosPost } from '../services/apiRequests';
import { axiosDelete, axiosGet, axiosPost } from '../services/apiRequests';
import { getFromLocalStorage } from './Auth';
import type { IConnectionListAPIParameter } from './connection';

Expand Down Expand Up @@ -82,3 +82,24 @@ export const issueOobEmailCredential = async (data: object) => {
return err?.message;
}
};



export const deleteIssuanceRecords = async (
) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);

const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.organizations.deleteIssaunce}`;

const axiosPayload = {
url,
config: await getHeaderConfigs(),
};

try {
return await axiosDelete(axiosPayload);
} catch (error) {
const err = error as Error;
return err?.message;
}
};
80 changes: 78 additions & 2 deletions src/api/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { apiRoutes } from '../config/apiRoutes';
import { getFromLocalStorage } from './Auth';
import { getHeaderConfigs } from '../config/GetHeaderConfigs';
import { storageKeys } from '../config/CommonConstant';
import type { IUpdatePrimaryDid } from '../components/organization/interfaces';
import type { IDedicatedAgentConfig, IUpdatePrimaryDid } from '../components/organization/interfaces';
import { pathRoutes } from '../config/pathRoutes';

export const createOrganization = async (data: object) => {
const url = apiRoutes.organizations.create;
Expand Down Expand Up @@ -166,6 +167,34 @@ export const spinupDedicatedAgent = async (data: object, orgId: string) => {
}
};

export const setAgentConfigDetails = async (data: IDedicatedAgentConfig, orgId: string) => {
const url =`${apiRoutes.organizations.root}/${orgId}${apiRoutes.Agent.setAgentConfig}`
const payload = data;

const token = await getFromLocalStorage(storageKeys.TOKEN);

const config = {
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`,
},
};
const axiosPayload = {
url,
payload,
config,
};

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



export const spinupSharedAgent = async (data: object, orgId: string) => {
const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Agent.agentSharedSpinup}`;
const payload = data;
Expand Down Expand Up @@ -423,4 +452,51 @@ export const updatePrimaryDid = async (orgId: string, payload: IUpdatePrimaryDid
const err = error as Error;
return err?.message;
}
};
};


export const getOrganizationReferences = async () => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);
const url = `${apiRoutes.organizations.root}${apiRoutes.organizations.getOrgReferences}/${orgId}`;

const token = await getFromLocalStorage(storageKeys.TOKEN);

const config = {
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`,
},
};
const axiosPayload = {
url,
config,
};

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

export const deleteOrganization = async (
) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);

const url = `${apiRoutes.organizations.root}/${orgId}`;

const axiosPayload = {
url,
config: await getHeaderConfigs(),
};

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


21 changes: 20 additions & 1 deletion src/api/verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { IssueCredential } from '../common/enums';
import { apiRoutes } from '../config/apiRoutes';
import { storageKeys } from '../config/CommonConstant';
import { getHeaderConfigs } from '../config/GetHeaderConfigs';
import { axiosGet, axiosPost } from '../services/apiRequests';
import { axiosDelete, axiosGet, axiosPost } from '../services/apiRequests';
import { getFromLocalStorage } from './Auth';
import type { IConnectionListAPIParameter } from './connection';

Expand Down Expand Up @@ -112,3 +112,22 @@ export const getCredentialDefinitionsForVerification = async (
return err?.message;
}
};

export const deleteVerificationRecords = async (
) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);

const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.organizations.deleteVerifications}`;

const axiosPayload = {
url,
config: await getHeaderConfigs(),
};

try {
return await axiosDelete(axiosPayload);
} catch (error) {
const err = error as Error;
return err?.message;
}
};
10 changes: 10 additions & 0 deletions src/common/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,14 @@ export enum Network {

export enum CommonConstants {
BALANCELIMIT = 0.01
}

export enum Devices {
Linux = 'linux'
}

export enum Ledgers {
INDY = 'indy',
POLYGON = 'polygon',
NO_LEDGER = 'noLedger'
}
7 changes: 6 additions & 1 deletion src/commonComponents/ConfirmationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ interface IProps {
setSuccess: (flag: string | null) => void;
buttonTitles: string[];
loading:boolean;
warning?:String
}

const ConfirmationModal = ({ openModal, closeModal, onSuccess, message, isProcessing, success, failure, setFailure, setSuccess, buttonTitles, loading }: IProps) => {
const ConfirmationModal = ({ openModal, closeModal, onSuccess, message, isProcessing, success, failure, setFailure, setSuccess, buttonTitles, loading, warning }: IProps) => {
return (
<Modal show={openModal} size="xl">
<div className="relative w-full max-w-xl max-h-[450px]">
Expand Down Expand Up @@ -72,6 +73,9 @@ const ConfirmationModal = ({ openModal, closeModal, onSuccess, message, isProces
<h3 className="py-2 text-lg font-normal text-gray-500 dark:text-gray-200 mb-4">
{message}
</h3>
<h4 className="text-[#C27803]">
{warning}
</h4>
<div className="w-full">
{success && (
<div className="w-full" role="alert">
Expand Down Expand Up @@ -117,6 +121,7 @@ const ConfirmationModal = ({ openModal, closeModal, onSuccess, message, isProces
className="sm:min-w-[197px] text-md bg-primary-700 hover:!bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 sm:w-auto dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800 font-medium rounded-lg text-md inline-flex items-center text-center"
>
{buttonTitles[1]}

</Button>
</div>
</div>
Expand Down
Loading

0 comments on commit 2ffdbaa

Please sign in to comment.