Issue:
feat(users): Introduce themes in user APIs

Currently there is no themes context in the user and email related APIs where the themes should be reflected.

We should change the APIs which would have the theme context.


Resolution:
<think>
PR Context:
- Title: feat(users): Incorporate themes in user APIs
- Merged: 2024-12-16T09:20:21Z
- Files changed: 27 files
- Commits: 22 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
- This PR will introduce theme context in user APIs and email related APIs.
  - The User APIs which are affected are
    1. User Info
    2. Invite
    3. Resend Invite
    4. Reset Password
    5. Connect Account
    6. Signup with mer
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(users): Incorporate themes in user APIs (#6772)
Co-authored-by: hyperswitch-bot[bot] <148525504
Files to modify:


**crates/api_models/src/user.rs**
  Remove:
    - struct: pub::AuthIdQueryParam
  Add:
    - struct: pub::AuthIdAndThemeIdQueryParam

**crates/api_models/src/user/theme.rs**
  Modify existing code

**crates/common_utils/src/types/theme.rs**
  Add:
    - function: pub::new

**crates/diesel_models/src/query/user/theme.rs**
  Add:
    - function: pub::find_most_specific_theme_in_lineage

**crates/diesel_models/src/schema.rs**
  Modify existing code

**crates/diesel_models/src/schema_v2.rs**
  Modify existing code

**crates/diesel_models/src/user/theme.rs**
  Add:
    - function: pub::new

**crates/router/src/configs/secrets_transformers.rs**
  Modify existing code

**crates/router/src/configs/settings.rs**
  Add:
    - struct: pub::ThemeSettings

**crates/router/src/core/errors/user.rs**
  Modify existing code

**crates/router/src/core/recon.rs**
  Modify existing code

**crates/router/src/core/user.rs**
  Modify existing code

**crates/router/src/core/user/dashboard_metadata.rs**
  Modify existing code

**crates/router/src/core/user/theme.rs**
  Modify existing code

**crates/router/src/db/kafka_store.rs**
  Add:
    - function: private::find_most_specific_theme_in_lineage

**crates/router/src/db/user/theme.rs**
  Add:
    - function: private::find_most_specific_theme_in_lineage

**crates/router/src/routes/app.rs**
  Modify existing code

**crates/router/src/routes/user.rs**
  Modify existing code

**crates/router/src/services/email/types.rs**
  Modify existing code

**crates/router/src/utils/user/theme.rs**
  Add:
    - function: pub::get_most_specific_theme_using_token_and_min_entity
    - function: pub::get_most_specific_theme_using_lineage

**crates/router/src/workflows/api_key_expiry.rs**
  Modify existing code