Add quota and share-attributes props

Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
Louis Chemineau
2023-04-24 14:48:23 +02:00
parent 62f63a2668
commit adeae621d2

View File

@@ -133,111 +133,120 @@ And here is how it should look in the body of your DAV request:
Supported properties
^^^^^^^^^^^^^^^^^^^^
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| Property | Description | Example |
+===============================+==================================================+=============================================+
| <d:getlastmodified /> | The latest modification time. | ``"Wed, 20 Jul 2022 05:12:23 GMT"`` |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <d:getetag /> | The file's etag. | ``"&quot;6436d084d4805&quot;"`` |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <d:getcontenttype /> | The mime type of the file. | ``"image/jpeg"`` |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <d:resourcetype /> | Specifies the nature of the resource. | ``<d:collection />`` for a folder |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <d:getcontentlength /> | The size if it is a file. | ``3030237`` |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:id /> | | The fileid namespaced by the instance id. | |
| | | Globally unique. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:fileid /> | The unique id for the file within the instance. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:downloadURL /> | The URL to download the file. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:permissions /> | The permissions that the user has over the file. | | S: Shared |
| | | | R: Shareable |
| | | | M: Mounted |
| | | | G: Readable |
| | | | D: Deletable |
| | | | NV: Updateable, Renameable, Moveable |
| | | | W: Updateable (file) |
| | | | CK: Creatable |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <nc:mount-type /> | The type of mount. | | ``''`` = local |
| | | | ``'shared'`` = received share |
| | | | ``'group'`` = group folder |
| | | | ``'external'`` = external storage |
| | | | ``'external-session'`` = external storage |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <nc:is-encrypted /> | Whether the folder is end-to-end encrypted. | | ``0`` for ``false`` |
| | | | ``1`` for ``true`` |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:tags /> | List of user specified tags. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:favorite /> | The favorite state. | | ``0`` for not favourited |
| | | | ``1`` for favourited |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:comments-href /> | The DAV endpoint to fetch the comments. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:comments-count /> | The number of comments. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:comments-unread /> | The number of unread comments. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:owner-id /> | The user id of the owner of a shared file. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:owner-display-name /> | The display name of the owner of a shared file. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:share-types /> | The list of type share. | | ``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 |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <ocs:share-permissions /> | | The permissions that the | | ``1`` = Read |
| | | user has over the share. | | ``2`` = Update |
| | | | ``4`` = Create |
| | | | ``8`` = Delete |
| | | | ``16`` = Share |
| | | | ``31`` = All |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <ocm:share-permissions /> | | The permissions that the | ``share``, ``read``, ``write`` |
| | | user has over the share. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <nc:sharees /> | The list of share recipient. | | - id |
| | | | - display-name |
| | | | - share type |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:checksums /> | A list of checksum. | ``md5:04c36b75222cd9fd47f2607333029106`` |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <nc:has-preview /> | Whether a preview of the file is available. | ``true`` or ``false`` |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <oc:size /> | | Unlike ```getcontentlength``, | |
| | | this property also works | |
| | | for folders, reporting the size | |
| | | of everything in the folder. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <nc:rich-workspace-file /> | The workspace file. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <nc:rich-workspace /> | The content of the workspace file. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <nc:upload_time /> | Date this file was uploaded. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <nc:note /> | Share note. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <nc:contained-folder-count /> | | The number of folders directly contained | |
| | | in the folder (not recursively). | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <nc:contained-file-count /> | | The number of files directly contained | |
| | | in the folder (not recursively). | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
| <nc:data-fingerprint /> | | Used by the clients to find out | |
| | | if a backup has been restored. | |
+-------------------------------+--------------------------------------------------+---------------------------------------------+
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| Property | Description | Example |
+===============================+==================================================+=======================================================================+
| <d:getlastmodified /> | The latest modification time. | ``"Wed, 20 Jul 2022 05:12:23 GMT"`` |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <d:getetag /> | The file's etag. | ``"&quot;6436d084d4805&quot;"`` |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <d:getcontenttype /> | The mime type of the file. | ``"image/jpeg"`` |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <d:resourcetype /> | Specifies the nature of the resource. | ``<d:collection />`` for a folder |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <d:getcontentlength /> | The size if it is a file. | ``3030237`` |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:id /> | | The fileid namespaced by the instance id. | |
| | | Globally unique. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:fileid /> | The unique id for the file within the instance. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:downloadURL /> | The URL to download the file. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:permissions /> | The permissions that the user has over the file. | | S: Shared |
| | | | R: Shareable |
| | | | M: Mounted |
| | | | G: Readable |
| | | | D: Deletable |
| | | | NV: Updateable, Renameable, Moveable |
| | | | W: Updateable (file) |
| | | | CK: Creatable |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <nc:mount-type /> | The type of mount. | | ``''`` = local |
| | | | ``'shared'`` = received share |
| | | | ``'group'`` = group folder |
| | | | ``'external'`` = external storage |
| | | | ``'external-session'`` = external storage |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <nc:is-encrypted /> | Whether the folder is end-to-end encrypted. | | ``0`` for ``false`` |
| | | | ``1`` for ``true`` |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:tags /> | List of user specified tags. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:favorite /> | The favorite state. | | ``0`` for not favourited |
| | | | ``1`` for favourited |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:comments-href /> | The DAV endpoint to fetch the comments. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:comments-count /> | The number of comments. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:comments-unread /> | The number of unread comments. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:owner-id /> | The user id of the owner of a shared file. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:owner-display-name /> | The display name of the owner of a shared file. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:share-types /> | The list of type share. | | ``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 |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <ocs:share-permissions /> | | The permissions that the | | ``1`` = Read |
| | | user has over the share. | | ``2`` = Update |
| | | | ``4`` = Create |
| | | | ``8`` = Delete |
| | | | ``16`` = Share |
| | | | ``31`` = All |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <ocm:share-permissions /> | | The permissions that the | ``share``, ``read``, ``write`` |
| | | user has over the share. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <ocm:share-attributes /> | User set attributes. | ``[{ "scope" => <string>, "key" => <string>, "enabled" => <bool> }]`` |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <nc:sharees /> | The list of share recipient. | | - id |
| | | | - display-name |
| | | | - share type |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:checksums /> | A list of checksum. | ``md5:04c36b75222cd9fd47f2607333029106`` |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <nc:has-preview /> | Whether a preview of the file is available. | ``true`` or ``false`` |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:size /> | | Unlike ```getcontentlength``, | |
| | | this property also works | |
| | | for folders, reporting the size | |
| | | of everything in the folder. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:quota-used-bytes /> | Amount of bytes used in the folder. | ``3950773`` |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <oc:quota-available-bytes /> | Amount of available bytes in the folder. | | ``3950773`` |
| | | | ``-1`` Uncomputed free space. |
| | | | ``-2`` Unknown free space. |
| | | | ``-3`` Unlimited free space. |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <nc:rich-workspace-file /> | The workspace file. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <nc:rich-workspace /> | The content of the workspace file. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <nc:upload_time /> | Date this file was uploaded. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <nc:note /> | Share note. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <nc:contained-folder-count /> | | The number of folders directly contained | |
| | | in the folder (not recursively). | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <nc:contained-file-count /> | | The number of files directly contained | |
| | | in the folder (not recursively). | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| <nc:data-fingerprint /> | | Used by the clients to find out | |
| | | if a backup has been restored. | |
+-------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
Listing folders (rfc4918_)