diff --git a/app/config/version.php b/app/config/version.php index 3e3d3ee0c3..21c048982c 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ post('/v1/database') ->label('sdk.method', 'createCollection') ->label('sdk.description', '/docs/references/database/create-collection.md') ->param('name', '', function () { return new Text(256); }, 'Collection name.') - ->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).') - ->param('write', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with write permissions. [Learn more about permissions and roles](/docs/permissions).') + ->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions and roles](/docs/permissions) and get a full list of available permissions.') + ->param('write', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions and roles](/docs/permissions) and get a full list of available permissions.') ->param('rules', [], function () use ($projectDB) { return new ArrayList(new Collection($projectDB, [Database::SYSTEM_COLLECTION_RULES], ['$collection' => Database::SYSTEM_COLLECTION_RULES, '$permissions' => ['read' => [], 'write' => []]])); }, 'Array of [rule objects](/docs/rules). Each rule define a collection field name, data type and validation') ->action( function ($name, $read, $write, $rules) use ($response, $projectDB, $webhook, $audit) { @@ -353,9 +353,8 @@ $utopia->post('/v1/database/:collectionId/documents') ->label('sdk.description', '/docs/references/database/create-document.md') ->param('collectionId', null, function () { return new UID(); }, 'Collection unique ID.') ->param('data', [], function () { return new \Utopia\Validator\Mock(); }, 'Document data as JSON string.') - ->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).', true) - ->param('write', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with write permissions. [Learn more about permissions and roles](/docs/permissions).', true) - ->param('parentDocument', '', function () { return new UID(); }, 'Parent document unique ID. Use when you want your new document to be a child of a parent document.', true) + ->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions and roles](/docs/permissions) and get a full list of available permissions.') + ->param('write', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions and roles](/docs/permissions) and get a full list of available permissions.') ->param('parentDocument', '', function () { return new UID(); }, 'Parent document unique ID. Use when you want your new document to be a child of a parent document.', true) ->param('parentProperty', '', function () { return new Key(); }, 'Parent document property name. Use when you want your new document to be a child of a parent document.', true) ->param('parentPropertyType', Document::SET_TYPE_ASSIGN, function () { return new WhiteList([Document::SET_TYPE_ASSIGN, Document::SET_TYPE_APPEND, Document::SET_TYPE_PREPEND]); }, 'Parent document property connection type. You can set this value to **assign**, **append** or **prepend**, default value is assign. Use when you want your new document to be a child of a parent document.', true) ->action( diff --git a/app/controllers/storage.php b/app/controllers/storage.php index 964ecb85ab..679b3158f4 100644 --- a/app/controllers/storage.php +++ b/app/controllers/storage.php @@ -523,8 +523,8 @@ $utopia->put('/v1/storage/files/:fileId') ->label('sdk.method', 'updateFile') ->label('sdk.description', '/docs/references/storage/update-file.md') ->param('fileId', '', function () { return new UID(); }, 'File unique ID.') - ->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).', true) - ->param('write', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with write permissions. [Learn more about permissions and roles](/docs/permissions).', true) + ->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions and roles](/docs/permissions) and get a full list of available permissions.') + ->param('write', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions and roles](/docs/permissions) and get a full list of available permissions.') ->param('folderId', '', function () { return new UID(); }, 'Folder to associate files with.', true) ->action( function ($fileId, $read, $write, $folderId) use ($response, $projectDB) { diff --git a/composer.lock b/composer.lock index d53c772300..8ce1193bfd 100644 --- a/composer.lock +++ b/composer.lock @@ -12,12 +12,12 @@ "source": { "type": "git", "url": "https://github.com/appwrite/sdk-for-php.git", - "reference": "263b9e265b8d49870f5d19cd964124a4dcd27faf" + "reference": "56a520e98ba5ccdc2aba4cde525814ecf76220b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/263b9e265b8d49870f5d19cd964124a4dcd27faf", - "reference": "263b9e265b8d49870f5d19cd964124a4dcd27faf", + "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/56a520e98ba5ccdc2aba4cde525814ecf76220b4", + "reference": "56a520e98ba5ccdc2aba4cde525814ecf76220b4", "shasum": "" }, "require": { @@ -39,7 +39,7 @@ "BSD-3-Clause" ], "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)", - "time": "2019-10-19T00:02:42+00:00" + "time": "2019-10-19T17:16:44+00:00" }, { "name": "appwrite/php-clamav",