Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge: changes from DEV environment to QA environment #716

Merged
merged 21 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e3eb7b4
[Deno Deploy] Update .github/workflows/deploy.yml
deno-deploy[bot] Jun 7, 2024
95aeaa6
feat: support no ledger (#689)
bhavanakarwade Jun 7, 2024
a41d5aa
fixed CSS and avatar issues (#696)
pranalidhanavade Jun 9, 2024
eb793d8
feat: support no ledger (#697)
bhavanakarwade Jun 10, 2024
252b504
refactor: responsiveness of the component (#699)
bhavanakarwade Jun 14, 2024
c318707
feat: manage keycloak client
bhavanakarwade Jun 17, 2024
d40b608
refactor: updated env sample file
bhavanakarwade Jun 17, 2024
2d8875c
fix: error messages issue from create organization and create ecosyst…
pranalidhanavade Jun 17, 2024
03147ee
Merge pull request #702 from credebl/feat/manage-keycloak-client
shitrerohit Jun 18, 2024
40c3b7e
fix: css issues (#704)
bhavanakarwade Jun 19, 2024
7300fc6
feat: add passkey warning message for unsupported devices (#706)
pranalidhanavade Jun 19, 2024
5698893
Feat/passkey warning messages (#707)
pranalidhanavade Jun 19, 2024
0dc76d1
feat: dedicated agent workflow (#693)
pranalidhanavade Jun 20, 2024
7d5a77d
fix: formik validations for dedicated agent workflow (#708)
pranalidhanavade Jun 21, 2024
a297a2a
fix: create did button restrictions (#710)
bhavanakarwade Jun 21, 2024
7616a5f
feat: changed schema payload (#711)
tipusinghaw Jun 23, 2024
a97bdfd
feat/delete wallet and organization (#712)
pranalidhanavade Jun 25, 2024
d3fce1a
fix: custom-avatar-css-issues (#714)
pranalidhanavade Jun 26, 2024
42bd813
feat: delete wallet and organization (#715)
pranalidhanavade Jun 26, 2024
c888199
refactor: added query parameter in get all schemas API (#713)
bhavanakarwade Jun 26, 2024
dc17ef1
merge: dev to qa
bhavanakarwade Jun 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading