Shared with me browser view (#82)

* shared with me page, move browser view backend
This commit is contained in:
Anton Shepilov
2023-06-20 14:42:47 +02:00
committed by GitHub
parent c249c70d48
commit 19b2d7d009
8 changed files with 262 additions and 16 deletions
@@ -17,13 +17,24 @@ import { stopWords } from "./const";
import { DriveFile } from "./entities/drive-file";
import { DriveFileMetadata, FileVersion } from "./entities/file-version";
import { checkAccess, generateAccessToken } from "./services/access-check";
import { CompanyExecutionContext, DriveExecutionContext, RootType, TrashType } from "./types";
import {
CompanyExecutionContext,
DriveExecutionContext,
RootType,
SharedWithMeType,
TrashType,
} from "./types";
const ROOT: RootType = "root";
const TRASH: TrashType = "trash";
const SHARED_WITH_ME: SharedWithMeType = "shared_with_me";
export const isVirtualFolder = (id: string) => {
return id === ROOT || id === TRASH || id.startsWith("user_");
return id === ROOT || id === TRASH || id.startsWith("user_") || id == SHARED_WITH_ME;
};
export const isSharedWithMeFolder = (id: string) => {
return id === SHARED_WITH_ME;
};
export const getVirtualFoldersNames = async (id: string, context: DriveExecutionContext) => {