From 140f3775dcdc77e84bd6bca5feba2788c05d1d2c Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Wed, 3 May 2023 16:13:29 +0200 Subject: [PATCH] Add groupfolders and files_lock properties Signed-off-by: Louis Chemineau --- developer_manual/client_apis/WebDAV/basic.rst | 312 ++++++++++-------- 1 file changed, 173 insertions(+), 139 deletions(-) diff --git a/developer_manual/client_apis/WebDAV/basic.rst b/developer_manual/client_apis/WebDAV/basic.rst index 48bfd6ab0..540503191 100644 --- a/developer_manual/client_apis/WebDAV/basic.rst +++ b/developer_manual/client_apis/WebDAV/basic.rst @@ -134,145 +134,179 @@ And here is how it should look in your DAV request: Supported properties ^^^^^^^^^^^^^^^^^^^^ -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| Property | Description | Example | -+===============================+==================================================+==========================================================================+ -| | The creation date of the node. | ``"1970-01-01T00:00:00+00:00"`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The latest modification time. | ``"Wed, 20 Jul 2022 05:12:23 GMT"`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The file's etag. | ``""6436d084d4805""`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The mime type of the file. | ``"image/jpeg"`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | Specifies the nature of the resource. | ```` for a folder | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The size if it is a file. | ``3030237`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The language of the content. | ``en`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | A name suitable for presentation. | ``File name`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | | Dummy endpoint for class 2 WebDAV support. | ```` | -| | | Should return the list of lock, but | | -| | | always return an empty response. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | | Dummy endpoint for class 2 WebDAV support. | | ```` | -| | | Always provide the same lock capabilities. | | ```` | -| | | | | ```` | -| | | | | ```` | -| | | | | ```` | -| | | | | ```` | -| | | | | ```` | -| | | | | ```` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | | The fileid namespaced by the instance id. | | -| | | Globally unique. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The unique id for the file within the instance. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The URL to download the file. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | | The permissions that the user has over the | | ``S``: Shared | -| | | file. The value is a string containing letters | | ``R``: Shareable | -| | | for all available permissions. | | ``M``: Mounted | -| | | | ``G``: Readable | -| | | | ``D``: Deletable | -| | | | ``NV``: Updateable, Renameable, Moveable | -| | | | ``W``: Updateable (file) | -| | | | ``CK``: Creatable | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | Same as ``creationdate``, but as a timestamp. | ``0`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The type of mount. | | ``''`` = local | -| | | | ``'shared'`` = received share | -| | | | ``'group'`` = group folder | -| | | | ``'external'`` = external storage | -| | | | ``'external-session'`` = external storage | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | Whether the folder is end-to-end encrypted. | | ``0`` for ``false`` | -| | | | ``1`` for ``true`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | List of user specified tags. | ``test`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The favorite state. | | ``0`` for not favourited | -| | | | ``1`` for favourited | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The DAV endpoint to fetch the comments. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The number of comments. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The number of unread comments. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The user id of the owner of a shared file. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The display name of the owner of a shared file. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | XML array of share types. | | ``{shareTypeId}`` | -| | | | ``0`` = User | -| | | | ``1`` = Group | -| | | | ``3`` = Public link | -| | | | ``4`` = Email | -| | | | ``6`` = Federated cloud share | -| | | | ``7`` = Circle | -| | | | ``8`` = Guest | -| | | | ``9`` = Remote group | -| | | | ``10`` = Talk conversation | -| | | | ``12`` = Deck | -| | | | ``15`` = Science mesh | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | | The permissions that the | | ``1`` = Read | -| | | user has over the share. | | ``2`` = Update | -| | | | ``4`` = Create | -| | | | ``8`` = Delete | -| | | | ``16`` = Share | -| | | | ``31`` = All | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | | The permissions that the user has | ``['share', 'read', 'write']`` | -| | | over the share as a JSON array. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | User set attributes as a JSON array. | ``[{ "scope" => , "key" => , "enabled" => }]`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The list of share recipient. | | ```` | -| | | | ``alice`` | -| | | | ``Alice`` | -| | | | ``0`` | -| | | | ```` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | An array of checksums. | ``md5:04c36b75222cd9fd47f2607333029106`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | Whether a preview of the file is available. | ``true`` or ``false`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | | Unlike ``getcontentlength``, | | -| | | this property also works | | -| | | for folders, reporting the size | | -| | | of everything in the folder. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | Amount of bytes used in the folder. | ``3950773`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | Amount of available bytes in the folder. | | ``3950773`` | -| | | | ``-1`` Uncomputed free space. | -| | | | ``-2`` Unknown free space. | -| | | | ``-3`` Unlimited free space. | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The id of the workspace file. | `3456` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | The content of the workspace file. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | Date this file was uploaded. | ``1675789581`` | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | Share note. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | | The number of folders directly contained | | -| | | in the folder (not recursively). | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | | The number of files directly contained | | -| | | in the folder (not recursively). | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ -| | | Used by the clients to find out | | -| | | if a backup has been restored. | | -+-------------------------------+--------------------------------------------------+--------------------------------------------------------------------------+ - ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| Property | Description | Example | ++===============================+=================================================+==========================================================================+ +| | The creation date of the node. | ``"1970-01-01T00:00:00+00:00"`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The latest modification time. | ``"Wed, 20 Jul 2022 05:12:23 GMT"`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The file's etag. | ``""6436d084d4805""`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The mime type of the file. | ``"image/jpeg"`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Specifies the nature of the resource. | ```` for a folder | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The size if it is a file. | ``3030237`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The language of the content. | ``en`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | A name suitable for presentation. | ``File name`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | | Dummy endpoint for class 2 WebDAV support. | ```` | +| | | Should return the list of lock, but | | +| | | always return an empty response. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | | Dummy endpoint for class 2 WebDAV support. | | ```` | +| | | Always provide the same lock capabilities. | | ```` | +| | | | | ```` | +| | | | | ```` | +| | | | | ```` | +| | | | | ```` | +| | | | | ```` | +| | | | | ```` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | | The fileid namespaced by the instance id. | | +| | | Globally unique. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The unique id for the file within the instance. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The URL to download the file. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | | The permissions that the user has over the | | ``S``: Shared | +| | | file. The value is a string containing | | ``R``: Shareable | +| | | letters for all available permissions. | | ``M``: Mounted | +| | | | ``G``: Readable | +| | | | ``D``: Deletable | +| | | | ``NV``: Updateable, Renameable, Moveable | +| | | | ``W``: Updateable (file) | +| | | | ``CK``: Creatable | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Same as ``creationdate``, but as a timestamp. | ``0`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The type of mount. | | ``''`` = local | +| | | | ``'shared'`` = received share | +| | | | ``'group'`` = group folder | +| | | | ``'external'`` = external storage | +| | | | ``'external-session'`` = external storage | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Whether the folder is end-to-end encrypted. | | ``0`` for ``false`` | +| | | | ``1`` for ``true`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | List of user specified tags. | ``test`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The favorite state. | | ``0`` for not favourited | +| | | | ``1`` for favourited | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The DAV endpoint to fetch the comments. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The number of comments. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The number of unread comments. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The user id of the owner of a shared file. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The display name of the owner of a shared file. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | XML array of share types. | | ``{shareTypeId}`` | +| | | | ``0`` = User | +| | | | ``1`` = Group | +| | | | ``3`` = Public link | +| | | | ``4`` = Email | +| | | | ``6`` = Federated cloud share | +| | | | ``7`` = Circle | +| | | | ``8`` = Guest | +| | | | ``9`` = Remote group | +| | | | ``10`` = Talk conversation | +| | | | ``12`` = Deck | +| | | | ``15`` = Science mesh | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | | The permissions that the | | ``1`` = Read | +| | | user has over the share. | | ``2`` = Update | +| | | | ``4`` = Create | +| | | | ``8`` = Delete | +| | | | ``16`` = Share | +| | | | ``31`` = All | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | | The permissions that the user has | ``['share', 'read', 'write']`` | +| | | over the share as a JSON array. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | User set attributes as a JSON array. | ``[{ "scope" => , "key" => , "enabled" => }]`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The list of share recipient. | | ```` | +| | | | ``alice`` | +| | | | ``Alice`` | +| | | | ``0`` | +| | | | ```` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | An array of checksums. | ``md5:04c36b75222cd9fd47f2607333029106`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Whether a preview of the file is available. | ``true`` or ``false`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | | Unlike ``getcontentlength``, | | +| | | this property also works | | +| | | for folders, reporting the size | | +| | | of everything in the folder. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Amount of bytes used in the folder. | ``3950773`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Amount of available bytes in the folder. | | ``3950773`` | +| | | | ``-1`` Uncomputed free space. | +| | | | ``-2`` Unknown free space. | +| | | | ``-3`` Unlimited free space. | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The id of the workspace file. | `3456` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The content of the workspace file. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Date this file was uploaded. | ``1675789581`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Share note. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | | The number of folders directly contained | | +| | | in the folder (not recursively). | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | | The number of files directly contained | | +| | | in the folder (not recursively). | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | | Used by the clients to find out | | +| | | if a backup has been restored. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Whether ACL is enabled for this group folder. | ``1`` or ``0`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Wether the current user can manager ACL. | ``1`` or ``0`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Array of ACL rules. | | ```` | +| | | | ``group`` | +| | | | ``admin`` | +| | | | ``admin`` | +| | | | ``20`` | +| | | | ``15`` | +| | | | ```` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Array of ACL rules from the parents folders | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Numerical id of that group folder. | ``1`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Wether the file is locked. | ``1`` or ``0`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Type of the owner of the lock. | ``0`` = User | +| | | ``1`` = Office or Text | +| | | ``2`` = WebDAV | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | User id of the owner of the lock. | ``alice`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Display name of the owner of the lock. | ``Alice`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | App id of an app owned lock. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | Date when the lock was created as a timestamp. | ``1675789581`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | TTL of the lock in seconds staring from the | ``0`` = No timeout | +| | creation time. | | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ +| | The token of the lock. | ``files_lock/0e53dfb6-61b4-46f0-b38e-d9a428292998`` | ++-------------------------------+-------------------------------------------------+--------------------------------------------------------------------------+ Listing folders (rfc4918_) --------------------------