Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Human APP backend - 3rd milestone #1996

Merged
merged 70 commits into from
May 16, 2024
Merged

Conversation

BartoszSolkaBD
Copy link
Contributor

Description

This PR adds the code from 3rd milestone for Human App backend-for-frontend

Summary of changes

  • email confirmation
  • password reset
  • disable operator
  • KYC start

How test the changes

There are unit tests for all the features. To run them please execute yarn test

MWBlocky and others added 30 commits March 21, 2024 19:57
Error handling - exception filters
Endpoint to assign a job to user and to retrieve assigned jobs
* Alignment of naming convention and endpoint structure

* Alignment of naming convention and endpoint structure

* ExchangeOracleApi->ExchangeOracle

* externalApiGateway-> gateway

* Coverage improvement
…xchange-oracle' into fixes-after-testing-with-stage-exchange-oracle
…e address provided in the enpoint. Adds CORS
MWBlocky and others added 18 commits April 25, 2024 12:13
* File `global-common.interface.ts` has been renamed to `global-common.ts`.

* Renamed and moved EnvironmentVariableMissingError class.

* Renamed and moved Pageable classes to utils directory.

* Remove unused import in exchange-oracle.gateway.spec.ts

* Remove console.log from fetchAssignedJobs method.

* Update dependencies in package.json.

* Update terminology in README.md

* Remove unused Headers import from job-assignment.controller.ts

* Removed OnModuleInit import from kv-store-gateway.service.ts

* Corrected the data types for REDIS_PORT and REDIS_HOST in .env.example file.

* Remove redundant volume configuration in Docker-compose

* Add RPC_URL environment variable to docker-compose

* Replace hardcoded URL_KEY in KvStoreGateway with imported constant.

* fix: Update KVStoreClient import and test in KvStoreGateway

* Add Reputation Oracle address to .env and refactor Oracle Discovery.

* Add token authentication for Oracle statistics.

* Remove manual environment variable check.

* Refactor address to use escrowAddress in job assignment service.

* Ensure environment variables validation takes place before module loading.

* Revert "Add token authentication for Oracle statistics."

* Update terminology from 'Interfaces' to 'Model' in README

* Refactor PageableClasses to PageableDto and the file renamed from pageable-classes.ts to pageable.model.ts

* Update KV store gateway test to use actual SDK.

* Added REPUTATION_ORACLE_ADDRESS in app configuration and docker compose file.

* Integrate and use EscrowUtils for job assignment processing.

* Added chainId parameter to `getExchangeOracleAddressByEscrowAddress` method.

* Remove redundant code KV-store gateway test

* Update EscrowUtilsGateway tests.

* Add mock ConfigService to oracle-discovery service test.

* Revert "Add mock ConfigService to oracle-discovery service test."

This reverts commit a2134ad.

* Update oracle-discovery.service.spec.ts tests.
* The KVStoreKeys.url constant is now directly called.

* Changed Redis data volume path and updated gitignore.

* Refactor oracle discovery and statistics modules.

* Add CHAIN_IDS_ENABLED to .env.example
Fix typo in oracle-discovery.service file name and references
…rd_milestone_features

# Conflicts:
#	packages/apps/human-app/server/src/app.module.ts
#	yarn.lock
…perator modules. (#64)

* Fixes after check

* Removes unnecessary comment

* Fixes SDK limitation

* Removes unnecessary interceptor, changes Body to Query in request for oracle discovery

* Adds statistics related DTO interfaces with api mapping

* Changes in interface naming convention of received data

* Review fixes

* Review fixes

* Review fixes

* Review fixes

* Changes logic of calling exchange oracle: url is obtained based on the address provided in the enpoint. Adds CORS

* Adds test coverage

* Adds test coverage

* Adds kv store to the modules that use it

* minor fixes

* minor fixes

* Alignment of the swagger and interface used in the project

* Add email verification endpoints and related logic.

* Implement password reset functionality.

* Add disableOperator and prepareSignature methods.

* A property has been set in the eslint config to avoid enforcing a line break style.

* Implement KYC procedure start.

* Integration with the KYC procedure, password reset and disable operator modules.

* The variable name 'restorePasswordDto' in the sendRestorePassword function has been changed to 'restorePasswordData'.

* Update 'type' field data type in PrepareSignature model.

* Refactor prepareSignature test and update response fixture.

* Refactor service injections in multiple controllers, renamed to a generic 'service' format.

* Refactor services to use 'gateway' instead of 'reputationOracleService'.

* Sets base paths in the controllers and simplify the path of each endpoint.

* Refactor email verification test fixtures.

* Refactor 'h_captcha_token'.

* Enhance test coverage for oracle gateway.

* bug fixed

* Remove hCaptcha token mapping in user-worker and password-reset mappers.

* Refactor code to separate PrepareSignature functionality into its own module. (#71)

* fix: Change naming conventions in password-reset mapper.

* Merge conflict fixes

---------

Co-authored-by: maciek.nabialek <[email protected]>
Copy link

vercel bot commented May 13, 2024

@MWBlocky is attempting to deploy a commit to the HUMAN Protocol Team on Vercel.

A member of the Team first needs to authorize it.

* Implement token authentication in KYC procedure start.

* Update endpoint in gateway config and add new signature types.

* Fixed tests.

* Remove 'CERTIFICATE_AUTHENTICATION' from global-common enums.
Copy link

vercel bot commented May 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
escrow-dashboard ⬜️ Ignored (Inspect) Visit Preview May 16, 2024 10:40am
faucet-server ⬜️ Ignored (Inspect) Visit Preview May 16, 2024 10:40am
job-launcher-client ⬜️ Ignored (Inspect) Visit Preview May 16, 2024 10:40am
job-launcher-server ⬜️ Ignored (Inspect) Visit Preview May 16, 2024 10:40am
reputation-oracle-server ⬜️ Ignored (Inspect) Visit Preview May 16, 2024 10:40am

@portuu3 portuu3 merged commit 054c23e into humanprotocol:develop May 16, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants