feat(pm_auth): pm_auth service migration (#3047)

Co-authored-by: Sarthak Soni <76486416+Sarthak1799@users.noreply.github.com>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Sarthak Soni <sarthak.soni@juspay.in>
Files to modify:


**enums.rs**
  Add:
    - function: pub::convert_pm_auth_connector
    - enum: pub::PmAuthConnectors

**lib.rs**
  Add:
    - mod: pub::pm_auth

**pm_auth.rs**
  Add:
    - struct: pub::LinkTokenCreateRequest
    - struct: pub::LinkTokenCreateResponse
    - struct: pub::ExchangeTokenCreateRequest
    - struct: pub::ExchangeTokenCreateResponse
    - struct: pub::PaymentMethodAuthConfig
    - struct: pub::PaymentMethodAuthConnectorChoice

**connector.rs**
  Add:
    - mod: pub::plaid

**plaid.rs**
  Add:
    - function: private::build_headers
    - function: private::id
    - function: private::common_get_content_type
    - function: private::base_url
    - function: private::get_auth_header
    - function: private::build_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::get_request_body
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::get_request_body
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::get_request_body
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - struct: pub::Plaid
    - impl: impl ConnectorCommonExt<Flow, Request, Response> for Plaid
    - impl: impl ConnectorCommon for Plaid
    - impl: impl auth_service::AuthService for Plaid
    - impl: impl auth_service::AuthServiceLinkToken for Plaid
    - impl: impl ConnectorIntegration<LinkToken, auth_types::LinkTokenRequest, auth_types::LinkTokenResponse> for Plaid
    - impl: impl auth_service::AuthServiceExchangeToken for Plaid
    - impl: impl ConnectorIntegration<
ExchangeToken,
auth_types::ExchangeTokenRequest,
auth_types::ExchangeTokenResponse,
> for Plaid
    - impl: impl auth_service::AuthServiceBankAccountCredentials for Plaid
    - impl: impl ConnectorIntegration<
BankAccountCredentials,
auth_types::BankAccountCredentialsRequest,
auth_types::BankAccountCredentialsResponse,
> for Plaid
    - mod: pub::transformers

**transformers.rs**
  Add:
    - function: private::try_from
    - function: private::try_from
    - function: private::try_from
    - function: private::try_from
    - function: private::try_from
    - function: private::try_from
    - function: private::try_from
    - struct: pub::PlaidLinkTokenRequest
    - struct: pub::User
    - struct: pub::PlaidLinkTokenResponse
    - struct: pub::PlaidExchangeTokenRequest
    - struct: pub::PlaidExchangeTokenResponse
    - struct: pub::PlaidBankAccountCredentialsRequest
    - struct: pub::PlaidBankAccountCredentialsResponse
    - struct: pub::BankAccountCredentialsOptions
    - struct: pub::PlaidBankAccountCredentialsAccounts
    - struct: pub::PlaidBankAccountCredentialsBalances
    - struct: pub::PlaidBankAccountCredentialsNumbers
    - struct: pub::PlaidBankAccountCredentialsItem
    - struct: pub::PlaidBankAccountCredentialsACH
    - struct: pub::PlaidBankAccountCredentialsEFT
    - struct: pub::PlaidBankAccountCredentialsInternational
    - struct: pub::PlaidBankAccountCredentialsBacs
    - struct: pub::PlaidAuthType
    - struct: pub::PlaidErrorResponse
    - impl: impl TryFrom<&types::LinkTokenRouterData> for PlaidLinkTokenRequest
    - impl: impl TryFrom<types::ResponseRouterData<F, PlaidLinkTokenResponse, T, types::LinkTokenResponse>> for types::PaymentAuthRouterData<F, T, types::LinkTokenResponse>
    - impl: impl TryFrom<
types::ResponseRouterData<F, PlaidExchangeTokenResponse, T, types::ExchangeTokenResponse>,
> for types::PaymentAuthRouterData<F, T, types::ExchangeTokenResponse>
    - impl: impl TryFrom<&types::ExchangeTokenRouterData> for PlaidExchangeTokenRequest
    - impl: impl TryFrom<&types::BankDetailsRouterData> for PlaidBankAccountCredentialsRequest
    - impl: impl TryFrom<
types::ResponseRouterData<
F,
PlaidBankAccountCredentialsResponse,
T,
types::BankAccountCredentialsResponse,
>,
> for types::PaymentAuthRouterData<F, T, types::BankAccountCredentialsResponse>
    - impl: impl TryFrom<&types::ConnectorAuthType> for PlaidAuthType

**consts.rs**
  Modify existing code

**core.rs**
  Add:
    - mod: pub::errors

**errors.rs**
  Add:
    - enum: pub::ConnectorError
    - enum: pub::ParsingError

**lib.rs**
  Add:
    - mod: pub::pm_auth

**types.rs**
  Add:
    - function: private::from
    - function: private::get_not_implemented
    - struct: pub::PaymentAuthRouterData
    - struct: pub::LinkTokenRequest
    - struct: pub::LinkTokenResponse
    - struct: pub::ExchangeTokenRequest
    - struct: pub::ExchangeTokenResponse
    - struct: pub::BankAccountCredentialsRequest
    - struct: pub::BankAccountOptionalIDs
    - struct: pub::BankAccountCredentialsResponse
    - struct: pub::BankAccountDetails
    - struct: pub::ResponseRouterData
    - struct: pub::ErrorResponse
    - struct: pub::Response
    - struct: pub::AuthServiceQueryParam
    - enum: pub::PaymentMethodAuthConnectors
    - enum: pub::ConnectorAuthType
    - impl: impl From<ExchangeTokenResponse> for api_models::pm_auth::ExchangeTokenCreateResponse
    - impl: impl ErrorResponse
    - mod: pub::api

**api.rs**
  Add:
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::get_request_body
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_5xx_error_response
    - function: private::build_headers
    - function: private::get_connector_integration
    - function: private::get_auth_header
    - function: private::common_get_content_type
    - function: private::build_error_response
    - struct: pub::PaymentAuthConnectorData
    - trait: pub::ConnectorIntegration
    - trait: pub::ConnectorCommonExt
    - trait: pub::ConnectorIntegrationAny
    - trait: pub::AuthServiceConnector
    - trait: pub::ConnectorCommon
    - impl: impl ConnectorIntegrationAny<T, Req, Resp> for S
    - impl: impl AuthServiceConnector for T
    - mod: pub::auth_service

**auth_service.rs**
  Add:
    - struct: pub::LinkToken
    - struct: pub::ExchangeToken
    - struct: pub::BankAccountCredentials
    - trait: pub::AuthService
    - trait: pub::AuthServiceLinkToken
    - trait: pub::AuthServiceExchangeToken
    - trait: pub::AuthServiceBankAccountCredentials

**settings.rs**
  Add:
    - struct: pub::PaymentMethodAuth

**core.rs**
  Add:
    - mod: pub::errors

**admin.rs**
  Add:
    - function: private::validate_pm_auth

**payment_methods.rs**
  Modify existing code

**cards.rs**
  Modify existing code

**pm_auth.rs**
  Add:
    - struct: pub::LinkTokenCreateRequest
    - struct: pub::LinkTokenCreateResponse
    - struct: pub::ExchangeTokenCreateRequest
    - struct: pub::ExchangeTokenCreateResponse
    - struct: pub::PaymentMethodAuthConfig
    - struct: pub::PaymentMethodAuthConnectorChoice

**helpers.rs**
  Add:
    - function: pub::get_connector_auth_type
    - trait: pub::PaymentAuthConnectorDataExt

**transformers.rs**
  Add:
    - function: private::try_from
    - function: private::try_from
    - function: private::try_from
    - function: private::try_from
    - function: private::try_from
    - function: private::try_from
    - function: private::try_from
    - struct: pub::PlaidLinkTokenRequest
    - struct: pub::User
    - struct: pub::PlaidLinkTokenResponse
    - struct: pub::PlaidExchangeTokenRequest
    - struct: pub::PlaidExchangeTokenResponse
    - struct: pub::PlaidBankAccountCredentialsRequest
    - struct: pub::PlaidBankAccountCredentialsResponse
    - struct: pub::BankAccountCredentialsOptions
    - struct: pub::PlaidBankAccountCredentialsAccounts
    - struct: pub::PlaidBankAccountCredentialsBalances
    - struct: pub::PlaidBankAccountCredentialsNumbers
    - struct: pub::PlaidBankAccountCredentialsItem
    - struct: pub::PlaidBankAccountCredentialsACH
    - struct: pub::PlaidBankAccountCredentialsEFT
    - struct: pub::PlaidBankAccountCredentialsInternational
    - struct: pub::PlaidBankAccountCredentialsBacs
    - struct: pub::PlaidAuthType
    - struct: pub::PlaidErrorResponse
    - impl: impl TryFrom<&types::LinkTokenRouterData> for PlaidLinkTokenRequest
    - impl: impl TryFrom<types::ResponseRouterData<F, PlaidLinkTokenResponse, T, types::LinkTokenResponse>> for types::PaymentAuthRouterData<F, T, types::LinkTokenResponse>
    - impl: impl TryFrom<
types::ResponseRouterData<F, PlaidExchangeTokenResponse, T, types::ExchangeTokenResponse>,
> for types::PaymentAuthRouterData<F, T, types::ExchangeTokenResponse>
    - impl: impl TryFrom<&types::ExchangeTokenRouterData> for PlaidExchangeTokenRequest
    - impl: impl TryFrom<&types::BankDetailsRouterData> for PlaidBankAccountCredentialsRequest
    - impl: impl TryFrom<
types::ResponseRouterData<
F,
PlaidBankAccountCredentialsResponse,
T,
types::BankAccountCredentialsResponse,
>,
> for types::PaymentAuthRouterData<F, T, types::BankAccountCredentialsResponse>
    - impl: impl TryFrom<&types::ConnectorAuthType> for PlaidAuthType

**routes.rs**
  Add:
    - mod: pub::pm_auth

**app.rs**
  Modify existing code

**lock_utils.rs**
  Modify existing code

**pm_auth.rs**
  Add:
    - struct: pub::LinkTokenCreateRequest
    - struct: pub::LinkTokenCreateResponse
    - struct: pub::ExchangeTokenCreateRequest
    - struct: pub::ExchangeTokenCreateResponse
    - struct: pub::PaymentMethodAuthConfig
    - struct: pub::PaymentMethodAuthConnectorChoice

**services.rs**
  Add:
    - mod: pub::pm_auth

**authentication.rs**
  Add:
    - function: private::get_client_secret
    - function: private::get_client_secret
    - impl: impl ClientSecretFetch for api_models::pm_auth::LinkTokenCreateRequest
    - impl: impl ClientSecretFetch for api_models::pm_auth::ExchangeTokenCreateRequest

**pm_auth.rs**
  Add:
    - struct: pub::LinkTokenCreateRequest
    - struct: pub::LinkTokenCreateResponse
    - struct: pub::ExchangeTokenCreateRequest
    - struct: pub::ExchangeTokenCreateResponse
    - struct: pub::PaymentMethodAuthConfig
    - struct: pub::PaymentMethodAuthConnectorChoice

**types.rs**
  Add:
    - function: private::from
    - function: private::get_not_implemented
    - struct: pub::PaymentAuthRouterData
    - struct: pub::LinkTokenRequest
    - struct: pub::LinkTokenResponse
    - struct: pub::ExchangeTokenRequest
    - struct: pub::ExchangeTokenResponse
    - struct: pub::BankAccountCredentialsRequest
    - struct: pub::BankAccountOptionalIDs
    - struct: pub::BankAccountCredentialsResponse
    - struct: pub::BankAccountDetails
    - struct: pub::ResponseRouterData
    - struct: pub::ErrorResponse
    - struct: pub::Response
    - struct: pub::AuthServiceQueryParam
    - enum: pub::PaymentMethodAuthConnectors
    - enum: pub::ConnectorAuthType
    - impl: impl From<ExchangeTokenResponse> for api_models::pm_auth::ExchangeTokenCreateResponse
    - impl: impl ErrorResponse
    - mod: pub::api

**pm_auth.rs**
  Add:
    - struct: pub::LinkTokenCreateRequest
    - struct: pub::LinkTokenCreateResponse
    - struct: pub::ExchangeTokenCreateRequest
    - struct: pub::ExchangeTokenCreateResponse
    - struct: pub::PaymentMethodAuthConfig
    - struct: pub::PaymentMethodAuthConnectorChoice

**types.rs**
  Add:
    - function: private::from
    - function: private::get_not_implemented
    - struct: pub::PaymentAuthRouterData
    - struct: pub::LinkTokenRequest
    - struct: pub::LinkTokenResponse
    - struct: pub::ExchangeTokenRequest
    - struct: pub::ExchangeTokenResponse
    - struct: pub::BankAccountCredentialsRequest
    - struct: pub::BankAccountOptionalIDs
    - struct: pub::BankAccountCredentialsResponse
    - struct: pub::BankAccountDetails
    - struct: pub::ResponseRouterData
    - struct: pub::ErrorResponse
    - struct: pub::Response
    - struct: pub::AuthServiceQueryParam
    - enum: pub::PaymentMethodAuthConnectors
    - enum: pub::ConnectorAuthType
    - impl: impl From<ExchangeTokenResponse> for api_models::pm_auth::ExchangeTokenCreateResponse
    - impl: impl ErrorResponse
    - mod: pub::api