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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 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.

## 0.1.0: Base Intelligence Seat manager lines (2026-11-18)

- On the Base Intelligence Seat a manager's own phone line is not captured. `add_manager(customer, user, *, activate_alerts=True)` no longer takes `own_extension` (`activate_alerts` is keyword-only, so an extension passed positionally raises `TypeError`): a manager is mapped to exactly the end-user lines at the location, and their own extension is never mapped, nor added to First Alert or Insights Hub.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Python client for the Intelligence Cloud partner API. It covers both jobs:
- **Customer lifecycle** with admin credentials (a reseller admin login): companies, locations, users, products, connectors, First Alert, Insights Hub, and the Base Intelligence Seat workflows.
- **Conversation intelligence** with frontline credentials (a frontline user login): calls, transcripts, recordings, alerts, tasks, insights, and the After Call webhook.

Version 0.1.0. Python 3.10 or later. One dependency: `httpx` (0.27 or later).
Version 0.1.1. Python 3.10 or later. One dependency: `httpx` (0.27 or later).

The API reference is at https://docs.intelligence.cloud/reference.html, built from https://docs.intelligence.cloud/openapi.yaml.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "intelligence-cloud"
version = "0.1.0"
version = "0.1.1"
description = "Python client for the Intelligence Cloud partner API: customer lifecycle and conversation intelligence."
readme = "README.md"
requires-python = ">=3.10"
Expand Down
2 changes: 1 addition & 1 deletion src/intelligence_cloud/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.1.1"
6 changes: 3 additions & 3 deletions src/intelligence_cloud/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def provision_seat_customer(self, spec: SeatCustomerSpec) -> SeatCustomer:
if spec.connector is not None:
self._ensure_connector(location_id, spec, result)

# 7. Insights Hub: group access + every call at the location
# 7. Insights Hub: group access; only the listed lines are covered ("monitor all numbers" stays off)
setup = unwrap(c.insights_hub.get_insights_hub_setup(location_id)) or {}
access = setup.get("group_access") or []
if result.insights_hub_group_id not in access:
Expand All @@ -282,8 +282,8 @@ def provision_seat_customer(self, spec: SeatCustomerSpec) -> SeatCustomer:
else:
c.insights_hub.add_groups(location_id, [result.insights_hub_group_id])
cfg = unwrap(c.insights_hub.get_insights_hub_config(location_id)) or {}
if not cfg.get("monitor_all_numbers"):
c.insights_hub.update_insights_hub_config(location_id, {"monitor_all_numbers": True})
if cfg.get("monitor_all_numbers"):
c.insights_hub.update_insights_hub_config(location_id, {"monitor_all_numbers": False})

# 8. SSO domain claim (optional): the customer publishes the TXT record, then verify
if spec.sso_domain:
Expand Down
2 changes: 1 addition & 1 deletion tests/live/test_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test_provision_seat_customer(admin, customer):
assert [g["id"] for g in threat["groups"]] == [customer.manager_alerts_group_id]
setup = unwrap(admin.insights_hub.get_insights_hub_setup(customer.location_id))
assert customer.insights_hub_group_id in setup["group_access"]
assert unwrap(admin.insights_hub.get_insights_hub_config(customer.location_id))["monitor_all_numbers"] is True
assert unwrap(admin.insights_hub.get_insights_hub_config(customer.location_id))["monitor_all_numbers"] is False
raw_keys(admin, "getConnector", {"locationId": customer.location_id, "connectorId": customer.connector_id})
raw_keys(admin, "getCompany", {"companyId": customer.company_id})

Expand Down
11 changes: 9 additions & 2 deletions tests/unit/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_provision_call_sequence(api):
("POST", r"/resellers/[^/]+/companies"), ("PATCH", r"/companies/[^/]+"),
("POST", r"/companies/[^/]+/locations"), ("POST", r"/locations/[^/]+/user-groups"),
("POST", r"/locations/[^/]+/first-alert/rules"), ("POST", r"/locations/[^/]+/connectors"),
("POST", r"/locations/[^/]+/insights-hub/setup"), ("PATCH", r"/locations/[^/]+/insights-hub/config"),
("POST", r"/locations/[^/]+/insights-hub/setup"),
("POST", r"/companies/[^/]+/domains"),
]
import re
Expand All @@ -72,7 +72,8 @@ def test_provision_call_sequence(api):
assert api.count("PATCH", r"/locations/[^/]+/first-alert/rules/[^/]+") == 0
assert all(r["groups"] == [{"id": cust.manager_alerts_group_id}] for r in rules.values())
assert api.ih_setup[cust.location_id]["group_access"] == [cust.insights_hub_group_id]
assert api.ih_config[cust.location_id] is True
assert api.ih_config.get(cust.location_id, False) is False # "monitor all numbers" stays off
assert api.count("PATCH", r"/locations/[^/]+/insights-hub/config") == 0
assert cust.connector_status == "active" and cust.connector_id
assert cust.sso_txt_record == {"name": "_ic-verify.riverbend.example.com", "value": "abc"}
assert "company" in cust.created and not cust.existing
Expand All @@ -82,6 +83,12 @@ def test_provision_call_sequence(api):
"enabled_products"}


def test_rerun_switches_monitor_all_off(api, customer):
api.ih_config[customer.location_id] = True # as a 0.1.0 run left it
api.client().workflows.provision_seat_customer(spec())
assert api.ih_config[customer.location_id] is False


def test_provision_is_idempotent(api, customer):
before = len(api.calls)
again = api.client().workflows.provision_seat_customer(spec())
Expand Down
Loading