#pragma once // Contact Center Insights (v1) and Customer Engagement Suite (CES, v1). #include #include #include "google/enterprise/caller.h" namespace molo::google::enterprise { class Insights { public: Insights(std::shared_ptr client, std::string location = "us-central1", Sleeper sleeper = nullptr); Caller& caller() { return caller_; } const Caller& caller() const { return caller_; } static std::string location_name(const std::string& project, const std::string& location); ListResult list_conversations(const std::string& location_parent, const std::string& filter = "") const; clients::body::Json get_conversation(const std::string& name) const; clients::body::Json calculate_stats(const std::string& location_parent, const std::string& filter = "") const; // issueModels.list has no paging in Discovery: one document. clients::body::Json list_issue_models(const std::string& location_parent) const; ListResult list_phrase_matchers(const std::string& location_parent) const; ListResult list_analysis_rules(const std::string& location_parent) const; ListResult list_views(const std::string& location_parent) const; // Starts an analysis (long-running, billed). Not read-only. clients::body::Json analyze(const std::string& conversation) const; private: Caller caller_; }; class Ces { public: Ces(std::shared_ptr client, std::string location = "global", Sleeper sleeper = nullptr); Caller& caller() { return caller_; } const Caller& caller() const { return caller_; } static std::string session_name(const std::string& project, const std::string& location, const std::string& app, const std::string& session_id); static Invocation run_session_invocation(const std::string& session, const std::string& text); ListResult list_apps(const std::string& location_parent) const; clients::body::Json get_app(const std::string& name) const; ListResult list_agents(const std::string& app) const; ListResult list_tools(const std::string& app) const; ListResult list_examples(const std::string& app) const; ListResult list_guardrails(const std::string& app) const; ListResult list_conversations(const std::string& app) const; // Sends one text turn to the app. clients::body::Json run_session(const std::string& session, const std::string& text) const; private: Caller caller_; }; } // namespace molo::google::enterprise