📝Updated documentation for the backend services
This commit is contained in:
committed by
Anton Shepilov
parent
904b767382
commit
3cf164787f
@@ -2,11 +2,11 @@
|
||||
description: Drive on TDrive
|
||||
---
|
||||
|
||||
# 📁 Drive
|
||||
# 📁 Documents
|
||||
|
||||
## description
|
||||
|
||||
**Drive** or **Documents** is the Nodejs drive implementation for tdrive, it contains drive items.
|
||||
**Documents** is the Nodejs drive implementation for tdrive, it contains drive items.
|
||||
|
||||
A **Drive item** can be:
|
||||
|
||||
|
||||
+35
-34
@@ -6,25 +6,25 @@ description: Documents database models
|
||||
|
||||
**DriveFile**
|
||||
|
||||
```javascript
|
||||
{
|
||||
// Primary Key
|
||||
"company_id": uuid;
|
||||
"id": uuid;
|
||||
|
||||
"parent_id": string;
|
||||
"is_in_trash": boolean;
|
||||
"is_directory": boolean;
|
||||
"name": string;
|
||||
"extension": string;
|
||||
"description": string;
|
||||
"tags": string[];
|
||||
"added": string;
|
||||
"last_modified": string;
|
||||
"access_info": AccessInformation;
|
||||
"content_keywords": string;
|
||||
"hidden_data": unknown;
|
||||
"last_version_cache": Partial<FileVersion>;
|
||||
```TypeScript
|
||||
export class DriveFile {
|
||||
company_id: string;
|
||||
id: string;
|
||||
parent_id: string;
|
||||
is_in_trash: boolean;
|
||||
is_directory: boolean;
|
||||
name: string;
|
||||
extension: string;
|
||||
description: string;
|
||||
tags: string[];
|
||||
added: number;
|
||||
last_modified: number;
|
||||
access_info: AccessInformation;
|
||||
content_keywords: string;
|
||||
creator: string;
|
||||
size: number;
|
||||
last_version_cache: Partial<FileVersion>;
|
||||
scope: DriveScope;
|
||||
}
|
||||
|
||||
type AccessInformation = {
|
||||
@@ -46,23 +46,24 @@ type AuthEntity = {
|
||||
|
||||
**FileVersion**
|
||||
|
||||
```javascript
|
||||
{
|
||||
"id": string;
|
||||
"provider": "internal" | "drive" | string;
|
||||
"file_id": string;
|
||||
"file_metadata": DriveFileMetadata;
|
||||
"date_added": number;
|
||||
"creator_id": string;
|
||||
"application_id": string;
|
||||
"realname": string;
|
||||
"key": string;
|
||||
"mode": string | "OpenSSL-2";
|
||||
"file_size": number;
|
||||
"filename": string;
|
||||
"data": unknown;
|
||||
```Typescript
|
||||
export class FileVersion {
|
||||
drive_item_id: string;
|
||||
id: string;
|
||||
provider: "internal" | "drive" | string;
|
||||
file_metadata: DriveFileMetadata;
|
||||
date_added: number;
|
||||
creator_id: string;
|
||||
application_id: string;
|
||||
realname: string;
|
||||
key: string;
|
||||
mode: string | "OpenSSL-2";
|
||||
file_size: number;
|
||||
filename: string;
|
||||
data: unknown;
|
||||
}
|
||||
|
||||
|
||||
type DriveFileMetadata = {
|
||||
source: "internal" | "drive" | string;
|
||||
external_id: string;
|
||||
|
||||
@@ -2,14 +2,6 @@
|
||||
description: Documents API
|
||||
---
|
||||
|
||||
# Authentication
|
||||
<!-- TODO[NOT UP TO DATE] -->
|
||||
All the following routes require the usual authentication header. But you can also use other ways of authentication:
|
||||
|
||||
- For the download routes, you can use a token generated by the `/internal/services/documents/v1/companies/:company_id/download/token` route (see bellow).
|
||||
- All the routes can use a query string `?public_token=token` to authenticate the user.
|
||||
- All the routes can use a query string `?tdrive_tab_token=token` to authenticate the user in the context of a channel tab for instance.
|
||||
|
||||
# Navigation and drive capabilities
|
||||
|
||||
## Fetch a drive item
|
||||
|
||||
Reference in New Issue
Block a user