Issue:
refactor(users): Deprecate unused APIs

For backwards compatibility, BE will not remove old APIs when adding new APIs.

We have to deprecate the APIs which are kept for backwards compatibility. This will make BE changes easier for user management changes.

These APIs include:
- All the APIs which are having `is_token_only` and `groups` query param. The false version of these APIs are not in use.

Resolution:
<think>
PR Context:
- Title: refactor(users): Add V2 user_roles data support
- Merged: 2024-09-01T14:04:31Z
- Files changed: 30 files
- Commits: 9 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
- Deprecate all the APIs which are used when `is_token_only` and `groups` query params are false.
- Add logic to get merchant_id from the db if not found in user_role.

### Additional Changes

- [x] This PR modifies the API contract
- [ 
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** refactor(users): Add V2 user_roles data support (#5763)
Co-authored-by: Apoorv Dixit <apoorv.dixit@j
Files to modify:


**crates/api_models/src/events/user.rs**
  Remove:
    - function: private::get_api_event_type
    - impl: impl ApiEventMetric for TokenOrPayloadResponse<T>

**crates/api_models/src/events/user_role.rs**
  Modify existing code

**crates/api_models/src/user.rs**
  Remove:
    - struct: pub::MerchantSelectResponse
    - struct: pub::TokenOnlyQueryParam
    - enum: pub::SignInResponse
    - enum: pub::TokenOrPayloadResponse

**crates/api_models/src/user_role.rs**
  Modify existing code

**crates/api_models/src/user_role/role.rs**
  Remove:
    - struct: pub::ListRolesResponse
    - struct: pub::GetGroupsQueryParam
    - enum: pub::GetRoleFromTokenResponse
    - enum: pub::RoleInfoResponse
  Add:
    - struct: pub::ListRolesResponse

**crates/router/src/core/user.rs**
  Remove:
    - function: pub::signup
    - function: pub::signin
    - function: pub::reset_password
    - function: pub::accept_invite_from_email
    - function: pub::verify_email

**crates/router/src/core/user_role.rs**
  Remove:
    - function: pub::get_authorization_info_with_modules
    - function: pub::merchant_select

**crates/router/src/core/user_role/role.rs**
  Remove:
    - function: pub::get_role_from_token_with_permissions
    - function: pub::get_role_with_permissions

**crates/router/src/db/user_role.rs**
  Modify existing code

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

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

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

**crates/router/src/services/authorization/predefined_permissions.rs**
  Remove:
    - function: pub::get_permissions
    - function: pub::get_name
    - function: pub::is_invitable
    - function: pub::get_role_name_from_id
    - function: pub::is_role_invitable
    - function: pub::is_role_deletable
    - function: pub::is_role_updatable
    - struct: pub::RoleInfo
    - impl: impl RoleInfo

**crates/router/src/types/domain/user.rs**
  Remove:
    - function: pub::decide_signin_strategy_by_user_roles
    - function: pub::get_signin_response
    - function: private::get_signin_response
    - function: private::get_signin_response
    - struct: pub::SignInWithSingleRoleStrategy
    - struct: pub::SignInWithMultipleRolesStrategy
    - enum: pub::SignInWithRoleStrategyType
    - impl: impl SignInWithRoleStrategyType
    - impl: impl SignInWithSingleRoleStrategy
    - impl: impl SignInWithMultipleRolesStrategy

**crates/router/src/types/domain/user/decision_manager.rs**
  Modify existing code

**crates/router/src/utils/user.rs**
  Remove:
    - function: pub::get_dashboard_entry_response
    - function: pub::get_multiple_merchant_details_with_status
    - function: pub::get_token_from_signin_response

**crates/router/src/utils/user_role.rs**
  Remove:
    - function: pub::get_multiple_role_info_for_user_roles
  Add:
    - function: pub::get_single_merchant_id