Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Changelog

## 0.2.0 (2026-11-29)

Two new layers. `client.accounts` replaces `client.workflows`; `client.conversations` is new. Every generated resource method and every `client.intelligence` helper keeps its name and behaviour.

- **Account layer, `client.accounts`** (administrator login): create and maintain a customer on Base User and Base Manager licenses. A customer is a company with teams and a `<Company> - Management` location. Each team gets its own connector, five groups (Customer Threats, Upset Customers, Low Sentiment Calls, Insights Hub Access, Insights Hub Weekly Reports) and three alerts (Customer Threat, Upset Customer, Low Sentiment), each routed to its group. Management gets its own connector, which captures the managers' own lines, and the weekly reports group; it has no alerts. Helpers: `create_customer`, `get_customer`, `add_team`, `set_alerts`, `set_connector`, `add_base_user`, `add_base_manager`, `add_integration_user`, `change_license`, `move_user`, `change_line`, `remove_user`, `activate_alerts`, `send_invitations`, `list_members`, `license_report`, `sync_lines`, `offboard_customer`.
- Every account helper finds what exists before it writes: a second run with the same input writes nothing. A helper that stops part-way raises `AccountError` with the step, the result so far and the cause.
- A customer can be created without the phrase lists: Low Sentiment and every group are created, `Customer.pending` lists the two phrase alerts, and `set_alerts` creates them when the lists arrive. `AlertSettings` sets the phrases and the sentiment level of each alert; `None` keeps what is there. Alerts are created switched off; `activate_alerts` switches them on for teams with a Base Manager in each alert group.
- Alert email is off for every person the helpers create, managers included (0.1.x switched it on for managers). Insights Hub "monitor all numbers" stays off.
- `ConnectorSpec(type, config, name=None, timeout=600)` takes any connector type the API accepts with that type's own settings; `ConnectorSpec.netsapiens(api_url, domain, api_key)` is the shortcut for the documented one. Values whose names contain key, secret, token or password are hidden when the spec is printed. `add_team` requires a connector; `set_connector` attaches one to a customer created without it.
- **Conversation layer, `client.conversations`** (the person's own login): `me`, `teams`, `calls`, `brief`, `transcript`, `recording_link`, `caller_history`, `open_tasks`, `alerts`, `alert`, `team_view`, `topics`, `reference`, `parse_first_alert_event`. Caller numbers are masked to their last four digits unless the client is created with `mask_numbers=False`. Windows are at most 31 days and lists at most 200 (`caller_history` 50), checked before any request. Printing a `CallBrief` or `AlertBrief` shows only its id and time.
- **Network failures raise `NetworkError`** (an `ApiError` with status 0) in place of the HTTP library's own error, which held the request: a request can hold a password, a token or a connection key.
- `CallBrief.link`, `AlertBrief.link` and `reference()` give the call or alert page in the app. `Client(app_url=...)` sets the app address (https only; default `https://app.intelligence.cloud`).
- A connector that does not become active stops `create_customer`, `add_team` and `set_connector` with `AccountError` (step `"connectors"`, cause `ConnectorTimeoutError` or `ConnectorError`) once everything else is built; run again to finish.
- `add_base_user`, `add_base_manager` and `add_integration_user` refuse a person already set up with another license; `change_license` converts. `change_license` and `move_user` continue from where an earlier run stopped.
- `parse_first_alert_event` and `FirstAlertEvent` parse the First Alert webhook, beside `parse_after_call_event`.
- New errors: `AccountError` and `WrongLoginError` (an account helper with a user login, or a conversation helper with an administrator login).
- Examples: `examples/create_customer.py` replaces the provisioning example; `examples/my_day.py` shows the conversation layer.

Removed in 0.2.0, with no aliases:

| 0.1.x | 0.2.0 |
|---|---|
| `client.workflows` | `client.accounts` |
| the 0.1.x provisioning helper and its spec and result types | `create_customer`, `CustomerSpec`, `Customer` |
| `ConnectorSpec(api_url, domain, api_key)` | `ConnectorSpec.netsapiens(api_url, domain, api_key)`, or `ConnectorSpec(type, config)` |
| `threat_phrases` | `alerts` (`AlertSettings`: phrases and sentiment level per alert) |
| the 0.1.x customer read-back helper | `get_customer` |
| `add_frontline_user` | `add_base_user` |
| `add_manager` | `add_base_manager` (own line now captured at Management; alert email now off) |
| the 0.1.x alert activation helper | `activate_alerts` |
| `change_user_extension` | `change_line` |
| `list_frontline_users`, `list_managers`, `list_integration_users` | `list_members(license=...)` |
| `sync_numbers` | `sync_lines` |
| the 0.1.x user result type, `UserSpec`, `LocationSpec` | `Member`, `PersonSpec`, `TeamSpec` |
| "Manager Alerts" group, two rules | Three groups and three rules per team |

A customer built with 0.1.x is not converted automatically: `get_customer` lists what its layout is missing in `Customer.pending`.

## 0.1.1 (2026-11-29)

- Insights Hub "monitor all numbers" is never switched on. `provision_seat_customer` used to set `monitor_all_numbers` to true; it now leaves it off and switches it off where an earlier run switched it on. Insights Hub covers the lines listed for the location, which `add_frontline_user` already adds. Re-run `provision_seat_customer` for customers set up with 0.1.0.
Expand Down
Loading
Loading