diff --git a/app/config/platforms.php b/app/config/platforms.php index 7623bb896e..8a33144b2f 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -11,7 +11,7 @@ return [ [ 'key' => 'web', 'name' => 'Web', - 'version' => '20.0.0', + 'version' => '20.1.0', 'url' => 'https://github.com/appwrite/sdk-for-web', 'package' => 'https://www.npmjs.com/package/appwrite', 'enabled' => true, @@ -60,7 +60,7 @@ return [ [ 'key' => 'flutter', 'name' => 'Flutter', - 'version' => '19.0.0', + 'version' => '19.1.0', 'url' => 'https://github.com/appwrite/sdk-for-flutter', 'package' => 'https://pub.dev/packages/appwrite', 'enabled' => true, @@ -79,7 +79,7 @@ return [ [ 'key' => 'apple', 'name' => 'Apple', - 'version' => '12.0.0', + 'version' => '12.1.0', 'url' => 'https://github.com/appwrite/sdk-for-apple', 'package' => 'https://github.com/appwrite/sdk-for-apple', 'enabled' => true, @@ -116,7 +116,7 @@ return [ [ 'key' => 'android', 'name' => 'Android', - 'version' => '10.0.0', + 'version' => '10.1.0', 'url' => 'https://github.com/appwrite/sdk-for-android', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', 'enabled' => true, @@ -139,7 +139,7 @@ return [ [ 'key' => 'react-native', 'name' => 'React Native', - 'version' => '0.13.0', + 'version' => '0.14.0', 'url' => 'https://github.com/appwrite/sdk-for-react-native', 'package' => 'https://npmjs.com/package/react-native-appwrite', 'enabled' => true, @@ -226,7 +226,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '9.1.0', + 'version' => '10.0.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, @@ -262,7 +262,7 @@ return [ [ 'key' => 'nodejs', 'name' => 'Node.js', - 'version' => '19.0.0', + 'version' => '19.1.0', 'url' => 'https://github.com/appwrite/sdk-for-node', 'package' => 'https://www.npmjs.com/package/node-appwrite', 'enabled' => true, @@ -281,7 +281,7 @@ return [ [ 'key' => 'php', 'name' => 'PHP', - 'version' => '17.0.0', + 'version' => '17.1.0', 'url' => 'https://github.com/appwrite/sdk-for-php', 'package' => 'https://packagist.org/packages/appwrite/appwrite', 'enabled' => true, @@ -300,7 +300,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '13.0.0', + 'version' => '13.1.0', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, @@ -319,7 +319,7 @@ return [ [ 'key' => 'ruby', 'name' => 'Ruby', - 'version' => '18.0.0', + 'version' => '18.1.0', 'url' => 'https://github.com/appwrite/sdk-for-ruby', 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, @@ -338,7 +338,7 @@ return [ [ 'key' => 'go', 'name' => 'Go', - 'version' => '0.11.0', + 'version' => '0.12.0', 'url' => 'https://github.com/appwrite/sdk-for-go', 'package' => 'https://github.com/appwrite/sdk-for-go', 'enabled' => true, @@ -357,7 +357,7 @@ return [ [ 'key' => 'dotnet', 'name' => '.NET', - 'version' => '0.17.0', + 'version' => '0.18.0', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => 'https://www.nuget.org/packages/Appwrite', 'enabled' => true, @@ -376,7 +376,7 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '18.0.0', + 'version' => '18.1.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, @@ -395,7 +395,7 @@ return [ [ 'key' => 'kotlin', 'name' => 'Kotlin', - 'version' => '11.0.0', + 'version' => '11.1.0', 'url' => 'https://github.com/appwrite/sdk-for-kotlin', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin', 'enabled' => true, @@ -418,7 +418,7 @@ return [ [ 'key' => 'swift', 'name' => 'Swift', - 'version' => '12.0.0', + 'version' => '12.1.0', 'url' => 'https://github.com/appwrite/sdk-for-swift', 'package' => 'https://github.com/appwrite/sdk-for-swift', 'enabled' => true, diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index d226fcc4e1..d57b9f83b2 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -11393,12 +11393,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -11412,7 +11423,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 02d97fffc7..bdff664cbc 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -25153,7 +25153,7 @@ "properties": { "type": { "type": "string", - "description": "Platform type.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", @@ -46223,7 +46223,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -46461,7 +46465,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46549,7 +46561,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46639,7 +46659,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46729,7 +46757,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46802,7 +46838,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46882,7 +46926,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46972,7 +47024,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47052,7 +47112,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47132,7 +47200,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47212,7 +47288,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47320,7 +47404,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47399,7 +47491,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47490,7 +47590,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47806,7 +47914,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -47894,7 +48010,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -47984,7 +48108,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48074,7 +48206,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48147,7 +48287,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48227,7 +48375,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48317,7 +48473,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48397,7 +48561,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48477,7 +48649,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48557,7 +48737,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48665,7 +48853,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48744,7 +48940,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48835,7 +49039,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48965,7 +49177,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -52191,7 +52410,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -52219,11 +52445,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -52249,6 +52470,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -52276,12 +52502,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -52305,12 +52531,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -52356,12 +52582,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -52375,7 +52612,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, @@ -53311,8 +53548,25 @@ }, "type": { "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", + "x-example": "web", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", + "android", + "unity", + "react-native-ios", + "react-native-android" + ] }, "key": { "type": "string", @@ -53327,7 +53581,7 @@ "hostname": { "type": "string", "description": "Web app hostname. Empty string for other platforms.", - "x-example": true + "x-example": "app.example.com" }, "httpUser": { "type": "string", @@ -53360,7 +53614,7 @@ "type": "web", "key": "com.company.appname", "store": "", - "hostname": true, + "hostname": "app.example.com", "httpUser": "username", "httpPass": "password" } @@ -53613,8 +53867,13 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -53661,8 +53920,13 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "description": "Service status. Possible values are: `pass`, `fail`", + "x-example": "pass", + "enum": [ + "pass", + "fail" + ], + "x-enum-name": "HealthCheckStatus" } }, "required": [ @@ -55827,7 +56091,11 @@ "deploymentResourceType": { "type": "string", "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function" + "x-example": "function", + "enum": [ + "function", + "site" + ] }, "deploymentResourceId": { "type": "string", @@ -55837,12 +56105,18 @@ "deploymentVcsProviderBranch": { "type": "string", "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "function" + "x-example": "main" }, "status": { "type": "string", "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] }, "logs": { "type": "string", @@ -55884,7 +56158,7 @@ "deploymentId": "n3u9feiwmf", "deploymentResourceType": "function", "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "function", + "deploymentVcsProviderBranch": "main", "status": "verified", "logs": "HTTP challegne failed.", "renewAt": "datetime" @@ -56391,7 +56665,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 09d53dbdf0..6b766dbdee 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -35093,7 +35093,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -35331,7 +35335,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35419,7 +35431,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35509,7 +35529,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35599,7 +35627,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35672,7 +35708,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35752,7 +35796,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35842,7 +35894,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35922,7 +35982,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36002,7 +36070,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36082,7 +36158,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36190,7 +36274,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36269,7 +36361,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36360,7 +36460,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36676,7 +36784,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36764,7 +36880,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36854,7 +36978,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36944,7 +37076,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37017,7 +37157,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37097,7 +37245,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37187,7 +37343,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37267,7 +37431,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37347,7 +37519,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37427,7 +37607,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37535,7 +37723,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37614,7 +37810,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37705,7 +37909,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37835,7 +38047,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -40272,7 +40491,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -40300,11 +40526,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -40330,6 +40551,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -40357,12 +40583,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -40386,12 +40612,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -40437,12 +40663,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -40456,7 +40693,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, @@ -40810,8 +41047,13 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -40858,8 +41100,13 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "description": "Service status. Possible values are: `pass`, `fail`", + "x-example": "pass", + "enum": [ + "pass", + "fail" + ], + "x-enum-name": "HealthCheckStatus" } }, "required": [ @@ -41324,7 +41571,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index d226fcc4e1..d57b9f83b2 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -11393,12 +11393,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -11412,7 +11423,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 02d97fffc7..bdff664cbc 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -25153,7 +25153,7 @@ "properties": { "type": { "type": "string", - "description": "Platform type.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", @@ -46223,7 +46223,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -46461,7 +46465,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46549,7 +46561,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46639,7 +46659,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46729,7 +46757,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46802,7 +46838,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46882,7 +46926,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46972,7 +47024,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47052,7 +47112,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47132,7 +47200,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47212,7 +47288,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47320,7 +47404,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47399,7 +47491,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47490,7 +47590,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47806,7 +47914,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -47894,7 +48010,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -47984,7 +48108,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48074,7 +48206,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48147,7 +48287,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48227,7 +48375,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48317,7 +48473,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48397,7 +48561,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48477,7 +48649,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48557,7 +48737,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48665,7 +48853,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48744,7 +48940,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48835,7 +49039,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48965,7 +49177,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -52191,7 +52410,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -52219,11 +52445,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -52249,6 +52470,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -52276,12 +52502,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -52305,12 +52531,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -52356,12 +52582,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -52375,7 +52612,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, @@ -53311,8 +53548,25 @@ }, "type": { "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", + "x-example": "web", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", + "android", + "unity", + "react-native-ios", + "react-native-android" + ] }, "key": { "type": "string", @@ -53327,7 +53581,7 @@ "hostname": { "type": "string", "description": "Web app hostname. Empty string for other platforms.", - "x-example": true + "x-example": "app.example.com" }, "httpUser": { "type": "string", @@ -53360,7 +53614,7 @@ "type": "web", "key": "com.company.appname", "store": "", - "hostname": true, + "hostname": "app.example.com", "httpUser": "username", "httpPass": "password" } @@ -53613,8 +53867,13 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -53661,8 +53920,13 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "description": "Service status. Possible values are: `pass`, `fail`", + "x-example": "pass", + "enum": [ + "pass", + "fail" + ], + "x-enum-name": "HealthCheckStatus" } }, "required": [ @@ -55827,7 +56091,11 @@ "deploymentResourceType": { "type": "string", "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function" + "x-example": "function", + "enum": [ + "function", + "site" + ] }, "deploymentResourceId": { "type": "string", @@ -55837,12 +56105,18 @@ "deploymentVcsProviderBranch": { "type": "string", "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "function" + "x-example": "main" }, "status": { "type": "string", "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] }, "logs": { "type": "string", @@ -55884,7 +56158,7 @@ "deploymentId": "n3u9feiwmf", "deploymentResourceType": "function", "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "function", + "deploymentVcsProviderBranch": "main", "status": "verified", "logs": "HTTP challegne failed.", "renewAt": "datetime" @@ -56391,7 +56665,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 09d53dbdf0..6b766dbdee 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -35093,7 +35093,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -35331,7 +35335,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35419,7 +35431,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35509,7 +35529,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35599,7 +35627,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35672,7 +35708,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35752,7 +35796,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35842,7 +35894,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35922,7 +35982,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36002,7 +36070,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36082,7 +36158,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36190,7 +36274,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36269,7 +36361,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36360,7 +36460,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36676,7 +36784,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36764,7 +36880,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36854,7 +36978,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36944,7 +37076,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37017,7 +37157,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37097,7 +37245,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37187,7 +37343,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37267,7 +37431,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37347,7 +37519,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37427,7 +37607,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37535,7 +37723,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37614,7 +37810,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37705,7 +37909,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37835,7 +38047,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -40272,7 +40491,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -40300,11 +40526,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -40330,6 +40551,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -40357,12 +40583,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -40386,12 +40612,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -40437,12 +40663,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -40456,7 +40693,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, @@ -40810,8 +41047,13 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -40858,8 +41100,13 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "description": "Service status. Possible values are: `pass`, `fail`", + "x-example": "pass", + "enum": [ + "pass", + "fail" + ], + "x-enum-name": "HealthCheckStatus" } }, "required": [ @@ -41324,7 +41571,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 55911e9556..c2628533d0 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -11392,12 +11392,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -11411,7 +11422,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 6d5721c73b..ee3702d27d 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -25305,7 +25305,7 @@ "properties": { "type": { "type": "string", - "description": "Platform type.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "default": null, "x-example": "web", "enum": [ @@ -46159,7 +46159,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -46398,7 +46402,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46486,7 +46498,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46576,7 +46596,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46666,7 +46694,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46739,7 +46775,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46819,7 +46863,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46909,7 +46961,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46989,7 +47049,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47069,7 +47137,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47149,7 +47225,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47257,7 +47341,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47336,7 +47428,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47427,7 +47527,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47744,7 +47852,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -47832,7 +47948,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -47922,7 +48046,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48012,7 +48144,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48085,7 +48225,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48165,7 +48313,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48255,7 +48411,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48335,7 +48499,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48415,7 +48587,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48495,7 +48675,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48603,7 +48791,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48682,7 +48878,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48773,7 +48977,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48903,7 +49115,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -52139,7 +52358,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -52167,11 +52393,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -52197,6 +52418,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -52224,12 +52450,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -52253,12 +52479,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -52304,12 +52530,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -52323,7 +52560,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" @@ -53267,8 +53504,25 @@ }, "type": { "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", + "x-example": "web", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", + "android", + "unity", + "react-native-ios", + "react-native-android" + ] }, "key": { "type": "string", @@ -53283,7 +53537,7 @@ "hostname": { "type": "string", "description": "Web app hostname. Empty string for other platforms.", - "x-example": true + "x-example": "app.example.com" }, "httpUser": { "type": "string", @@ -53316,7 +53570,7 @@ "type": "web", "key": "com.company.appname", "store": "", - "hostname": true, + "hostname": "app.example.com", "httpUser": "username", "httpPass": "password" } @@ -53569,8 +53823,13 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -53617,8 +53876,13 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "description": "Service status. Possible values are: `pass`, `fail`", + "x-example": "pass", + "enum": [ + "pass", + "fail" + ], + "x-enum-name": "HealthCheckStatus" } }, "required": [ @@ -55874,7 +56138,11 @@ "deploymentResourceType": { "type": "string", "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function" + "x-example": "function", + "enum": [ + "function", + "site" + ] }, "deploymentResourceId": { "type": "string", @@ -55884,12 +56152,18 @@ "deploymentVcsProviderBranch": { "type": "string", "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "function" + "x-example": "main" }, "status": { "type": "string", "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] }, "logs": { "type": "string", @@ -55931,7 +56205,7 @@ "deploymentId": "n3u9feiwmf", "deploymentResourceType": "function", "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "function", + "deploymentVcsProviderBranch": "main", "status": "verified", "logs": "HTTP challegne failed.", "renewAt": "datetime" @@ -56440,7 +56714,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 98077f1050..ff5056b35a 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -35120,7 +35120,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -35359,7 +35363,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35447,7 +35459,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35537,7 +35557,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35627,7 +35655,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35700,7 +35736,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35780,7 +35824,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35870,7 +35922,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35950,7 +36010,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36030,7 +36098,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36110,7 +36186,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36218,7 +36302,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36297,7 +36389,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36388,7 +36488,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36705,7 +36813,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36793,7 +36909,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36883,7 +37007,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36973,7 +37105,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37046,7 +37186,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37126,7 +37274,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37216,7 +37372,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37296,7 +37460,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37376,7 +37548,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37456,7 +37636,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37564,7 +37752,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37643,7 +37839,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37734,7 +37938,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37864,7 +38076,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -40307,7 +40526,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -40335,11 +40561,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -40365,6 +40586,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -40392,12 +40618,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -40421,12 +40647,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -40472,12 +40698,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -40491,7 +40728,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" @@ -40847,8 +41084,13 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -40895,8 +41137,13 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "description": "Service status. Possible values are: `pass`, `fail`", + "x-example": "pass", + "enum": [ + "pass", + "fail" + ], + "x-enum-name": "HealthCheckStatus" } }, "required": [ @@ -41363,7 +41610,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 55911e9556..c2628533d0 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -11392,12 +11392,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -11411,7 +11422,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 6d5721c73b..ee3702d27d 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -25305,7 +25305,7 @@ "properties": { "type": { "type": "string", - "description": "Platform type.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "default": null, "x-example": "web", "enum": [ @@ -46159,7 +46159,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -46398,7 +46402,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46486,7 +46498,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46576,7 +46596,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46666,7 +46694,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46739,7 +46775,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46819,7 +46863,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46909,7 +46961,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46989,7 +47049,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47069,7 +47137,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47149,7 +47225,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47257,7 +47341,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47336,7 +47428,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47427,7 +47527,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47744,7 +47852,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -47832,7 +47948,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -47922,7 +48046,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48012,7 +48144,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48085,7 +48225,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48165,7 +48313,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48255,7 +48411,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48335,7 +48499,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48415,7 +48587,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48495,7 +48675,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48603,7 +48791,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48682,7 +48878,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48773,7 +48977,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48903,7 +49115,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -52139,7 +52358,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -52167,11 +52393,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -52197,6 +52418,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -52224,12 +52450,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -52253,12 +52479,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -52304,12 +52530,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -52323,7 +52560,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" @@ -53267,8 +53504,25 @@ }, "type": { "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", + "x-example": "web", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", + "android", + "unity", + "react-native-ios", + "react-native-android" + ] }, "key": { "type": "string", @@ -53283,7 +53537,7 @@ "hostname": { "type": "string", "description": "Web app hostname. Empty string for other platforms.", - "x-example": true + "x-example": "app.example.com" }, "httpUser": { "type": "string", @@ -53316,7 +53570,7 @@ "type": "web", "key": "com.company.appname", "store": "", - "hostname": true, + "hostname": "app.example.com", "httpUser": "username", "httpPass": "password" } @@ -53569,8 +53823,13 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -53617,8 +53876,13 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "description": "Service status. Possible values are: `pass`, `fail`", + "x-example": "pass", + "enum": [ + "pass", + "fail" + ], + "x-enum-name": "HealthCheckStatus" } }, "required": [ @@ -55874,7 +56138,11 @@ "deploymentResourceType": { "type": "string", "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function" + "x-example": "function", + "enum": [ + "function", + "site" + ] }, "deploymentResourceId": { "type": "string", @@ -55884,12 +56152,18 @@ "deploymentVcsProviderBranch": { "type": "string", "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "function" + "x-example": "main" }, "status": { "type": "string", "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] }, "logs": { "type": "string", @@ -55931,7 +56205,7 @@ "deploymentId": "n3u9feiwmf", "deploymentResourceType": "function", "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "function", + "deploymentVcsProviderBranch": "main", "status": "verified", "logs": "HTTP challegne failed.", "renewAt": "datetime" @@ -56440,7 +56714,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 98077f1050..ff5056b35a 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -35120,7 +35120,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -35359,7 +35363,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35447,7 +35459,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35537,7 +35557,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35627,7 +35655,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35700,7 +35736,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35780,7 +35824,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35870,7 +35922,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35950,7 +36010,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36030,7 +36098,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36110,7 +36186,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36218,7 +36302,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36297,7 +36389,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36388,7 +36488,15 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36705,7 +36813,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36793,7 +36909,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36883,7 +37007,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36973,7 +37105,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37046,7 +37186,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37126,7 +37274,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37216,7 +37372,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37296,7 +37460,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37376,7 +37548,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37456,7 +37636,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37564,7 +37752,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37643,7 +37839,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37734,7 +37938,15 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37864,7 +38076,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -40307,7 +40526,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -40335,11 +40561,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -40365,6 +40586,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -40392,12 +40618,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -40421,12 +40647,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -40472,12 +40698,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -40491,7 +40728,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" @@ -40847,8 +41084,13 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -40895,8 +41137,13 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "description": "Service status. Possible values are: `pass`, `fail`", + "x-example": "pass", + "enum": [ + "pass", + "fail" + ], + "x-enum-name": "HealthCheckStatus" } }, "required": [ @@ -41363,7 +41610,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index d22c5cb2c2..dbc384f3c4 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -3102,7 +3102,7 @@ App::post('/v1/messaging/messages/email') case MessageStatus::SCHEDULED: $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'message', + 'resourceType' => SCHEDULE_RESOURCE_TYPE_MESSAGE, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -3244,7 +3244,7 @@ App::post('/v1/messaging/messages/sms') case MessageStatus::SCHEDULED: $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'message', + 'resourceType' => SCHEDULE_RESOURCE_TYPE_MESSAGE, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -3462,7 +3462,7 @@ App::post('/v1/messaging/messages/push') case MessageStatus::SCHEDULED: $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'message', + 'resourceType' => SCHEDULE_RESOURCE_TYPE_MESSAGE, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -3863,7 +3863,7 @@ App::patch('/v1/messaging/messages/email/:messageId') if (\is_null($currentScheduledAt) && !\is_null($scheduledAt)) { $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'message', + 'resourceType' => SCHEDULE_RESOURCE_TYPE_MESSAGE, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -4084,7 +4084,7 @@ App::patch('/v1/messaging/messages/sms/:messageId') if (\is_null($currentScheduledAt) && !\is_null($scheduledAt)) { $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'message', + 'resourceType' => SCHEDULE_RESOURCE_TYPE_MESSAGE, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -4258,7 +4258,7 @@ App::patch('/v1/messaging/messages/push/:messageId') if (\is_null($currentScheduledAt) && !\is_null($scheduledAt)) { $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'message', + 'resourceType' => SCHEDULE_RESOURCE_TYPE_MESSAGE, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index ea3a00dcb6..80d407322e 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -1756,7 +1756,28 @@ App::post('/v1/projects/:projectId/platforms') ] )) ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('type', null, new WhiteList([Platform::TYPE_WEB, Platform::TYPE_FLUTTER_WEB, Platform::TYPE_FLUTTER_IOS, Platform::TYPE_FLUTTER_ANDROID, Platform::TYPE_FLUTTER_LINUX, Platform::TYPE_FLUTTER_MACOS, Platform::TYPE_FLUTTER_WINDOWS, Platform::TYPE_APPLE_IOS, Platform::TYPE_APPLE_MACOS, Platform::TYPE_APPLE_WATCHOS, Platform::TYPE_APPLE_TVOS, Platform::TYPE_ANDROID, Platform::TYPE_UNITY, Platform::TYPE_REACT_NATIVE_IOS, Platform::TYPE_REACT_NATIVE_ANDROID], true), 'Platform type.') + ->param( + 'type', + null, + new WhiteList([ + Platform::TYPE_WEB, + Platform::TYPE_FLUTTER_WEB, + Platform::TYPE_FLUTTER_IOS, + Platform::TYPE_FLUTTER_ANDROID, + Platform::TYPE_FLUTTER_LINUX, + Platform::TYPE_FLUTTER_MACOS, + Platform::TYPE_FLUTTER_WINDOWS, + Platform::TYPE_APPLE_IOS, + Platform::TYPE_APPLE_MACOS, + Platform::TYPE_APPLE_WATCHOS, + Platform::TYPE_APPLE_TVOS, + Platform::TYPE_ANDROID, + Platform::TYPE_UNITY, + Platform::TYPE_REACT_NATIVE_IOS, + Platform::TYPE_REACT_NATIVE_ANDROID, + ], true), + 'Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.' + ) ->param('name', null, new Text(128), 'Platform name. Max length: 128 chars.') ->param('key', '', new Text(256), 'Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.', true) ->param('store', '', new Text(256), 'App store or Google Play store ID. Max length: 256 chars.', true) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 8cfeb5da3b..8bc383cabd 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -225,6 +225,8 @@ App::get('/v1/storage/buckets') $total = $dbForProject->count('buckets', $filterQueries, APP_LIMIT_COUNT); } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } $response->dynamic(new Document([ 'buckets' => $buckets, @@ -853,6 +855,8 @@ App::get('/v1/storage/buckets/:bucketId/files') throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } $response->dynamic(new Document([ diff --git a/app/init/constants.php b/app/init/constants.php index 28cf8a4052..74f04f25e9 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -262,7 +262,6 @@ const METRIC_SITES_ID_INBOUND = 'sites.{siteInternalId}.inbound'; const METRIC_SITES_ID_OUTBOUND = 'sites.{siteInternalId}.outbound'; // Resource types - const RESOURCE_TYPE_PROJECTS = 'projects'; const RESOURCE_TYPE_FUNCTIONS = 'functions'; const RESOURCE_TYPE_SITES = 'sites'; @@ -272,10 +271,15 @@ const RESOURCE_TYPE_PROVIDERS = 'providers'; const RESOURCE_TYPE_TOPICS = 'topics'; const RESOURCE_TYPE_SUBSCRIBERS = 'subscribers'; const RESOURCE_TYPE_MESSAGES = 'messages'; +const RESOURCE_TYPE_EXECUTIONS = 'executions'; // Resource types for Tokens - const TOKENS_RESOURCE_TYPE_FILES = 'files'; const TOKENS_RESOURCE_TYPE_SITES = 'sites'; const TOKENS_RESOURCE_TYPE_FUNCTIONS = 'functions'; const TOKENS_RESOURCE_TYPE_DATABASES = 'databases'; + +// Resource types for Schedules +const SCHEDULE_RESOURCE_TYPE_EXECUTION = 'execution'; +const SCHEDULE_RESOURCE_TYPE_FUNCTION = 'function'; +const SCHEDULE_RESOURCE_TYPE_MESSAGE = 'message'; diff --git a/app/init/database/filters.php b/app/init/database/filters.php index 33f5d8077a..c4cfd1ac81 100644 --- a/app/init/database/filters.php +++ b/app/init/database/filters.php @@ -255,6 +255,8 @@ Database::addFilter( ->find('variables', [ Query::equal('resourceInternalId', [$document->getSequence()]), Query::equal('resourceType', $resourceType), + Query::orderAsc('resourceType'), + Query::orderAsc(), Query::limit(APP_LIMIT_SUBQUERY), ]); } diff --git a/composer.lock b/composer.lock index e454de0313..f5a8c43b32 100644 --- a/composer.lock +++ b/composer.lock @@ -756,24 +756,21 @@ }, { "name": "google/protobuf", - "version": "v4.32.0", + "version": "v4.32.1", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "9a9a92ecbe9c671dc1863f6d4a91ea3ea12c8646" + "reference": "c4ed1c1f9bbc1e91766e2cd6c0af749324fe87cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/9a9a92ecbe9c671dc1863f6d4a91ea3ea12c8646", - "reference": "9a9a92ecbe9c671dc1863f6d4a91ea3ea12c8646", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/c4ed1c1f9bbc1e91766e2cd6c0af749324fe87cb", + "reference": "c4ed1c1f9bbc1e91766e2cd6c0af749324fe87cb", "shasum": "" }, "require": { "php": ">=8.1.0" }, - "provide": { - "ext-protobuf": "*" - }, "require-dev": { "phpunit/phpunit": ">=5.0.0 <8.5.27" }, @@ -797,9 +794,9 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.32.0" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.32.1" }, - "time": "2025-08-14T20:00:33+00:00" + "time": "2025-09-14T05:14:52+00:00" }, { "name": "league/csv", @@ -1162,20 +1159,20 @@ }, { "name": "open-telemetry/api", - "version": "1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/api.git", - "reference": "7692075f486c14d8cfd37fba98a08a5667f089e5" + "reference": "ee17d937652eca06c2341b6fadc0f74c1c1a5af2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/7692075f486c14d8cfd37fba98a08a5667f089e5", - "reference": "7692075f486c14d8cfd37fba98a08a5667f089e5", + "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/ee17d937652eca06c2341b6fadc0f74c1c1a5af2", + "reference": "ee17d937652eca06c2341b6fadc0f74c1c1a5af2", "shasum": "" }, "require": { - "open-telemetry/context": "^1.0", + "open-telemetry/context": "^1.4", "php": "^8.1", "psr/log": "^1.1|^2.0|^3.0", "symfony/polyfill-php82": "^1.26" @@ -1228,20 +1225,20 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-08-07T23:07:38+00:00" + "time": "2025-09-19T00:05:49+00:00" }, { "name": "open-telemetry/context", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/context.git", - "reference": "438f71812242db3f196fb4c717c6f92cbc819be6" + "reference": "d4c4470b541ce72000d18c339cfee633e4c8e0cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/438f71812242db3f196fb4c717c6f92cbc819be6", - "reference": "438f71812242db3f196fb4c717c6f92cbc819be6", + "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/d4c4470b541ce72000d18c339cfee633e4c8e0cf", + "reference": "d4c4470b541ce72000d18c339cfee633e4c8e0cf", "shasum": "" }, "require": { @@ -1287,7 +1284,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-08-13T01:12:00+00:00" + "time": "2025-09-19T00:05:49+00:00" }, { "name": "open-telemetry/exporter-otlp", @@ -1355,16 +1352,16 @@ }, { "name": "open-telemetry/gen-otlp-protobuf", - "version": "1.5.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/gen-otlp-protobuf.git", - "reference": "585bafddd4ae6565de154610b10a787a455c9ba0" + "reference": "673af5b06545b513466081884b47ef15a536edde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/585bafddd4ae6565de154610b10a787a455c9ba0", - "reference": "585bafddd4ae6565de154610b10a787a455c9ba0", + "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/673af5b06545b513466081884b47ef15a536edde", + "reference": "673af5b06545b513466081884b47ef15a536edde", "shasum": "" }, "require": { @@ -1414,27 +1411,27 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-01-15T23:07:07+00:00" + "time": "2025-09-17T23:10:12+00:00" }, { "name": "open-telemetry/sdk", - "version": "1.7.1", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sdk.git", - "reference": "52690d4b37ae4f091af773eef3c238ed2bc0aa06" + "reference": "105c6e81e3d86150bd5704b00c7e4e165e957b89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/52690d4b37ae4f091af773eef3c238ed2bc0aa06", - "reference": "52690d4b37ae4f091af773eef3c238ed2bc0aa06", + "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/105c6e81e3d86150bd5704b00c7e4e165e957b89", + "reference": "105c6e81e3d86150bd5704b00c7e4e165e957b89", "shasum": "" }, "require": { "ext-json": "*", "nyholm/psr7-server": "^1.1", - "open-telemetry/api": "^1.4", - "open-telemetry/context": "^1.0", + "open-telemetry/api": "^1.6", + "open-telemetry/context": "^1.4", "open-telemetry/sem-conv": "^1.0", "php": "^8.1", "php-http/discovery": "^1.14", @@ -1511,7 +1508,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-09-05T07:17:06+00:00" + "time": "2025-09-19T00:05:49+00:00" }, { "name": "open-telemetry/sem-conv", @@ -1572,16 +1569,16 @@ }, { "name": "paragonie/constant_time_encoding", - "version": "v2.7.0", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105" + "reference": "e30811f7bc69e4b5b6d5783e712c06c8eabf0226" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105", - "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/e30811f7bc69e4b5b6d5783e712c06c8eabf0226", + "reference": "e30811f7bc69e4b5b6d5783e712c06c8eabf0226", "shasum": "" }, "require": { @@ -1635,7 +1632,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2024-05-08T12:18:48+00:00" + "time": "2025-09-24T15:12:37+00:00" }, { "name": "paragonie/random_compat", @@ -3638,16 +3635,16 @@ }, { "name": "utopia-php/database", - "version": "1.4.8", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "dbecdf89fde33a5f81ec19f4f97fe0c3715dc83a" + "reference": "24c4519b4ac32aee13af31dddd984db2a3b34980" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/dbecdf89fde33a5f81ec19f4f97fe0c3715dc83a", - "reference": "dbecdf89fde33a5f81ec19f4f97fe0c3715dc83a", + "url": "https://api.github.com/repos/utopia-php/database/zipball/24c4519b4ac32aee13af31dddd984db2a3b34980", + "reference": "24c4519b4ac32aee13af31dddd984db2a3b34980", "shasum": "" }, "require": { @@ -3688,9 +3685,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/1.4.8" + "source": "https://github.com/utopia-php/database/tree/1.5.0" }, - "time": "2025-09-12T03:35:59+00:00" + "time": "2025-09-18T14:42:01+00:00" }, { "name": "utopia-php/detector", @@ -3942,16 +3939,16 @@ }, { "name": "utopia-php/framework", - "version": "0.33.27", + "version": "0.33.28", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "d9d10a895e85c8c7675220347cc6109db9d3bd37" + "reference": "5aaa94d406577b0059ad28c78022606890dc6de0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/d9d10a895e85c8c7675220347cc6109db9d3bd37", - "reference": "d9d10a895e85c8c7675220347cc6109db9d3bd37", + "url": "https://api.github.com/repos/utopia-php/http/zipball/5aaa94d406577b0059ad28c78022606890dc6de0", + "reference": "5aaa94d406577b0059ad28c78022606890dc6de0", "shasum": "" }, "require": { @@ -3983,9 +3980,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.27" + "source": "https://github.com/utopia-php/http/tree/0.33.28" }, - "time": "2025-09-07T18:40:53+00:00" + "time": "2025-09-25T10:44:24+00:00" }, { "name": "utopia-php/image", @@ -4190,16 +4187,16 @@ }, { "name": "utopia-php/migration", - "version": "1.1.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "c42935a6a4ee3701c68d24244e82ecb39e945ec4" + "reference": "42ff497c5231f5a727d1e229419ff1d2195d8093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/c42935a6a4ee3701c68d24244e82ecb39e945ec4", - "reference": "c42935a6a4ee3701c68d24244e82ecb39e945ec4", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/42ff497c5231f5a727d1e229419ff1d2195d8093", + "reference": "42ff497c5231f5a727d1e229419ff1d2195d8093", "shasum": "" }, "require": { @@ -4240,9 +4237,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/1.1.1" + "source": "https://github.com/utopia-php/migration/tree/1.2.0" }, - "time": "2025-09-10T06:17:20+00:00" + "time": "2025-09-24T10:32:24+00:00" }, { "name": "utopia-php/orchestration", @@ -5007,16 +5004,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.3.4", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "d3b420dced42f1eec1f6d0aa98b7bbf8de4042ac" + "reference": "3583fa6fddb1d1a902b37ff2048527a5827fc008" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d3b420dced42f1eec1f6d0aa98b7bbf8de4042ac", - "reference": "d3b420dced42f1eec1f6d0aa98b7bbf8de4042ac", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/3583fa6fddb1d1a902b37ff2048527a5827fc008", + "reference": "3583fa6fddb1d1a902b37ff2048527a5827fc008", "shasum": "" }, "require": { @@ -5052,9 +5049,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.3.4" + "source": "https://github.com/appwrite/sdk-generator/tree/1.4.0" }, - "time": "2025-09-08T11:56:04+00:00" + "time": "2025-09-23T02:27:10+00:00" }, { "name": "doctrine/annotations", @@ -5281,16 +5278,16 @@ }, { "name": "laravel/pint", - "version": "v1.24.0", + "version": "v1.25.1", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "0345f3b05f136801af8c339f9d16ef29e6b4df8a" + "reference": "5016e263f95d97670d71b9a987bd8996ade6d8d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/0345f3b05f136801af8c339f9d16ef29e6b4df8a", - "reference": "0345f3b05f136801af8c339f9d16ef29e6b4df8a", + "url": "https://api.github.com/repos/laravel/pint/zipball/5016e263f95d97670d71b9a987bd8996ade6d8d9", + "reference": "5016e263f95d97670d71b9a987bd8996ade6d8d9", "shasum": "" }, "require": { @@ -5301,9 +5298,9 @@ "php": "^8.2.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.82.2", - "illuminate/view": "^11.45.1", - "larastan/larastan": "^3.5.0", + "friendsofphp/php-cs-fixer": "^3.87.2", + "illuminate/view": "^11.46.0", + "larastan/larastan": "^3.7.1", "laravel-zero/framework": "^11.45.0", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^2.3.1", @@ -5314,9 +5311,6 @@ ], "type": "project", "autoload": { - "files": [ - "overrides/Runner/Parallel/ProcessFactory.php" - ], "psr-4": { "App\\": "app/", "Database\\Seeders\\": "database/seeders/", @@ -5346,7 +5340,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2025-07-10T18:09:32+00:00" + "time": "2025-09-19T02:57:12+00:00" }, { "name": "matthiasmullie/minify", @@ -6236,16 +6230,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.26", + "version": "9.6.29", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a0139ea157533454f611038326f3020b3051f129" + "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a0139ea157533454f611038326f3020b3051f129", - "reference": "a0139ea157533454f611038326f3020b3051f129", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9ecfec57835a5581bc888ea7e13b51eb55ab9dd3", + "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3", "shasum": "" }, "require": { @@ -6270,7 +6264,7 @@ "sebastian/comparator": "^4.0.9", "sebastian/diff": "^4.0.6", "sebastian/environment": "^5.1.5", - "sebastian/exporter": "^4.0.6", + "sebastian/exporter": "^4.0.8", "sebastian/global-state": "^5.0.8", "sebastian/object-enumerator": "^4.0.4", "sebastian/resource-operations": "^3.0.4", @@ -6319,7 +6313,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.26" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.29" }, "funding": [ { @@ -6343,7 +6337,7 @@ "type": "tidelift" } ], - "time": "2025-09-11T06:17:45+00:00" + "time": "2025-09-24T06:29:11+00:00" }, { "name": "psr/cache", @@ -6835,16 +6829,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.6", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" + "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/14c6ba52f95a36c3d27c835d65efc7123c446e8c", + "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c", "shasum": "" }, "require": { @@ -6900,15 +6894,27 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.8" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" } ], - "time": "2024-03-02T06:33:00+00:00" + "time": "2025-09-24T06:03:27+00:00" }, { "name": "sebastian/global-state", diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md index cdd92c2a02..bc3587fcec 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md @@ -24,12 +24,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md index 12c50c32f3..0ce968e5f4 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md @@ -27,12 +27,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md index ebfced2c68..60a78c41ca 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md @@ -25,12 +25,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md index 50df97fd21..68735b35ca 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md @@ -23,12 +23,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md index 6226282651..1b2d3dc131 100644 --- a/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md @@ -23,12 +23,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md index 72562556e4..f63d8c5e5a 100644 --- a/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md @@ -27,12 +27,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md index ccc18cf2e0..6c5241e734 100644 --- a/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md @@ -25,12 +25,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md index 92751c167f..24064428e2 100644 --- a/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md +++ b/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md @@ -23,12 +23,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/sdks/cli/CHANGELOG.md b/docs/sdks/cli/CHANGELOG.md index 8964d059a9..000a7e0938 100644 --- a/docs/sdks/cli/CHANGELOG.md +++ b/docs/sdks/cli/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## 10.0.0 + +* **Breaking:** Removed Avatars CLI command and all related subcommands; corresponding examples deleted +* **Feat:** Geo defaults now accept coordinate arrays for Databases and Tables DB, with automatic normalization +* **Feat:** Pull command skips deprecated resources by default and shows clearer totals/messages +* **Feat:** Updated CLI descriptions: Databases marked legacy; added tables-db, projects, and project +* Fix TypeScript type generation now quotes invalid property names to produce valid typings +* Update documentation: Removed Avatars CLI examples and updated help text to reflect new geo defaults and terminology + ## 8.3.0 * **Feat:** Add support for `appwrite.config.json` file diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index 7033bbdd1d..7e33794153 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 18.1.0 + +* Add `orderRandom` query support + ## 18.0.0 * Rename `CreditCard` enum value `unionChinaPay` to `unionPay` diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index 7ff4a445b3..f704415675 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 19.1.0 + +* Add `orderRandom` query support + ## 19.0.0 * Rename `CreditCard` enum value `unionChinaPay` to `unionPay` diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index f0394b2395..b74e2a7549 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -58,7 +58,8 @@ class Mapper 'json' => Types::json(), 'none' => Types::json(), 'any' => Types::json(), - 'array' => Types::json() + 'array' => Types::json(), + 'enum' => Type::string() ]; foreach ($defaults as $type => $default) { @@ -452,6 +453,7 @@ class Mapper 'ip' => static::model("{$prefix}Ip"), default => static::model("{$prefix}String"), }, + 'enum' => static::model("{$prefix}String"), // TODO: Add enum type (breaking change if added) 'integer' => static::model("{$prefix}Integer"), 'double' => static::model("{$prefix}Float"), 'boolean' => static::model("{$prefix}Boolean"), diff --git a/src/Appwrite/Migration/Version/V19.php b/src/Appwrite/Migration/Version/V19.php index d4dda02d75..f5cf84c95e 100644 --- a/src/Appwrite/Migration/Version/V19.php +++ b/src/Appwrite/Migration/Version/V19.php @@ -730,8 +730,8 @@ class V19 extends Migration if (empty($document->getAttribute('scheduleId', null))) { $schedule = $this->dbForPlatform->createDocument('schedules', new Document([ - 'region' => $project->getAttribute('region'), - 'resourceType' => 'function', + 'region' => $this->project->getAttribute('region'), + 'resourceType' => SCHEDULE_RESOURCE_TYPE_FUNCTION, 'resourceId' => $document->getId(), 'resourceInternalId' => $document->getSequence(), 'resourceUpdatedAt' => DateTime::now(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index f3903d91a7..22a90d2653 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -122,7 +122,7 @@ abstract class Action extends UtopiaAction /** * Get the correct invalid structure message. */ - protected function getInvalidStructureException(): string + protected function getStructureException(): string { return $this->isCollectionsAPI() ? Exception::DOCUMENT_INVALID_STRUCTURE @@ -366,13 +366,27 @@ abstract class Action extends UtopiaAction 'filters' => $filters, 'options' => $options, ]); + if ( + !$dbForProject->getAdapter()->getSupportForSpatialIndexNull() && + \in_array($attribute->getAttribute('type'), Database::SPATIAL_TYPES) && + $attribute->getAttribute('required') + ) { + $hasData = !Authorization::skip(fn () => $dbForProject + ->findOne('database_' . $db->getSequence() . '_collection_' . $collection->getSequence())) + ->isEmpty(); + if ($hasData) { + throw new StructureException('Failed to add required spatial column: existing rows present. Make the column optional.'); + } + } $dbForProject->checkAttribute($collection, $attribute); $attribute = $dbForProject->createDocument('attributes', $attribute); } catch (DuplicateException) { throw new Exception($this->getDuplicateException()); } catch (LimitException) { throw new Exception($this->getLimitException()); + } catch (StructureException $e) { + throw new Exception($this->getStructureException(), $e->getMessage()); } catch (Throwable $e) { $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $collectionId); $dbForProject->purgeCachedCollection('database_' . $db->getSequence() . '_collection_' . $collection->getSequence()); @@ -416,7 +430,7 @@ abstract class Action extends UtopiaAction } catch (LimitException) { throw new Exception($this->getLimitException()); } catch (StructureException) { - throw new Exception($this->getInvalidStructureException()); + throw new Exception($this->getStructureException()); } catch (Throwable $e) { $dbForProject->deleteDocument('attributes', $attribute->getId()); throw $e; @@ -580,7 +594,7 @@ abstract class Action extends UtopiaAction } catch (RelationshipException $e) { throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); } if ($primaryDocumentOptions['twoWay']) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index d1d0738990..e05e588201 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -160,7 +160,7 @@ abstract class Action extends AppwriteAction /** * Get the correct invalid structure message. */ - protected function getInvalidStructureException(): string + protected function getStructureException(): string { return $this->isCollectionsAPI() ? Exception::DOCUMENT_INVALID_STRUCTURE diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index fc4e2a8a91..3467a9d11c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -124,6 +124,8 @@ class Delete extends Action throw new Exception($this->getConflictException()); } catch (RestrictedException) { throw new Exception($this->getRestrictedException()); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } foreach ($documents as $document) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index 0f0ae14020..65bd255d32 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -149,7 +149,9 @@ class Update extends Action } catch (RelationshipException $e) { throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } foreach ($documents as $document) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index 395e3d757b..4ce3990a38 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -130,7 +130,7 @@ class Upsert extends Action } catch (RelationshipException $e) { throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); } foreach ($upserted as $document) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index c03daabd4f..a8af1eda86 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -375,7 +375,7 @@ class Create extends Action } catch (RelationshipException $e) { throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); } $queueForEvents diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 8382bdd5e9..e510aeb089 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -247,7 +247,7 @@ class Update extends Action } catch (RelationshipException $e) { throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); } $collectionsCache = []; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index 54b1cad950..3ac5e704e3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -258,7 +258,7 @@ class Upsert extends Action } catch (RelationshipException $e) { throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); } $collectionsCache = []; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 9c8405cf18..546cbeddd4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -158,43 +158,6 @@ class XList extends Action ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); - // Check if the SELECT query includes the removable attributes - $hasWildcard = false; - $hasSelectQueries = !empty($selectQueries); - $requestedAttributes = []; - - if ($hasSelectQueries) { - foreach ($selectQueries as $query) { - if ($query->getMethod() !== Query::TYPE_SELECT) { - continue; - } - - $values = $query->getValues(); - if (\in_array('*', $values, true)) { - $hasWildcard = true; - break; - } - - // Check which removable attributes are explicitly requested - foreach ($this->removableAttributes['*'] as $attribute) { - if (\in_array($attribute, $values, true)) { - $requestedAttributes[$attribute] = true; - } - } - } - - if (!$hasWildcard) { - foreach ($documents as $document) { - // Remove attributes that are not explicitly requested - foreach ($this->removableAttributes['*'] as $attribute) { - if (!isset($requestedAttributes[$attribute])) { - $document->removeAttribute($attribute); - } - } - } - } - } - $response->dynamic(new Document([ 'total' => $total, // rows or documents diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index 4770d727a0..c9de9d5217 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -77,8 +77,8 @@ class Get extends Action str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_COLLECTIONS), str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_DOCUMENTS), str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_STORAGE), - str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASES_OPERATIONS_READS), - str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASES_OPERATIONS_WRITES) + str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_READS), + str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES) ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php index 1603e8f997..69af3b7d04 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php @@ -11,7 +11,6 @@ use Appwrite\Extend\Exception; use Appwrite\Extend\Exception as AppwriteException; use Appwrite\Functions\Validator\Headers; use Appwrite\Platform\Modules\Compute\Base; -use Appwrite\Platform\Tasks\ScheduleExecutions; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -313,7 +312,7 @@ class Create extends Base $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => ScheduleExecutions::getSupportedResource(), + 'resourceType' => SCHEDULE_RESOURCE_TYPE_EXECUTION, 'resourceId' => $execution->getId(), 'resourceInternalId' => $execution->getSequence(), 'resourceUpdatedAt' => DateTime::now(), diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Delete.php b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Delete.php index 9c818cfacc..666cb8310c 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Delete.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Delete.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Functions\Http\Executions; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Compute\Base; -use Appwrite\Platform\Tasks\ScheduleExecutions; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -100,7 +99,7 @@ class Delete extends Base if ($status === 'scheduled') { $schedule = $dbForPlatform->findOne('schedules', [ Query::equal('resourceId', [$execution->getId()]), - Query::equal('resourceType', [ScheduleExecutions::getSupportedResource()]), + Query::equal('resourceType', [SCHEDULE_RESOURCE_TYPE_EXECUTION]), Query::equal('active', [true]), ]); diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php index 8e3e0c3772..5462f02082 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php @@ -235,7 +235,7 @@ class Create extends Base $schedule = Authorization::skip( fn () => $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'function', + 'resourceType' => SCHEDULE_RESOURCE_TYPE_FUNCTION, 'resourceId' => $function->getId(), 'resourceInternalId' => $function->getSequence(), 'resourceUpdatedAt' => DateTime::now(), diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 9547a752ef..ce45d6b629 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -899,7 +899,7 @@ class Builds extends Action Console::log('Build details stored'); - $this->afterBuildSuccess($queueForRealtime, $dbForProject, $deployment); + $this->afterBuildSuccess($queueForRealtime, $dbForProject, $deployment, $runtime, $adapter); $logs = $deployment->getAttribute('buildLogs', ''); /** Screenshot site */ @@ -1390,13 +1390,28 @@ class Builds extends Action * @param Realtime $queueForRealtime * @param Database $dbForProject * @param Document $deployment + * @param array $runtime + * @param string|null $adapter * @return void + * @throws Exception */ - protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment): void + protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment, array $runtime, ?string $adapter): void { - assert($queueForRealtime instanceof Realtime); - assert($dbForProject instanceof Database); - assert($deployment instanceof Document); + if (!($queueForRealtime instanceof Realtime)) { + throw new Exception('queueForRealtime must be an instance of Realtime'); + } + if (!($dbForProject instanceof Database)) { + throw new Exception('dbForProject must be an instance of Database'); + } + if (!($deployment instanceof Document)) { + throw new Exception('deployment must be an instance of Document'); + } + if (!is_array($runtime)) { + throw new Exception('runtime must be an array'); + } + if (!is_string($adapter) && !is_null($adapter)) { + throw new Exception('adapter must be a string or null'); + } } protected function getRuntime(Document $resource, string $version): array diff --git a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php index 14a4259e17..83a3f51b03 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php @@ -6,6 +6,12 @@ use Appwrite\Event\Func; use Swoole\Coroutine as Co; use Utopia\Database\Database; +/** + * ScheduleExecutions + * + * Handles delayed executions by processing one-time scheduled tasks + * that are executed at a specific future time. + */ class ScheduleExecutions extends ScheduleBase { public const UPDATE_TIMER = 3; // seconds @@ -18,12 +24,12 @@ class ScheduleExecutions extends ScheduleBase public static function getSupportedResource(): string { - return 'execution'; + return SCHEDULE_RESOURCE_TYPE_EXECUTION; } public static function getCollectionId(): string { - return 'executions'; + return RESOURCE_TYPE_EXECUTIONS; } protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void diff --git a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php index 6f072425e4..7fda2f75df 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php @@ -7,8 +7,13 @@ use Cron\CronExpression; use Utopia\CLI\Console; use Utopia\Database\Database; use Utopia\Database\DateTime; -use Utopia\Pools\Group; +/** + * ScheduleFunctions + * + * Handles cron job related executions by processing cron expressions + * and scheduling function executions based on recurring schedules. + */ class ScheduleFunctions extends ScheduleBase { public const UPDATE_TIMER = 10; // seconds @@ -23,12 +28,12 @@ class ScheduleFunctions extends ScheduleBase public static function getSupportedResource(): string { - return 'function'; + return SCHEDULE_RESOURCE_TYPE_FUNCTION; } public static function getCollectionId(): string { - return 'functions'; + return RESOURCE_TYPE_FUNCTIONS; } protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void diff --git a/src/Appwrite/Platform/Tasks/ScheduleMessages.php b/src/Appwrite/Platform/Tasks/ScheduleMessages.php index fe4afbe69c..57f6dd8002 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleMessages.php +++ b/src/Appwrite/Platform/Tasks/ScheduleMessages.php @@ -17,12 +17,12 @@ class ScheduleMessages extends ScheduleBase public static function getSupportedResource(): string { - return 'message'; + return SCHEDULE_RESOURCE_TYPE_MESSAGE; } public static function getCollectionId(): string { - return 'messages'; + return RESOURCE_TYPE_MESSAGES; } protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index da8c086bf4..0c8f11c07b 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -434,18 +434,43 @@ class StatsResources extends Action { $message = 'Stats writeDocuments project: ' . $project->getId() . '(' . $project->getSequence() . ')'; + /** + * sort by unique index key reduce locks/deadlocks + */ + usort($this->documents, function ($a, $b) { + // Metric DESC + $cmp = strcmp($b['metric'], $a['metric']); + if ($cmp !== 0) { + return $cmp; + } + + // Period ASC + $cmp = strcmp($a['period'], $b['period']); + if ($cmp !== 0) { + return $cmp; + } + + // Time ASC, NULLs first + if ($a['time'] === null) { + return ($b['time'] === null) ? 0 : -1; + } + if ($b['time'] === null) { + return 1; + } + + return strcmp($a['time'], $b['time']); + }); + try { $dbForLogs->createOrUpdateDocuments( 'stats', - $this->documents + $this->documents, ); Console::success($message . ' | Documents: ' . count($this->documents)); } catch (\Throwable $e) { Console::error('Error: ' . $message . ' | Exception: ' . $e->getMessage()); throw $e; - } finally { - $this->documents = []; } } } diff --git a/src/Appwrite/Platform/Workers/StatsUsage.php b/src/Appwrite/Platform/Workers/StatsUsage.php index 3610381d5a..bd34d53b00 100644 --- a/src/Appwrite/Platform/Workers/StatsUsage.php +++ b/src/Appwrite/Platform/Workers/StatsUsage.php @@ -424,12 +424,40 @@ class StatsUsage extends Action try { $dbForProject = $getProjectDB($projectStats['project']); Console::log('Processing batch with ' . count($projectStats['stats']) . ' stats'); + + /** + * Sort by unique index key reduce locks/deadlocks + */ + usort($projectStats['stats'], function ($a, $b) { + // Metric DESC + $cmp = strcmp($b['metric'], $a['metric']); + if ($cmp !== 0) { + return $cmp; + } + + // Period ASC + $cmp = strcmp($a['period'], $b['period']); + if ($cmp !== 0) { + return $cmp; + } + + // Time ASC, NULLs first + if ($a['time'] === null) { + return ($b['time'] === null) ? 0 : -1; + } + if ($b['time'] === null) { + return 1; + } + + return strcmp($a['time'], $b['time']); + }); + $dbForProject->createOrUpdateDocumentsWithIncrease('stats', 'value', $projectStats['stats']); Console::success('Batch successfully written to DB'); - - unset($this->projects[$sequence]); } catch (Throwable $e) { Console::error('Error processing stats: ' . $e->getMessage()); + } finally { + unset($this->projects[$sequence]); } } @@ -468,12 +496,53 @@ class StatsUsage extends Action try { Console::log('Processing batch with ' . count($this->statDocuments) . ' stats'); + + /** + * Sort by UNIQUE KEY "_key_metric_period_time" ("_tenant","metric" DESC,"period","time") + * Here we sort by _tenant as well because of setTenantPerDocument + */ + + usort($this->statDocuments, function ($a, $b) { + // Tenant ASC + $cmp = $a['$tenant'] <=> $b['$tenant']; + if ($cmp !== 0) { + return $cmp; + } + + // Metric DESC + $cmp = strcmp($b['metric'], $a['metric']); + if ($cmp !== 0) { + return $cmp; + } + + // Period ASC + $cmp = strcmp($a['period'], $b['period']); + if ($cmp !== 0) { + return $cmp; + } + + // Time ASC, NULLs first + if ($a['time'] === null) { + return ($b['time'] === null) ? 0 : -1; + } + if ($b['time'] === null) { + return 1; + } + + return strcmp($a['time'], $b['time']); + }); + $dbForLogs->createOrUpdateDocumentsWithIncrease( 'stats', 'value', $this->statDocuments ); Console::success('Usage logs pushed to Logs DB'); + + /** + * todo: Do we need to unset $this->statDocuments? + */ + } catch (Throwable $th) { Console::error($th->getMessage()); } diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index 825f9bf01d..c687df143a 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -112,7 +112,7 @@ abstract class Format return $this->params[$key] ?? $default; } - protected function getEnumName(string $service, string $method, string $param): ?string + protected function getRequestEnumName(string $service, string $method, string $param): ?string { /* `$service` is `$namespace` */ switch ($service) { @@ -450,7 +450,7 @@ abstract class Format return null; } - public function getEnumKeys(string $service, string $method, string $param): array + public function getRequestEnumKeys(string $service, string $method, string $param): array { $values = []; switch ($service) { @@ -543,6 +543,175 @@ abstract class Format return $values; } + public function getResponseEnumName(string $model, string $param): ?string + { + switch ($model) { + case 'attributeString': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeInteger': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeFloat': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeBoolean': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeEmail': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeEnum': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeIp': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeUrl': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeDatetime': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeRelationship': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributePoint': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeLine': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributePolygon': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'columnString': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnInteger': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnFloat': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnBoolean': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnEmail': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnEnum': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnIp': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnUrl': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnDatetime': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnRelationship': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnPoint': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnLine': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnPolygon': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'healthStatus': + switch ($param) { + case 'status': + return 'HealthCheckStatus'; + } + break; + } + return null; + } + protected function getNestedModels(Model $model, array &$usedModels): void { foreach ($model->getRules() as $rule) { diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index c9c2135ab3..2380f03920 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -9,6 +9,7 @@ use Appwrite\SDK\Response; use Appwrite\SDK\Specification\Format; use Appwrite\Template\Template; use Appwrite\Utopia\Response\Model; +use Appwrite\Utopia\Response\Model\Any; use Utopia\Database\Database; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; @@ -559,8 +560,8 @@ class OpenAPI3 extends Format if ($allowed) { $node['schema']['enum'] = $validator->getList(); - $node['schema']['x-enum-name'] = $this->getEnumName($sdk->getNamespace() ?? '', $methodName, $name); - $node['schema']['x-enum-keys'] = $this->getEnumKeys($sdk->getNamespace() ?? '', $methodName, $name); + $node['schema']['x-enum-name'] = $this->getRequestEnumName($sdk->getNamespace() ?? '', $methodName, $name); + $node['schema']['x-enum-keys'] = $this->getRequestEnumKeys($sdk->getNamespace() ?? '', $methodName, $name); } if ($validator->getType() === 'integer') { $node['format'] = 'int32'; @@ -682,6 +683,10 @@ class OpenAPI3 extends Format $type = 'string'; break; + case 'enum': + $type = 'string'; + break; + case 'json': $type = 'object'; $output['components']['schemas'][$model->getType()]['properties'][$name]['additionalProperties'] = true; @@ -770,11 +775,27 @@ class OpenAPI3 extends Format if ($items) { $output['components']['schemas'][$model->getType()]['properties'][$name]['items'] = $items; } + if ($rule['type'] === 'enum' && !empty($rule['enum'])) { + if ($rule['array']) { + $output['components']['schemas'][$model->getType()]['properties'][$name]['items']['enum'] = $rule['enum']; + $enumName = $this->getResponseEnumName($model->getType(), $name); + if ($enumName) { + $output['components']['schemas'][$model->getType()]['properties'][$name]['items']['x-enum-name'] = $enumName; + } + } else { + $output['components']['schemas'][$model->getType()]['properties'][$name]['enum'] = $rule['enum']; + $enumName = $this->getResponseEnumName($model->getType(), $name); + if ($enumName) { + $output['components']['schemas'][$model->getType()]['properties'][$name]['x-enum-name'] = $enumName; + } + } + } if (!in_array($name, $required)) { $output['components']['schemas'][$model->getType()]['properties'][$name]['nullable'] = true; } } + /** @var Any $model */ if ($model->isAny() && !empty($model->getSampleData())) { $examples = array_merge($examples, $model->getSampleData()); } diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index a923f40ffa..ed1217d86c 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -9,6 +9,7 @@ use Appwrite\SDK\Response; use Appwrite\SDK\Specification\Format; use Appwrite\Template\Template; use Appwrite\Utopia\Response\Model; +use Appwrite\Utopia\Response\Model\Any; use Utopia\Database\Database; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; @@ -565,8 +566,8 @@ class Swagger2 extends Format if ($allowed && $validator->getType() === 'string') { $node['enum'] = $validator->getList(); - $node['x-enum-name'] = $this->getEnumName($namespace, $methodName, $name); - $node['x-enum-keys'] = $this->getEnumKeys($namespace, $methodName, $name); + $node['x-enum-name'] = $this->getRequestEnumName($namespace, $methodName, $name); + $node['x-enum-keys'] = $this->getRequestEnumKeys($namespace, $methodName, $name); } if ($validator->getType() === 'integer') { @@ -690,6 +691,10 @@ class Swagger2 extends Format $type = 'string'; break; + case 'enum': + $type = 'string'; + break; + case 'json': $type = 'object'; break; @@ -792,11 +797,27 @@ class Swagger2 extends Format if ($items) { $output['definitions'][$model->getType()]['properties'][$name]['items'] = $items; } + if ($rule['type'] === 'enum' && !empty($rule['enum'])) { + if ($rule['array']) { + $output['definitions'][$model->getType()]['properties'][$name]['items']['enum'] = $rule['enum']; + $enumName = $this->getResponseEnumName($model->getType(), $name); + if ($enumName) { + $output['definitions'][$model->getType()]['properties'][$name]['items']['x-enum-name'] = $enumName; + } + } else { + $output['definitions'][$model->getType()]['properties'][$name]['enum'] = $rule['enum']; + $enumName = $this->getResponseEnumName($model->getType(), $name); + if ($enumName) { + $output['definitions'][$model->getType()]['properties'][$name]['x-enum-name'] = $enumName; + } + } + } if (!in_array($name, $required)) { $output['definitions'][$model->getType()]['properties'][$name]['x-nullable'] = true; } } + /** @var Any $model */ if ($model->isAny() && !empty($model->getSampleData())) { $examples = array_merge($examples, $model->getSampleData()); } diff --git a/src/Appwrite/Transformation/Adapter/Preview.php b/src/Appwrite/Transformation/Adapter/Preview.php index bfbb2e82fd..e69ab5252e 100644 --- a/src/Appwrite/Transformation/Adapter/Preview.php +++ b/src/Appwrite/Transformation/Adapter/Preview.php @@ -62,7 +62,7 @@ class Preview extends Adapter position: fixed; right: 16px; bottom: 16px; - z-index: 1; + z-index: calc(infinity); border-radius: var(--border-radius-S, 8px); border: var(--border-width-S, 1px) solid var(--color-border-neutral, #EDEDF0); background: var(--color-bgColor-neutral-primary, #FFF); diff --git a/src/Appwrite/Utopia/Request/Filters/V16.php b/src/Appwrite/Utopia/Request/Filters/V16.php index 51b05359b3..55db1f4756 100644 --- a/src/Appwrite/Utopia/Request/Filters/V16.php +++ b/src/Appwrite/Utopia/Request/Filters/V16.php @@ -11,8 +11,6 @@ class V16 extends Filter { switch ($model) { case 'functions.create': - $content['commands'] = $this->getCommands($content['runtime'] ?? ''); - break; case 'functions.update': $content['commands'] = $this->getCommands($content['runtime'] ?? ''); break; diff --git a/src/Appwrite/Utopia/Request/Filters/V17.php b/src/Appwrite/Utopia/Request/Filters/V17.php index 83ec62a168..2cdf3973b2 100644 --- a/src/Appwrite/Utopia/Request/Filters/V17.php +++ b/src/Appwrite/Utopia/Request/Filters/V17.php @@ -2,6 +2,7 @@ namespace Appwrite\Utopia\Request\Filters; +use Appwrite\Extend\Exception; use Appwrite\Utopia\Request\Filter; use Utopia\Database\Query; @@ -67,9 +68,9 @@ class V17 extends Filter foreach ($content['queries'] as $query) { try { $query = $this->parseQuery($query); - $parsed[] = json_encode(array_filter($query->toArray())); + $parsed[] = \json_encode(\array_filter($query->toArray())); } catch (\Throwable $th) { - throw new \Exception("Invalid query: {$query}", previous: $th); + throw new Exception(Exception::GENERAL_QUERY_INVALID, $th->getMessage()); } } @@ -83,6 +84,7 @@ class V17 extends Filter { // Init empty vars we fill later $method = ''; + $attribute = null; $params = []; // Separate method from filter @@ -92,7 +94,7 @@ class V17 extends Filter throw new \Exception('Invalid query'); } - $method = mb_substr($filter, 0, $paramsStart); + $method = \mb_substr($filter, 0, $paramsStart); // Separate params from filter $paramsEnd = \strlen($filter) - 1; // -1 to ignore ) @@ -103,14 +105,13 @@ class V17 extends Filter throw new \Exception('Invalid query method'); } - $currentParam = ""; // We build param here before pushing when it's ended + $currentParam = ''; // We build param here before pushing when it's ended $currentArrayParam = []; // We build array param here before pushing when it's ended $stack = []; // State for stack of parentheses $stackCount = 0; // Length of stack array. Kept as variable to improve performance $stringStackState = null; // State for string support - // Loop thorough all characters for ($i = $parametersStart; $i < $paramsEnd; $i++) { $char = $filter[$i]; @@ -135,20 +136,25 @@ class V17 extends Filter ($filter[$i - 1] !== static::CHAR_BACKSLASH || $filter[$i - 2] === static::CHAR_BACKSLASH) // Must not be escaped; ) { if ($isStringStack) { - // Dont mix-up string symbols. Only allow the same as on start + // Don't mix up string symbols. Only allow the same as on start if ($char === $stringStackState) { // End of string $stringStackState = null; } - - // Either way, add symbol to builder - static::appendSymbol($isStringStack, $char, $i, $filter, $currentParam); } else { // Start of string $stringStackState = $char; - static::appendSymbol($isStringStack, $char, $i, $filter, $currentParam); } + // Either way, add symbol to builder + static::appendSymbol( + $isStringStack, + $char, + $i, + $filter, + $currentParam, + ); + continue; } @@ -174,12 +180,12 @@ class V17 extends Filter continue; } elseif ($char === static::CHAR_COMMA) { // Params separation support - // If in array stack, dont merge yet, just mark it in array param builder + // If in array stack, don't merge yet, just mark it in array param builder if ($isArrayStack) { $currentArrayParam[] = $currentParam; $currentParam = ""; } else { - // Append from parap builder. Either value, or array + // Append from param builder. Either value, or array if (empty($currentArrayParam)) { if (strlen($currentParam)) { $params[] = $currentParam; @@ -193,23 +199,28 @@ class V17 extends Filter } // Value, not relevant to syntax - static::appendSymbol($isStringStack, $char, $i, $filter, $currentParam); + static::appendSymbol( + $isStringStack, + $char, + $i, + $filter, + $currentParam, + ); } - if (strlen($currentParam)) { + if (\strlen($currentParam)) { $params[] = $currentParam; - $currentParam = ""; + $currentParam = ''; } $parsedParams = []; foreach ($params as $param) { - // If array, parse each child separatelly + // If array, parse each child separately if (\is_array($param)) { foreach ($param as $element) { $arr[] = self::parseValue($element); } - $parsedParams[] = $arr ?? []; } else { $parsedParams[] = self::parseValue($param); @@ -295,8 +306,13 @@ class V17 extends Filter * @param string $currentParam * @return void */ - private function appendSymbol(bool $isStringStack, string $char, int $index, string $filter, string &$currentParam): void - { + private function appendSymbol( + bool $isStringStack, + string $char, + int $index, + string $filter, + string &$currentParam + ): void { // Ignore spaces and commas outside of string $canBeIgnored = false; diff --git a/src/Appwrite/Utopia/Request/Filters/V20.php b/src/Appwrite/Utopia/Request/Filters/V20.php index c8622f8b7a..3783a61947 100644 --- a/src/Appwrite/Utopia/Request/Filters/V20.php +++ b/src/Appwrite/Utopia/Request/Filters/V20.php @@ -2,8 +2,10 @@ namespace Appwrite\Utopia\Request\Filters; +use Appwrite\Extend\Exception; use Appwrite\Utopia\Request\Filter; use Utopia\Database\Database; +use Utopia\Database\Exception\NotFound; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; @@ -54,8 +56,8 @@ class V20 extends Filter try { $parsed = Query::parseQueries($content['queries']); - } catch (QueryException) { - return $content; + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } $selections = Query::groupByType($parsed)['selections'] ?? []; @@ -136,17 +138,28 @@ class V20 extends Filter return []; } - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty()) { - return []; + try { + $database = Authorization::skip(fn () => $dbForProject->getDocument( + 'databases', + $databaseId + )); + if ($database->isEmpty()) { + return []; + } + } catch (NotFound) { + throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = Authorization::skip(fn () => $dbForProject->getDocument( - 'database_' . $database->getSequence(), - $collectionId - )); - if ($collection->isEmpty()) { - return []; + try { + $collection = Authorization::skip(fn () => $dbForProject->getDocument( + 'database_' . $database->getSequence(), + $collectionId + )); + if ($collection->isEmpty()) { + return []; + } + } catch (NotFound) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); } $attributes = $collection->getAttribute('attributes', []); diff --git a/src/Appwrite/Utopia/Response/Model.php b/src/Appwrite/Utopia/Response/Model.php index 04468521b6..59c786ee1f 100644 --- a/src/Appwrite/Utopia/Response/Model.php +++ b/src/Appwrite/Utopia/Response/Model.php @@ -16,6 +16,7 @@ abstract class Model public const TYPE_RELATIONSHIP = 'relationship'; public const TYPE_PAYLOAD = 'payload'; public const TYPE_ARRAY = 'array'; + public const TYPE_ENUM = 'enum'; /** * @var bool diff --git a/src/Appwrite/Utopia/Response/Model/Attribute.php b/src/Appwrite/Utopia/Response/Model/Attribute.php index 8c43f8d21c..35de6bacc5 100644 --- a/src/Appwrite/Utopia/Response/Model/Attribute.php +++ b/src/Appwrite/Utopia/Response/Model/Attribute.php @@ -23,10 +23,11 @@ class Attribute extends Model 'example' => 'string', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`', 'default' => '', 'example' => 'available', + 'enum' => ['available', 'processing', 'deleting', 'stuck', 'failed'], ]) ->addRule('error', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Column.php b/src/Appwrite/Utopia/Response/Model/Column.php index 5562de39f2..cae8d1fadb 100644 --- a/src/Appwrite/Utopia/Response/Model/Column.php +++ b/src/Appwrite/Utopia/Response/Model/Column.php @@ -23,10 +23,11 @@ class Column extends Model 'example' => 'string', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`', 'default' => '', 'example' => 'available', + 'enum' => ['available', 'processing', 'deleting', 'stuck', 'failed'], ]) ->addRule('error', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Database.php b/src/Appwrite/Utopia/Response/Model/Database.php index 44a0d52af8..59f32b3162 100644 --- a/src/Appwrite/Utopia/Response/Model/Database.php +++ b/src/Appwrite/Utopia/Response/Model/Database.php @@ -41,10 +41,11 @@ class Database extends Model 'example' => false, ]) ->addRule('type', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Database type.', 'default' => 'legacy', 'example' => 'legacy', + 'enum' => ['legacy', 'tablesdb'], ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/Deployment.php b/src/Appwrite/Utopia/Response/Model/Deployment.php index 55c1589af0..f0815630b3 100644 --- a/src/Appwrite/Utopia/Response/Model/Deployment.php +++ b/src/Appwrite/Utopia/Response/Model/Deployment.php @@ -95,10 +95,11 @@ class Deployment extends Model 'example' => '5e5ea5c16897e', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'The deployment status. Possible values are "waiting", "processing", "building", "ready", and "failed".', 'default' => '', 'example' => 'ready', + 'enum' => ['waiting', 'processing', 'building', 'ready', 'failed'], ]) ->addRule('buildLogs', [ 'type' => self::TYPE_STRING, @@ -130,12 +131,6 @@ class Deployment extends Model 'default' => '', 'example' => 'https://github.com/vermakhushboo/g4-node-function', ]) - ->addRule('providerBranch', [ - 'type' => self::TYPE_STRING, - 'description' => 'The branch name of the vcs provider repository', - 'default' => '', - 'example' => 'main', - ]) ->addRule('providerCommitHash', [ 'type' => self::TYPE_STRING, 'description' => 'The commit hash of the vcs commit', diff --git a/src/Appwrite/Utopia/Response/Model/Execution.php b/src/Appwrite/Utopia/Response/Model/Execution.php index 39d2203bf9..f8ee32aa6e 100644 --- a/src/Appwrite/Utopia/Response/Model/Execution.php +++ b/src/Appwrite/Utopia/Response/Model/Execution.php @@ -52,16 +52,18 @@ class Execution extends Model 'example' => '5e5ea5c16897e', ]) ->addRule('trigger', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.', 'default' => '', 'example' => 'http', + 'enum' => ['http', 'schedule', 'event'], ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.', 'default' => '', 'example' => 'processing', + 'enum' => ['waiting', 'processing', 'completed', 'failed'], ]) ->addRule('requestMethod', [ 'type' => self::TYPE_STRING, @@ -77,7 +79,7 @@ class Execution extends Model ]) ->addRule('requestHeaders', [ 'type' => Response::MODEL_HEADERS, - 'description' => 'HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.', + 'description' => 'HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.', 'default' => [], 'example' => [['Content-Type' => 'application/json']], 'array' => true, diff --git a/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php b/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php index 7a74195371..29bd420ce5 100644 --- a/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php +++ b/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php @@ -17,10 +17,11 @@ class HealthAntivirus extends Model 'example' => '1.0.0', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, - 'description' => 'Antivirus status. Possible values can are: `disabled`, `offline`, `online`', + 'type' => self::TYPE_ENUM, + 'description' => 'Antivirus status. Possible values are: `disabled`, `offline`, `online`', 'default' => '', 'example' => 'online', + 'enum' => ['disabled', 'offline', 'online'], ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/HealthStatus.php b/src/Appwrite/Utopia/Response/Model/HealthStatus.php index ba340107ac..24fb8766ce 100644 --- a/src/Appwrite/Utopia/Response/Model/HealthStatus.php +++ b/src/Appwrite/Utopia/Response/Model/HealthStatus.php @@ -23,10 +23,11 @@ class HealthStatus extends Model 'example' => 128, ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, - 'description' => 'Service status. Possible values can are: `pass`, `fail`', + 'type' => self::TYPE_ENUM, + 'description' => 'Service status. Possible values are: `pass`, `fail`', 'default' => '', 'example' => 'pass', + 'enum' => ['pass', 'fail'], ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/Index.php b/src/Appwrite/Utopia/Response/Model/Index.php index 62661738c2..5a4d606408 100644 --- a/src/Appwrite/Utopia/Response/Model/Index.php +++ b/src/Appwrite/Utopia/Response/Model/Index.php @@ -41,10 +41,11 @@ class Index extends Model 'example' => 'primary', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`', 'default' => '', 'example' => 'available', + 'enum' => ['available', 'processing', 'deleting', 'stuck', 'failed'], ]) ->addRule('error', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Message.php b/src/Appwrite/Utopia/Response/Model/Message.php index e52b6836c5..4c1e08b9cb 100644 --- a/src/Appwrite/Utopia/Response/Model/Message.php +++ b/src/Appwrite/Utopia/Response/Model/Message.php @@ -34,6 +34,7 @@ class Message extends Model 'description' => 'Message provider type.', 'default' => '', 'example' => MESSAGE_TYPE_EMAIL, + 'enum' => [MESSAGE_TYPE_EMAIL, MESSAGE_TYPE_SMS, MESSAGE_TYPE_PUSH], ]) ->addRule('topics', [ 'type' => self::TYPE_STRING, @@ -50,7 +51,7 @@ class Message extends Model 'example' => ['5e5ea5c16897e'], ]) ->addRule('targets', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Target IDs set as recipients.', 'default' => '', 'array' => true, @@ -94,10 +95,11 @@ class Message extends Model ], ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Status of delivery.', 'default' => 'draft', 'example' => 'Message status can be one of the following: draft, processing, scheduled, sent, or failed.', + 'enum' => ['draft', 'processing', 'scheduled', 'sent', 'failed'], ]); } diff --git a/src/Appwrite/Utopia/Response/Model/Platform.php b/src/Appwrite/Utopia/Response/Model/Platform.php index 4b8ffb1486..151e43780d 100644 --- a/src/Appwrite/Utopia/Response/Model/Platform.php +++ b/src/Appwrite/Utopia/Response/Model/Platform.php @@ -40,10 +40,11 @@ class Platform extends Model 'example' => 'My Web App', ]) ->addRule('type', [ - 'type' => self::TYPE_STRING, - 'description' => 'Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.', + 'type' => self::TYPE_ENUM, + 'description' => 'Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.', 'default' => '', 'example' => 'web', + 'enum' => ['web', 'flutter-web', 'flutter-ios', 'flutter-android', 'flutter-linux', 'flutter-macos', 'flutter-windows', 'apple-ios', 'apple-macos', 'apple-watchos', 'apple-tvos', 'android', 'unity', 'react-native-ios', 'react-native-android'], ]) ->addRule('key', [ 'type' => self::TYPE_STRING, @@ -60,7 +61,7 @@ class Platform extends Model 'type' => self::TYPE_STRING, 'description' => 'Web app hostname. Empty string for other platforms.', 'default' => '', - 'example' => true, + 'example' => 'app.example.com', ]) ->addRule('httpUser', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Rule.php b/src/Appwrite/Utopia/Response/Model/Rule.php index 12903b270e..d4b8ffd9e7 100644 --- a/src/Appwrite/Utopia/Response/Model/Rule.php +++ b/src/Appwrite/Utopia/Response/Model/Rule.php @@ -55,7 +55,7 @@ class Rule extends Model ->addRule('redirectStatusCode', [ 'type' => self::TYPE_INTEGER, 'description' => 'Status code to apply during redirect. Used if type is "redirect"', - 'default' => '', + 'default' => 301, 'example' => 301, ]) ->addRule('deploymentId', [ @@ -65,10 +65,11 @@ class Rule extends Model 'example' => 'n3u9feiwmf', ]) ->addRule('deploymentResourceType', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Type of deployment. Possible values are "function", "site". Used if rule\'s type is "deployment".', 'default' => '', 'example' => 'function', + 'enum' => ['function', 'site'], ]) ->addRule('deploymentResourceId', [ 'type' => self::TYPE_STRING, @@ -80,13 +81,14 @@ class Rule extends Model 'type' => self::TYPE_STRING, 'description' => 'Name of Git branch that updates rule. Used if type is "deployment"', 'default' => '', - 'example' => 'function', + 'example' => 'main', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Domain verification status. Possible values are "created", "verifying", "verified" and "unverified"', - 'default' => false, + 'default' => 'created', 'example' => 'verified', + 'enum' => ['created', 'verifying', 'verified', 'unverified'], ]) ->addRule('logs', [ 'type' => self::TYPE_STRING, diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 8d27aa7230..a432bc0acd 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -5270,8 +5270,8 @@ trait DatabasesBase $this->assertEquals(2, count($response['body']['documents'])); $this->assertEquals(null, $response['body']['documents'][0]['fullName']); $this->assertArrayNotHasKey("libraries", $response['body']['documents'][0]); - $this->assertArrayNotHasKey('$databaseId', $response['body']['documents'][0]); - $this->assertArrayNotHasKey('$collectionId', $response['body']['documents'][0]); + $this->assertArrayHasKey('$databaseId', $response['body']['documents'][0]); + $this->assertArrayHasKey('$collectionId', $response['body']['documents'][0]); } /** @@ -5291,8 +5291,8 @@ trait DatabasesBase $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayNotHasKey('libraries', $response['body']['documents'][0]); - $this->assertArrayNotHasKey('$databaseId', $response['body']['documents'][0]); - $this->assertArrayNotHasKey('$collectionId', $response['body']['documents'][0]); + $this->assertArrayHasKey('$databaseId', $response['body']['documents'][0]); + $this->assertArrayHasKey('$collectionId', $response['body']['documents'][0]); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -5305,8 +5305,8 @@ trait DatabasesBase $document = $response['body']['documents'][0]; $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayHasKey('libraries', $document); - $this->assertArrayNotHasKey('$databaseId', $document); - $this->assertArrayNotHasKey('$collectionId', $document); + $this->assertArrayHasKey('$databaseId', $document); + $this->assertArrayHasKey('$collectionId', $document); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents/' . $document['$id'], array_merge([ 'content-type' => 'application/json', @@ -7798,4 +7798,269 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ])); } + + public function testSpatialColCreateOnExistingData(): void + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Spatial Distance Meters Database' + ]); + + $databaseId = $database['body']['$id']; + + $colId = ID::unique(); + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => $colId, + 'name' => 'spatial-test', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'description', + 'size' => 512, + 'required' => false, + 'default' => '', + ]); + + $this->assertEquals(202, $description['headers']['status-code']); + sleep(2); + + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'description' => 'description' + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $document['headers']['status-code']); + + $point = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/point', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'loc', + 'required' => true, + ]); + + $this->assertEquals(400, $point['headers']['status-code']); + + $point = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/point', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'loc', + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(202, $point['headers']['status-code']); + + $line = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/line', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'route', + 'required' => true, + ]); + + $this->assertEquals(400, $line['headers']['status-code']); + + $line = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/line', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'route', + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(202, $line['headers']['status-code']); + + $poly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/polygon', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'area', + 'required' => true, + ]); + + $this->assertEquals(400, $poly['headers']['status-code']); + + $poly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/polygon', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'area', + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(202, $poly['headers']['status-code']); + } + + public function testSpatialColCreateOnExistingDataWithDefaults(): void + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Spatial With Defaults Database' + ]); + + $databaseId = $database['body']['$id']; + + $colId = ID::unique(); + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => $colId, + 'name' => 'spatial-test-defaults', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'description', + 'size' => 512, + 'required' => false, + 'default' => '', + ]); + + $this->assertEquals(202, $description['headers']['status-code']); + sleep(2); + + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'description' => 'description' + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $document['headers']['status-code']); + + // Test point with default value + $point = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/point', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'loc', + 'required' => false, + 'default' => [0.0, 0.0] + ]); + + $this->assertEquals(202, $point['headers']['status-code']); + + // Test line with default value + $line = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/line', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'route', + 'required' => false, + 'default' => [[0.0, 0.0], [1.0, 1.0]] + ]); + + $this->assertEquals(202, $line['headers']['status-code']); + + // Test polygon with default value + $poly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/polygon', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'area', + 'required' => false, + 'default' => [[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]]] + ]); + + $this->assertEquals(202, $poly['headers']['status-code']); + + // Wait for attributes to be available + sleep(2); + + // Create a new document without spatial data to test default values + $newDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'description' => 'test default values' + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $newDocument['headers']['status-code']); + + $newDocumentId = $newDocument['body']['$id']; + + // Fetch the document to verify default values are applied + $fetchedDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $colId . '/documents/' . $newDocumentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $fetchedDocument['headers']['status-code']); + + // Verify default values are applied + $this->assertEquals([0.0, 0.0], $fetchedDocument['body']['loc']); + $this->assertEquals([[0.0, 0.0], [1.0, 1.0]], $fetchedDocument['body']['route']); + $this->assertEquals([[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]]], $fetchedDocument['body']['area']); + } } diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index eba7ec96a7..336193f5d9 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -3062,7 +3062,7 @@ trait DatabasesBase public function testInvalidRowStructure(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3735,7 +3735,7 @@ trait DatabasesBase public function testEnforceTableAndRowPermissions(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3928,7 +3928,7 @@ trait DatabasesBase public function testEnforceTablePermissions(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4284,7 +4284,7 @@ trait DatabasesBase public function testUpdatePermissionsWithEmptyPayload(): array { // Create Database - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5197,8 +5197,8 @@ trait DatabasesBase $this->assertEquals(2, count($response['body']['rows'])); $this->assertEquals(null, $response['body']['rows'][0]['fullName']); $this->assertArrayNotHasKey("libraries", $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$tableId', $response['body']['rows'][0]); + $this->assertArrayHasKey('$databaseId', $response['body']['rows'][0]); + $this->assertArrayHasKey('$tableId', $response['body']['rows'][0]); } /** @@ -5218,8 +5218,8 @@ trait DatabasesBase $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayNotHasKey('libraries', $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$tableId', $response['body']['rows'][0]); + $this->assertArrayHasKey('$databaseId', $response['body']['rows'][0]); + $this->assertArrayHasKey('$tableId', $response['body']['rows'][0]); $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', @@ -5232,8 +5232,8 @@ trait DatabasesBase $row = $response['body']['rows'][0]; $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayHasKey('libraries', $row); - $this->assertArrayNotHasKey('$databaseId', $row); - $this->assertArrayNotHasKey('$tableId', $row); + $this->assertArrayHasKey('$databaseId', $row); + $this->assertArrayHasKey('$tableId', $row); $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', @@ -8828,4 +8828,269 @@ trait DatabasesBase $this->client->call(Client::METHOD_DELETE, "/tablesdb/{$databaseId}", $headers); } + public function testSpatialColCreateOnExistingData(): void + { + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Spatial Distance Meters Database' + ]); + + $databaseId = $database['body']['$id']; + + $tableId = ID::unique(); + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => $tableId, + 'name' => 'spatial-test', + 'rowSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + ], + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + + $description = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'description', + 'size' => 512, + 'required' => false, + 'default' => '', + ]); + + $this->assertEquals(202, $description['headers']['status-code']); + sleep(2); + + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'description' => 'description' + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $row['headers']['status-code']); + + $point = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/point', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'loc', + 'required' => true, + ]); + + $this->assertEquals(400, $point['headers']['status-code']); + + $point = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/point', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'loc', + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(202, $point['headers']['status-code']); + + $line = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/line', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'route', + 'required' => true, + ]); + + $this->assertEquals(400, $line['headers']['status-code']); + + $line = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/line', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'route', + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(202, $line['headers']['status-code']); + + $poly = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/polygon', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'area', + 'required' => true, + ]); + + $this->assertEquals(400, $poly['headers']['status-code']); + + $poly = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/polygon', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'area', + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(202, $poly['headers']['status-code']); + } + + public function testSpatialColCreateOnExistingDataWithDefaults(): void + { + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Spatial With Defaults Database' + ]); + + $databaseId = $database['body']['$id']; + + $tableId = ID::unique(); + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => $tableId, + 'name' => 'spatial-test-defaults', + 'rowSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + ], + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + + $description = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'description', + 'size' => 512, + 'required' => false, + 'default' => '', + ]); + + $this->assertEquals(202, $description['headers']['status-code']); + sleep(2); + + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'description' => 'description' + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $row['headers']['status-code']); + + // Test point with default value + $point = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/point', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'loc', + 'required' => false, + 'default' => [0.0, 0.0] + ]); + + $this->assertEquals(202, $point['headers']['status-code']); + + // Test line with default value + $line = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/line', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'route', + 'required' => false, + 'default' => [[0.0, 0.0], [1.0, 1.0]] + ]); + + $this->assertEquals(202, $line['headers']['status-code']); + + // Test polygon with default value + $poly = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/polygon', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'area', + 'required' => false, + 'default' => [[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]]] + ]); + + $this->assertEquals(202, $poly['headers']['status-code']); + + // Wait for columns to be available + sleep(2); + + // Create a new row without spatial data to test default values + $newRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'description' => 'test default values' + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $newRow['headers']['status-code']); + + $newRowId = $newRow['body']['$id']; + + // Fetch the row to verify default values are applied + $fetchedRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $newRowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $fetchedRow['headers']['status-code']); + + // Verify default values are applied + $this->assertEquals([0.0, 0.0], $fetchedRow['body']['loc']); + $this->assertEquals([[0.0, 0.0], [1.0, 1.0]], $fetchedRow['body']['route']); + $this->assertEquals([[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]]], $fetchedRow['body']['area']); + } + }