From e7113a080d426bccde21fbb3fb493beb44b65924 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 4 Sep 2025 12:57:43 +0530 Subject: [PATCH] removed spaital type response and will be using the json type for the spatial responses --- src/Appwrite/GraphQL/Types/Mapper.php | 3 +-- src/Appwrite/Utopia/Response/Model.php | 1 - src/Appwrite/Utopia/Response/Model/AttributeLine.php | 2 +- src/Appwrite/Utopia/Response/Model/AttributePoint.php | 2 +- src/Appwrite/Utopia/Response/Model/AttributePolygon.php | 2 +- src/Appwrite/Utopia/Response/Model/ColumnLine.php | 2 +- src/Appwrite/Utopia/Response/Model/ColumnPoint.php | 2 +- src/Appwrite/Utopia/Response/Model/ColumnPolygon.php | 2 +- 8 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index 244a0c0ccb..214dbbb976 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -57,8 +57,7 @@ class Mapper 'datetime' => Type::string(), 'json' => Types::json(), 'none' => Types::json(), - 'any' => Types::json(), - 'spatial' => Types::json(), + 'any' => Types::json() ]; foreach ($defaults as $type => $default) { diff --git a/src/Appwrite/Utopia/Response/Model.php b/src/Appwrite/Utopia/Response/Model.php index f40c89f093..80c2c4d620 100644 --- a/src/Appwrite/Utopia/Response/Model.php +++ b/src/Appwrite/Utopia/Response/Model.php @@ -15,7 +15,6 @@ abstract class Model public const TYPE_DATETIME_EXAMPLE = '2020-10-15T06:38:00.000+00:00'; public const TYPE_RELATIONSHIP = 'relationship'; public const TYPE_PAYLOAD = 'payload'; - public const TYPE_SPATIAL = 'spatial'; /** * @var bool diff --git a/src/Appwrite/Utopia/Response/Model/AttributeLine.php b/src/Appwrite/Utopia/Response/Model/AttributeLine.php index a4d9c75672..d5eab30ca6 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeLine.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeLine.php @@ -12,7 +12,7 @@ class AttributeLine extends Attribute $this ->addRule('default', [ - 'type' => self::TYPE_SPATIAL, + 'type' => self::TYPE_JSON, 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', 'default' => null, 'required' => false, diff --git a/src/Appwrite/Utopia/Response/Model/AttributePoint.php b/src/Appwrite/Utopia/Response/Model/AttributePoint.php index 47b83cc58b..e44ecf96d0 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributePoint.php +++ b/src/Appwrite/Utopia/Response/Model/AttributePoint.php @@ -12,7 +12,7 @@ class AttributePoint extends Attribute $this ->addRule('default', [ - 'type' => self::TYPE_SPATIAL, + 'type' => self::TYPE_JSON, 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', 'default' => null, 'required' => false, diff --git a/src/Appwrite/Utopia/Response/Model/AttributePolygon.php b/src/Appwrite/Utopia/Response/Model/AttributePolygon.php index 8ef7f4ab73..32708f6470 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributePolygon.php +++ b/src/Appwrite/Utopia/Response/Model/AttributePolygon.php @@ -12,7 +12,7 @@ class AttributePolygon extends Attribute $this ->addRule('default', [ - 'type' => self::TYPE_SPATIAL, + 'type' => self::TYPE_JSON, 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', 'default' => null, 'required' => false, diff --git a/src/Appwrite/Utopia/Response/Model/ColumnLine.php b/src/Appwrite/Utopia/Response/Model/ColumnLine.php index 01a6c6fe02..951e787086 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnLine.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnLine.php @@ -12,7 +12,7 @@ class ColumnLine extends Column $this ->addRule('default', [ - 'type' => self::TYPE_SPATIAL, + 'type' => self::TYPE_JSON, 'description' => 'Default value for column when not provided. Cannot be set when column is required.', 'default' => null, 'required' => false, diff --git a/src/Appwrite/Utopia/Response/Model/ColumnPoint.php b/src/Appwrite/Utopia/Response/Model/ColumnPoint.php index 6ec5229011..2e548976aa 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnPoint.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnPoint.php @@ -12,7 +12,7 @@ class ColumnPoint extends Column $this ->addRule('default', [ - 'type' => self::TYPE_SPATIAL, + 'type' => self::TYPE_JSON, 'description' => 'Default value for column when not provided. Cannot be set when column is required.', 'default' => null, 'required' => false, diff --git a/src/Appwrite/Utopia/Response/Model/ColumnPolygon.php b/src/Appwrite/Utopia/Response/Model/ColumnPolygon.php index 6a9a14d548..1efcd1199e 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnPolygon.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnPolygon.php @@ -12,7 +12,7 @@ class ColumnPolygon extends Column $this ->addRule('default', [ - 'type' => self::TYPE_SPATIAL, + 'type' => self::TYPE_JSON, 'description' => 'Default value for column when not provided. Cannot be set when column is required.', 'default' => null, 'required' => false,