Events, logs & expressions
Event definitions and custom events, request/live logs, and the expression catalog + evaluator.
Available as mgr.events, mgr.logs, and mgr.expressions. Integration action dispatch and
single-action variables live on mgr.integrations.
Events
- TypeScript
- Go
- Rust
const events = await mgr.events.list();
const custom = await mgr.events.createCustom({ /* CustomEventRequest */ });
await mgr.events.deleteCustom(custom.item.id);
events, _ := mgr.Events.List(ctx)
custom, _ := mgr.Events.CreateCustom(ctx, managerapi.CustomEventRequest{})
_ = mgr.Events.DeleteCustom(ctx, custom.Item.Id.String())
let events = mgr.events.list().await?;
let custom = mgr.events.create_custom(/* CustomEventRequest */).await?;
mgr.events.delete_custom(&custom.item.id.to_string()).await?;
Logs
- TypeScript
- Go
- Rust
for await (const entry of mgr.logs.audit()) console.log(entry); // request audit log, auto-paged
const live = await mgr.logs.live();
for entry, err := range mgr.Logs.Audit(ctx, managerapi.ListAuditLogsParams{}) { /* ... */ }
live, _ := mgr.Logs.Live(ctx)
let audit = mgr.logs.audit_all().await?; // request audit log, auto-paged
let live = mgr.logs.live().await?;
Live logging & custom log entries
Toggle live logging on or off, or write a custom log entry.
- TypeScript
- Go
- Rust
await mgr.logs.enableLive();
await mgr.logs.disableLive();
await mgr.logs.write({ /* WriteLogRequest */ });
_, _ = mgr.Logs.EnableLive(ctx)
_, _ = mgr.Logs.DisableLive(ctx)
_, _ = mgr.Logs.Write(ctx, managerapi.WriteLogRequest{})
mgr.logs.enable_live().await?;
mgr.logs.disable_live().await?;
mgr.logs.write(/* WriteLogRequest */).await?;
Expressions
- TypeScript
- Go
- Rust
const available = await mgr.expressions.list();
const result = await mgr.expressions.evaluate({ /* EvaluateExpression */ });
available, _ := mgr.Expressions.List(ctx)
result, _ := mgr.Expressions.Evaluate(ctx, managerapi.EvaluateExpression{}, false)
let available = mgr.expressions.list().await?;
let result = mgr.expressions.evaluate(/* EvaluateExpression */, false).await?; // is_async = false
Integration action dispatch
- TypeScript
- Go
- Rust
await mgr.integrations.dispatchAction(integrationId, action, { /* IntegrationDispatchActionRequest */ });
const vars = await mgr.integrations.actionVariables("salesforce", actionName);
_, _ = mgr.Integrations.DispatchAction(ctx, integrationID, action, managerapi.IntegrationDispatchActionRequest{})
vars, _ := mgr.Integrations.ActionVariables(ctx, managerapi.IntegrationProvider("salesforce"), actionName)
use babelforce_manager_sdk::gen::manager::models::{IntegrationDispatchActionRequest, IntegrationProvider};
mgr.integrations.dispatch_action(&integration_id, &action, IntegrationDispatchActionRequest::new()).await?;
let vars = mgr.integrations.action_variables(IntegrationProvider::Salesforce, &action_name).await?;