Files
nextcloud-app-api/lib/Capabilities.php
Alexander Piskun 7ad5541eae removed "optional API Scope" support (#220)
* added URL encoding for Docker Container Pull action
* added two logs with `info` level for PullImage action
* removed "optional API Scope" support
* added AppAPI options toggles in Admin settings
* added RestartPolicy option to created containers

CI fails unrelated:
https://github.com/pytest-dev/pytest-asyncio/issues/737

---------

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Co-authored-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Nextcloud bot <bot@nextcloud.com>
Co-authored-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2024-02-01 21:58:00 +03:00

34 lines
756 B
PHP

<?php
declare(strict_types=1);
namespace OCA\AppAPI;
use OCA\AppAPI\AppInfo\Application;
use OCA\AppAPI\Service\ProvidersAI\TextProcessingService;
use OCP\App\IAppManager;
use OCP\Capabilities\ICapability;
use OCP\IConfig;
class Capabilities implements ICapability {
public function __construct(
private readonly IConfig $config,
private readonly IAppManager $appManager,
) {
}
public function getCapabilities(): array {
$capabilities = [
'loglevel' => intval($this->config->getSystemValue('loglevel', 2)),
'version' => $this->appManager->getAppVersion(Application::APP_ID),
'text_processing' => [
'task_types' => array_keys(TextProcessingService::TASK_TYPES),
]
];
return [
'app_api' => $capabilities,
];
}
}