appwrite/src/Appwrite/Platform/Modules/Sites/Services/Http.php

84 lines
4.4 KiB
PHP
Raw Normal View History

2024-10-22 15:01:38 +00:00
<?php
namespace Appwrite\Platform\Modules\Sites\Services;
2025-02-05 10:30:19 +00:00
use Appwrite\Platform\Modules\Sites\Http\Deployments\Builds\Create as CreateBuild;
2025-02-05 11:28:52 +00:00
use Appwrite\Platform\Modules\Sites\Http\Deployments\Builds\Update as UpdateBuild;
2025-02-05 10:30:19 +00:00
use Appwrite\Platform\Modules\Sites\Http\Deployments\Create as CreateDeployment;
use Appwrite\Platform\Modules\Sites\Http\Deployments\Delete as DeleteDeployment;
use Appwrite\Platform\Modules\Sites\Http\Deployments\Download\Get as DownloadDeployment;
use Appwrite\Platform\Modules\Sites\Http\Deployments\Get as GetDeployment;
use Appwrite\Platform\Modules\Sites\Http\Deployments\Template\Create as CreateTemplateDeployment;
use Appwrite\Platform\Modules\Sites\Http\Deployments\Vcs\Create as CreateVcsDeployment;
2025-02-05 11:28:52 +00:00
use Appwrite\Platform\Modules\Sites\Http\Deployments\XList as ListDeployments;
use Appwrite\Platform\Modules\Sites\Http\Frameworks\XList as ListFrameworks;
2025-02-05 10:30:19 +00:00
use Appwrite\Platform\Modules\Sites\Http\Logs\Delete as DeleteLog;
use Appwrite\Platform\Modules\Sites\Http\Logs\Get as GetLog;
use Appwrite\Platform\Modules\Sites\Http\Logs\XList as ListLogs;
use Appwrite\Platform\Modules\Sites\Http\Sites\Create as CreateSite;
use Appwrite\Platform\Modules\Sites\Http\Sites\Delete as DeleteSite;
2025-03-04 15:04:37 +00:00
use Appwrite\Platform\Modules\Sites\Http\Sites\Deployment\Update as UpdateSiteDeployment;
2025-02-05 10:30:19 +00:00
use Appwrite\Platform\Modules\Sites\Http\Sites\Get as GetSite;
use Appwrite\Platform\Modules\Sites\Http\Sites\Update as UpdateSite;
2025-02-05 11:28:52 +00:00
use Appwrite\Platform\Modules\Sites\Http\Sites\XList as ListSites;
2025-02-05 10:30:19 +00:00
use Appwrite\Platform\Modules\Sites\Http\Templates\Get as GetTemplate;
use Appwrite\Platform\Modules\Sites\Http\Templates\XList as ListTemplates;
2025-02-05 11:28:52 +00:00
use Appwrite\Platform\Modules\Sites\Http\Usage\Get as GetUsage;
use Appwrite\Platform\Modules\Sites\Http\Usage\XList as ListUsage;
2025-02-05 10:30:19 +00:00
use Appwrite\Platform\Modules\Sites\Http\Variables\Create as CreateVariable;
use Appwrite\Platform\Modules\Sites\Http\Variables\Delete as DeleteVariable;
use Appwrite\Platform\Modules\Sites\Http\Variables\Get as GetVariable;
use Appwrite\Platform\Modules\Sites\Http\Variables\Update as UpdateVariable;
2025-02-05 11:28:52 +00:00
use Appwrite\Platform\Modules\Sites\Http\Variables\XList as ListVariables;
2024-10-22 15:01:38 +00:00
use Utopia\Platform\Service;
class Http extends Service
{
public function __construct()
{
$this->type = Service::TYPE_HTTP;
// Sites
2024-10-22 15:01:38 +00:00
$this->addAction(CreateSite::getName(), new CreateSite());
$this->addAction(GetSite::getName(), new GetSite());
$this->addAction(ListSites::getName(), new ListSites());
$this->addAction(UpdateSite::getName(), new UpdateSite());
2024-10-24 08:49:43 +00:00
$this->addAction(DeleteSite::getName(), new DeleteSite());
// Frameworks
$this->addAction(ListFrameworks::getName(), new ListFrameworks());
// Deployments
2024-10-22 17:45:49 +00:00
$this->addAction(CreateDeployment::getName(), new CreateDeployment());
$this->addAction(CreateTemplateDeployment::getName(), new CreateTemplateDeployment());
$this->addAction(CreateVcsDeployment::getName(), new CreateVcsDeployment());
2024-10-23 15:07:28 +00:00
$this->addAction(GetDeployment::getName(), new GetDeployment());
$this->addAction(ListDeployments::getName(), new ListDeployments());
2025-03-04 15:04:37 +00:00
$this->addAction(UpdateSiteDeployment::getName(), new UpdateSiteDeployment());
2024-10-23 15:07:28 +00:00
$this->addAction(DeleteDeployment::getName(), new DeleteDeployment());
$this->addAction(DownloadDeployment::getName(), new DownloadDeployment());
2025-02-03 11:38:27 +00:00
$this->addAction(CreateBuild::getName(), new CreateBuild());
2025-02-05 10:30:19 +00:00
$this->addAction(UpdateBuild::getName(), new UpdateBuild());
2024-11-29 12:57:51 +00:00
// Logs
$this->addAction(GetLog::getName(), new GetLog());
$this->addAction(ListLogs::getName(), new ListLogs());
$this->addAction(DeleteLog::getName(), new DeleteLog());
// Variables
2024-10-24 08:49:43 +00:00
$this->addAction(CreateVariable::getName(), new CreateVariable());
$this->addAction(GetVariable::getName(), new GetVariable());
$this->addAction(ListVariables::getName(), new ListVariables());
$this->addAction(UpdateVariable::getName(), new UpdateVariable());
$this->addAction(DeleteVariable::getName(), new DeleteVariable());
2024-10-25 12:55:09 +00:00
// Templates
2024-10-24 13:21:40 +00:00
$this->addAction(ListTemplates::getName(), new ListTemplates());
2024-10-25 12:55:09 +00:00
$this->addAction(GetTemplate::getName(), new GetTemplate());
// Usage
2025-02-05 10:30:19 +00:00
$this->addAction(ListUsage::getName(), new ListUsage());
$this->addAction(GetUsage::getName(), new GetUsage());
2024-10-22 15:01:38 +00:00
}
}