Skip to content

Commit

Permalink
merge: develop to qa (17-07-2024) (#833)
Browse files Browse the repository at this point in the history
* fix: create organisation changes and added geo-location attribute in response

Signed-off-by: Ganesh Nawle <[email protected]>

* fix: send email verification issue (#823)

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

* refactor: bulk issuance template list response changes (#824)

* refactor: updated schema response for get API

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

* fix: schema already exist logic

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

* fix: schema attribute while w3c schema creation

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

---------

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

* feat: batch bulk issunace (#826)

* feat: batch bulk issuance

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

* stoped queue to remove issuance data

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

* feat: added delay for 1 min

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

* refactor: changed batch config

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

* feat: changed delay time for batch

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

* feat: added batch for retry

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

* refactor: added common constant in libs

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

* refactor: removed duplicate value from schema DTO

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

---------

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

* fix: constant issue for bulk issunace (#827)

* feat: batch bulk issuance

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

* stoped queue to remove issuance data

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

* feat: added delay for 1 min

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

* refactor: changed batch config

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

* feat: changed delay time for batch

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

* feat: added batch for retry

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

* refactor: added common constant in libs

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

* refactor: removed duplicate value from schema DTO

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

* fix: constent issue

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

---------

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

* refactor: schema endorsement flow (#828)

* fix: send email verification issue

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

* refcator: schema endorsement flow

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

* fix: resolved sonar lint issues

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

* fix: worked on sonarcloud issues

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

---------

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

* fix: delete organization bugs (#829)

* fix: send email verification issue

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

* refcator: schema endorsement flow

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

* fix: resolved sonar lint issues

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

* fix: worked on sonarcloud issues

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

* fix: delete organization bugs

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

---------

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

* feature:added schema details in file_upload data and fix minor changes

Signed-off-by: Ganesh Nawle <[email protected]>

* feature:added schema details in file_upload data,fix minor exception changes and resovle PR conflict

Signed-off-by: Ganesh Nawle <[email protected]>

* feat: added schema details in  table

Signed-off-by: Ganesh Nawle <[email protected]>

* refactor: endorsement flow for key and web method (#831)

* refactor: endorsement flow for key and web method

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

* refactor: send email for issuance

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

---------

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

* fix: prisma model issue and refactored file_upload model

Signed-off-by: Ganesh Nawle <[email protected]>

* fix: prisma migration issue

Signed-off-by: Ganesh Nawle <[email protected]>

* fix: prisma migration issue (#835)

Signed-off-by: Ganesh Nawle <[email protected]>

* fix: prisma migration issue

Signed-off-by: Ganesh Nawle <[email protected]>

* fix: parameter and response related bugs (#837)

* fix: send email verification issue

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

* refcator: schema endorsement flow

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

* fix: resolved sonar lint issues

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

* fix: worked on sonarcloud issues

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

* fix: delete organization bugs

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

* fix: cred def id space fixes

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

* fix: create organization bug

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

---------

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

* fix:rollback statistics changes

Signed-off-by: Ganesh Nawle <[email protected]>

* Fix/bugs (#839)

* fix: send email verification issue

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

* refcator: schema endorsement flow

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

* fix: resolved sonar lint issues

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

* fix: worked on sonarcloud issues

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

* fix: delete organization bugs

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

* fix: cred def id space fixes

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

* fix: create organization bug

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

* fix: pagination issue for preview file

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

* fix: pagination issue

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

---------

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

* fix: imageurl issue for verification process (#840)

* fix: send email verification issue

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

* refcator: schema endorsement flow

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

* fix: resolved sonar lint issues

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

* fix: worked on sonarcloud issues

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

* fix: delete organization bugs

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

* fix: cred def id space fixes

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

* fix: create organization bug

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

* fix: pagination issue for preview file

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

* fix: pagination issue

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

* fix: imageurl issue in verification

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

---------

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

* fix: made reuqest Id parameter optional (#841)

* fix: send email verification issue

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

* refcator: schema endorsement flow

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

* fix: resolved sonar lint issues

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

* fix: worked on sonarcloud issues

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

* fix: delete organization bugs

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

* fix: cred def id space fixes

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

* fix: create organization bug

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

* fix: pagination issue for preview file

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

* fix: pagination issue

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

* fix: imageurl issue in verification

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

* fix: made request if parameter optional

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

---------

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

* refactor: added temaplateId column in file_upload table (#842)

* fix: send email verification issue

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

* refcator: schema endorsement flow

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

* fix: resolved sonar lint issues

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

* fix: worked on sonarcloud issues

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

* fix: delete organization bugs

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

* fix: cred def id space fixes

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

* fix: create organization bug

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

* fix: pagination issue for preview file

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

* fix: pagination issue

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

* fix: imageurl issue in verification

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

* fix: made request if parameter optional

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

* refactor: added templateId mapping in file upload functionality

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

* refactor: interface types

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

---------

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

* feat: changed issuance email template for EDUCRED

Signed-off-by: Ganesh Nawle <[email protected]>

* fix:refactored preview uploaded file api changed query Param to path param

Signed-off-by: Ganesh Nawle <[email protected]>

* added-logger statement

Signed-off-by: Ganesh Nawle <[email protected]>

* fix:Minor fixes

Signed-off-by: Ganesh Nawle <[email protected]>

* fix:removed all console logs

Signed-off-by: Ganesh Nawle <[email protected]>

* feat:refactored  api to add dynamic support to email template

Signed-off-by: Ganesh Nawle <[email protected]>

---------

Signed-off-by: Ganesh Nawle <[email protected]>
Signed-off-by: bhavanakarwade <[email protected]>
Signed-off-by: tipusinghaw <[email protected]>
Co-authored-by: Ganesh Nawle <[email protected]>
Co-authored-by: ganesh_nawle <[email protected]>
Co-authored-by: tipusinghaw <[email protected]>
Co-authored-by: shitrerohit <[email protected]>
  • Loading branch information
5 people authored and KulkarniShashank committed Sep 11, 2024
1 parent cc47593 commit c07d71a
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 68 deletions.
2 changes: 2 additions & 0 deletions apps/issuance/src/issuance.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,9 @@ async sendEmailForCredentialOffer(sendEmailCredentialOffer: SendEmailCredentialO
}

const invitationUrl: string = credentialCreateOfferDetails.response?.invitationUrl;

const shortenUrl: string = await this.storeIssuanceObjectReturnUrl(invitationUrl);

const deeplLinkURL = convertUrlToDeepLinkUrl(shortenUrl);

if (!invitationUrl) {
Expand Down
2 changes: 1 addition & 1 deletion apps/ledger/src/schema/repositories/schema.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ledgers, org_agents, org_agents_type, organisation, schema } from '@pri
import { ISchema, ISchemaExist, ISchemaSearchCriteria } from '../interfaces/schema-payload.interface';
import { ResponseMessages } from '@credebl/common/response-messages';
import { AgentDetails, ISchemasWithCount } from '../interfaces/schema.interface';
import { SortValue } from '@credebl/enum/enum';
import { SchemaType, SortValue } from '@credebl/enum/enum';
import { ICredDefWithCount, IPlatformSchemas } from '@credebl/common/interfaces/schema.interface';

@Injectable()
Expand Down
2 changes: 1 addition & 1 deletion apps/ledger/src/schema/schema.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ export class SchemaService extends BaseService {
schema: {
schemaName: schemaRequest.title,
schemaVersion: W3CSchemaVersion.W3C_SCHEMA_VERSION,
attributes:extractedData,
attributes,
id: schemaDetails.schemaUrl

},
Expand Down
68 changes: 35 additions & 33 deletions apps/organization/repositories/organization.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,9 @@ export class OrganizationRepository {
logoUrl: true,
orgSlug: true,
createDateTime: true,
countryId:true,
stateId: true,
cityId: true,
ecosystemOrgs: {
select: {
ecosystemId: true
Expand Down Expand Up @@ -874,7 +877,7 @@ export class OrganizationRepository {
createDateTime: true,
did: true,
lastChangedDateTime: true,
isPrimaryDid: true
isPrimaryDid: true
}
});
} catch (error) {
Expand Down Expand Up @@ -907,53 +910,52 @@ export class OrganizationRepository {
]);
return ResponseMessages.organisation.success.didDetails;
} catch (error) {
this.logger.error(`[setOrgsPrimaryDid] - Update DID details: ${JSON.stringify(error)}`);
throw error;
this.logger.error(`[setOrgsPrimaryDid] - Update DID details: ${JSON.stringify(error)}`);
throw error;
}
}
}

async getDidDetailsByDid(did:string): Promise<IDidDetails> {
try {
return this.prisma.org_dids.findFirstOrThrow({
where: {
did
}
});
} catch (error) {
try {
return this.prisma.org_dids.findFirstOrThrow({
where: {
did
}
});
} catch (error) {
this.logger.error(`[getDidDetailsByDid] - get DID details: ${JSON.stringify(error)}`);
throw error;
}
}
}

async getPerviousPrimaryDid(orgId:string): Promise<IDidDetails> {
try {
return this.prisma.org_dids.findFirstOrThrow({
where: {
orgId,
isPrimaryDid: true
}
});
} catch (error) {
try {
return this.prisma.org_dids.findFirstOrThrow({
where: {
orgId,
isPrimaryDid: true
}
});
} catch (error) {
this.logger.error(`[getPerviousPrimaryDid] - get DID details: ${JSON.stringify(error)}`);
throw error;
}
}
}

async setPreviousDidFlase(id:string): Promise<IDidDetails> {
try {
return this.prisma.org_dids.update({
where: {
id
},
data: {
isPrimaryDid: false
}
});
} catch (error) {
try {
return this.prisma.org_dids.update({
where: {
id
},
data: {
isPrimaryDid: false
}
});
} catch (error) {
this.logger.error(`[setPreviousDidFlase] - Update DID details: ${JSON.stringify(error)}`);
throw error;
}
}
}


}
50 changes: 25 additions & 25 deletions apps/user/interfaces/user.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,31 +120,31 @@ export interface IUserCredentials {
export interface IOrgUsers {
totalPages: number,
users: OrgUser[]
}

export interface IDidList {
id: string;
createDateTime: Date;
did: string;
lastChangedDateTime: Date;
isPrimaryDid: boolean;
}

interface OrgUser {
id: string;
username: string;
email: string;
firstName: string;
lastName: string;
isEmailVerified: boolean;
userOrgRoles: UserOrgRoles[];
}

interface UserOrgRoles {
id: string;
orgId: string;
orgRoleId: string;
orgRole: OrgRole;
}

export interface IDidList {
id: string;
createDateTime: Date;
did: string;
lastChangedDateTime: Date;
isPrimaryDid: boolean;
}

interface OrgUser {
id: string;
username: string;
email: string;
firstName: string;
lastName: string;
isEmailVerified: boolean;
userOrgRoles: UserOrgRoles[];
}

interface UserOrgRoles {
id: string;
orgId: string;
orgRoleId: string;
orgRole: OrgRole;
organisation: Organization
}
interface OrgRole {
Expand Down
1 change: 1 addition & 0 deletions apps/verification/src/verification.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ export class VerificationService {
if (ProofRequestType.INDY === type) {
updateOutOfBandRequestProof.protocolVersion = updateOutOfBandRequestProof.protocolVersion || 'v1';
updateOutOfBandRequestProof.invitationDid = invitationDid || undefined;
updateOutOfBandRequestProof.imageUrl = getOrganization?.logoUrl || undefined;
payload = {
orgId: user.orgId,
url,
Expand Down
23 changes: 23 additions & 0 deletions libs/common/src/interfaces/schema.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,29 @@ export interface ISchemasWithPagination extends IPaginationDetails{
issuerId: string;
}

interface Attribute {
attributeName: string;
schemaDataType: string;
displayName: string;
isRequired: boolean;
}

export interface ISchemaDetail {
id: string;
createDateTime: string;
createdBy: string;
lastChangedDateTime: string;
lastChangedBy: string;
name: string;
version: string;
attributes: Attribute[];
schemaLedgerId: string;
publisherDid: string;
issuerId: string;
orgId: string;
ledgerId: string;
type: string;
}

export interface IPlatformSchemas {
schemasCount: number;
Expand Down
40 changes: 32 additions & 8 deletions libs/common/src/response-messages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,38 @@ export const ResponseMessages = {
credDefIdNotFound: 'Credential Definition Id not found'
}
},
ledger: {
success: {
fetch: 'Ledger details retrieved successfully.',
fetchNetworkUrl: 'Network url retrieved successfully'
},
error: {
NotFound: 'No ledgers found.'
}
error: {
invalidSchemaId: 'Invalid schema Id provided.',
invalidData: 'Invalid data provided.',
nameNotEmpty: 'Schema name is required',
versionNotEmpty: 'Schema version is required',
invalidVersion: 'Invalid schema version provided.',
insufficientAttributes: 'Please provide at least one attribute.',
uniqueAttributesnames: 'Please provide unique attribute names',
uniqueAttributesDisplaynames: 'Please provide unique display names for attributes',
emptyData: 'Please provide data for creating schema.',
exists: 'Schema already exists',
notCreated: 'Schema not created',
notFound: 'Schema records not found',
schemaIdNotFound: 'SchemaLedgerId not found',
credentialDefinitionNotFound: 'No credential definition exist',
notStoredCredential: 'User credential not stored',
agentDetailsNotFound: 'Agent details not found',
failedFetchSchema: 'Failed to fetch schema data',
atLeastOneRequired: 'At least one of the attributes should have isReuired as `true`',
schemaBuilder: 'Error while creating schema JSON',
schemaUploading: 'Error while uploading schema JSON',
W3CSchemaNotFOund: 'Error while resolving W3C schema',
storeW3CSchema: 'Error while storing W3C schema',
networkNotFound: 'Error while fetching network',
orgDidAndSchemaType: 'Organization DID and schema type does not match'
}
},
credentialDefinition: {
success: {
fetch: 'Credential definition fetched successfully.',
create: 'Credential definition created successfully.',
template: 'Credential template fetched successfully.'
},
agent: {
success: {
Expand Down

0 comments on commit c07d71a

Please sign in to comment.