feat(connector): wasm changes for Taxjar (#5879)

This commit is contained in:
Swangi Kumari
2024-09-16 12:23:47 +05:30
committed by GitHub
parent 9f9a414042
commit 90ebd54ec9
5 changed files with 31 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 = getTaxProcessorConfig)]
pub fn get_tax_processor_config(key: &str) -> JsResult {
let key = api_model_enums::TaxConnectors::from_str(key)
.map_err(|_| "Invalid key received".to_string())?;
let res = connector::ConnectorConfig::get_tax_processor_config(key)?;
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)