use napi_derive::napi;
#[napi(js_name = "auditToJson")]
pub async fn audit_to_json_napi(state_dir: String, deep: bool, fix: bool) -> napi::Result<String> {
Ok(crate::audit_to_json(state_dir, deep, fix).await)
}
#[napi(js_name = "iocDbInfo")]
pub fn ioc_db_info_napi() -> napi::Result<String> {
Ok(crate::ioc_db_info())
}
#[napi(js_name = "version")]
pub fn version_napi() -> napi::Result<String> {
Ok(crate::SECUREOPS_VERSION.to_string())
}
#[napi(js_name = "pluginManifest")]
pub fn plugin_manifest_napi() -> napi::Result<String> {
Ok(crate::plugin::plugin_manifest())
}
#[napi(js_name = "onGatewayStart")]
pub async fn on_gateway_start_napi(state_dir: String) -> napi::Result<String> {
Ok(crate::plugin::on_gateway_start(&state_dir).await)
}
#[napi(js_name = "onGatewayStop")]
pub fn on_gateway_stop_napi() -> napi::Result<String> {
Ok(crate::plugin::on_gateway_stop())
}
#[napi(js_name = "dispatchCommand")]
pub async fn dispatch_command_napi(cmd: String, args: Vec<String>) -> napi::Result<String> {
Ok(crate::plugin::dispatch_command(&cmd, &args).await)
}
#[napi(js_name = "callTool")]
pub async fn call_tool_napi(tool: String, args: Vec<String>) -> napi::Result<String> {
Ok(crate::plugin::call_tool(&tool, &args).await)
}