Add the Bird Control Plane gateway, signed webhook ingestion, policy-gated writes, fail-closed production auto-activation, and RSA-OAEP bootstrap credential flow.
146 lines
5.9 KiB
PHP
146 lines
5.9 KiB
PHP
<?php
|
|
|
|
namespace bird;
|
|
|
|
require_once WD . '/traits/module_config_t.php';
|
|
require_once WD . '/modules/bird/config/bird_enabled_c.php';
|
|
require_once WD . '/modules/bird/config/bird_api_key_c.php';
|
|
require_once WD . '/modules/bird/config/bird_server_url_c.php';
|
|
require_once WD . '/modules/bird/config/bird_workplaceId_c.php';
|
|
require_once WD . '/modules/bird/config/bird_workspaceId_c.php';
|
|
require_once WD . '/modules/bird/config/bird_channelId_c.php';
|
|
require_once WD . '/modules/bird/config/bird_allowed_channel_ids_json_c.php';
|
|
require_once WD . '/modules/bird/config/bird_control_plane_enabled_c.php';
|
|
require_once WD . '/modules/bird/config/bird_control_plane_token_c.php';
|
|
require_once WD . '/modules/bird/config/bird_webhook_signing_key_c.php';
|
|
require_once WD . '/modules/bird/config/bird_webhook_public_url_c.php';
|
|
require_once WD . '/modules/bird/config/bird_webhook_replay_window_seconds_c.php';
|
|
require_once WD . '/modules/bird/config/bird_flow_enabled_c.php';
|
|
require_once WD . '/modules/bird/config/bird_flow_shared_secret_c.php';
|
|
require_once WD . '/modules/bird/config/bird_flow_policy_json_c.php';
|
|
require_once WD . '/modules/bird/config/bird_operations_actions_enabled_c.php';
|
|
require_once WD . '/modules/bird/config/bird_outbound_messages_enabled_c.php';
|
|
require_once WD . '/modules/bird/config/bird_template_policy_json_c.php';
|
|
require_once WD . '/modules/bird/config/bird_participantId_c.php';
|
|
|
|
use bird\config\bird_enabled_c;
|
|
use bird\config\bird_api_key_c;
|
|
use bird\config\bird_server_url_c;
|
|
use bird\config\bird_workplaceId_c;
|
|
use bird\config\bird_workspaceId_c;
|
|
use bird\config\bird_channelId_c;
|
|
use bird\config\bird_allowed_channel_ids_json_c;
|
|
use bird\config\bird_control_plane_enabled_c;
|
|
use bird\config\bird_control_plane_token_c;
|
|
use bird\config\bird_webhook_signing_key_c;
|
|
use bird\config\bird_webhook_public_url_c;
|
|
use bird\config\bird_webhook_replay_window_seconds_c;
|
|
use bird\config\bird_flow_enabled_c;
|
|
use bird\config\bird_flow_shared_secret_c;
|
|
use bird\config\bird_flow_policy_json_c;
|
|
use bird\config\bird_operations_actions_enabled_c;
|
|
use bird\config\bird_outbound_messages_enabled_c;
|
|
use bird\config\bird_template_policy_json_c;
|
|
use bird\config\bird_participantId_c;
|
|
use traits\module_config_t;
|
|
|
|
class bird_c
|
|
{
|
|
use module_config_t;
|
|
|
|
/**
|
|
* Whether the Bird module is enabled
|
|
* @var bird_enabled_c
|
|
*/
|
|
public bird_enabled_c $enabled;
|
|
|
|
/**
|
|
* API key/token for Bird API (secret)
|
|
* @var bird_api_key_c
|
|
*/
|
|
public bird_api_key_c $api_key;
|
|
|
|
/**
|
|
* Base server URL for Bird API
|
|
* @var bird_server_url_c
|
|
*/
|
|
public bird_server_url_c $server_url;
|
|
|
|
/**
|
|
* Default Bird workplace identifier
|
|
* @var bird_workplaceId_c
|
|
*/
|
|
public bird_workplaceId_c $workplaceId;
|
|
|
|
/**
|
|
* Canonical Bird workspace identifier.
|
|
* @var bird_workspaceId_c
|
|
*/
|
|
public bird_workspaceId_c $workspaceId;
|
|
|
|
/**
|
|
* Default Bird channel identifier
|
|
* @var bird_channelId_c
|
|
*/
|
|
public bird_channelId_c $channelId;
|
|
public bird_allowed_channel_ids_json_c $allowed_channel_ids_json;
|
|
|
|
public bird_control_plane_enabled_c $control_plane_enabled;
|
|
public bird_control_plane_token_c $control_plane_token;
|
|
public bird_webhook_signing_key_c $webhook_signing_key;
|
|
public bird_webhook_public_url_c $webhook_public_url;
|
|
public bird_webhook_replay_window_seconds_c $webhook_replay_window_seconds;
|
|
public bird_flow_enabled_c $flow_enabled;
|
|
public bird_flow_shared_secret_c $flow_shared_secret;
|
|
public bird_flow_policy_json_c $flow_policy_json;
|
|
public bird_operations_actions_enabled_c $operations_actions_enabled;
|
|
public bird_outbound_messages_enabled_c $outbound_messages_enabled;
|
|
public bird_template_policy_json_c $template_policy_json;
|
|
public bird_participantId_c $participantId;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->setupConfig('bird');
|
|
$this->allowUpdate([
|
|
bird_enabled_c::class,
|
|
bird_api_key_c::class,
|
|
bird_server_url_c::class,
|
|
bird_workplaceId_c::class,
|
|
bird_workspaceId_c::class,
|
|
bird_channelId_c::class,
|
|
bird_allowed_channel_ids_json_c::class,
|
|
bird_control_plane_enabled_c::class,
|
|
bird_control_plane_token_c::class,
|
|
bird_webhook_signing_key_c::class,
|
|
bird_webhook_public_url_c::class,
|
|
bird_webhook_replay_window_seconds_c::class,
|
|
bird_flow_enabled_c::class,
|
|
bird_flow_shared_secret_c::class,
|
|
bird_flow_policy_json_c::class,
|
|
bird_operations_actions_enabled_c::class,
|
|
bird_outbound_messages_enabled_c::class,
|
|
bird_template_policy_json_c::class,
|
|
bird_participantId_c::class,
|
|
]);
|
|
$this->enabled = new bird_enabled_c();
|
|
$this->api_key = new bird_api_key_c();
|
|
$this->server_url = new bird_server_url_c();
|
|
$this->workplaceId = new bird_workplaceId_c();
|
|
$this->workspaceId = new bird_workspaceId_c();
|
|
$this->channelId = new bird_channelId_c();
|
|
$this->allowed_channel_ids_json = new bird_allowed_channel_ids_json_c();
|
|
$this->control_plane_enabled = new bird_control_plane_enabled_c();
|
|
$this->control_plane_token = new bird_control_plane_token_c();
|
|
$this->webhook_signing_key = new bird_webhook_signing_key_c();
|
|
$this->webhook_public_url = new bird_webhook_public_url_c();
|
|
$this->webhook_replay_window_seconds = new bird_webhook_replay_window_seconds_c();
|
|
$this->flow_enabled = new bird_flow_enabled_c();
|
|
$this->flow_shared_secret = new bird_flow_shared_secret_c();
|
|
$this->flow_policy_json = new bird_flow_policy_json_c();
|
|
$this->operations_actions_enabled = new bird_operations_actions_enabled_c();
|
|
$this->outbound_messages_enabled = new bird_outbound_messages_enabled_c();
|
|
$this->template_policy_json = new bird_template_policy_json_c();
|
|
$this->participantId = new bird_participantId_c();
|
|
}
|
|
}
|