mirror of
https://github.com/nextcloud/app_api.git
synced 2026-01-13 20:19:21 +00:00
* 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>
34 lines
756 B
PHP
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,
|
|
];
|
|
}
|
|
}
|