Serve the scripts an agent reads on a call

FeatureKBService
Shipped
September 2, 2026 at 8:43 PM UTC
Author
Kamo
Commit
5967ae9

/api/kb/sales-scripts, gated on the two new rights. Reads take VIEW_SALES_SCRIPTS or MANAGE_SALES_SCRIPTS, writes take MANAGE. SessionHelper.hasRight fails closed, which is what every gate in this service depends on. Here rather than in SecurityService because APIService already forwards /api/kb/** to this service wholesale, so the feature needs no gateway change, and because donotmodify.dao.repos is in this application's @EnableJpaRepositories — the lead-market lookup a script needs is a local query rather than a cross-service call. The list endpoint returns summaries with a block COUNT and no block bodies. A settings list of a dozen scripts has no use for a dozen full Lexical documents, and the counts come from one grouped query rather than one per row — the shape that made /leads slow enough to be reported as an outage. GET /markets exists so the Interaction Center can draw its sub-tabs in one call. The alternative was fetching every market and every script and intersecting them in the browser: two round trips and a payload of script bodies to answer a question about ids.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing