diff --git a/src/components/session/token/superUser/modules/bird/Bird.vue b/src/components/session/token/superUser/modules/bird/Bird.vue index 44d08f26..d55d4312 100644 --- a/src/components/session/token/superUser/modules/bird/Bird.vue +++ b/src/components/session/token/superUser/modules/bird/Bird.vue @@ -35,6 +35,12 @@ export const Bird = { }, config: Config, functions: { + getHealth: async () => { + return authenticatedRequest( + "/bird/health", + "GET" + ); + }, createVoiceCall: async (workspaceId, channelId, payload) => { return authenticatedRequest( "/bird/voice/calls" + withWorkspaceAndChannel(workspaceId, channelId), diff --git a/src/components/session/token/superUser/modules/bird/Config.vue b/src/components/session/token/superUser/modules/bird/Config.vue index 2a2b7f9f..98808b0b 100644 --- a/src/components/session/token/superUser/modules/bird/Config.vue +++ b/src/components/session/token/superUser/modules/bird/Config.vue @@ -44,6 +44,15 @@ export const Config = { return Config.set("server_url", value); }, }, + workspaceId: { + get: async () => { + return Config.get("workspaceId"); + }, + set: async (value) => { + return Config.set("workspaceId", value); + }, + }, + // Kept for installations that have not migrated the historical typo yet. workplaceId: { get: async () => { return Config.get("workplaceId"); @@ -60,6 +69,54 @@ export const Config = { return Config.set("channelId", value); }, }, + participantId: { + get: async () => Config.get("participantId"), + set: async (value) => Config.set("participantId", value), + }, + allowed_channel_ids_json: { + get: async () => Config.get("allowed_channel_ids_json"), + set: async (value) => Config.set("allowed_channel_ids_json", value), + }, + control_plane_token: { + get: async () => Config.get("control_plane_token"), + set: async (value) => Config.set("control_plane_token", value), + }, + webhook_signing_key: { + get: async () => Config.get("webhook_signing_key"), + set: async (value) => Config.set("webhook_signing_key", value), + }, + webhook_public_url: { + get: async () => Config.get("webhook_public_url"), + set: async (value) => Config.set("webhook_public_url", value), + }, + webhook_replay_window_seconds: { + get: async () => Config.get("webhook_replay_window_seconds"), + set: async (value) => Config.set("webhook_replay_window_seconds", value), + }, + flow_shared_secret: { + get: async () => Config.get("flow_shared_secret"), + set: async (value) => Config.set("flow_shared_secret", value), + }, + flow_policy_json: { + get: async () => Config.get("flow_policy_json"), + set: async (value) => Config.set("flow_policy_json", value), + }, + template_policy_json: { + get: async () => Config.get("template_policy_json"), + set: async (value) => Config.set("template_policy_json", value), + }, + control_plane_enabled: { + set: async (value) => Config.set("control_plane_enabled", value), + }, + flow_enabled: { + set: async (value) => Config.set("flow_enabled", value), + }, + operations_actions_enabled: { + set: async (value) => Config.set("operations_actions_enabled", value), + }, + outbound_messages_enabled: { + set: async (value) => Config.set("outbound_messages_enabled", value), + }, }, enabled: { get: async () => { diff --git a/src/i18n/generated/global-v2.json b/src/i18n/generated/global-v2.json index 491f2972..5530ab35 100644 --- a/src/i18n/generated/global-v2.json +++ b/src/i18n/generated/global-v2.json @@ -1189,6 +1189,70 @@ "zip": "@:{'templates.generated.compat.common.zip'}" }, "configuration": { + "bird": { + "api_key": "API key", + "api_key_desc": "The Bird access key. The saved value is never displayed.", + "api_settings": "API connection", + "api_settings_desc": "Credentials and identifiers used by the Pleno backend to connect to Bird.", + "allowed_channels": "Allowed channel IDs (JSON)", + "allowed_channels_desc": "An explicit JSON array of Bird channel IDs owned by Pleno. The legacy default channel is used only while this list is empty.", + "automation": "Flows and controlled writes", + "automation_desc": "All switches are disabled by default. Enable them only after the protected activation review.", + "channel_id": "Default channel ID", + "channel_id_desc": "The default Bird channel used by existing voice operations.", + "channels": "Available channels", + "config_unavailable": "Bird configuration could not be loaded. No settings were changed.", + "control_plane": "Control Plane gateway", + "control_plane_desc": "Authenticate the local Control Plane through the Pleno backend. Never place the Bird access key in Control Plane.", + "control_plane_enable": "Enable the Control Plane gateway", + "control_plane_enable_desc": "Permit the narrow service-bearer API after credentials and channel ownership are verified.", + "control_plane_token": "Control Plane service token", + "control_plane_token_desc": "The narrow Pleno service bearer. The saved value is never displayed.", + "enable": "Enable Bird", + "enable_desc": "Allow the Pleno backend to use the configured Bird integration.", + "general_settings": "General settings", + "general_settings_desc": "Enable or disable Bird without changing saved credentials.", + "flow_enable": "Enable deterministic Bird Flow decisions", + "flow_enable_desc": "Allow only policy-matched tag, assign, snooze, and close decisions.", + "flow_policy": "Flow policy (JSON)", + "flow_policy_desc": "Versioned deterministic rules evaluated by the Pleno backend.", + "flow_secret": "Flow shared secret", + "flow_secret_desc": "Authenticates timestamp-bound Bird Flow requests. The saved value is never displayed.", + "health_title": "Connection health", + "not_available": "Not available", + "not_configured": "Not configured", + "operations_enable": "Enable confirmed voice operations", + "operations_enable_desc": "Permit only typed, explicitly confirmed, idempotent operations exposed by the gateway.", + "outbound_enable": "Enable confirmed conversation replies", + "outbound_enable_desc": "Permit approved replies and separately allowlisted immutable templates through the gateway.", + "participant_id": "Bird participant ID", + "participant_id_desc": "The Bird participant identity used as the sender for confirmed replies and immutable templates.", + "provider_check": "Provider check", + "read_only_health": "This read-only check does not place calls, send messages, or change Bird data.", + "refresh_health": "Refresh health", + "server_url": "Server URL", + "server_url_desc": "The Bird API base URL.", + "state": { + "degraded": "Degraded", + "disabled": "Disabled", + "healthy": "Healthy", + "needs_configuration": "Needs configuration", + "unavailable": "Unavailable" + }, + "subtitle": "Configure Bird credentials and inspect read-only connection and channel health.", + "title": "Bird configuration", + "template_policy": "Immutable template allowlist (JSON)", + "template_policy_desc": "Exact template project IDs, versions, locales, and structured parameter rules.", + "unnamed_channel": "Unnamed channel", + "replay_window": "Webhook replay window (seconds)", + "replay_window_desc": "Maximum accepted Bird webhook timestamp skew.", + "webhook_key": "Webhook signing key", + "webhook_key_desc": "Verifies Bird notification signatures. The saved value is never displayed.", + "webhook_url": "Exact public webhook URL", + "webhook_url_desc": "The HTTPS URL included exactly in Bird signature verification.", + "workspace_id": "Workspace ID", + "workspace_id_desc": "The canonical Bird workspace identifier. Existing workplaceId values remain readable during migration." + }, "backups": { "active_jobs": "@:{'templates.generated.compat.configuration.backups.active_jobs'}", "actions": "@:{'templates.generated.compat.configuration.backups.actions'}", diff --git a/src/i18n/source/global/shared/configuration/bird.json b/src/i18n/source/global/shared/configuration/bird.json new file mode 100644 index 00000000..01483107 --- /dev/null +++ b/src/i18n/source/global/shared/configuration/bird.json @@ -0,0 +1,68 @@ +{ + "configuration": { + "bird": { + "api_key": "API key", + "api_key_desc": "The Bird access key. The saved value is never displayed.", + "api_settings": "API connection", + "api_settings_desc": "Credentials and identifiers used by the Pleno backend to connect to Bird.", + "allowed_channels": "Allowed channel IDs (JSON)", + "allowed_channels_desc": "An explicit JSON array of Bird channel IDs owned by Pleno. The legacy default channel is used only while this list is empty.", + "automation": "Flows and controlled writes", + "automation_desc": "All switches are disabled by default. Enable them only after the protected activation review.", + "channel_id": "Default channel ID", + "channel_id_desc": "The default Bird channel used by existing voice operations.", + "channels": "Available channels", + "config_unavailable": "Bird configuration could not be loaded. No settings were changed.", + "control_plane": "Control Plane gateway", + "control_plane_desc": "Authenticate the local Control Plane through the Pleno backend. Never place the Bird access key in Control Plane.", + "control_plane_enable": "Enable the Control Plane gateway", + "control_plane_enable_desc": "Permit the narrow service-bearer API after credentials and channel ownership are verified.", + "control_plane_token": "Control Plane service token", + "control_plane_token_desc": "The narrow Pleno service bearer. The saved value is never displayed.", + "enable": "Enable Bird", + "enable_desc": "Allow the Pleno backend to use the configured Bird integration.", + "general_settings": "General settings", + "general_settings_desc": "Enable or disable Bird without changing saved credentials.", + "flow_enable": "Enable deterministic Bird Flow decisions", + "flow_enable_desc": "Allow only policy-matched tag, assign, snooze, and close decisions.", + "flow_policy": "Flow policy (JSON)", + "flow_policy_desc": "Versioned deterministic rules evaluated by the Pleno backend.", + "flow_secret": "Flow shared secret", + "flow_secret_desc": "Authenticates timestamp-bound Bird Flow requests. The saved value is never displayed.", + "health_title": "Connection health", + "not_available": "Not available", + "not_configured": "Not configured", + "operations_enable": "Enable confirmed voice operations", + "operations_enable_desc": "Permit only typed, explicitly confirmed, idempotent operations exposed by the gateway.", + "outbound_enable": "Enable confirmed conversation replies", + "outbound_enable_desc": "Permit approved replies and separately allowlisted immutable templates through the gateway.", + "participant_id": "Bird participant ID", + "participant_id_desc": "The Bird participant identity used as the sender for confirmed replies and immutable templates.", + "provider_check": "Provider check", + "read_only_health": "This read-only check does not place calls, send messages, or change Bird data.", + "refresh_health": "Refresh health", + "server_url": "Server URL", + "server_url_desc": "The Bird API base URL.", + "state": { + "degraded": "Degraded", + "disabled": "Disabled", + "healthy": "Healthy", + "needs_configuration": "Needs configuration", + "unavailable": "Unavailable" + }, + "subtitle": "Configure Bird credentials and inspect read-only connection and channel health.", + "title": "Bird configuration", + "template_policy": "Immutable template allowlist (JSON)", + "template_policy_desc": "Exact template project IDs, versions, locales, and structured parameter rules.", + "unnamed_channel": "Unnamed channel", + "replay_window": "Webhook replay window (seconds)", + "replay_window_desc": "Maximum accepted Bird webhook timestamp skew.", + "webhook_key": "Webhook signing key", + "webhook_key_desc": "Verifies Bird notification signatures. The saved value is never displayed.", + "webhook_url": "Exact public webhook URL", + "webhook_url_desc": "The HTTPS URL included exactly in Bird signature verification.", + "workspace_id": "Workspace ID", + "workspace_id_desc": "The canonical Bird workspace identifier. Existing workplaceId values remain readable during migration." + } + } +} diff --git a/src/views/dashboards/superUserDashboard/configuration/ConfigurationBird.vue b/src/views/dashboards/superUserDashboard/configuration/ConfigurationBird.vue index 30acc29f..36a3fbdb 100644 --- a/src/views/dashboards/superUserDashboard/configuration/ConfigurationBird.vue +++ b/src/views/dashboards/superUserDashboard/configuration/ConfigurationBird.vue @@ -1,169 +1,470 @@