@@ -278,14 +278,20 @@ async downloadBulkIssuanceCSVTemplate(
278
278
required : true ,
279
279
description : 'The type of schema to be used'
280
280
} )
281
+ @ApiQuery ( {
282
+ name : 'isValidateSchema' ,
283
+ type : Boolean ,
284
+ required : false
285
+ } )
281
286
@UseInterceptors ( FileInterceptor ( 'file' ) )
282
287
async uploadCSVTemplate (
283
288
@Param ( 'orgId' , new ParseUUIDPipe ( { exceptionFactory : ( ) : Error => { throw new BadRequestException ( ResponseMessages . organisation . error . invalidOrgId ) ; } } ) ) orgId : string ,
284
289
@Query ( new ValidationPipe ( { transform : true } ) ) query : TemplateQuery ,
285
290
@UploadedFile ( ) file : Express . Multer . File ,
286
291
@Body ( ) fileDetails : object ,
287
292
@Res ( ) res : Response ,
288
- @Query ( 'schemaType' ) schemaType : SchemaType = SchemaType . INDY
293
+ @Query ( 'schemaType' ) schemaType : SchemaType = SchemaType . INDY ,
294
+ @Query ( 'isValidateSchema' ) isValidateSchema : boolean = true
289
295
) : Promise < object > {
290
296
const { templateId } = query ;
291
297
@@ -301,7 +307,8 @@ async downloadBulkIssuanceCSVTemplate(
301
307
type : schemaType ,
302
308
templateId,
303
309
fileKey,
304
- fileName : fileDetails [ 'fileName' ] || file ?. filename || file ?. originalname
310
+ fileName : fileDetails [ 'fileName' ] || file ?. filename || file ?. originalname ,
311
+ isValidateSchema
305
312
} ;
306
313
307
314
const importCsvDetails = await this . issueCredentialService . uploadCSVTemplate ( uploadedfileDetails ) ;
@@ -384,6 +391,11 @@ async downloadBulkIssuanceCSVTemplate(
384
391
summary : 'bulk issue credential' ,
385
392
description : 'bulk issue credential'
386
393
} )
394
+ @ApiQuery ( {
395
+ name : 'isValidateSchema' ,
396
+ type : Boolean ,
397
+ required : false
398
+ } )
387
399
@ApiResponse ( { status : HttpStatus . OK , description : 'Success' , type : ApiResponseDto } )
388
400
@ApiConsumes ( 'multipart/form-data' )
389
401
@ApiBody ( {
@@ -409,6 +421,7 @@ async downloadBulkIssuanceCSVTemplate(
409
421
@Param ( 'orgId' ) orgId : string ,
410
422
@User ( ) user : user ,
411
423
@Query ( new ValidationPipe ( { transform : true } ) ) query : CredentialQuery ,
424
+ @Query ( 'isValidateSchema' ) isValidateSchema : boolean = true ,
412
425
@Res ( ) res : Response ,
413
426
@Body ( ) fileDetails ?: object ,
414
427
@UploadedFile ( ) file ?: Express . Multer . File
@@ -432,7 +445,7 @@ async downloadBulkIssuanceCSVTemplate(
432
445
type : fileDetails ?. [ 'type' ]
433
446
} ;
434
447
}
435
- const bulkIssuanceDetails = await this . issueCredentialService . issueBulkCredential ( requestId , orgId , clientDetails , reqPayload ) ;
448
+ const bulkIssuanceDetails = await this . issueCredentialService . issueBulkCredential ( requestId , orgId , clientDetails , reqPayload , isValidateSchema ) ;
436
449
437
450
const finalResponse : IResponse = {
438
451
statusCode : HttpStatus . CREATED ,
@@ -562,16 +575,23 @@ async downloadBulkIssuanceCSVTemplate(
562
575
summary : 'Retry bulk issue credential' ,
563
576
description : 'Retry bulk issue credential'
564
577
} )
578
+ @ApiQuery ( {
579
+ name : 'isValidateSchema' ,
580
+ type : Boolean ,
581
+ required : false
582
+ } )
565
583
async retryBulkCredentials (
566
584
@Param ( 'fileId' ) fileId : string ,
567
585
@Param ( 'orgId' ) orgId : string ,
586
+ @Query ( 'isValidateSchema' ) isValidateSchema : boolean = true ,
568
587
@Res ( ) res : Response ,
569
588
@Body ( ) clientDetails : ClientDetails
570
589
) : Promise < Response > {
571
590
const bulkIssuanceDetails = await this . issueCredentialService . retryBulkCredential (
572
591
fileId ,
573
592
orgId ,
574
- clientDetails
593
+ clientDetails ,
594
+ isValidateSchema
575
595
) ;
576
596
const finalResponse : IResponseType = {
577
597
statusCode : HttpStatus . CREATED ,
@@ -713,17 +733,24 @@ async downloadBulkIssuanceCSVTemplate(
713
733
name :'credentialType' ,
714
734
enum : IssueCredentialType
715
735
} )
736
+ @ApiQuery ( {
737
+ name : 'isValidateSchema' ,
738
+ type : Boolean ,
739
+ required : false
740
+ } )
716
741
@UseGuards ( AuthGuard ( 'jwt' ) , OrgRolesGuard )
717
742
@Roles ( OrgRoles . OWNER , OrgRoles . ADMIN , OrgRoles . ISSUER )
718
743
@ApiResponse ( { status : HttpStatus . CREATED , description : 'Success' , type : ApiResponseDto } )
719
744
async createOOBCredentialOffer (
720
745
@Query ( 'credentialType' ) credentialType : IssueCredentialType = IssueCredentialType . INDY ,
746
+ @Query ( 'isValidateSchema' ) isValidateSchema : boolean = true ,
721
747
@Param ( 'orgId' ) orgId : string ,
722
748
@Body ( ) issueCredentialDto : OOBIssueCredentialDto ,
723
749
@Res ( ) res : Response
724
750
) : Promise < Response > {
725
751
issueCredentialDto . orgId = orgId ;
726
752
issueCredentialDto . credentialType = credentialType ;
753
+ issueCredentialDto . isValidateSchema = isValidateSchema ;
727
754
const getCredentialDetails = await this . issueCredentialService . sendCredentialOutOfBand ( issueCredentialDto ) ;
728
755
const finalResponse : IResponseType = {
729
756
statusCode : HttpStatus . CREATED ,
0 commit comments