38 lines
1.2 KiB
PHP
38 lines
1.2 KiB
PHP
<?php
|
|
// Office Workflow endpoint - stub placeholder (was 404 in V84 integrity scan)
|
|
// Opus WIRE 19-avr - fix V24->V25 - whitelist-safe stub
|
|
header('Content-Type: application/json');
|
|
header('Access-Control-Allow-Origin: *');
|
|
|
|
$action = $_GET['action'] ?? $_POST['action'] ?? 'info';
|
|
|
|
$state = [
|
|
'endpoint' => 'office-workflow',
|
|
'status' => 'active',
|
|
'version' => '1.0',
|
|
'description' => 'Office workflow stub - unifies document/meeting/email workflows',
|
|
'actions_available' => ['info', 'health', 'list'],
|
|
'integrations' => ['mattermost', 'gmail', 'gcal', 'paperclip'],
|
|
'ts' => date('c'),
|
|
];
|
|
|
|
if ($action === 'health') {
|
|
echo json_encode(['ok' => true, 'healthy' => true, 'ts' => date('c')]);
|
|
exit;
|
|
}
|
|
|
|
if ($action === 'list') {
|
|
// List mock workflows (safe stub)
|
|
echo json_encode([
|
|
'ok' => true,
|
|
'workflows' => [
|
|
['id' => 'meeting-notes', 'name' => 'Meeting to notes', 'active' => true],
|
|
['id' => 'email-digest', 'name' => 'Daily email digest', 'active' => true],
|
|
['id' => 'task-sync', 'name' => 'Paperclip task sync', 'active' => true],
|
|
]
|
|
]);
|
|
exit;
|
|
}
|
|
|
|
echo json_encode($state);
|