feat: rename tags response model to deployment
This commit is contained in:
parent
939a11d701
commit
8307c8d432
|
@ -149,7 +149,7 @@ return [
|
|||
],
|
||||
'functions.deployments.create' => [
|
||||
'description' => 'This event triggers when a function delpoyment is created.',
|
||||
'model' => Response::MODEL_TAG,
|
||||
'model' => Response::MODEL_DEPLOYMENT,
|
||||
'note' => 'version >= 0.7',
|
||||
],
|
||||
'functions.deployments.update' => [
|
||||
|
|
|
@ -51,7 +51,7 @@ use Appwrite\Utopia\Response\Model\Phone;
|
|||
use Appwrite\Utopia\Response\Model\Platform;
|
||||
use Appwrite\Utopia\Response\Model\Project;
|
||||
use Appwrite\Utopia\Response\Model\Rule;
|
||||
use Appwrite\Utopia\Response\Model\Tag;
|
||||
use Appwrite\Utopia\Response\Model\Deployment;
|
||||
use Appwrite\Utopia\Response\Model\Token;
|
||||
use Appwrite\Utopia\Response\Model\Webhook;
|
||||
use Appwrite\Utopia\Response\Model\Preferences;
|
||||
|
@ -151,8 +151,8 @@ class Response extends SwooleResponse
|
|||
const MODEL_FUNCTION_LIST = 'functionList';
|
||||
const MODEL_RUNTIME = 'runtime';
|
||||
const MODEL_RUNTIME_LIST = 'runtimeList';
|
||||
const MODEL_TAG = 'tag';
|
||||
const MODEL_TAG_LIST = 'tagList';
|
||||
const MODEL_DEPLOYMENT = 'deployment';
|
||||
const MODEL_DEPLOYMENT_LIST = 'deploymentList';
|
||||
const MODEL_EXECUTION = 'execution';
|
||||
const MODEL_SYNC_EXECUTION = 'syncExecution';
|
||||
const MODEL_EXECUTION_LIST = 'executionList';
|
||||
|
@ -222,7 +222,7 @@ class Response extends SwooleResponse
|
|||
->setModel(new BaseList('Memberships List', self::MODEL_MEMBERSHIP_LIST, 'memberships', self::MODEL_MEMBERSHIP))
|
||||
->setModel(new BaseList('Functions List', self::MODEL_FUNCTION_LIST, 'functions', self::MODEL_FUNCTION))
|
||||
->setModel(new BaseList('Runtimes List', self::MODEL_RUNTIME_LIST, 'runtimes', self::MODEL_RUNTIME))
|
||||
->setModel(new BaseList('Tags List', self::MODEL_TAG_LIST, 'tags', self::MODEL_TAG))
|
||||
->setModel(new BaseList('Deployments List', self::MODEL_DEPLOYMENT_LIST, 'deployments', self::MODEL_DEPLOYMENT_LIST))
|
||||
->setModel(new BaseList('Executions List', self::MODEL_EXECUTION_LIST, 'executions', self::MODEL_EXECUTION))
|
||||
->setModel(new BaseList('Builds List', self::MODEL_BUILD_LIST, 'builds', self::MODEL_BUILD))
|
||||
->setModel(new BaseList('Projects List', self::MODEL_PROJECT_LIST, 'projects', self::MODEL_PROJECT, true, false))
|
||||
|
@ -262,7 +262,7 @@ class Response extends SwooleResponse
|
|||
->setModel(new Membership())
|
||||
->setModel(new Func())
|
||||
->setModel(new Runtime())
|
||||
->setModel(new Tag())
|
||||
->setModel(new Deployment())
|
||||
->setModel(new Execution())
|
||||
->setModel(new SyncExecution())
|
||||
->setModel(new Build())
|
||||
|
|
|
@ -5,14 +5,14 @@ namespace Appwrite\Utopia\Response\Model;
|
|||
use Appwrite\Utopia\Response;
|
||||
use Appwrite\Utopia\Response\Model;
|
||||
|
||||
class Tag extends Model
|
||||
class Deployment extends Model
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->addRule('$id', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Tag ID.',
|
||||
'description' => 'Deployment ID.',
|
||||
'default' => '',
|
||||
'example' => '5e5ea5c16897e',
|
||||
])
|
||||
|
@ -24,13 +24,13 @@ class Tag extends Model
|
|||
])
|
||||
->addRule('dateCreated', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'The tag creation date in Unix timestamp.',
|
||||
'description' => 'The deployment creation date in Unix timestamp.',
|
||||
'default' => 0,
|
||||
'example' => 1592981250,
|
||||
])
|
||||
->addRule('entrypoint', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'The entrypoint file to use to execute the tag code.',
|
||||
'description' => 'The entrypoint file to use to execute the delpoyment code.',
|
||||
'default' => '',
|
||||
'example' => 'enabled',
|
||||
])
|
||||
|
@ -41,13 +41,13 @@ class Tag extends Model
|
|||
'example' => 128,
|
||||
])
|
||||
// Build Status
|
||||
// Failed - The tag build has failed. More details can usually be found in buildStderr
|
||||
// Ready - The tag build was successful and the tag is ready to be deployed
|
||||
// Processing - The tag is currently waiting to have a build triggered
|
||||
// Building - The tag is currently being built
|
||||
// Failed - The deployment build has failed. More details can usually be found in buildStderr
|
||||
// Ready - The deployment build was successful and the deployment is ready to be deployed
|
||||
// Processing - The deployment is currently waiting to have a build triggered
|
||||
// Building - The deployment is currently being built
|
||||
->addRule('status', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'The tags current built status',
|
||||
'description' => 'The deployment\'s current built status',
|
||||
'default' => '',
|
||||
'example' => 'ready',
|
||||
])
|
||||
|
@ -71,7 +71,7 @@ class Tag extends Model
|
|||
])
|
||||
->addRule('deploy', [
|
||||
'type' => self::TYPE_BOOLEAN,
|
||||
'description' => 'Whether the tag should be automatically deployed.',
|
||||
'description' => 'Whether the deployment should be automatically deployed.',
|
||||
'default' => false,
|
||||
'example' => true,
|
||||
])
|
||||
|
@ -85,7 +85,7 @@ class Tag extends Model
|
|||
*/
|
||||
public function getName():string
|
||||
{
|
||||
return 'Tag';
|
||||
return 'Deployment';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -95,6 +95,6 @@ class Tag extends Model
|
|||
*/
|
||||
public function getType():string
|
||||
{
|
||||
return Response::MODEL_TAG;
|
||||
return Response::MODEL_DEPLOYMENT;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue