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

feat(user): add email apis and new enums for metadata #3053

Merged
merged 19 commits into from
Dec 5, 2023

Conversation

apoorvdixit88
Copy link
Contributor

@apoorvdixit88 apoorvdixit88 commented Dec 4, 2023

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

  • Add new enums for Feedback, ProdIntent and ConfigurationType. Add update for Integration Method
  • Add SES dependent apis: forget password, resend password, invite
  • Bugfix Refund List

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Dashboard Metadata new enums
Get Dashboard metadata for new enums:

curl --location 'http://localhost:8080/user/data?keys=IntegrationMethod%2CConfigurationType%2CFeedback%2CProdIntent' \
--header 'Authorization: Bearer JWT' \
--data ''

Set Dashboard Metadata for new enums:

curl --location 'http://localhost:8080/user/data/merchant' \
--header 'Authorization: Bearer JWT' \
--data '
{"ConfigurationType": "Multiple"}
'

For refund
Dynamic search for payment_id or refund_id:

curl --location 'http://localhost:8080/refunds/list' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer JWT' \
--data '{
    "payment_id": "test_uvDEdQQj93gqQWVVcTZcx",
    "refund_id": "test_7KdOrWgMN5kN4UUUwqrVx"
}'

Refund_status Bugfix:

curl --location 'http://localhost:8080/refunds/list' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer JWY '{
    "refund_status": ["Failure"]
}'

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@apoorvdixit88 apoorvdixit88 added C-bug Category: Bug C-feature Category: Feature request or enhancement A-users Area: Users labels Dec 4, 2023
@apoorvdixit88 apoorvdixit88 added this to the November 2023 Release milestone Dec 4, 2023
@apoorvdixit88 apoorvdixit88 self-assigned this Dec 4, 2023
@apoorvdixit88 apoorvdixit88 requested review from a team as code owners December 4, 2023 15:34
Copy link
Contributor

@ThisIsMani ThisIsMani left a comment

Choose a reason for hiding this comment

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

Minor concerns. Other than that LGTM.

@@ -9,7 +9,7 @@ readme = "README.md"
license.workspace = true

[features]
default = ["kv_store", "stripe", "oltp", "olap", "backwards_compatibility", "accounts_cache", "dummy_connector", "payouts", "profile_specific_fallback_routing", "retry"]
default = ["kv_store", "stripe", "oltp", "olap", "backwards_compatibility", "accounts_cache", "dummy_connector", "payouts", "profile_specific_fallback_routing", "retry", "email"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we enabling email by default? Is this intentional?

is_email_sent,
}))
} else {
Err(UserErrors::InternalServerError.into())
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Err(UserErrors::InternalServerError.into())
invitee_user.change_context(UserErrors::InternalServerError)?

This way the error will be propagated.

@likhinbopanna likhinbopanna added this pull request to the merge queue Dec 5, 2023
@apoorvdixit88 apoorvdixit88 added the M-api-contract-changes Metadata: This PR involves API contract changes label Dec 5, 2023
Merged via the queue into main with commit 1c3d260 Dec 5, 2023
12 of 14 checks passed
@likhinbopanna likhinbopanna deleted the reset-password branch December 5, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-users Area: Users C-bug Category: Bug C-feature Category: Feature request or enhancement M-api-contract-changes Metadata: This PR involves API contract changes
Projects
No open projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

6 participants