appwrite/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php

131 lines
4.7 KiB
PHP
Raw Normal View History

2023-03-31 15:14:59 +00:00
<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class ConsoleVariables extends Model
{
public function __construct()
{
$this
2025-08-05 11:44:06 +00:00
->addRule('_APP_DOMAIN_TARGET_CNAME', [
'type' => self::TYPE_STRING,
'description' => 'CNAME target for your Appwrite custom domains.',
'default' => '',
'example' => 'appwrite.io',
])
->addRule('_APP_DOMAIN_TARGET_A', [
'type' => self::TYPE_STRING,
'description' => 'A target for your Appwrite custom domains.',
'default' => '',
'example' => '127.0.0.1',
])
->addRule('_APP_COMPUTE_BUILD_TIMEOUT', [
'type' => self::TYPE_INTEGER,
'description' => 'Maximum build timeout in seconds.',
'default' => '',
'example' => 900,
])
2025-08-05 11:44:06 +00:00
->addRule('_APP_DOMAIN_TARGET_AAAA', [
'type' => self::TYPE_STRING,
'description' => 'AAAA target for your Appwrite custom domains.',
'default' => '',
'example' => '::1',
])
->addRule('_APP_DOMAIN_TARGET_CAA', [
'type' => self::TYPE_STRING,
'description' => 'CAA target for your Appwrite custom domains.',
'default' => '',
'example' => 'digicert.com',
])
2023-03-31 15:14:59 +00:00
->addRule('_APP_STORAGE_LIMIT', [
'type' => self::TYPE_INTEGER,
'description' => 'Maximum file size allowed for file upload in bytes.',
'default' => '',
2023-03-31 20:48:34 +00:00
'example' => '30000000',
2023-03-31 15:14:59 +00:00
])
->addRule('_APP_COMPUTE_SIZE_LIMIT', [
2023-03-31 15:14:59 +00:00
'type' => self::TYPE_INTEGER,
'description' => 'Maximum file size allowed for deployment in bytes.',
'default' => '',
2023-03-31 20:48:34 +00:00
'example' => '30000000',
2023-03-31 15:14:59 +00:00
])
->addRule('_APP_USAGE_STATS', [
'type' => self::TYPE_STRING,
'description' => 'Defines if usage stats are enabled. This value is set to \'enabled\' by default, to disable the usage stats set the value to \'disabled\'.',
'default' => '',
2023-03-31 20:48:34 +00:00
'example' => 'enabled',
2023-08-20 08:10:42 +00:00
])
->addRule('_APP_VCS_ENABLED', [
'type' => self::TYPE_BOOLEAN,
'description' => 'Defines if VCS (Version Control System) is enabled.',
'default' => false,
'example' => true,
])
2023-08-28 14:08:50 +00:00
->addRule('_APP_DOMAIN_ENABLED', [
'type' => self::TYPE_BOOLEAN,
'description' => 'Defines if main domain is configured. If so, custom domains can be created.',
'default' => false,
'example' => true,
])
2023-08-20 08:10:42 +00:00
->addRule('_APP_ASSISTANT_ENABLED', [
'type' => self::TYPE_BOOLEAN,
'description' => 'Defines if AI assistant is enabled.',
'default' => false,
'example' => true,
])
->addRule('_APP_DOMAIN_SITES', [
'type' => self::TYPE_STRING,
2026-02-04 05:04:48 +00:00
'description' => 'A comma separated list of domains to use for site URLs.',
'default' => '',
2026-02-04 05:04:48 +00:00
'example' => 'sites.localhost,sites.example.com',
2025-03-28 10:38:45 +00:00
])
->addRule('_APP_DOMAIN_FUNCTIONS', [
'type' => self::TYPE_STRING,
'description' => 'A domain to use for function URLs.',
'default' => '',
'example' => 'functions.localhost',
])
->addRule(
'_APP_OPTIONS_FORCE_HTTPS',
[
'type' => self::TYPE_STRING,
'description' => 'Defines if HTTPS is enforced for all requests.',
'default' => '',
'example' => 'enabled',
]
2025-02-22 17:32:10 +00:00
)
->addRule(
'_APP_DOMAINS_NAMESERVERS',
[
'type' => self::TYPE_STRING,
'description' => 'Comma-separated list of nameservers.',
'default' => '',
'example' => 'ns1.example.com,ns2.example.com',
]
);
2023-03-31 15:14:59 +00:00
}
/**
* Get Name
*
* @return string
*/
public function getName(): string
{
return 'Console Variables';
}
/**
* Get Type
*
* @return string
*/
public function getType(): string
{
return Response::MODEL_CONSOLE_VARIABLES;
}
}