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 - 4th milestone #2170

Merged
merged 92 commits into from
Jul 15, 2024
Merged

Conversation

BartoszSolkaBD
Copy link
Contributor

Description

Adds 4th milestone related features:

H-Captcha labeling enpoints:

/enable - proxy to Reputation Oracle
/verify - an endpoint that sends the user solution of the job to Captcha
/daily-hmt-spent - an endpoint that returns global daily HMT spent (will be cached in Redis)
/user-stats - an endpoint that returns stats per user (will be cached in Redis)

H-Captcha labeling gateway

Proxy enpoints in reputation oracle:

/user/register-address
/auth/web3/signin
/assignment/resign-job

Improves coverage

Adds necessary mappings for reputation oracle gateway

Adds authorization in KYC procedure start

Summary of changes

  • hCaptcha
  • proxy endpoints to reputation oracle
  • proxy endpoints to exchange oracle
  • improved test coverage

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
macnablocky and others added 3 commits May 16, 2024 12:31
* Milestone 4 - draft: TODO
* User stats endpoint, test and possible rework of response mapping
* Add unit tests
* Add proxy endpoints for:
- user/register-address
- auth/signin/web3

* Adds test coverage, minor fixes

* Adds additional proxies for 4 milestone

* Reworks reputation oracle gateway test suite, adds necessary mappings

* adds missing await

* Review fixes

* Adds /user/register-address handling

* Changes endpoint name

* Adds import fixes

* Adds controller and module to the main app module

* Updates README.md (#125)

* Updates README.md: Adds Caching section, Changes in signature type

* README.md updates

* README.md updates

* fix(app/user/worker): remove chain id validation (#114)

* fix(app/user/worker): remove chain id validation

* Test fix and JWT User data align

* Updates README.md: Adds Caching section, Changes in signature type

* Removes commented code

* Changes after hcaptcha api check

* Adds interceptor for axios requests

* Fix/signature (#126)

* Updates README.md (#125)

* Updates README.md: Adds Caching section, Changes in signature type

* README.md updates

* README.md updates

* fix(app/worker): add signature field to req body

* update(app): revert readme

* fix(app/register-address): fix test

---------

Co-authored-by: macnablocky <[email protected]>
Co-authored-by: Kacper Koza <[email protected]>

* Fixes undefined in POST data, fixes unit tests

* Adds Resign job feature, small changes in the gateway config (#134)

* Fixes

* Fixes in dependencies

---------

Co-authored-by: Kacper Koza <[email protected]>
Co-authored-by: maciej.nabialek <[email protected]>
Co-authored-by: macnablocky <[email protected]>

* Fixes restore password

* Fixes restore password part 2.

* review fixes

---------

Co-authored-by: KacperKoza343 <[email protected]>
Co-authored-by: Kacper Koza <[email protected]>
Co-authored-by: Bartosz Solka <[email protected]>
Copy link

vercel bot commented Jun 20, 2024

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

A member of the Team first needs to authorize it.

…elop

# Conflicts:
#	packages/apps/human-app/server/package.json
#	yarn.lock
@BartoszSolkaBD BartoszSolkaBD marked this pull request as ready for review June 20, 2024 14:15
@CLAassistant
Copy link

CLAassistant commented Jun 21, 2024

CLA assistant check
All committers have signed the CLA.

* Update endpoint paths in `reputation-oracle.gateway.spec.ts`.

* Add TokenRefresh feature in reputation oracle integration
Copy link
Collaborator

@portuu3 portuu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase to develop branch.
Not tested yet

macnablocky and others added 7 commits June 26, 2024 11:15
* Fixes after client review

* Fixes after client review

* Fixes after client review

* Fixes failing test

* small fix in displaying axios interceptor logs

* Adds filtering to oracle discovery (#154)

* Adds filtering to oracle discovery

* Adds and passes tests for controller, adds mapper

* Adds and passes tests for service

* Rework of oracle-discovery.service.ts in alignment with code review remark
* Fixes in validators, fixes in parsing Oracle Discovery DTO

* Removes TransformToArray from decorator list,

* Rollbacks yarn lock in dashboard admin

* Changes to improve swagger readablity
* Adds optional validator to jobsDiscoveryParamsDto.sort_field

* Adds optional validator to jobsDiscoveryParamsDto.job_type
@portuu3 portuu3 added this to the HUMAN app 2024 milestone Jul 1, 2024
macnablocky and others added 8 commits July 2, 2024 14:36
* HAM-2

* HAM-6

* HAM-3

* HAM-3 part 2

* HAM-9

* HAM-1

* HAM-5

* HAM-1 rework

* Fix to HAM-9

* Fix to HAM-6
* HAM-16/30/31/32
* fix(app/worker/jobs): fix resign job dto

* Fixes ut

---------

Co-authored-by: KacperKoza343 <[email protected]>
* Changes assignment id back from number to string

* Update job-assignment.model.ts
* feat(app/worker/password): add hcaptcha field

* Fixes endpoint model for forgot password, adds h-captcha token to email verification resend endpoint model

* Adds proper handling of ttl and changes address to wallet_address in JWT token decoding

* Adds proper handling of ttl and changes address to wallet_address in JWT token decoding

* small fix

* small fix

* Adds cache reset on demand

---------

Co-authored-by: KacperKoza343 <[email protected]>
* Jobs discovery should return only ACTIVE jobs

* Removes unnecessary filtering, adds type guarding of responses from reputation and exchange oracle gateways
@portuu3 portuu3 merged commit 202b525 into humanprotocol:develop Jul 15, 2024
8 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.

6 participants