diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index e65f65cd52..902d50b0c7 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -31,6 +31,7 @@ use Appwrite\Utopia\Response\Model\AttributeIP; use Appwrite\Utopia\Response\Model\AttributeURL; use Appwrite\Utopia\Response\Model\AttributeDatetime; use Appwrite\Utopia\Response\Model\AttributeRelationship; +use Appwrite\Utopia\Response\Model\AuthProvider; use Appwrite\Utopia\Response\Model\BaseList; use Appwrite\Utopia\Response\Model\Collection; use Appwrite\Utopia\Response\Model\Database; @@ -205,8 +206,8 @@ class Response extends SwooleResponse public const MODEL_WEBHOOK_LIST = 'webhookList'; public const MODEL_KEY = 'key'; public const MODEL_KEY_LIST = 'keyList'; - public const MODEL_PROVIDER = 'provider'; - public const MODEL_PROVIDER_LIST = 'providerList'; + public const MODEL_AUTH_PROVIDER = 'authProvider'; + public const MODEL_AUTH_PROVIDER_LIST = 'authProviderList'; public const MODEL_PLATFORM = 'platform'; public const MODEL_PLATFORM_LIST = 'platformList'; public const MODEL_DOMAIN = 'domain'; @@ -277,7 +278,7 @@ class Response extends SwooleResponse ->setModel(new BaseList('Projects List', self::MODEL_PROJECT_LIST, 'projects', self::MODEL_PROJECT, true, false)) ->setModel(new BaseList('Webhooks List', self::MODEL_WEBHOOK_LIST, 'webhooks', self::MODEL_WEBHOOK, true, false)) ->setModel(new BaseList('API Keys List', self::MODEL_KEY_LIST, 'keys', self::MODEL_KEY, true, false)) - ->setModel(new BaseList('Providers List', self::MODEL_PROVIDER_LIST, 'platforms', self::MODEL_PROVIDER, true, false)) + ->setModel(new BaseList('Providers List', self::MODEL_AUTH_PROVIDER_LIST, 'platforms', self::MODEL_AUTH_PROVIDER, true, false)) ->setModel(new BaseList('Platforms List', self::MODEL_PLATFORM_LIST, 'platforms', self::MODEL_PLATFORM, true, false)) ->setModel(new BaseList('Domains List', self::MODEL_DOMAIN_LIST, 'domains', self::MODEL_DOMAIN, true, false)) ->setModel(new BaseList('Countries List', self::MODEL_COUNTRY_LIST, 'countries', self::MODEL_COUNTRY)) @@ -334,7 +335,7 @@ class Response extends SwooleResponse ->setModel(new Webhook()) ->setModel(new Key()) ->setModel(new Domain()) - ->setModel(new Provider()) + ->setModel(new AuthProvider()) ->setModel(new Platform()) ->setModel(new Variable()) ->setModel(new Country()) diff --git a/src/Appwrite/Utopia/Response/Model/Provider.php b/src/Appwrite/Utopia/Response/Model/AuthProvider.php similarity index 82% rename from src/Appwrite/Utopia/Response/Model/Provider.php rename to src/Appwrite/Utopia/Response/Model/AuthProvider.php index c589011a46..0171a3c152 100644 --- a/src/Appwrite/Utopia/Response/Model/Provider.php +++ b/src/Appwrite/Utopia/Response/Model/AuthProvider.php @@ -5,7 +5,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; -class Provider extends Model +class AuthProvider extends Model { /** * @var bool @@ -17,13 +17,13 @@ class Provider extends Model $this ->addRule('key', [ 'type' => self::TYPE_STRING, - 'description' => 'Provider.', + 'description' => 'Auth Provider.', 'default' => '', 'example' => 'github', ]) ->addRule('name', [ 'type' => self::TYPE_STRING, - 'description' => 'Provider name.', + 'description' => 'Auth Provider name.', 'default' => '', 'example' => 'GitHub', ]) @@ -41,7 +41,7 @@ class Provider extends Model ]) ->addRule('enabled', [ 'type' => self::TYPE_BOOLEAN, - 'description' => 'Provider is active and can be used to create session.', + 'description' => 'Auth Provider is active and can be used to create session.', 'example' => '', ]) ; @@ -54,7 +54,7 @@ class Provider extends Model */ public function getName(): string { - return 'Provider'; + return 'AuthProvider'; } /** @@ -64,6 +64,6 @@ class Provider extends Model */ public function getType(): string { - return Response::MODEL_PROVIDER; + return Response::MODEL_AUTH_PROVIDER; } } diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index 0fc334abc2..cebf951596 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -133,8 +133,8 @@ class Project extends Model 'example' => true, ]) ->addRule('providers', [ - 'type' => Response::MODEL_PROVIDER, - 'description' => 'List of Providers.', + 'type' => Response::MODEL_AUTH_PROVIDER, + 'description' => 'List of Auth Providers.', 'default' => [], 'example' => [new \stdClass()], 'array' => true,