-
Notifications
You must be signed in to change notification settings - Fork 54
feat: optional object datastore #1248
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
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>
Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>
* fix: added api param validations Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: removed unnecessary validations Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix:resolved validations issue Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * added comment on function for understanding Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: resolve orgid validations Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: added response message Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: added space in response messages Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>
Signed-off-by: pallavighule <pallavi.ghule@ayanworks.com>
* fix: removed prisma commands in build stage Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * feat: create yml file for all services Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * Updated Dockerfiles Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * Updated yml to push docker images Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * updated yml files Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> --------- Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com>
* fix: used single yml file using matrix instead of multiple files Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * fix: renamed yml file to cicd.yml Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * fix: renamed yml file Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * fix: renamed yml file Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * chore: removed id-token and attestations Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> --------- Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com>
* chore: add aws into monorepo Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * chore: update tsconfig Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor:tsconfig.build.json file Signed-off-by: Tipu_Singh <tipu.singh@ayanworks.com> * refactor: remove redundant .nvmrc file Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> --------- Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> Signed-off-by: Tipu_Singh <tipu.singh@ayanworks.com> Co-authored-by: Tipu_Singh <tipu.singh@ayanworks.com>
Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>
* refactor: merge nats-interceptor into common Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: merge repsonses lib into common Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: create common function to handle errors Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * chore: add todo Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * fix: remove missed image service Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * fix: create separate function to handle common error Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * chore: add comment for the purpose of the functions Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * chore: update function comments Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> --------- Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>
* refactor: merge nats-interceptor into common Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: merge repsonses lib into common Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: create common function to handle errors Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * chore: add todo Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: create common package in libs Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * fix: remove missed image service Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: common service Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> --------- Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>
Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com>
refactor: update dockerfile to reduce dockerimages
* fix: qa conflict fixes (#1214) * chore: Platform version upgrade (#1100) * chore: platform version upgrade Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * fix: docker file for cloud wallet Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> --------- Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Add OpenSSL installation support for Docker image Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Add OpenSSL installation support for Docker image Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Add OpenSSL installation support for Docker image Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: Changes in NATS interceptor for error handling (#1103) * fix: changes in nats intercepor for error handling Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * fix: Error handling for send proof request with identical attributes when one attribute uses predicates and the other does not Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * fix: Resolve comments on PR Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * fix: added comments in service Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * fix: added comments in service Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> --------- Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * error handling in NATS interceptor (#1106) Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: exception handling for common handler (#1108) * fix: exception handling Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * refactor: NATS interceptor Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * refactor: exception handler component changes Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> --------- Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * feat: add array data type in schema payload (#1110) * fix:added array data type in schema payload Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com> * fix:added nested attributes in schema paylaod Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com> * feat: add array data type while creating schema Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * replace hardcoded value with dynamic Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: removed commented code Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com> Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Co-authored-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: added search on schema name for credentials list (#1111) * fix:added array data type in schema payload Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com> * fix:added nested attributes in schema paylaod Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com> * feat: add array data type while creating schema Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * replace hardcoded value with dynamic Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: removed commented code Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: added search on schema name Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: made api property optional Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * handled conditions for empty array Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com> Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Co-authored-by: pallavicoder <pallavi.ghule@ayanworks.com> Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * chore: added parentThreadId in webhook dto (#1112) * fix:added array data type in schema payload Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com> * fix:added nested attributes in schema paylaod Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com> * feat: add array data type while creating schema Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * replace hardcoded value with dynamic Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: removed commented code Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: added search on schema name Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: made api property optional Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * handled conditions for empty array Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * chore: added loggers Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * chore: added loggers for issuance and verification Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * chore: added parentthreadid in webhook dto Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: remove unnecessary loggers Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: remove unnecessary loggers Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com> Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Co-authored-by: pallavicoder <pallavi.ghule@ayanworks.com> Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: changes schema endpoint (#1114) Signed-off-by: Tipu_Singh <tipu.singh@ayanworks.com> Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * feat: added purpose property in send proof request (#1113) Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * refactor:modification on API summary and description (#1116) Signed-off-by: Tipu_Singh <tipu.singh@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * chore: added orgdid in get all orgs response Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * refactor: improve response for oob verification via email (#1118) Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * refactor: swagger documentation changes for auth, schema, ledger, credential-definition, agent and user controllers. (#1117) * swagger documentation changes for auth, schema and user controllers Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * swagger documentation changes for auth, schema and user controller Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * refactor: API descrption Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * refactor: swagger API documentation for agent controller Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * fix: API trim validation Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * fix: Removed extra description related to pagination from API documentation Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * fix: changes in email example Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * fix: changes in API documentation Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> --------- Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: removed unnecessary code Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * chore: added orgdid in get all orgs response (#1119) Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: added API params validations (#1124) * fix: added API params validations Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * fix: removed unneccessary roles from role gaurd Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> --------- Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: added api param validations (#1121) * fix: added api param validations Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: removed unnecessary validations Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * refactor:Conditions to get issued credential list for OOB issuance (#1125) Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: parameter validations issues (#1126) * fix: added api param validations Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: removed unnecessary validations Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix:resolved validations issue Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * added comment on function for understanding Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * added compass.yml file Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * feat: update schema details and add alias in schema table (#1129) * API for update schema details Signed-off-by: pallavighule <pallavi.ghule@ayanworks.com> * refactored query Signed-off-by: pallavighule <pallavi.ghule@ayanworks.com> * chore: added alias in response Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: pallavighule <pallavi.ghule@ayanworks.com> Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Co-authored-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * chore: remove yarn.lock and package-lock.json files (#1133) Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: platform agent set up issue (#1136) Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: Parameter validations (#1138) * fix: added api param validations Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: removed unnecessary validations Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix:resolved validations issue Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * added comment on function for understanding Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: resolve orgid validations Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: added response message Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: added space in response messages Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * added tenant id in get org info (#1139) Signed-off-by: pallavighule <pallavi.ghule@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix/added-yml-file-to-push-docker-images (#1142) * fix: removed prisma commands in build stage Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * feat: create yml file for all services Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * Updated Dockerfiles Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * Updated yml to push docker images Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * updated yml files Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> --------- Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix/push docker image (#1154) * fix: used single yml file using matrix instead of multiple files Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * fix: renamed yml file to cicd.yml Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * fix: renamed yml file Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * fix: renamed yml file Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * chore: removed id-token and attestations Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> --------- Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * chore: add aws module into monorepo (#1135) * chore: add aws into monorepo Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * chore: update tsconfig Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor:tsconfig.build.json file Signed-off-by: Tipu_Singh <tipu.singh@ayanworks.com> * refactor: remove redundant .nvmrc file Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> --------- Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> Signed-off-by: Tipu_Singh <tipu.singh@ayanworks.com> Co-authored-by: Tipu_Singh <tipu.singh@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * chore: remove unused modules (#1163) Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * refactor: remove image-service from libs (#1164) Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * refactor: merge nats-interceptor and responses lib into common (#1165) * refactor: merge nats-interceptor into common Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: merge repsonses lib into common Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: create common function to handle errors Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * chore: add todo Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * fix: remove missed image service Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * fix: create separate function to handle common error Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * chore: add comment for the purpose of the functions Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * chore: update function comments Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> --------- Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * refactor: create common package in libs (#1167) * refactor: merge nats-interceptor into common Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: merge repsonses lib into common Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: create common function to handle errors Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * chore: add todo Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: create common package in libs Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * fix: remove missed image service Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> * refactor: common service Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> --------- Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * feat: Support nested attributes while creating schema (#1166) * wip: support nested attributes while creating schema Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * wip: aligned issuance functionality with nested attributes structure Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * refactor: modify csv to json function Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: formatting changes Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: resolved sonar cloud issue Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: security hotspot issue Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * feat: added schema builder function Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: resolved issue Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * refactor: modify extract attributes function Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: destructured objects Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * feat: added description property Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * refactor: schema data type validations (#1174) * wip: support nested attributes while creating schema Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * wip: aligned issuance functionality with nested attributes structure Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * refactor: modify csv to json function Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: formatting changes Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: resolved sonar cloud issue Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: security hotspot issue Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * feat: added schema builder function Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: resolved issue Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * refactor: modify extract attributes function Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: destructured objects Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * feat: added description property Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: added validations for schema type Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * formatted enum file Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * chore: added enum for indy schema data type Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * refactor: update organization API to support updation of country, state and city (#1180) * refactor: update organization API to support updation of country, state and city Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * resolved sonarlint issues Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * resolved sonarlint issues Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> --------- Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * refactor: error handling for download csv file (#1182) * wip: support nested attributes while creating schema Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * wip: aligned issuance functionality with nested attributes structure Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * refactor: modify csv to json function Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: formatting changes Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: resolved sonar cloud issue Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: security hotspot issue Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * feat: added schema builder function Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: resolved issue Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * refactor: modify extract attributes function Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: destructured objects Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * feat: added description property Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: added validations for schema type Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * formatted enum file Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * chore: added enum for indy schema data type Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * chore: refactor validations Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * feat: implemented get verified presentation counts by issuer id (#1184) Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: local setup issues (#1155) * Update start_agent.sh Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update .env.demo fix: correct script for local build Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> --------- Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: issues related nested attributes in issuance process (#1194) * fix: issues related nested attributes in issuance process Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: added statuscode Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: required field validation for request id field Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * chore: update .env.demo file (#1198) Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * feat: Validations for organization and template ledgerId in all issuance methods (#1200) * fix: ledgerId validations in issuance process Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * fix: added validations for not found exception Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * chore: added comment Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * feat: added seed dockerfile (#1203) * feat: added seed dockerfile Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> * feat: updated seed dockerfile Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> --------- Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update nats server and redis configurations (#1206) * Update nats-server.conf Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Create docker-compose.nats.yml Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Create docker-compose.redis.yml Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> --------- Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update .env.demo (#1205) * Update .env.demo Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update .env.demo Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> --------- Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * feat/update-docker-compose (#1209) * feat: add schema and seed service to docker-compose Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> * feat: add docker-compose-dev.yml Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> --------- Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * chore: removed unwanted values (#1212) Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * feat: created yml file for tag v2.0.0 Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: added organization service in yml file Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * feat: create yml file to push docker images Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Create FEATURE-REQUEST.md (#1181) * Create FEATURE-REQUEST.md Create FEATURE-REQUEST.md Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update bug_report.md Update bug_report.md Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update FEATURE-REQUEST.md change links Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update bug_report.md Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> --------- Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix readme typo (#1170) fix readme typo Signed-off-by: NucleonGodX <racerpro41@gmail.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * fix: Update GET proof record endpoint to return 404 for non-existing records (#1190) Signed-off-by: Amr Mubarak <amrrdev@gmail.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> --------- Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com> Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Tipu_Singh <tipu.singh@ayanworks.com> Signed-off-by: pallavighule <pallavi.ghule@ayanworks.com> Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: NucleonGodX <racerpro41@gmail.com> Signed-off-by: Amr Mubarak <amrrdev@gmail.com> Co-authored-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Co-authored-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> Co-authored-by: pallavighule <61926403+pallavighule@users.noreply.github.com> Co-authored-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Co-authored-by: pallavicoder <pallavi.ghule@ayanworks.com> Co-authored-by: Tipu_Singh <tipu.singh@ayanworks.com> Co-authored-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> Co-authored-by: Manit Singh <79140607+NucleonGodX@users.noreply.github.com> Co-authored-by: Amr Mubarak <138404703+amrrdev@users.noreply.github.com> * feat: created yml file for tag v2.0.0 Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * fix: added organization service in yml file Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * feat: create yml file to push docker images Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> * Update and rename FEATURE-REQUEST.md to FEATURE-REQUEST.yml update template from .md to .yml Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update FEATURE-REQUEST.yml Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update and rename bug_report.md to bug_report.yml Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update FEATURE-REQUEST.yml Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update bug_report.yml Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update bug_report.yml Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update bug_report.yml Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update bug_report.yml Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> * Update FEATURE-REQUEST.yml Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> --------- Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Signed-off-by: Krishna Waske <krishna.waske@ayanworks.com> Signed-off-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com> Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Signed-off-by: Tipu_Singh <tipu.singh@ayanworks.com> Signed-off-by: pallavighule <pallavi.ghule@ayanworks.com> Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> Signed-off-by: NucleonGodX <racerpro41@gmail.com> Signed-off-by: Amr Mubarak <amrrdev@gmail.com> Co-authored-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> Co-authored-by: sahil.kamble@ayanworks.com <sahil.kamble@ayanworks.com> Co-authored-by: pallavighule <61926403+pallavighule@users.noreply.github.com> Co-authored-by: bhavanakarwade <bhavana.karwade@ayanworks.com> Co-authored-by: pallavicoder <pallavi.ghule@ayanworks.com> Co-authored-by: Tipu_Singh <tipu.singh@ayanworks.com> Co-authored-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com> Co-authored-by: Manit Singh <79140607+NucleonGodX@users.noreply.github.com> Co-authored-by: Amr Mubarak <138404703+amrrdev@users.noreply.github.com>
…factoring Signed-off-by: Ankita Patidar <ankita.patidar@ayanworks.com>
Signed-off-by: Ankita Patidar <ankita.patidar@ayanworks.com>
* chore: remove unwanted values from .env.demo Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> * chore: remove unwanted values from agent.env Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com> --------- Signed-off-by: Sahil Kamble <sahil.kamble@ayanworks.com>
Signed-off-by: Ankita Patidar <ankita.patidar@ayanworks.com>
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis update introduces a new Changes
Sequence Diagram(s)sequenceDiagram
participant AppService as Application Service
participant StorageService as StorageService
participant Provider as S3/MinIO Provider
AppService->>StorageService: uploadFileToBucket(fileBuffer, ext, filename, bucket, encoding, filePath)
StorageService->>Provider: uploadFile(bucket, key, content, options)
Provider-->>StorageService: URL string
StorageService-->>AppService: URL string
AppService->>StorageService: getFile(key)
StorageService->>Provider: getFile(bucket, key)
Provider-->>StorageService: Buffer
StorageService-->>AppService: Buffer
AppService->>StorageService: storeObject(persistent, key, body)
StorageService->>Provider: storeObject(bucket, persistent, key, body)
Provider-->>StorageService: URL string
StorageService-->>AppService: URL string
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Caution No docstrings were generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 13
🔭 Outside diff range comments (1)
libs/storage/src/storage.service.spec.ts (1)
1-19
: 🛠️ Refactor suggestionTest coverage is minimal and needs expansion.
While the basic test structure is correct, this test suite only verifies service instantiation. For a critical storage abstraction service, comprehensive tests should be added covering:
- File upload/download operations
- Provider switching between MinIO and S3
- Error handling scenarios
- Configuration validation
- Method parameter validation
Consider adding comprehensive test cases for the storage operations. Would you like me to help generate a more complete test suite for the StorageService?
🧹 Nitpick comments (9)
libs/validations/keyword.ts (1)
2-3
: Avoid disabling the explicit-any lint rule
Rather than suppressing@typescript-eslint/no-explicit-any
, define a more specific type for thecontext
parameter and its return type to improve type safety.Proposed diff:
- // eslint-disable-next-line @typescript-eslint/no-explicit-any - json(context): any { + json(context: unknown): Record<string, unknown> { return context || {}; }libs/validations/pattern.ts (1)
17-22
: Refine regex validation error handling.All exceptions from
new RegExp(value)
are caught here, which could mask unexpected errors. Consider narrowing the catch to only handle syntax errors for invalid patterns.docker-compose.yml (1)
64-64
: Indentation misalignment on- redis
.
The- redis
underissuance.depends_on
is indented differently than the other list items, which may cause parsing issues.Apply this diff to align indentation:
- - redis + - redisapps/api-gateway/src/issuance/issuance.controller.ts (1)
372-372
: Add debug log in uploadCSVTemplate
A debug statement was added at the method entry. Consider if this should remain in production or be more descriptive.libs/storage/src/storage.interface.ts (2)
1-7
: Remove commented legacy code.The commented-out interface definition should be removed to maintain code cleanliness and avoid confusion.
-// export interface IStorageProvider { -// uploadFile(buffer: Buffer, key: string, mimeType: string): Promise<string>; -// getFile(key: string): Promise<Buffer>; -// deleteFile(key: string): Promise<void>; -// // eslint-disable-next-line @typescript-eslint/no-explicit-any -// storeObject(key: string, body: any): Promise<string>; -// } -
9-22
: LGTM! Well-designed storage abstraction interface.The interface design is excellent for a multi-provider storage system:
- Bucket parameter enables multi-tenant support
- Clear separation of concerns with dedicated methods
- Proper TypeScript typing with FileUploadOptions
- Consistent async/await pattern
Consider adding JSDoc documentation to describe the purpose and usage of each method for better developer experience.
libs/storage/src/storage.service.ts (1)
14-20
: Remove redundant case clause.The
case 's3':
is redundant since there's adefault:
clause that handles the same logic.switch (fileStorageProvider) { case 'minio': this.provider = new MinioProvider(); break; - case 's3': default: this.provider = new S3Provider(); break; }
🧰 Tools
🪛 Biome (1.9.4)
[error] 17-17: Useless case clause.
because the default clause is present:
Unsafe fix: Remove the useless case.
(lint/complexity/noUselessSwitchCase)
.env.demo (1)
63-67
: MinIO configuration looks complete.All necessary MinIO connection parameters are included. Consider adding validation for required MinIO environment variables in the application startup.
Would you like me to help create environment variable validation logic to ensure all required MinIO variables are present when
FILE_STORAGE_PROVIDER=minio
?apps/organization/src/organization.service.ts (1)
1569-1570
: Fix ESLint formatting issueThere's an ESLint error regarding linebreak before expression. Consider formatting the arrow function consistently:
- const deleteUserRolesPromises = keycloakUserIds.map((keycloakUserId) => - this.clientRegistrationService.deleteUserClientRoles(organizationDetails?.idpId, token, keycloakUserId) + const deleteUserRolesPromises = keycloakUserIds.map((keycloakUserId) => + this.clientRegistrationService.deleteUserClientRoles(organizationDetails?.idpId, token, keycloakUserId) );🧰 Tools
🪛 ESLint
[error] 1570-1570: Expected no linebreak before this expression.
(implicit-arrow-linebreak)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (52)
.env.demo
(3 hunks)apps/agent-service/src/agent-service.service.ts
(7 hunks)apps/api-gateway/src/issuance/dtos/issuance.dto.ts
(1 hunks)apps/api-gateway/src/issuance/issuance.controller.ts
(4 hunks)apps/api-gateway/src/issuance/issuance.module.ts
(2 hunks)apps/api-gateway/src/organization/organization.module.ts
(2 hunks)apps/api-gateway/src/organization/organization.service.ts
(2 hunks)apps/api-gateway/src/user/user.controller.ts
(14 hunks)apps/api-gateway/src/user/user.module.ts
(2 hunks)apps/api-gateway/src/webhook/webhook.module.ts
(2 hunks)apps/connection/src/connection.repository.ts
(2 hunks)apps/connection/src/connection.service.ts
(7 hunks)apps/issuance/src/issuance.module.ts
(2 hunks)apps/issuance/src/issuance.repository.ts
(1 hunks)apps/issuance/src/issuance.service.ts
(10 hunks)apps/ledger/src/schema/enum/schema.enum.ts
(1 hunks)apps/ledger/src/schema/interfaces/schema-payload.interface.ts
(1 hunks)apps/organization/src/organization.module.ts
(2 hunks)apps/organization/src/organization.service.ts
(44 hunks)apps/user/src/fido/fido.module.ts
(3 hunks)apps/user/src/user.module.ts
(1 hunks)apps/user/src/user.service.ts
(30 hunks)apps/utility/src/utilities.module.ts
(2 hunks)apps/utility/src/utilities.service.ts
(1 hunks)apps/verification/src/verification.service.ts
(7 hunks)docker-compose.yml
(1 hunks)libs/aws/src/aws.service.ts
(6 hunks)libs/common/src/common.constant.ts
(9 hunks)libs/storage/package.json
(1 hunks)libs/storage/src/index.ts
(1 hunks)libs/storage/src/providers/minio.provider.ts
(1 hunks)libs/storage/src/providers/s3.provider.ts
(1 hunks)libs/storage/src/storage.interface.ts
(1 hunks)libs/storage/src/storage.module.ts
(1 hunks)libs/storage/src/storage.service.spec.ts
(1 hunks)libs/storage/src/storage.service.ts
(1 hunks)libs/storage/tsconfig.build.json
(1 hunks)libs/storage/tsconfig.json
(1 hunks)libs/validations/exclusiveMaximum.ts
(1 hunks)libs/validations/exclusiveMinimum.ts
(1 hunks)libs/validations/keyword.ts
(1 hunks)libs/validations/maxItems.ts
(1 hunks)libs/validations/maxLength.ts
(1 hunks)libs/validations/maximum.ts
(1 hunks)libs/validations/minItems.ts
(1 hunks)libs/validations/minLength.ts
(1 hunks)libs/validations/minimum.ts
(1 hunks)libs/validations/multipleOf.ts
(1 hunks)libs/validations/pattern.ts
(1 hunks)libs/validations/stringKeyword.ts
(1 hunks)package.json
(1 hunks)tsconfig.json
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (17)
libs/validations/stringKeyword.ts (1)
libs/validations/keyword.ts (1)
Keyword
(1-6)
libs/validations/exclusiveMinimum.ts (3)
libs/validations/exclusiveMaximum.ts (2)
value
(11-13)value
(15-21)libs/validations/maximum.ts (2)
value
(11-13)value
(15-21)libs/validations/minimum.ts (2)
value
(11-13)value
(15-21)
libs/validations/minimum.ts (8)
libs/validations/exclusiveMaximum.ts (2)
value
(11-13)value
(15-21)libs/validations/exclusiveMinimum.ts (2)
value
(11-13)value
(15-21)libs/validations/maxItems.ts (2)
value
(11-13)value
(15-21)libs/validations/minItems.ts (2)
value
(11-13)value
(15-21)libs/validations/maximum.ts (2)
value
(11-13)value
(15-21)libs/validations/maxLength.ts (2)
value
(10-12)value
(14-20)libs/validations/minLength.ts (2)
value
(11-13)value
(15-21)libs/validations/multipleOf.ts (2)
value
(11-13)value
(15-21)
libs/validations/maxItems.ts (3)
libs/validations/minItems.ts (2)
value
(11-13)value
(15-21)libs/validations/maxLength.ts (2)
value
(10-12)value
(14-20)libs/validations/minLength.ts (2)
value
(11-13)value
(15-21)
libs/validations/maximum.ts (3)
libs/validations/exclusiveMaximum.ts (2)
value
(11-13)value
(15-21)libs/validations/exclusiveMinimum.ts (2)
value
(11-13)value
(15-21)libs/validations/minimum.ts (2)
value
(11-13)value
(15-21)
libs/validations/minItems.ts (3)
libs/validations/maxItems.ts (2)
value
(11-13)value
(15-21)libs/validations/maxLength.ts (2)
value
(10-12)value
(14-20)libs/validations/minLength.ts (2)
value
(11-13)value
(15-21)
apps/ledger/src/schema/interfaces/schema-payload.interface.ts (4)
apps/ledger/src/schema/interfaces/schema.interface.ts (1)
IUserRequestInterface
(5-18)apps/connection/src/interfaces/connection.interfaces.ts (1)
IUserRequestInterface
(21-33)apps/ledger/src/schema/schema.interface.ts (1)
IAttributeValue
(12-16)apps/api-gateway/src/interfaces/ISchemaSearch.interface.ts (2)
ISchemaSearchPayload
(4-13)W3CSchemaPayload
(16-20)
libs/validations/exclusiveMaximum.ts (3)
libs/validations/exclusiveMinimum.ts (2)
value
(11-13)value
(15-21)libs/validations/maximum.ts (2)
value
(11-13)value
(15-21)libs/validations/minimum.ts (2)
value
(11-13)value
(15-21)
libs/validations/multipleOf.ts (8)
libs/validations/exclusiveMaximum.ts (2)
value
(11-13)value
(15-21)libs/validations/exclusiveMinimum.ts (2)
value
(11-13)value
(15-21)libs/validations/maxItems.ts (2)
value
(11-13)value
(15-21)libs/validations/minItems.ts (2)
value
(11-13)value
(15-21)libs/validations/maximum.ts (2)
value
(11-13)value
(15-21)libs/validations/maxLength.ts (2)
value
(10-12)value
(14-20)libs/validations/minLength.ts (2)
value
(11-13)value
(15-21)libs/validations/minimum.ts (2)
value
(11-13)value
(15-21)
libs/validations/pattern.ts (8)
libs/validations/exclusiveMaximum.ts (2)
value
(11-13)value
(15-21)libs/validations/exclusiveMinimum.ts (2)
value
(11-13)value
(15-21)libs/validations/maxItems.ts (2)
value
(11-13)value
(15-21)libs/validations/minItems.ts (2)
value
(11-13)value
(15-21)libs/validations/maximum.ts (2)
value
(11-13)value
(15-21)libs/validations/maxLength.ts (2)
value
(10-12)value
(14-20)libs/validations/minLength.ts (2)
value
(11-13)value
(15-21)libs/validations/multipleOf.ts (2)
value
(11-13)value
(15-21)
libs/validations/maxLength.ts (3)
libs/validations/maxItems.ts (2)
value
(11-13)value
(15-21)libs/validations/minItems.ts (2)
value
(11-13)value
(15-21)libs/validations/minLength.ts (2)
value
(11-13)value
(15-21)
apps/issuance/src/issuance.service.ts (1)
apps/issuance/interfaces/issuance.interfaces.ts (1)
SchemaDetails
(190-196)
libs/storage/src/providers/s3.provider.ts (1)
libs/storage/src/storage.interface.ts (2)
IStorageProvider
(14-22)FileUploadOptions
(9-12)
apps/connection/src/connection.service.ts (1)
libs/common/src/response-messages/index.ts (1)
ResponseMessages
(1-492)
libs/storage/src/providers/minio.provider.ts (1)
libs/storage/src/storage.interface.ts (2)
IStorageProvider
(14-22)FileUploadOptions
(9-12)
apps/connection/src/connection.repository.ts (3)
apps/connection/src/connection.service.ts (2)
getConnectionRecords
(101-110)deleteConnectionRecords
(819-860)apps/api-gateway/src/connection/connection.service.ts (1)
deleteConnectionRecords
(146-149)apps/connection/src/connection.controller.ts (1)
deleteConnectionRecords
(100-103)
apps/organization/src/organization.service.ts (13)
apps/api-gateway/src/organization/organization.service.ts (1)
Injectable
(29-242)apps/connection/src/connection.service.ts (1)
Injectable
(35-910)libs/aws/src/aws.service.ts (1)
Injectable
(7-119)apps/user/src/user.service.ts (2)
Injectable
(67-1199)invitations
(821-844)apps/organization/repositories/organization.repository.ts (3)
Injectable
(44-1194)getUser
(427-439)deleteOrg
(805-863)libs/common/src/common.service.ts (1)
Injectable
(20-350)libs/client-registration/src/client-registration.service.ts (1)
Injectable
(23-724)apps/user/repositories/user.repository.ts (1)
Injectable
(30-818)libs/user-org-roles/src/user-org-roles.service.ts (1)
Injectable
(6-78)libs/org-roles/repositories/index.ts (1)
Injectable
(9-63)libs/common/src/cast.helper.ts (1)
toNumber
(55-73)apps/organization/interfaces/organization.interface.ts (2)
ICreateConnectionUrl
(31-41)IOrgRole
(115-119)libs/common/src/interfaces/interface.ts (1)
IAccessTokenData
(10-16)
🪛 Biome (1.9.4)
apps/api-gateway/src/issuance/dtos/issuance.dto.ts
[error] 18-18: Declarations inside of a import
declaration may not have duplicates
a second declaration of IsUUID
is not allowed
IsUUID
is first declared here
(parse)
libs/storage/src/storage.service.ts
[error] 17-17: Useless case clause.
because the default clause is present:
Unsafe fix: Remove the useless case.
(lint/complexity/noUselessSwitchCase)
🪛 ESLint
apps/organization/src/organization.service.ts
[error] 1570-1570: Expected no linebreak before this expression.
(implicit-arrow-linebreak)
🔇 Additional comments (136)
libs/validations/minLength.ts (1)
4-4
: Formatting cleanup onlyRemoved trailing whitespace in the private property declaration and getter return line. No functional changes introduced.
Also applies to: 12-12
libs/validations/multipleOf.ts (1)
4-4
: Format alignment only
These edits remove trailing spaces and realign the getter/setter block to match the style of otherNumberKeyword
subclasses without impacting functionality.Also applies to: 12-12, 17-20
libs/validations/minimum.ts (3)
4-4
: Clean up trailing whitespace
Removed trailing spaces from the private_value
declaration, aligning with lint rules and improving readability.
12-12
: Trimmed trailing whitespace
Whitespace removed from the getter’s return statement; no behavioral change.
17-20
: Removed superfluous trailing whitespace
Cleaned up formatting in the setter block (assignment and error throw); logic remains intact and consistent with sibling validation classes.libs/validations/stringKeyword.ts (1)
3-3
: No functional changes.This is just a formatting adjustment (newline at end of file); no review required.
libs/validations/minItems.ts (3)
4-4
: Clean up: remove trailing whitespace
The private field declaration now aligns with the rest of the codebase’s formatting.
11-13
: Clean up: normalize getter formatting
The getter’s formatting adjustment is consistent with other validation classes and doesn’t affect behavior.
17-20
: Clean up: normalize setter formatting
Whitespace removal around the setter’s assignment and error block matches the style of related validators without altering logic.libs/validations/maxLength.ts (4)
4-4
: Whitespace cleanup on private property declaration.The removal of trailing spaces and consistent indentation aligns this declaration with other validation classes. No functional change.
11-11
: Indentation adjustment in getter.Aligns the getter’s body with the project’s formatting conventions. Behavior remains unchanged.
16-16
: Indentation adjustment in setter assignment.Improves readability by matching the conditional block style used elsewhere. No logic alteration.
18-18
: Indentation adjustment in error throw statement.Standardizes formatting of the
throw
line; error message remains the same.libs/validations/exclusiveMinimum.ts (1)
4-4
: Approve whitespace cleanup
Trailing whitespace has been removed from the private field declaration, getter return, and setter block. No functional logic was altered.Also applies to: 12-12, 17-20
libs/validations/keyword.ts (1)
6-6
: Class closure is correctly formatted
The closing brace for theKeyword
class is properly aligned; no further formatting changes needed here.libs/validations/maximum.ts (1)
4-4
: No functional changes
These edits strictly remove trailing whitespace in the private field declaration, getter, setter assignment, and error throw lines. Logic and behavior remain identical to the other validation classes.Also applies to: 12-12, 17-20
apps/ledger/src/schema/enum/schema.enum.ts (1)
2-8
: Formatting adjustments approved.
Consistent 2-space indentation for enum members and cleanup of blank lines align with the project’s style guidelines. No functional changes.Also applies to: 12-12
libs/validations/maxItems.ts (4)
4-4
: Cleanup: remove trailing whitespace.
Whitespace after the_value
declaration has been trimmed to align with the project’s formatting conventions. No functional change.
12-12
: Cleanup: remove trailing whitespace.
Trailing spaces on thereturn this._value;
line were removed, improving consistency and readability. No logic was altered.
17-17
: Cleanup: remove trailing whitespace.
Whitespace after the assignment to_value
has been cleared to maintain uniform formatting. No behavior change.
19-20
: Cleanup: remove trailing whitespace.
Trailing spaces on the error throw statement and its closing brace have been removed for style consistency. No functional impact.apps/ledger/src/schema/interfaces/schema-payload.interface.ts (15)
5-21
: Stylistic update: Use semicolons for ISchema properties.
Converted trailing commas to semicolons on all properties inISchema
for consistent TypeScript interface formatting. No functional changes.
25-28
: Stylistic update: Use semicolons for IAttributeValue properties.
Applied semicolons to each property inIAttributeValue
to align with interface style guidelines. No behavior altered.
32-44
: Stylistic update: Use semicolons for ISchemaPayload properties.
Replaced commas with semicolons acrossISchemaPayload
fields for consistent TypeScript styling. No changes to structure or types.
48-50
: Stylistic update: Use semicolons for ISchemaSearchPayload properties.
Uniformly applied semicolons at the end of each property inISchemaSearchPayload
. Purely formatting.
54-63
: Stylistic update: Use semicolons for ISchemaSearchCriteria properties.
Standardized punctuation by converting commas to semicolons inISchemaSearchCriteria
. No functional impact.
67-69
: Stylistic update: Use semicolons for ISchemaCredDeffSearchInterface properties.
Added semicolons to interface properties for consistency. Behavior and naming unchanged.
73-74
: Stylistic update: Use semicolons for ISchemaExist properties.
Ensured semicolon termination on each property ofISchemaExist
. Formatting-only change.
78-82
: Stylistic update: Use semicolons for SchemaPayload properties.
Converted property delimiters to semicolons for uniform interface styling. No logic adjustments.
85-88
: Stylistic update: Format W3CSchemaAttributes interface consistently.
Added semicolons and adjusted braces spacing to match project conventions. Purely stylistic.
90-104
: Stylistic update: Format ISchemaAttributesFormat interface consistently.
Uniform semicolon usage and spacing applied toISchemaAttributesFormat
properties. No behavior change.
106-109
: Stylistic update: Use semicolons for W3CSchemaPayload properties.
Standardized semicolon termination on each field. Formatting-only.
112-114
: Stylistic update: Use semicolons for W3CCreateSchema properties.
Adopted semicolons at line ends forW3CCreateSchema
. No structural changes.
118-119
: Stylistic update: Use semicolons for IdAttribute properties.
Added semicolons to properties inIdAttribute
to follow interface style. Pure formatting.
123-133
: Stylistic update: Use semicolons for ISaveSchema properties.
Replaced trailing commas with semicolons acrossISaveSchema
. No functional difference.
137-137
: Stylistic update: Use semicolon for SaveSchemaPayload property.
Ensured theschemaDetails
field ends with a semicolon. Formatting-only change.libs/validations/pattern.ts (3)
4-4
: Private field declaration is correct.The
private _value: string;
aligns with other validation classes and ensures encapsulation.
11-13
: Getter implementation is accurate.The
get value()
accessor returns the validated_value
as intended.
23-25
: Type check for non-string input is consistent.Throwing an error for non-string inputs matches the style and behavior of other validators in the library.
libs/validations/exclusiveMaximum.ts (3)
4-4
: Cleaned up trailing whitespace; no functional change.
12-12
: Removed trailing whitespace in getter; behavior unchanged.
17-20
: Trimmed trailing whitespace in setter block; logic remains intact.apps/user/src/user.service.ts (23)
36-42
: New interface imports added and utilized.
The additional user-related interfaces (IUserInformation
,IUsersProfile
,IUserResetPassword
,IUserDeletedActivity
,UserKeycloakId
,IEcosystemConfig
,IUserForgotPassword
) align with newly implemented methods.
80-80
: InjectedNATSClient
alongsideClientProxy
.
The newnatsClient
DI allows more concise NATS interactions ingetOrgInvitations
.
124-131
: Updated call tosendEmailForVerification
to include all required context parameters.
Ensures the method now receivesverifyCode
,redirectUrl
,clientId
,brandLogoUrl
, andplatformName
.
180-187
: ExtendedsendEmailForVerification
signature.
AddedbrandLogoUrl
andplatformName
parameters to support templating.
278-283
: IntroducedkeycloakDetails
initializer and unified token acquisition.
Pulled the management token retrieval outside of the passkey conditional for DRY.
294-303
: Wrapped Keycloak user creation intry
/catch
in both branches.
Consistent error handling forcreateUser
calls.
319-319
: UnifiedupdateUserDetails
call after Keycloak registration.
Ensures the DB is updated regardless of flow (passkey vs. standard).
427-427
: ConsistentgenerateToken
invocation in login fallback path.
Normalized the non-FIDO branch to mirror the FIDO logic.
437-448
: Added nestedtry
/catch
insiderefreshTokenDetails
.
Decodes and validates the refresh token, throwing aBadRequestException
on invalid input.
464-465
: Updated JSDoc forforgotPassword
.
Added@param
and@returns
annotations.
512-518
: ExtendedsendEmailForResetPassword
signature.
Supports new parametersbrandLogoUrl
,platformName
, andendpoint
.
570-572
: Added expiration check for reset-password tokens.
ThrowsBadRequestException
when token is missing or expired.
575-590
: Encapsulated Keycloak reset/create logic intry
/catch
.
Ensures password reset flows handle both existing and new Keycloak users, updating the repository accordingly.
636-661
: RefactoredresetPassword
to unify Keycloak and FIDO workflows.
Introduced error handling, token acquisition, and repository updates in a consolidated block.
680-719
: OverhauledgenerateToken
to support Keycloak and Supabase paths.
Distinct flows forkeycloakUserId
vs. Supabase authentication, including error mapping and response typing.
731-733
: Applied dynamic ecosystem settings ingetProfile
.
Maps each setting key to a boolean based on stored values when ecosystem mode is enabled.
742-742
: Added placeholderpayload
in_getEcosystemConfig
.
Prepares for future expansions of the request payload.
863-864
: Specified generic type for NATSsend
ingetOrgInvitations
.
Enhances type safety for the returnedIUserInvitations
.
834-836
: Injected updated invitations list viaupdateOrgInvitations
.
Transforms raw invitation data into enrichedOrgInvitations
objects.
913-919
: Enforced maximum organization limit inacceptRejectInvitations
.
ChecksMAX_ORG_LIMIT
from env and throws on excess.
928-934
: Extracted_getTotalOrgCount
helper.
Provides single-responsibility method for fetching organization count via NATS.
1044-1050
: InitializeduserVerificationDetails
ahead of conditions.
Prepares the response object for thecheckUserExist
logic.
1064-1067
: Defined default return for non-existent users.
Returns an object withisRegistrationCompleted=false
and appropriate message.libs/storage/tsconfig.json (1)
1-4
: Added newtsconfig.json
for@credebl/storage
.
Extends the base config without modifications; ready for library compilation.apps/api-gateway/src/webhook/webhook.module.ts (3)
8-8
: ReplacedAwsService
import with genericStorageService
.
Aligns with the new storage abstraction in@credebl/storage
.
24-24
: Updatedproviders
array to includeStorageService
.
Removes AWS-specific provider in favor of generic storage.
26-26
: Minor formatting change; no behavior impact.libs/storage/src/index.ts (1)
1-2
: Re-export barrel file is correct.
The module and service are properly re-exported to provide a single entry point for@credebl/storage
.apps/user/src/user.module.ts (1)
37-37
: Imports array reformatted.
The imports have been split into separate lines for clarity and consistency with other modules.Also applies to: 40-42, 45-45
apps/api-gateway/src/organization/organization.module.ts (2)
10-10
: Switched toStorageService
import.
Replacing the oldAwsService
import aligns with the new multi-provider storage abstraction.
27-27
: Updated providers to includeStorageService
.
Ensure all constructors in controllers/services have been updated to injectStorageService
instead ofAwsService
.apps/api-gateway/src/user/user.module.ts (2)
9-9
: ImportedStorageService
in place ofAwsService
.
This change correctly moves the module towards the new storage abstraction.
26-26
: RegisteredStorageService
as a provider.
Please verify that any existing references toAwsService
in controllers or services have been fully replaced withStorageService
.apps/issuance/src/issuance.module.ts (2)
16-16
: Import change looks correct for storage service migration.The replacement of
AwsService
withStorageService
from the new@credebl/storage
package aligns with the PR's objective to introduce a unified storage abstraction.
61-61
: Provider registration updated correctly for the new storage service.The provider registration has been properly updated to use
StorageService
instead ofAwsService
, maintaining consistency with the import change.apps/user/src/fido/fido.module.ts (3)
22-22
: Import replacement is consistent with the storage migration.The replacement of
AwsService
withStorageService
from@credebl/storage
is correctly implemented and aligns with the broader storage abstraction migration.
38-38
: Minor formatting improvements enhance code readability.The formatting adjustments to array brackets and class declaration spacing improve code consistency and readability.
Also applies to: 59-59, 61-61
41-41
: Provider registration correctly updated for StorageService.The provider array has been properly updated to include
StorageService
instead ofAwsService
, maintaining consistency with the import change.libs/storage/tsconfig.build.json (1)
1-9
: TypeScript build configuration follows best practices.The configuration correctly:
- Extends the root TypeScript configuration
- Enables declaration file generation for library consumers
- Sets appropriate output directory structure
- Uses standard include/exclude patterns for library builds
This follows NestJS and TypeScript best practices for library package configuration.
apps/api-gateway/src/organization/organization.service.ts (1)
27-27
: LGTM! Good improvement using constants over magic strings.Replacing the hardcoded
'base64'
string withCommonConstants.ENCODING
improves maintainability and consistency across the codebase.Also applies to: 239-239
libs/storage/src/storage.module.ts (1)
1-8
: LGTM! Clean module implementation.The
StorageModule
follows NestJS conventions properly, providing and exporting theStorageService
for use across the application.apps/organization/src/organization.module.ts (1)
21-21
: LGTM! Proper migration to generic storage service.The replacement of
AwsService
withStorageService
aligns with the storage abstraction strategy and is correctly implemented in both import and provider registration.Also applies to: 60-60
apps/issuance/src/issuance.repository.ts (1)
684-686
: LGTM! Improved readability of error message construction.The formatting change makes the template literal more readable while maintaining the same functionality.
tsconfig.json (1)
106-112
: Add TypeScript path mappings for storage alias
The new@credebl/storage
and@credebl/storage/*
entries enable the compiler to resolve imports from the storage library correctly.package.json (1)
190-192
: Extend Jest moduleNameMapper for storage
Added a mapping for@credebl/storage
so Jest can resolve the new storage library in tests.apps/utility/src/utilities.module.ts (2)
10-10
: Import StorageService directly
TheStorageService
is now pulled in from@credebl/storage
to replace the formerAwsService
.
28-30
: These lines adjust imported modules ordering/formatting without functional impact.apps/api-gateway/src/issuance/issuance.controller.ts (4)
72-72
: Import StorageService
ReplacedAwsService
import withStorageService
to unify storage operations.
92-92
: Inject StorageService in constructor
The newstorageService
is injected for use in upload methods.
378-378
: Use StorageService.uploadCsvFile
Switched from AWS SDK to the unified storage abstraction for CSV uploads.
534-534
: Use StorageService.uploadCsvFile in bulk issuance
Consistent refactor to useStorageService
when handling file uploads in bulk issuance flows.libs/storage/package.json (3)
9-13
: Scripts for build lifecycle
Theclean
,compile
,build
, andtest
scripts correctly set up the library build process.
16-20
: Dependencies declared properly
NestJS and AWS SDK dependencies are correctly specified for runtime.
22-24
: Development dependencies are accurate
Dev dependencies support TypeScript compilation and file cleaning as expected.apps/verification/src/verification.service.ts (2)
246-248
: LGTM! Improved error logging formatting.The multi-line formatting enhances readability while maintaining the same functionality.
810-815
: LGTM! Better readability for complex URL construction.The reformatted ternary operators across multiple lines significantly improve code readability, especially for complex conditional URL construction logic.
Also applies to: 824-827, 836-837, 846-849, 858-859, 868-871
apps/api-gateway/src/user/user.controller.ts (2)
50-50
: LGTM! Successfully migrated to the new storage abstraction.The migration from
AwsService
toStorageService
aligns with the PR objectives to support multiple storage providers. The new@credebl/storage
library provides a clean abstraction over different storage backends.Also applies to: 64-65
311-319
: LGTM! Improved error handling for UUID validation.The explicit
exceptionFactory
provides clearer error messages for invalid UUID formats, enhancing the API's user experience.apps/utility/src/utilities.service.ts (2)
4-4
: LGTM! Successfully migrated to the new storage abstraction.The migration to
StorageService
from@credebl/storage
is consistent with the system-wide refactor to support multiple storage providers.Also applies to: 12-12
51-61
:✅ Verification successful
Verify the simplified implementation aligns with the StorageService interface.
The implementation has been significantly simplified - now returning the string result directly instead of constructing a URL from an upload key. This suggests the new
StorageService.storeObject()
returns the final URL directly.Please ensure this change is consistent with how other services use the
storeObject
method to avoid breaking existing functionality.
🏁 Script executed:
#!/bin/bash # Description: Verify StorageService.storeObject usage across the codebase # Expected: All usages should expect a string return value echo "=== Searching for StorageService.storeObject usage ===" rg -A 3 -B 2 "storageService\.storeObject" echo "=== Searching for storeObject method calls ===" rg -A 3 -B 2 "\.storeObject\("Length of output: 3206
Consistent URL return from
StorageService.storeObject
verifiedI searched all usages of
storeObject
and confirmed:
libs/storage/src/storage.service.ts
returns aPromise<string>
from the provider (the full URL).apps/utility/src/utilities.service.ts
now correctly passes that URL through.- Both controllers (
apps/utility
andapps/api-gateway
) receive and return the URL string.No mismatches found—this simplified implementation aligns with the existing interface and won’t break existing consumers.
apps/issuance/src/issuance.service.ts (3)
70-70
: LGTM - Clean migration to StorageService.The import and dependency injection changes properly migrate from
AwsService
toStorageService
from the new storage abstraction layer.Also applies to: 109-109
153-155
: LGTM - Consistent method formatting.The formatting improvements for
getCredentialDefinitionDetails
method calls enhance readability while maintaining the same functionality.Also applies to: 335-337, 796-798
1337-1338
:✅ Verification successful
Verify the return value handling change.
The method call changed from
awsService.getFile()
tostorageService.getFile()
with different handling of the return value. Ensure thatstorageService.getFile()
returns aBuffer
that can be directly converted to string.
🏁 Script executed:
#!/bin/bash # Verify that StorageService.getFile returns Buffer and the toString() call is correct ast-grep --pattern $'async getFile($_): Promise<Buffer> { $$$ }'Length of output: 67
🏁 Script executed:
#!/bin/bash # Locate StorageService class definition in TypeScript files rg -n 'class\s\+StorageService' -g '*.ts' # Locate all getFile method definitions and usages with context rg -n 'getFile' -g '*.ts' -A2Length of output: 10393
Confirm Buffer return type of storageService.getFile
StorageService.getFile
is defined to return aPromise<Buffer>
(seelibs/storage/src/storage.service.ts:54
), so callingtoString()
on its result correctly yields a string. No changes required.apps/connection/src/connection.repository.ts (3)
333-336
: LGTM - Improved error message formatting.The multiline string construction enhances readability while maintaining the same error message content.
Also applies to: 346-346
350-362
: LGTM - Consistent Prisma query formatting.The formatting changes improve readability while maintaining identical query logic and parameters.
Also applies to: 364-368, 370-370
378-393
:✅ Verification successful
Verify the behavioral change in getInvitationDidByOrgId.
The method signature and implementation changed significantly:
- Return type:
Promise<agent_invitations[]>
→Promise<agent_invitations>
- Query:
findMany()
→findFirst()
withorderBy
This is a breaking change that affects all callers. Ensure this change is intentional and all consumers have been updated accordingly.
🏁 Script executed:
#!/bin/bash # Search for all usages of getInvitationDidByOrgId to verify they handle the new return type rg -A 5 "getInvitationDidByOrgId"Length of output: 3633
No breaking change detected outside the Connection module
All callers of
getInvitationDidByOrgId
were scoped to their own repositories—only the Connection app’s repository was updated fromfindMany()
→findFirst()
, and its service signature was adjusted accordingly:• Connection service now expects a single
agent_invitations
and uses.invitationDid
directly.
• Verification and Issuance apps still use their owngetInvitationDidByOrgId
(returning arrays) and remain unaffected.No further action needed.
libs/aws/src/aws.service.ts (4)
5-5
: Good addition of CommonConstants import.This supports the move away from hardcoded strings and improves maintainability.
34-40
: Excellent refactoring to make the method more generic.The method name change from
uploadFileToS3Bucket
touploadFileToBucket
and parameter name change frompathAWS
tofilePath
makes this more provider-agnostic, aligning well with the new storage abstraction.
105-105
: Good use of constants and updated environment variables.The changes to use
STORE_OBJECT_BUCKET
environment variable andCommonConstants.ENCODING.toString()
instead of hardcoded strings improve consistency and maintainability.Also applies to: 108-108
65-65
:✅ Verification successful
Verify environment variable consistency across the codebase.
The environment variable changes from
AWS_BUCKET
toFILE_BUCKET
support the new storage abstraction. Ensure all references to the old variable names have been updated consistently.Also applies to: 79-79, 91-91
🏁 Script executed:
#!/bin/bash # Description: Check for any remaining references to old AWS bucket environment variables # Expected: No matches for old variable names echo "Checking for old AWS bucket environment variables..." rg -i "AWS_BUCKET(?!_)" --type ts --type js rg -i "AWS_ORG_LOGO_BUCKET_NAME" --type ts --type js rg -i "AWS_S3_STOREOBJECT_BUCKET" --type ts --type jsLength of output: 496
Verify removal of legacy AWS bucket environment variables
The update replaces
AWS_BUCKET
withFILE_BUCKET
inlibs/aws/src/aws.service.ts
(lines 65, 79, 91). We need to ensure no old variable names remain anywhere in the codebase.Please re-run the following checks and confirm zero matches:
If any references to the above names are found, update them to use the new
FILE_BUCKET
abstraction.
🏁 Script executed:
#!/bin/bash echo "Re-checking for old AWS bucket environment variables..." rg -i --type ts --type js "AWS_BUCKET" rg -i --type ts --type js "AWS_ORG_LOGO_BUCKET_NAME" rg -i --type ts --type js "AWS_S3_STOREOBJECT_BUCKET"Length of output: 266
No remaining references to legacy AWS bucket environment variables
All
rg
checks forAWS_BUCKET
,AWS_ORG_LOGO_BUCKET_NAME
, andAWS_S3_STOREOBJECT_BUCKET
across.ts
and.js
files returned zero matches. The codebase consistently usesFILE_BUCKET
..env.demo (2)
9-9
: Good addition of storage provider configuration.The
FILE_STORAGE_PROVIDER=minio
setting enables dynamic selection between storage providers in the new abstraction.
75-75
: Excellent bucket name generalization.The renaming from AWS-specific bucket names (
AWS_BUCKET
,AWS_ORG_LOGO_BUCKET_NAME
,AWS_S3_STOREOBJECT_BUCKET
) to generic names (FILE_BUCKET
,ORG_LOGO_BUCKET
,STORE_OBJECT_BUCKET
) properly supports the multi-provider storage abstraction.Also applies to: 83-83, 91-91
apps/connection/src/connection.service.ts (3)
24-28
: Clean import statement formatting.The multi-line import formatting improves readability.
678-680
: Simplified invitation DID retrieval logic.The change from fetching an array to directly fetching a single
agent_invitations
object and accessing itsinvitationDid
property is more efficient and cleaner.
821-859
: Improved code formatting and structure.The reformatted
deleteConnectionRecords
method has better readability with consistent spacing and structure while maintaining the same functionality.libs/storage/src/providers/minio.provider.ts (1)
27-36
: Efficient stream-to-buffer conversion.The implementation correctly handles the stream conversion to buffer using async iteration.
apps/organization/src/organization.service.ts (7)
31-42
: LGTM: Import formatting improvedThe multiline import formatting enhances readability without changing functionality.
47-47
: LGTM: Storage service abstraction implemented correctlyThe replacement of AWS-specific storage with the generic
StorageService
aligns with the PR objectives. The addition of image-related constants (IMG_EXT
,ORG_LOGO_FOLDER
,ORG_LOGO_PREFIX
) and usage ofCommonConstants
follows best practices for maintainability.Also applies to: 66-66, 69-71, 79-79, 85-85
481-498
: LGTM: Storage upload method properly abstractedThe method successfully replaces AWS-specific upload with the generic storage service. Using
CommonConstants.ENCODING
instead of hardcoded'base64'
and the new image-related constants improves maintainability and consistency.
136-136
: LGTM: Method calls updated consistentlyThe method calls are properly updated to use the new generic
uploadFile()
method name, maintaining consistency with the storage service abstraction.Also applies to: 533-533
302-305
: LGTM: Client registration method calls updatedThe method calls to
getManagementToken
are properly updated to passclientId
andclientSecret
as separate arguments, which aligns with the refactored client registration service API.Also applies to: 371-374, 937-940
379-381
: LGTM: Async/await patterns improvedThe code shows better async/await patterns and improved Promise.all usage with array destructuring, enhancing readability and maintainability.
Also applies to: 411-415, 1374-1381
1542-1673
: LGTM: Complex method refactoring improves reliabilityThe
deleteOrganization
andregisterOrgsMapUsers
methods show excellent improvements:
- Better error handling with Promise.allSettled
- Structured approach to parallel operations
- Improved logging and debugging information
- More maintainable code organization
These changes enhance the reliability and maintainability of critical organization management operations.
Also applies to: 1743-1841
🧰 Tools
🪛 ESLint
[error] 1570-1570: Expected no linebreak before this expression.
(implicit-arrow-linebreak)
libs/common/src/common.constant.ts (4)
35-36
: LGTM: URL constants consolidated and clarifiedThe consolidation of wallet-related URL constants and addition of clarifying comments improves the maintainability of the constants file.
Also applies to: 120-120, 135-136
258-258
: LGTM: ESLint disable comments appropriately addedThe ESLint disable comments for duplicate enum values are properly added where the duplicates are semantically meaningful (e.g., different role types with the same numeric value).
Also applies to: 261-261, 265-265, 267-267, 273-273, 276-276, 281-281, 284-284, 298-298, 301-301, 313-313, 316-316
291-295
: LGTM: New constants improve maintainabilityThe addition of platform admin constants, microservice names, cache configurations, and especially the
ENCODING = 'base64'
constant significantly improves code maintainability by replacing hardcoded values throughout the application.Also applies to: 333-333, 336-347, 356-376, 377-381
440-440
: LGTM: Export formatting consistency maintainedThe export statement formatting for
DISALLOWED_EMAIL_DOMAIN
maintains consistency with other exports in the file.apps/agent-service/src/agent-service.service.ts (7)
95-95
: LGTM: Proper dependency injection.The addition of
NATSClient
dependency follows the established pattern and aligns with the messaging infrastructure improvements.
820-836
: LGTM: Improved validation flow.The reordering of ledger validation logic improves the method flow by:
- Moving validation earlier in the process
- Properly handling the case where network is not provided
- Ensuring ledger existence before proceeding with tenant creation
This is a good refactoring that enhances code clarity and error handling.
673-754
: Excellent refactoring with improved reliability and observability.This refactoring significantly improves the
deleteWallet
method:Improvements:
- Parallel execution with
Promise.allSettled
for better performance- Comprehensive error handling for each async operation
- Prisma transactions ensure data consistency and rollback on failure
- Enhanced logging with detailed deletion tracking
- Schema archiving integration for proper cleanup
Code Quality:
- Proper handling of promise settlement states
- Atomic operations within transaction boundaries
- Clear separation of concerns with dedicated logging function
This is a robust implementation that handles edge cases and provides better reliability.
🧰 Tools
🪛 Biome (1.9.4)
[error] 685-685: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
[error] 720-720: The catch clause that only rethrows the original error is useless.
An unnecessary catch clause can be confusing.
Unsafe fix: Remove the try/catch clause.(lint/complexity/noUselessCatch)
756-778
: LGTM: Well-implemented schema archiving method.The new
_updateIsSchemaArchivedFlag
method follows established patterns:
- Consistent NATS messaging pattern
- Proper error handling with HTTP exception mapping
- Clear method signature and return type
- Appropriate logging for debugging
This integrates well with the wallet deletion workflow.
931-931
: LGTM: Consistent use of injected NATS client.The change to use the injected
natsClient
instead of direct proxy access:
- Maintains consistency with the constructor dependency injection
- Improves testability and follows dependency inversion principles
- Preserves the existing method signature and error handling
This is a good refactoring that aligns with modern dependency injection patterns.
1959-1959
: LGTM: Formatting change.This is just a formatting adjustment with no functional impact.
319-319
:✅ Verification successful
Verify the new URL constant is correctly defined.
The change from deprecated
URL_AGENT_STATUS
toURL_AGENT_GET_ENDPOINT
looks appropriate for agent health checks. Please ensure the new constant exists inCommonConstants
and points to the correct endpoint.Also applies to: 549-549
🏁 Script executed:
#!/bin/bash # Description: Verify the new URL constant exists and check for the old deprecated constant. # Check if the new constant exists echo "Checking for URL_AGENT_GET_ENDPOINT in CommonConstants:" rg "URL_AGENT_GET_ENDPOINT" --type ts # Check if the old constant still exists (should be removed if deprecated) echo -e "\nChecking for deprecated URL_AGENT_STATUS:" rg "URL_AGENT_STATUS" --type tsLength of output: 983
✅ URL constant verified and approved
- Confirmed
URL_AGENT_GET_ENDPOINT
is defined inlibs/common/src/common.constant.ts
.- Verified
URL_AGENT_STATUS
has been removed from the codebase.- All HTTP GET calls now correctly reference the new constant.
"main": "src/index", | ||
"types": "src/index", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect entry points for published package
The main
and types
fields point to source (src/index
) instead of compiled output. Update to "main": "dist/index.js"
and "types": "dist/index.d.ts"
.
🤖 Prompt for AI Agents
In libs/storage/package.json at lines 3 to 4, the "main" and "types" fields
incorrectly point to source files under "src/index". Update these fields to
point to the compiled output files by setting "main" to "dist/index.js" and
"types" to "dist/index.d.ts" to ensure the published package references the
correct entry points.
constructor() { | ||
const fileStorageProvider = process.env.FILE_STORAGE_PROVIDER; | ||
switch (fileStorageProvider) { | ||
case 'minio': | ||
this.provider = new MinioProvider(); | ||
break; | ||
case 's3': | ||
default: | ||
this.provider = new S3Provider(); | ||
break; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add environment variable validation.
The constructor uses process.env.FILE_STORAGE_PROVIDER
without validation, which could lead to unexpected behavior.
constructor() {
const fileStorageProvider = process.env.FILE_STORAGE_PROVIDER;
+ if (!fileStorageProvider) {
+ this.logger?.warn('FILE_STORAGE_PROVIDER not set, defaulting to S3');
+ }
+
switch (fileStorageProvider) {
case 'minio':
this.provider = new MinioProvider();
break;
default:
this.provider = new S3Provider();
break;
}
}
🧰 Tools
🪛 Biome (1.9.4)
[error] 17-17: Useless case clause.
because the default clause is present:
Unsafe fix: Remove the useless case.
(lint/complexity/noUselessSwitchCase)
🤖 Prompt for AI Agents
In libs/storage/src/storage.service.ts around lines 11 to 22, the constructor
uses process.env.FILE_STORAGE_PROVIDER without validating its value, which can
cause unexpected behavior. Add validation to check if FILE_STORAGE_PROVIDER is
set and if its value is one of the expected options ('minio' or 's3'). If the
value is invalid or missing, throw an error or set a default provider explicitly
to avoid silent failures.
try { | ||
return await this.provider.uploadFile(bucketName, key, fileBuffer, { | ||
encoding, | ||
mimeType: 'image/png' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Avoid hardcoded MIME type.
The uploadFileToBucket
method hardcodes 'image/png'
as the MIME type, but the method accepts any file type based on the ext
parameter.
async uploadFileToBucket(
fileBuffer: Buffer,
ext: string,
filename: string,
bucketName: string,
encoding: string,
filePath = ''
): Promise<string> {
const timestamp = Date.now();
const key = `${filePath}/${encodeURIComponent(filename)}-${timestamp}.${ext}`;
+ const mimeType = this.getMimeTypeFromExtension(ext);
try {
return await this.provider.uploadFile(bucketName, key, fileBuffer, {
encoding,
- mimeType: 'image/png'
+ mimeType
});
} catch (error) {
throw new HttpException(error, HttpStatus.SERVICE_UNAVAILABLE);
}
}
+
+ private getMimeTypeFromExtension(ext: string): string {
+ const mimeTypes = {
+ 'png': 'image/png',
+ 'jpg': 'image/jpeg',
+ 'jpeg': 'image/jpeg',
+ 'pdf': 'application/pdf',
+ 'csv': 'text/csv'
+ };
+ return mimeTypes[ext.toLowerCase()] || 'application/octet-stream';
+ }
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
mimeType: 'image/png' | |
async uploadFileToBucket( | |
fileBuffer: Buffer, | |
ext: string, | |
filename: string, | |
bucketName: string, | |
encoding: string, | |
filePath = '' | |
): Promise<string> { | |
const timestamp = Date.now(); | |
const key = `${filePath}/${encodeURIComponent(filename)}-${timestamp}.${ext}`; | |
const mimeType = this.getMimeTypeFromExtension(ext); | |
try { | |
return await this.provider.uploadFile(bucketName, key, fileBuffer, { | |
encoding, | |
mimeType | |
}); | |
} catch (error) { | |
throw new HttpException(error, HttpStatus.SERVICE_UNAVAILABLE); | |
} | |
} | |
private getMimeTypeFromExtension(ext: string): string { | |
const mimeTypes = { | |
'png': 'image/png', | |
'jpg': 'image/jpeg', | |
'jpeg': 'image/jpeg', | |
'pdf': 'application/pdf', | |
'csv': 'text/csv' | |
}; | |
return mimeTypes[ext.toLowerCase()] || 'application/octet-stream'; | |
} |
🤖 Prompt for AI Agents
In libs/storage/src/storage.service.ts at line 37, the MIME type is hardcoded as
'image/png' in the uploadFileToBucket method, which does not accommodate
different file types. Modify the code to dynamically determine the MIME type
based on the file extension parameter `ext` passed to the method, ensuring the
correct MIME type is set for each file type uploaded.
constructor() { | ||
this.minioClient = new Client({ | ||
endPoint: process.env.MINIO_ENDPOINT as string, | ||
port: parseInt(process.env.MINIO_PORT || '9000', 10), | ||
// eslint-disable-next-line yoda | ||
useSSL: process.env.MINIO_USE_SSL === 'true', | ||
accessKey: process.env.MINIO_ACCESS_KEY as string, | ||
secretKey: process.env.MINIO_SECRET_KEY as string | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add environment variable validation in constructor.
The constructor assumes all MinIO environment variables are present. Consider adding validation to throw meaningful errors if required variables are missing.
constructor() {
+ const requiredEnvVars = ['MINIO_ENDPOINT', 'MINIO_ACCESS_KEY', 'MINIO_SECRET_KEY'];
+ const missingVars = requiredEnvVars.filter(varName => !process.env[varName]);
+ if (missingVars.length > 0) {
+ throw new Error(`Missing required MinIO environment variables: ${missingVars.join(', ')}`);
+ }
+
this.minioClient = new Client({
endPoint: process.env.MINIO_ENDPOINT as string,
port: parseInt(process.env.MINIO_PORT || '9000', 10),
// eslint-disable-next-line yoda
useSSL: process.env.MINIO_USE_SSL === 'true',
accessKey: process.env.MINIO_ACCESS_KEY as string,
secretKey: process.env.MINIO_SECRET_KEY as string
});
}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
constructor() { | |
this.minioClient = new Client({ | |
endPoint: process.env.MINIO_ENDPOINT as string, | |
port: parseInt(process.env.MINIO_PORT || '9000', 10), | |
// eslint-disable-next-line yoda | |
useSSL: process.env.MINIO_USE_SSL === 'true', | |
accessKey: process.env.MINIO_ACCESS_KEY as string, | |
secretKey: process.env.MINIO_SECRET_KEY as string | |
}); | |
} | |
constructor() { | |
const requiredEnvVars = ['MINIO_ENDPOINT', 'MINIO_ACCESS_KEY', 'MINIO_SECRET_KEY']; | |
const missingVars = requiredEnvVars.filter(varName => !process.env[varName]); | |
if (missingVars.length > 0) { | |
throw new Error(`Missing required MinIO environment variables: ${missingVars.join(', ')}`); | |
} | |
this.minioClient = new Client({ | |
endPoint: process.env.MINIO_ENDPOINT as string, | |
port: parseInt(process.env.MINIO_PORT || '9000', 10), | |
// eslint-disable-next-line yoda | |
useSSL: process.env.MINIO_USE_SSL === 'true', | |
accessKey: process.env.MINIO_ACCESS_KEY as string, | |
secretKey: process.env.MINIO_SECRET_KEY as string | |
}); | |
} |
🤖 Prompt for AI Agents
In libs/storage/src/providers/minio.provider.ts around lines 8 to 17, the
constructor initializes the MinIO client using environment variables without
validating their presence. Add checks before creating the client to verify that
all required environment variables (MINIO_ENDPOINT, MINIO_PORT, MINIO_USE_SSL,
MINIO_ACCESS_KEY, MINIO_SECRET_KEY) are defined. If any are missing, throw a
clear error indicating which variable is absent to prevent silent failures and
aid debugging.
async uploadFile(bucket: string, key: string, content: Buffer, options: FileUploadOptions): Promise<string> { | ||
await this.minioClient.putObject(bucket, key, content, null, { | ||
'Content-Type': options.mimeType, | ||
'Content-Encoding': options.encoding | ||
}); | ||
return `${process.env.MINIO_ENDPOINT}:${process.env.MINIO_PORT}/${bucket}/${key}`; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider URL protocol and security.
The URL construction doesn't include the protocol (http/https). The URL should respect the useSSL
setting from the constructor.
async uploadFile(bucket: string, key: string, content: Buffer, options: FileUploadOptions): Promise<string> {
await this.minioClient.putObject(bucket, key, content, null, {
'Content-Type': options.mimeType,
'Content-Encoding': options.encoding
});
- return `${process.env.MINIO_ENDPOINT}:${process.env.MINIO_PORT}/${bucket}/${key}`;
+ const protocol = process.env.MINIO_USE_SSL === 'true' ? 'https' : 'http';
+ return `${protocol}://${process.env.MINIO_ENDPOINT}:${process.env.MINIO_PORT}/${bucket}/${key}`;
}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
async uploadFile(bucket: string, key: string, content: Buffer, options: FileUploadOptions): Promise<string> { | |
await this.minioClient.putObject(bucket, key, content, null, { | |
'Content-Type': options.mimeType, | |
'Content-Encoding': options.encoding | |
}); | |
return `${process.env.MINIO_ENDPOINT}:${process.env.MINIO_PORT}/${bucket}/${key}`; | |
} | |
async uploadFile(bucket: string, key: string, content: Buffer, options: FileUploadOptions): Promise<string> { | |
await this.minioClient.putObject(bucket, key, content, null, { | |
'Content-Type': options.mimeType, | |
'Content-Encoding': options.encoding | |
}); | |
const protocol = process.env.MINIO_USE_SSL === 'true' ? 'https' : 'http'; | |
return `${protocol}://${process.env.MINIO_ENDPOINT}:${process.env.MINIO_PORT}/${bucket}/${key}`; | |
} |
🤖 Prompt for AI Agents
In libs/storage/src/providers/minio.provider.ts around lines 19 to 25, the
returned URL from uploadFile lacks the protocol prefix, which should reflect the
useSSL setting from the constructor. Modify the URL construction to prepend
'https://' if useSSL is true, otherwise 'http://', ensuring the URL correctly
represents the protocol used for Minio access.
async storeObject(bucket: string, persistent: boolean, key: string, body: unknown): Promise<string> { | ||
const objKey = persistent ? `persist/${key}` : `default/${key}`; | ||
const buffer = Buffer.from(JSON.stringify(body)); | ||
|
||
await this.minioClient.putObject(bucket, objKey, buffer, null, { | ||
ContentType: 'application/json', | ||
ContentEncoding: CommonConstants.ENCODING | ||
}); | ||
|
||
return `${process.env.MINIO_ENDPOINT}:${process.env.MINIO_PORT}/${bucket}/${objKey}`; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Inconsistent metadata property names.
There's an inconsistency in metadata property names between uploadFile
(kebab-case) and storeObject
(PascalCase). Consider standardizing to match the uploadFile
method.
await this.minioClient.putObject(bucket, objKey, buffer, null, {
- ContentType: 'application/json',
- ContentEncoding: CommonConstants.ENCODING
+ 'Content-Type': 'application/json',
+ 'Content-Encoding': CommonConstants.ENCODING
});
Also apply the same URL protocol fix as suggested for uploadFile
:
- return `${process.env.MINIO_ENDPOINT}:${process.env.MINIO_PORT}/${bucket}/${objKey}`;
+ const protocol = process.env.MINIO_USE_SSL === 'true' ? 'https' : 'http';
+ return `${protocol}://${process.env.MINIO_ENDPOINT}:${process.env.MINIO_PORT}/${bucket}/${objKey}`;
🤖 Prompt for AI Agents
In libs/storage/src/providers/minio.provider.ts around lines 42 to 52, the
metadata property names in the putObject call use PascalCase (ContentType,
ContentEncoding) which is inconsistent with the kebab-case used in the
uploadFile method. Change these property names to kebab-case (content-type,
content-encoding) to standardize. Additionally, update the returned URL to
include the protocol (e.g., http:// or https://) as done in uploadFile, by
prefixing the URL with the appropriate protocol from environment variables or
configuration.
@ankita-p17 you think the CodeRabbit reviews are useful? |
Signed-off-by: Ankita Patidar <ankita.patidar@ayanworks.com>
|
@ankita-p17 Do we have any further updates on this? |
This is linked to the issue 1162 to support addition object storage in CREDEBL.
Other improvements -
Summary by CodeRabbit
New Features
Refactor
Chores
Bug Fixes