diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index daae50cd58..16a002fdfe 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -62,20 +62,6 @@ class Create extends Action since: '1.8.0', replaceWith: 'tablesdb.createDatabase', ) - ), - new Method( - namespace: 'tablesdb', - group: 'tablesdb', - name: 'createDatabase', - description: '/docs/references/tablesdb/create-database.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_CREATED, - model: UtopiaResponse::MODEL_DATABASE, - ) - ], - contentType: ContentType::JSON ) ]) ->param('databaseId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') @@ -103,8 +89,6 @@ class Create extends Action } catch (DuplicateException) { throw new Exception(Exception::DATABASE_ALREADY_EXISTS); } catch (StructureException $e) { - // TODO: @Jake, how do we handle this document/row? - // there's no context awareness at this level on what the api is. throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php index 8b637539b8..4e8be85b78 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php @@ -51,23 +51,9 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tablesdb.deleteDatabase', + replaceWith: 'tablesdb.delete', ) ), - new Method( - namespace: 'tablesdb', - group: 'tablesdb', - name: 'deleteDatabase', - description: '/docs/references/tablesdb/delete-database.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_NOCONTENT, - model: UtopiaResponse::MODEL_NONE, - ) - ], - contentType: ContentType::NONE - ), ]) ->param('databaseId', '', new UID(), 'Database ID.') ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php index 2e073a427d..429175afe5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php @@ -46,23 +46,9 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tablesdb.getDatabase', + replaceWith: 'tablesdb.get', ) ), - new Method( - namespace: 'tablesdb', - group: 'tablesdb', - name: 'getDatabase', - description: '/docs/references/tablesdb/get-database.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DATABASE, - ) - ], - contentType: ContentType::JSON - ), ]) ->param('databaseId', '', new UID(), 'Database ID.') ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php index c1732d11c8..fac51ab47e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php @@ -52,23 +52,9 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tablesdb.updateDatabase', + replaceWith: 'tablesdb.update', ) ), - new Method( - namespace: 'tablesdb', - group: 'tablesdb', - name: 'updateDatabase', - description: '/docs/references/tablesdb/update-database.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DATABASE, - ) - ], - contentType: ContentType::JSON - ), ]) ->param('databaseId', '', new UID(), 'Database ID.') ->param('name', null, new Text(128), 'Database name. Max length: 128 chars.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php index 120a2c9dfb..897f8b50ef 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -52,23 +52,9 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tablesdb.listDatabases', + replaceWith: 'tablesdb.list', ) ), - new Method( - namespace: 'tablesdb', - group: 'tablesdb', - name: 'listDatabases', - description: '/docs/references/tablesdb/list-databases.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DATABASE_LIST, - ) - ], - contentType: ContentType::JSON - ), ]) ->param('queries', [], new Databases(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Databases::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)