Issue:
feat: Begin TOTP API

There should be an API which should tell whether the TOTP for the user is set or not, if not, the API should respond back with TOTP secrets (url, recovery_codes and secret) which FE uses to help user to setup TOTP in their authenticator application.

This API should work with the Decision manager and should be authenticated by the TOTP Single purpose token.

Resolution:
<think>
PR Context:
- Title: feat(users): Create `user_key_store` table and `begin_totp` API
- Merged: 2024-05-08T13:10:09Z
- Files changed: 30 files
- Commits: 12 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 adds a new table `user_key_store`, which stores the encryption keys for the user's secrets.
- A new API `begin_totp` has been added, which will check if the user has setup the TOTP or not, and respond with TOTP secret which user has
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(users): Create `user_key_store` table and `begin_totp` API (#4577)
Co-authored-by: hyperswitch-
Files to modify:


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

**crates/api_models/src/user.rs**
  Add:
    - struct: pub::BeginTotpResponse
    - struct: pub::TotpSecret

**crates/diesel_models/src/enums.rs**
  Add:
    - enum: pub::TotpStatus

**crates/diesel_models/src/lib.rs**
  Add:
    - mod: pub::user_key_store

**crates/diesel_models/src/query.rs**
  Add:
    - mod: pub::user_key_store

**crates/diesel_models/src/query/user_key_store.rs**
  Add:
    - function: pub::insert
    - function: pub::find_by_user_id
    - impl: impl UserKeyStoreNew
    - impl: impl UserKeyStore

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

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

**crates/diesel_models/src/user_key_store.rs**
  Add:
    - struct: pub::UserKeyStore
    - struct: pub::UserKeyStoreNew

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

**crates/router/src/core/user.rs**
  Add:
    - function: pub::begin_totp

**crates/router/src/db.rs**
  Add:
    - mod: pub::user_key_store

**crates/router/src/db/kafka_store.rs**
  Add:
    - function: private::insert_user_key_store
    - function: private::get_user_key_store_by_user_id
    - impl: impl UserKeyStoreInterface for KafkaStore

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

**crates/router/src/db/user_key_store.rs**
  Add:
    - function: private::insert_user_key_store
    - function: private::get_user_key_store_by_user_id
    - function: private::insert_user_key_store
    - function: private::get_user_key_store_by_user_id
    - trait: pub::UserKeyStoreInterface
    - impl: impl UserKeyStoreInterface for Store
    - impl: impl UserKeyStoreInterface for MockDb

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

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

**crates/router/src/routes/user.rs**
  Add:
    - function: pub::totp_begin

**crates/router/src/types/domain.rs**
  Add:
    - mod: pub::user_key_store

**crates/router/src/types/domain/user.rs**
  Add:
    - function: pub::get_or_create_key_store
    - function: pub::get_totp_status
    - function: pub::generate_new
    - function: pub::get_hashed
    - function: pub::into_inner
    - struct: pub::RecoveryCodes
    - impl: impl RecoveryCodes

**crates/router/src/types/domain/user_key_store.rs**
  Add:
    - function: private::convert
    - function: private::convert_back
    - function: private::construct_new
    - struct: pub::UserKeyStore
    - impl: impl super::behaviour::Conversion for UserKeyStore

**crates/router/src/utils/user.rs**
  Add:
    - function: pub::generate_default_totp

**crates/router_env/src/logger/types.rs**
  Modify existing code

**crates/storage_impl/src/mock_db.rs**
  Modify existing code