From 043ca48f91e594017e55ec1548dacf0b4d2e462d Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 1 Sep 2025 11:27:57 +0530 Subject: [PATCH] updated response model and docs --- docs/references/databases/update-line-attribute.md | 1 + docs/references/databases/update-point-attribute.md | 1 + docs/references/databases/update-polygon-attribute.md | 1 + docs/references/tablesdb/create-line-column.md | 1 + docs/references/tablesdb/create-point-column.md | 1 + docs/references/tablesdb/create-polygon-column.md | 1 + docs/references/tablesdb/update-line-column.md | 1 + docs/references/tablesdb/update-point-column.md | 1 + docs/references/tablesdb/update-polygon-column.md | 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 +- 15 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 docs/references/databases/update-line-attribute.md create mode 100644 docs/references/databases/update-point-attribute.md create mode 100644 docs/references/databases/update-polygon-attribute.md create mode 100644 docs/references/tablesdb/create-line-column.md create mode 100644 docs/references/tablesdb/create-point-column.md create mode 100644 docs/references/tablesdb/create-polygon-column.md create mode 100644 docs/references/tablesdb/update-line-column.md create mode 100644 docs/references/tablesdb/update-point-column.md create mode 100644 docs/references/tablesdb/update-polygon-column.md diff --git a/docs/references/databases/update-line-attribute.md b/docs/references/databases/update-line-attribute.md new file mode 100644 index 0000000000..b55d31c5f6 --- /dev/null +++ b/docs/references/databases/update-line-attribute.md @@ -0,0 +1 @@ +Update a line attribute. Changing the `default` value will not update already existing documents. \ No newline at end of file diff --git a/docs/references/databases/update-point-attribute.md b/docs/references/databases/update-point-attribute.md new file mode 100644 index 0000000000..f40d18c6e5 --- /dev/null +++ b/docs/references/databases/update-point-attribute.md @@ -0,0 +1 @@ +Update a point attribute. Changing the `default` value will not update already existing documents. \ No newline at end of file diff --git a/docs/references/databases/update-polygon-attribute.md b/docs/references/databases/update-polygon-attribute.md new file mode 100644 index 0000000000..0d9718e41e --- /dev/null +++ b/docs/references/databases/update-polygon-attribute.md @@ -0,0 +1 @@ +Update a polygon attribute. Changing the `default` value will not update already existing documents. \ No newline at end of file diff --git a/docs/references/tablesdb/create-line-column.md b/docs/references/tablesdb/create-line-column.md new file mode 100644 index 0000000000..96f1509936 --- /dev/null +++ b/docs/references/tablesdb/create-line-column.md @@ -0,0 +1 @@ +Create a geometric line attribute. \ No newline at end of file diff --git a/docs/references/tablesdb/create-point-column.md b/docs/references/tablesdb/create-point-column.md new file mode 100644 index 0000000000..dd92ffc98e --- /dev/null +++ b/docs/references/tablesdb/create-point-column.md @@ -0,0 +1 @@ +Create a geometric point attribute. \ No newline at end of file diff --git a/docs/references/tablesdb/create-polygon-column.md b/docs/references/tablesdb/create-polygon-column.md new file mode 100644 index 0000000000..7cb3985ff7 --- /dev/null +++ b/docs/references/tablesdb/create-polygon-column.md @@ -0,0 +1 @@ +Create a geometric polygon attribute. \ No newline at end of file diff --git a/docs/references/tablesdb/update-line-column.md b/docs/references/tablesdb/update-line-column.md new file mode 100644 index 0000000000..1cd3b53d07 --- /dev/null +++ b/docs/references/tablesdb/update-line-column.md @@ -0,0 +1 @@ +Update a line column. Changing the `default` value will not update already existing documents. \ No newline at end of file diff --git a/docs/references/tablesdb/update-point-column.md b/docs/references/tablesdb/update-point-column.md new file mode 100644 index 0000000000..251e6de260 --- /dev/null +++ b/docs/references/tablesdb/update-point-column.md @@ -0,0 +1 @@ +Update a point column. Changing the `default` value will not update already existing documents. \ No newline at end of file diff --git a/docs/references/tablesdb/update-polygon-column.md b/docs/references/tablesdb/update-polygon-column.md new file mode 100644 index 0000000000..fc46a223cf --- /dev/null +++ b/docs/references/tablesdb/update-polygon-column.md @@ -0,0 +1 @@ +Update a polygon column. Changing the `default` value will not update already existing documents. \ No newline at end of file diff --git a/src/Appwrite/Utopia/Response/Model/AttributeLine.php b/src/Appwrite/Utopia/Response/Model/AttributeLine.php index dce5b61978..ceebfc067d 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeLine.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeLine.php @@ -18,7 +18,7 @@ class AttributeLine extends Attribute 'example' => 'route', ]) ->addRule('type', [ - 'type' => self::TYPE_JSON, + 'type' => self::TYPE_STRING, 'description' => 'Attribute type.', 'default' => '', 'example' => 'linestring', diff --git a/src/Appwrite/Utopia/Response/Model/AttributePoint.php b/src/Appwrite/Utopia/Response/Model/AttributePoint.php index a79a1e7006..f93e5a8954 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributePoint.php +++ b/src/Appwrite/Utopia/Response/Model/AttributePoint.php @@ -18,7 +18,7 @@ class AttributePoint extends Attribute 'example' => 'location', ]) ->addRule('type', [ - 'type' => self::TYPE_JSON, + 'type' => self::TYPE_STRING, 'description' => 'Attribute type.', 'default' => '', 'example' => 'point', diff --git a/src/Appwrite/Utopia/Response/Model/AttributePolygon.php b/src/Appwrite/Utopia/Response/Model/AttributePolygon.php index e4ed3e93f9..46e95e954e 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributePolygon.php +++ b/src/Appwrite/Utopia/Response/Model/AttributePolygon.php @@ -18,7 +18,7 @@ class AttributePolygon extends Attribute 'example' => 'boundary', ]) ->addRule('type', [ - 'type' => self::TYPE_JSON, + 'type' => self::TYPE_STRING, 'description' => 'Attribute type.', 'default' => '', 'example' => 'polygon', diff --git a/src/Appwrite/Utopia/Response/Model/ColumnLine.php b/src/Appwrite/Utopia/Response/Model/ColumnLine.php index 2737924545..1e2c4d9bde 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnLine.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnLine.php @@ -18,7 +18,7 @@ class ColumnLine extends Column 'example' => 'route', ]) ->addRule('type', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_JSON, 'description' => 'Column type.', 'default' => '', 'example' => 'linestring', diff --git a/src/Appwrite/Utopia/Response/Model/ColumnPoint.php b/src/Appwrite/Utopia/Response/Model/ColumnPoint.php index d1803e3cae..29d39e5678 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnPoint.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnPoint.php @@ -24,7 +24,7 @@ class ColumnPoint extends Column 'example' => 'point', ]) ->addRule('default', [ - 'type' => self::TYPE_STRING, + '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 487f98b695..e68baa65ad 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnPolygon.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnPolygon.php @@ -24,7 +24,7 @@ class ColumnPolygon extends Column 'example' => 'polygon', ]) ->addRule('default', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_JSON, 'description' => 'Default value for column when not provided. Cannot be set when column is required.', 'default' => null, 'required' => false,