feat(Connector): Plaid connector configs (#5545)

Co-authored-by: Sarthak Soni <sarthak.soni@juspay.in>
Co-authored-by: Sarthak Soni <76486416+Sarthak1799@users.noreply.github.com>
This commit is contained in:
Gitanjli
2024-08-09 14:36:41 +05:30
committed by GitHub
parent 74632aebea
commit 885428bd1e
2 changed files with 18 additions and 1 deletions

View File

@ -327,6 +327,14 @@ pub fn get_authentication_connector_config(key: &str) -> JsResult {
Ok(serde_wasm_bindgen::to_value(&res)?)
}
#[wasm_bindgen(js_name = getPMAuthenticationProcessorConfig)]
pub fn get_pm_authentication_processor_config(key: &str) -> JsResult {
let key: api_model_enums::PmAuthConnectors = api_model_enums::PmAuthConnectors::from_str(key)
.map_err(|_| "Invalid key received".to_string())?;
let res = connector::ConnectorConfig::get_pm_authentication_processor_config(key)?;
Ok(serde_wasm_bindgen::to_value(&res)?)
}
#[wasm_bindgen(js_name = getRequestPayload)]
pub fn get_request_payload(input: JsValue, response: JsValue) -> JsResult {
let input: DashboardRequestPayload = serde_wasm_bindgen::from_value(input)?;