Skip to main content

Crate babelforce_manager_sdk

Crate babelforce_manager_sdk 

Source
Expand description

Rust SDK for the babelforce manager APIs — auth, user & agent management, call reporting, metrics, and task automations.

One client, configured once, exposes resource namespaces over the API. The low-level clients under [gen] are generated from the OpenAPI specs and are an internal detail; the public surface is the hand-written facade.

use babelforce_manager_sdk::{ManagerClient, Auth};

let mgr = ManagerClient::connect(Auth::ClientCredentials {
    client_id: "…".into(),
    client_secret: "…".into(),
})
.await?;

for user in mgr.users.list_all().await? {
    println!("{:?}", user.email);
}

Structs§

AgentGroupsResource
Agent groups — /api/v2/agents/groups.
AgentsResource
Agent management — /api/v2/agents, with a nested groups sub-resource.
ApplicationsResource
Applications — /api/v2/applications, with a nested local_automations sub-resource.
AuthResource
OAuth 2.0 endpoints — /oauth/authorize, /oauth/token, /oauth/revoke.
AutomationsResource
Global automations (event triggers) — /api/v2/events/triggers.
BabeldeskResource
Babeldesk dashboards — /api/v2/babeldesk, with a nested widgets sub-resource.
BabeldeskWidgetsResource
Babeldesk widgets — /api/v2/babeldesk/widgets.
BusinessHoursResource
Business hours — /api/v2/business-hours.
CalendarsResource
Calendars — /api/v2/calendars.
CallReportFilter
Filters for the detailed call report (/api/v2/calls/reporting). String-typed on purpose — values are validated against the API’s enums on use, so a bad value is an ManagerError::InvalidArgument naming the field, never a silent mismatch.
CallsResource
Call reporting and call control — /api/v2/calls, with a nested reporting sub-resource.
CampaignsResource
Outbound campaigns — /api/v2/outbound/campaigns.
ConferencesResource
Conferences — /api/v2/conferences.
ConversationsResource
Conversations — /api/v2/conversations, including their events and session variables.
DashboardsResource
Reporting dashboards — /api/v2/dashboards, with per-dashboard user management.
DialerBehavioursResource
Dialer behaviours — /api/v2/outbound/dialer-behaviours.
DialerResource
Dialer runtime & reporting — /api/v2/dialer, with a nested behaviours sub-resource.
EventsResource
Event definitions & custom events — /api/v2/events.
ExpressionsResource
Expressions — /api/v2/expressions. The catalog of available expressions plus an evaluator.
FilesResource
Stored files — /api/v2/files (recordings, prompts and backups).
IntegrationsResource
Integrations — /api/v2/integrations.
ListAgentsQuery
Optional server-side filters for the agents list surfaces (AgentsResource::list / AgentsResource::list_page). All fields combine; the default filters nothing.
ListUsersQuery
Optional server-side filters for UsersResource::list.
LocalAutomationsResource
Per-application local automations — /api/v2/applications/{applicationId}/actions.
LogsResource
Logs — the request audit log (/api/v2/audit/request) and the live log (/api/v2/logs).
ManagerClient
The babelforce manager SDK client. Build one with ManagerClient::connect (or ManagerClient::builder) and use its resource namespaces.
ManagerClientBuilder
Builder for ManagerClient.
MeResource
The authenticated principal — the current user, the accounts they can access, and self-service password reset. Backed by /api/v2/user (the user spec).
MetricsResource
Metrics — /api/v2/metrics.
NumbersResource
Service (phone) numbers — /api/v2/numbers.
OutboundResource
Outbound lists & leads — /api/v2/outbound/lists.
Page
One fetched page of a v2 list endpoint.
PhonebookResource
Phonebook entries — /api/v2/phonebook.
PkceChallenge
A PKCE code verifier + S256 challenge (RFC 7636).
PromptsResource
Audio prompts — /api/v2/prompts.
QueueSelectionsResource
Queue selections (routing rules) and their agent/group/tag membership.
QueuesResource
Queues — /api/v2/queues, with a nested selections sub-resource.
RecordingsResource
Call recordings — /api/v2/recordings, including bulk actions and per-recording flagging.
ReportingResource
Call reporting — /api/v2/calls/reporting.
RetryPolicy
Automatic-retry tuning. See the module docs for the retry semantics; disable with RetryPolicy::disabled or tune via crate::ManagerClientBuilder::retry.
RoutingResource
Routing rules — /api/v2/routings.
SessionsResource
Call/automation sessions — /api/v2/sessions.
SettingsResource
Global settings — /api/v2/settings, grouped by scope (app, telephony, audit, ui, retention). Each section has a read accessor and a set_* writer that return the section’s typed response.
SmsResource
SMS records — /api/v2/sms.
TaskMetricsResource
Task & agent metrics — /api/v3/metrics.
TaskSchedulesResource
Task schedules (cron-style task submission) — /api/v3/schedules.
TaskScriptsResource
Custom scripts by type — /api/v3/scripts.
TaskSecretsResource
Account secrets, grouped by prefix — /api/v3/secrets.
TaskSelectionConfigResource
Account task-selection configuration — /api/v3/account/selection.
TasksResource
Task automation (v3) — /api/v3/tasks, with nested scripts, secrets, selection_config, and metrics sub-resources.
TokenRequest
Optional parameters for the OAuth token endpoint. Set the fields relevant to your grant type (e.g. code + redirect_uri + code_verifier for authorization_code, refresh_token for refresh_token, username + password for password, client_id + client_secret for client_credentials); leave the rest at their default None.
TriggersResource
Workflow triggers — /api/v2/triggers.
UsersResource
User management — /api/v2/users.

Enums§

ApplicationItem
One application as returned by the API — typed when this SDK version knows its module, preserved raw when it doesn’t.
Auth
How the SDK authenticates. Configure once when building the client.
ManagerError
The error type returned by every facade call.

Constants§

DEFAULT_BASE_URL
Default babelforce API host. Override with ManagerClientBuilder::base_url.

Functions§

build_authorize_url
Build the GET {base_url}/oauth/authorize URL that starts the Authorization Code + PKCE flow. Redirect the user to it; babelforce redirects back to redirect_uri with a short-lived code. code_challenge_method defaults to S256 when None. Pass a full base_url including the scheme (e.g. https://services.babelforce.com).
pkce_challenge
Generate a fresh PKCE verifier + S256 challenge (RFC 7636). Pass code_challenge to build_authorize_url and keep code_verifier to exchange the returned code.