@burdenoff/microfe-files 2026.510.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/config/index.d.ts +33 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +28 -0
- package/dist/config/index.js.map +1 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/files/FilesRoot.d.ts +31 -0
- package/dist/files/FilesRoot.d.ts.map +1 -0
- package/dist/files/FilesRoot.js +63 -0
- package/dist/files/FilesRoot.js.map +1 -0
- package/dist/files/FilesRoutes.d.ts +12 -0
- package/dist/files/FilesRoutes.d.ts.map +1 -0
- package/dist/files/FilesRoutes.js +45 -0
- package/dist/files/FilesRoutes.js.map +1 -0
- package/dist/files/components/ActionMenu.d.ts +19 -0
- package/dist/files/components/ActionMenu.d.ts.map +1 -0
- package/dist/files/components/ActionMenu.js +73 -0
- package/dist/files/components/ActionMenu.js.map +1 -0
- package/dist/files/components/ConfirmDialog.d.ts +14 -0
- package/dist/files/components/ConfirmDialog.d.ts.map +1 -0
- package/dist/files/components/ConfirmDialog.js +85 -0
- package/dist/files/components/ConfirmDialog.js.map +1 -0
- package/dist/files/components/ContextMenu.d.ts +59 -0
- package/dist/files/components/ContextMenu.d.ts.map +1 -0
- package/dist/files/components/ContextMenu.js +136 -0
- package/dist/files/components/ContextMenu.js.map +1 -0
- package/dist/files/components/CopyDialog.d.ts +12 -0
- package/dist/files/components/CopyDialog.d.ts.map +1 -0
- package/dist/files/components/CopyDialog.js +139 -0
- package/dist/files/components/CopyDialog.js.map +1 -0
- package/dist/files/components/EmptyState.d.ts +8 -0
- package/dist/files/components/EmptyState.d.ts.map +1 -0
- package/dist/files/components/EmptyState.js +66 -0
- package/dist/files/components/EmptyState.js.map +1 -0
- package/dist/files/components/FileBrowser.d.ts +37 -0
- package/dist/files/components/FileBrowser.d.ts.map +1 -0
- package/dist/files/components/FileBrowser.js +421 -0
- package/dist/files/components/FileBrowser.js.map +1 -0
- package/dist/files/components/FileCard.d.ts +30 -0
- package/dist/files/components/FileCard.d.ts.map +1 -0
- package/dist/files/components/FileCard.js +233 -0
- package/dist/files/components/FileCard.js.map +1 -0
- package/dist/files/components/FileInfoPanel.d.ts +9 -0
- package/dist/files/components/FileInfoPanel.d.ts.map +1 -0
- package/dist/files/components/FileInfoPanel.js +224 -0
- package/dist/files/components/FileInfoPanel.js.map +1 -0
- package/dist/files/components/FileListItem.d.ts +46 -0
- package/dist/files/components/FileListItem.d.ts.map +1 -0
- package/dist/files/components/FileListItem.js +235 -0
- package/dist/files/components/FileListItem.js.map +1 -0
- package/dist/files/components/FilePreviewModal.d.ts +17 -0
- package/dist/files/components/FilePreviewModal.d.ts.map +1 -0
- package/dist/files/components/FilePreviewModal.js +175 -0
- package/dist/files/components/FilePreviewModal.js.map +1 -0
- package/dist/files/components/FileVersionPanel.d.ts +9 -0
- package/dist/files/components/FileVersionPanel.d.ts.map +1 -0
- package/dist/files/components/FileVersionPanel.js +227 -0
- package/dist/files/components/FileVersionPanel.js.map +1 -0
- package/dist/files/components/FolderCard.d.ts +34 -0
- package/dist/files/components/FolderCard.d.ts.map +1 -0
- package/dist/files/components/FolderCard.js +225 -0
- package/dist/files/components/FolderCard.js.map +1 -0
- package/dist/files/components/MoveDialog.d.ts +12 -0
- package/dist/files/components/MoveDialog.d.ts.map +1 -0
- package/dist/files/components/MoveDialog.js +123 -0
- package/dist/files/components/MoveDialog.js.map +1 -0
- package/dist/files/components/SearchBar.d.ts +13 -0
- package/dist/files/components/SearchBar.d.ts.map +1 -0
- package/dist/files/components/SearchBar.js +257 -0
- package/dist/files/components/SearchBar.js.map +1 -0
- package/dist/files/components/ShareDialog.d.ts +24 -0
- package/dist/files/components/ShareDialog.d.ts.map +1 -0
- package/dist/files/components/ShareDialog.js +201 -0
- package/dist/files/components/ShareDialog.js.map +1 -0
- package/dist/files/components/TabBar.d.ts +14 -0
- package/dist/files/components/TabBar.d.ts.map +1 -0
- package/dist/files/components/TabBar.js +65 -0
- package/dist/files/components/TabBar.js.map +1 -0
- package/dist/files/components/Toast.d.ts +14 -0
- package/dist/files/components/Toast.d.ts.map +1 -0
- package/dist/files/components/Toast.js +51 -0
- package/dist/files/components/Toast.js.map +1 -0
- package/dist/files/components/UploadQueue.d.ts +21 -0
- package/dist/files/components/UploadQueue.d.ts.map +1 -0
- package/dist/files/components/UploadQueue.js +171 -0
- package/dist/files/components/UploadQueue.js.map +1 -0
- package/dist/files/components/index.d.ts +43 -0
- package/dist/files/components/index.d.ts.map +1 -0
- package/dist/files/components/viewers/AudioPlayer.d.ts +8 -0
- package/dist/files/components/viewers/AudioPlayer.d.ts.map +1 -0
- package/dist/files/components/viewers/AudioPlayer.js +102 -0
- package/dist/files/components/viewers/AudioPlayer.js.map +1 -0
- package/dist/files/components/viewers/CodeViewer.d.ts +16 -0
- package/dist/files/components/viewers/CodeViewer.d.ts.map +1 -0
- package/dist/files/components/viewers/CodeViewer.js +113 -0
- package/dist/files/components/viewers/CodeViewer.js.map +1 -0
- package/dist/files/components/viewers/ImageViewer.d.ts +8 -0
- package/dist/files/components/viewers/ImageViewer.d.ts.map +1 -0
- package/dist/files/components/viewers/ImageViewer.js +138 -0
- package/dist/files/components/viewers/ImageViewer.js.map +1 -0
- package/dist/files/components/viewers/PDFViewer.d.ts +15 -0
- package/dist/files/components/viewers/PDFViewer.d.ts.map +1 -0
- package/dist/files/components/viewers/PDFViewer.js +80 -0
- package/dist/files/components/viewers/PDFViewer.js.map +1 -0
- package/dist/files/components/viewers/TextViewer.d.ts +8 -0
- package/dist/files/components/viewers/TextViewer.d.ts.map +1 -0
- package/dist/files/components/viewers/TextViewer.js +121 -0
- package/dist/files/components/viewers/TextViewer.js.map +1 -0
- package/dist/files/components/viewers/VideoPlayer.d.ts +8 -0
- package/dist/files/components/viewers/VideoPlayer.d.ts.map +1 -0
- package/dist/files/components/viewers/VideoPlayer.js +138 -0
- package/dist/files/components/viewers/VideoPlayer.js.map +1 -0
- package/dist/files/components/viewers/index.d.ts +7 -0
- package/dist/files/components/viewers/index.d.ts.map +1 -0
- package/dist/files/components/viewers/index.js +6 -0
- package/dist/files/graphql-types.d.ts +317 -0
- package/dist/files/graphql-types.d.ts.map +1 -0
- package/dist/files/hooks/useBatchOperations.d.ts +32 -0
- package/dist/files/hooks/useBatchOperations.d.ts.map +1 -0
- package/dist/files/hooks/useBatchOperations.js +18 -0
- package/dist/files/hooks/useBatchOperations.js.map +1 -0
- package/dist/files/hooks/useBinItems.d.ts +11 -0
- package/dist/files/hooks/useBinItems.d.ts.map +1 -0
- package/dist/files/hooks/useBinItems.js +27 -0
- package/dist/files/hooks/useBinItems.js.map +1 -0
- package/dist/files/hooks/useBrowsePage.d.ts +18 -0
- package/dist/files/hooks/useBrowsePage.d.ts.map +1 -0
- package/dist/files/hooks/useBrowsePage.js +34 -0
- package/dist/files/hooks/useBrowsePage.js.map +1 -0
- package/dist/files/hooks/useCopyFile.d.ts +14 -0
- package/dist/files/hooks/useCopyFile.d.ts.map +1 -0
- package/dist/files/hooks/useCopyFile.js +22 -0
- package/dist/files/hooks/useCopyFile.js.map +1 -0
- package/dist/files/hooks/useCreateFolder.d.ts +14 -0
- package/dist/files/hooks/useCreateFolder.d.ts.map +1 -0
- package/dist/files/hooks/useCreateFolder.js +14 -0
- package/dist/files/hooks/useCreateFolder.js.map +1 -0
- package/dist/files/hooks/useCreateFolderShare.d.ts +16 -0
- package/dist/files/hooks/useCreateFolderShare.d.ts.map +1 -0
- package/dist/files/hooks/useCreateFolderShare.js +14 -0
- package/dist/files/hooks/useCreateFolderShare.js.map +1 -0
- package/dist/files/hooks/useCreateShare.d.ts +16 -0
- package/dist/files/hooks/useCreateShare.d.ts.map +1 -0
- package/dist/files/hooks/useCreateShare.js +14 -0
- package/dist/files/hooks/useCreateShare.js.map +1 -0
- package/dist/files/hooks/useDeleteFile.d.ts +9 -0
- package/dist/files/hooks/useDeleteFile.d.ts.map +1 -0
- package/dist/files/hooks/useDeleteFile.js +20 -0
- package/dist/files/hooks/useDeleteFile.js.map +1 -0
- package/dist/files/hooks/useDeleteFolder.d.ts +10 -0
- package/dist/files/hooks/useDeleteFolder.d.ts.map +1 -0
- package/dist/files/hooks/useDeleteFolder.js +24 -0
- package/dist/files/hooks/useDeleteFolder.js.map +1 -0
- package/dist/files/hooks/useDragDrop.d.ts +31 -0
- package/dist/files/hooks/useDragDrop.d.ts.map +1 -0
- package/dist/files/hooks/useDragDrop.js +45 -0
- package/dist/files/hooks/useDragDrop.js.map +1 -0
- package/dist/files/hooks/useFileVersions.d.ts +52 -0
- package/dist/files/hooks/useFileVersions.d.ts.map +1 -0
- package/dist/files/hooks/useFileVersions.js +52 -0
- package/dist/files/hooks/useFileVersions.js.map +1 -0
- package/dist/files/hooks/useFiles.d.ts +18 -0
- package/dist/files/hooks/useFiles.d.ts.map +1 -0
- package/dist/files/hooks/useFolder.d.ts +7 -0
- package/dist/files/hooks/useFolder.d.ts.map +1 -0
- package/dist/files/hooks/useFolderPath.d.ts +2 -0
- package/dist/files/hooks/useFolderPath.d.ts.map +1 -0
- package/dist/files/hooks/useFoldersQuery.d.ts +7 -0
- package/dist/files/hooks/useFoldersQuery.d.ts.map +1 -0
- package/dist/files/hooks/useFoldersQuery.js +13 -0
- package/dist/files/hooks/useFoldersQuery.js.map +1 -0
- package/dist/files/hooks/useKeyboardNavigation.d.ts +17 -0
- package/dist/files/hooks/useKeyboardNavigation.d.ts.map +1 -0
- package/dist/files/hooks/useKeyboardNavigation.js +105 -0
- package/dist/files/hooks/useKeyboardNavigation.js.map +1 -0
- package/dist/files/hooks/useMoveFile.d.ts +10 -0
- package/dist/files/hooks/useMoveFile.d.ts.map +1 -0
- package/dist/files/hooks/useMoveFile.js +21 -0
- package/dist/files/hooks/useMoveFile.js.map +1 -0
- package/dist/files/hooks/useMoveFolder.d.ts +10 -0
- package/dist/files/hooks/useMoveFolder.d.ts.map +1 -0
- package/dist/files/hooks/useMoveFolder.js +21 -0
- package/dist/files/hooks/useMoveFolder.js.map +1 -0
- package/dist/files/hooks/usePermanentlyDeleteFile.d.ts +9 -0
- package/dist/files/hooks/usePermanentlyDeleteFile.d.ts.map +1 -0
- package/dist/files/hooks/usePermanentlyDeleteFile.js +18 -0
- package/dist/files/hooks/usePermanentlyDeleteFile.js.map +1 -0
- package/dist/files/hooks/usePermanentlyDeleteFolder.d.ts +9 -0
- package/dist/files/hooks/usePermanentlyDeleteFolder.d.ts.map +1 -0
- package/dist/files/hooks/usePermanentlyDeleteFolder.js +18 -0
- package/dist/files/hooks/usePermanentlyDeleteFolder.js.map +1 -0
- package/dist/files/hooks/useRecentFiles.d.ts +10 -0
- package/dist/files/hooks/useRecentFiles.d.ts.map +1 -0
- package/dist/files/hooks/useRecentFiles.js +24 -0
- package/dist/files/hooks/useRecentFiles.js.map +1 -0
- package/dist/files/hooks/useRenameFile.d.ts +10 -0
- package/dist/files/hooks/useRenameFile.d.ts.map +1 -0
- package/dist/files/hooks/useRenameFile.js +21 -0
- package/dist/files/hooks/useRenameFile.js.map +1 -0
- package/dist/files/hooks/useRenameFolder.d.ts +10 -0
- package/dist/files/hooks/useRenameFolder.d.ts.map +1 -0
- package/dist/files/hooks/useRenameFolder.js +21 -0
- package/dist/files/hooks/useRenameFolder.js.map +1 -0
- package/dist/files/hooks/useRestoreFile.d.ts +9 -0
- package/dist/files/hooks/useRestoreFile.d.ts.map +1 -0
- package/dist/files/hooks/useRestoreFile.js +21 -0
- package/dist/files/hooks/useRestoreFile.js.map +1 -0
- package/dist/files/hooks/useRestoreFolder.d.ts +9 -0
- package/dist/files/hooks/useRestoreFolder.d.ts.map +1 -0
- package/dist/files/hooks/useRestoreFolder.js +21 -0
- package/dist/files/hooks/useRestoreFolder.js.map +1 -0
- package/dist/files/hooks/useSearch.d.ts +15 -0
- package/dist/files/hooks/useSearch.d.ts.map +1 -0
- package/dist/files/hooks/useSearch.js +27 -0
- package/dist/files/hooks/useSearch.js.map +1 -0
- package/dist/files/hooks/useStarredItems.d.ts +10 -0
- package/dist/files/hooks/useStarredItems.d.ts.map +1 -0
- package/dist/files/hooks/useStarredItems.js +18 -0
- package/dist/files/hooks/useStarredItems.js.map +1 -0
- package/dist/files/hooks/useToast.d.ts +11 -0
- package/dist/files/hooks/useToast.d.ts.map +1 -0
- package/dist/files/hooks/useToast.js +28 -0
- package/dist/files/hooks/useToast.js.map +1 -0
- package/dist/files/hooks/useToggleStar.d.ts +10 -0
- package/dist/files/hooks/useToggleStar.d.ts.map +1 -0
- package/dist/files/hooks/useToggleStar.js +26 -0
- package/dist/files/hooks/useToggleStar.js.map +1 -0
- package/dist/files/hooks/useUploadFile.d.ts +25 -0
- package/dist/files/hooks/useUploadFile.d.ts.map +1 -0
- package/dist/files/hooks/useUploadFile.js +74 -0
- package/dist/files/hooks/useUploadFile.js.map +1 -0
- package/dist/files/index.d.ts +29 -0
- package/dist/files/index.d.ts.map +1 -0
- package/dist/files/index.js +3 -0
- package/dist/files/pages/BrowserPage.d.ts +5 -0
- package/dist/files/pages/BrowserPage.d.ts.map +1 -0
- package/dist/files/pages/BrowserPage.js +1014 -0
- package/dist/files/pages/BrowserPage.js.map +1 -0
- package/dist/files/pages/ShareAccessPage.d.ts +2 -0
- package/dist/files/pages/ShareAccessPage.d.ts.map +1 -0
- package/dist/files/pages/ShareAccessPage.js +162 -0
- package/dist/files/pages/ShareAccessPage.js.map +1 -0
- package/dist/files/providers/FilesProvider.d.ts +25 -0
- package/dist/files/providers/FilesProvider.d.ts.map +1 -0
- package/dist/files/providers/FilesProvider.js +18 -0
- package/dist/files/providers/FilesProvider.js.map +1 -0
- package/dist/files/store/filesStore.d.ts +99 -0
- package/dist/files/store/filesStore.d.ts.map +1 -0
- package/dist/files/store/filesStore.js +129 -0
- package/dist/files/store/filesStore.js.map +1 -0
- package/dist/files/types.d.ts +266 -0
- package/dist/files/types.d.ts.map +1 -0
- package/dist/files/utils/events.d.ts +6 -0
- package/dist/files/utils/events.d.ts.map +1 -0
- package/dist/files/utils/events.js +16 -0
- package/dist/files/utils/events.js.map +1 -0
- package/dist/files/utils/i18n.d.ts +5 -0
- package/dist/files/utils/i18n.d.ts.map +1 -0
- package/dist/files/utils/i18n.js +15 -0
- package/dist/files/utils/i18n.js.map +1 -0
- package/dist/files/utils/index.d.ts +74 -0
- package/dist/files/utils/index.d.ts.map +1 -0
- package/dist/files/utils/index.js +50 -0
- package/dist/files/utils/index.js.map +1 -0
- package/dist/files/utils/thumbnail.d.ts +5 -0
- package/dist/files/utils/thumbnail.d.ts.map +1 -0
- package/dist/files/utils/thumbnail.js +39 -0
- package/dist/files/utils/thumbnail.js.map +1 -0
- package/dist/files.d.ts +2 -0
- package/dist/files.js +6 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +21253 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2706 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-operations.js +1085 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/dist/generated/wspace-types.d.ts +55214 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/shared/types/index.d.ts +101 -0
- package/dist/shared/types/index.d.ts.map +1 -0
- package/dist/utils/nativeBridge.d.ts +3 -0
- package/dist/utils/nativeBridge.d.ts.map +1 -0
- package/dist/utils/nativeBridge.js +2 -0
- package/package.json +126 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File and Folder Types
|
|
3
|
+
*
|
|
4
|
+
* NOTE: Generated types now exist in `src/generated/wspace-types.ts` via graphql-codegen.
|
|
5
|
+
* This file is kept for backward compatibility with hooks that reference these local types.
|
|
6
|
+
* Prefer importing from `src/generated/wspace-types.ts` for new code.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum FileStatus {
|
|
9
|
+
ACTIVE = "ACTIVE",
|
|
10
|
+
ARCHIVED = "ARCHIVED",
|
|
11
|
+
DELETED = "DELETED"
|
|
12
|
+
}
|
|
13
|
+
export declare enum FileVisibility {
|
|
14
|
+
PUBLIC = "PUBLIC",
|
|
15
|
+
PRIVATE = "PRIVATE",
|
|
16
|
+
WORKSPACE = "WORKSPACE"
|
|
17
|
+
}
|
|
18
|
+
export declare enum FolderStatus {
|
|
19
|
+
ACTIVE = "ACTIVE",
|
|
20
|
+
ARCHIVED = "ARCHIVED",
|
|
21
|
+
DELETED = "DELETED"
|
|
22
|
+
}
|
|
23
|
+
export declare enum UploadType {
|
|
24
|
+
DIRECT = "DIRECT",
|
|
25
|
+
MULTIPART = "MULTIPART",
|
|
26
|
+
RESUMABLE = "RESUMABLE"
|
|
27
|
+
}
|
|
28
|
+
export declare enum UploadStatus {
|
|
29
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
30
|
+
COMPLETED = "COMPLETED",
|
|
31
|
+
FINALIZED = "FINALIZED",
|
|
32
|
+
FAILED = "FAILED",
|
|
33
|
+
EXPIRED = "EXPIRED",
|
|
34
|
+
ABORTED = "ABORTED"
|
|
35
|
+
}
|
|
36
|
+
export declare enum LockType {
|
|
37
|
+
OPTIMISTIC = "OPTIMISTIC",
|
|
38
|
+
PESSIMISTIC = "PESSIMISTIC",
|
|
39
|
+
SHARED = "SHARED"
|
|
40
|
+
}
|
|
41
|
+
export declare enum PermissionType {
|
|
42
|
+
VIEW = "VIEW",
|
|
43
|
+
DOWNLOAD = "DOWNLOAD",
|
|
44
|
+
EDIT = "EDIT",
|
|
45
|
+
DELETE = "DELETE",
|
|
46
|
+
SHARE = "SHARE",
|
|
47
|
+
MANAGE = "MANAGE"
|
|
48
|
+
}
|
|
49
|
+
export interface User {
|
|
50
|
+
id: string;
|
|
51
|
+
email: string;
|
|
52
|
+
name: string | null;
|
|
53
|
+
}
|
|
54
|
+
export interface File {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
workspaceId: string;
|
|
58
|
+
mimeType: string;
|
|
59
|
+
extension: string;
|
|
60
|
+
size: string;
|
|
61
|
+
s3Key: string;
|
|
62
|
+
s3Bucket: string;
|
|
63
|
+
sha256Hash: string | null;
|
|
64
|
+
description: string | null;
|
|
65
|
+
status: FileStatus;
|
|
66
|
+
visibility: FileVisibility;
|
|
67
|
+
folderId: string | null;
|
|
68
|
+
folder: Folder | null;
|
|
69
|
+
uploadedById: string;
|
|
70
|
+
uploadedBy: User;
|
|
71
|
+
createdAt: Date | string;
|
|
72
|
+
updatedAt: Date | string;
|
|
73
|
+
}
|
|
74
|
+
export interface Folder {
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
description: string | null;
|
|
78
|
+
workspaceId: string;
|
|
79
|
+
parentFolderId: string | null;
|
|
80
|
+
path: string;
|
|
81
|
+
status: FolderStatus;
|
|
82
|
+
createdById: string;
|
|
83
|
+
createdBy: User;
|
|
84
|
+
createdAt: Date | string;
|
|
85
|
+
updatedAt: Date | string;
|
|
86
|
+
}
|
|
87
|
+
export interface PaginationInput {
|
|
88
|
+
limit?: number;
|
|
89
|
+
cursor?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface FileFilterInput {
|
|
92
|
+
workspaceId?: string;
|
|
93
|
+
folderId?: string | null;
|
|
94
|
+
mimeType?: string[];
|
|
95
|
+
extensions?: string[];
|
|
96
|
+
uploadedBy?: string[];
|
|
97
|
+
status?: FileStatus[];
|
|
98
|
+
visibility?: FileVisibility[];
|
|
99
|
+
search?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface FileSortInput {
|
|
102
|
+
field: "name" | "size" | "createdAt" | "updatedAt";
|
|
103
|
+
direction: "asc" | "desc";
|
|
104
|
+
}
|
|
105
|
+
export interface FolderFilterInput {
|
|
106
|
+
workspaceId?: string;
|
|
107
|
+
parentFolderId?: string | null;
|
|
108
|
+
status?: FolderStatus[];
|
|
109
|
+
search?: string;
|
|
110
|
+
}
|
|
111
|
+
export interface FolderSortInput {
|
|
112
|
+
field: "name" | "createdAt" | "updatedAt";
|
|
113
|
+
direction: "asc" | "desc";
|
|
114
|
+
}
|
|
115
|
+
export interface PaginatedFilesResult {
|
|
116
|
+
files: File[];
|
|
117
|
+
total: number;
|
|
118
|
+
page: number;
|
|
119
|
+
limit: number;
|
|
120
|
+
hasMore: boolean;
|
|
121
|
+
}
|
|
122
|
+
export interface PaginatedFoldersResult {
|
|
123
|
+
folders: Folder[];
|
|
124
|
+
total: number;
|
|
125
|
+
page: number;
|
|
126
|
+
limit: number;
|
|
127
|
+
hasMore: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface FolderTree {
|
|
130
|
+
id: string;
|
|
131
|
+
name: string;
|
|
132
|
+
path: string;
|
|
133
|
+
children: FolderTree[];
|
|
134
|
+
fileCount: number;
|
|
135
|
+
folderCount: number;
|
|
136
|
+
}
|
|
137
|
+
export interface FolderPath {
|
|
138
|
+
id: string;
|
|
139
|
+
name: string;
|
|
140
|
+
path: string;
|
|
141
|
+
}
|
|
142
|
+
export interface FolderWithContents {
|
|
143
|
+
folder: Folder;
|
|
144
|
+
files: File[];
|
|
145
|
+
subfolders: Folder[];
|
|
146
|
+
totalFiles: number;
|
|
147
|
+
totalSubfolders: number;
|
|
148
|
+
}
|
|
149
|
+
export interface CreateFileInput {
|
|
150
|
+
name: string;
|
|
151
|
+
workspaceId: string;
|
|
152
|
+
mimeType: string;
|
|
153
|
+
extension: string;
|
|
154
|
+
size: string;
|
|
155
|
+
s3Key: string;
|
|
156
|
+
s3Bucket: string;
|
|
157
|
+
sha256Hash?: string;
|
|
158
|
+
description?: string;
|
|
159
|
+
visibility?: FileVisibility;
|
|
160
|
+
folderId?: string;
|
|
161
|
+
}
|
|
162
|
+
export interface UpdateFileInput {
|
|
163
|
+
id: string;
|
|
164
|
+
name?: string;
|
|
165
|
+
description?: string;
|
|
166
|
+
visibility?: FileVisibility;
|
|
167
|
+
folderId?: string;
|
|
168
|
+
}
|
|
169
|
+
export interface MoveFileInput {
|
|
170
|
+
id: string;
|
|
171
|
+
targetFolderId: string | null;
|
|
172
|
+
}
|
|
173
|
+
export interface CreateFolderInput {
|
|
174
|
+
name: string;
|
|
175
|
+
description?: string;
|
|
176
|
+
parentFolderId?: string;
|
|
177
|
+
}
|
|
178
|
+
export interface UpdateFolderInput {
|
|
179
|
+
id: string;
|
|
180
|
+
name?: string;
|
|
181
|
+
description?: string;
|
|
182
|
+
}
|
|
183
|
+
export interface MoveFolderInput {
|
|
184
|
+
id: string;
|
|
185
|
+
targetParentFolderId: string | null;
|
|
186
|
+
}
|
|
187
|
+
export interface UploadSession {
|
|
188
|
+
id: string;
|
|
189
|
+
workspaceId: string;
|
|
190
|
+
fileId: string | null;
|
|
191
|
+
uploadId: string;
|
|
192
|
+
fileName: string;
|
|
193
|
+
fileSize: string;
|
|
194
|
+
mimeType: string;
|
|
195
|
+
partSize: number;
|
|
196
|
+
totalParts: number;
|
|
197
|
+
uploadedParts: number;
|
|
198
|
+
uploadType: UploadType;
|
|
199
|
+
status: UploadStatus;
|
|
200
|
+
s3Key: string | null;
|
|
201
|
+
s3Bucket: string | null;
|
|
202
|
+
expiresAt: Date | string;
|
|
203
|
+
startedById: string;
|
|
204
|
+
startedAt: Date | string;
|
|
205
|
+
completedAt: Date | string | null;
|
|
206
|
+
updatedAt: Date | string;
|
|
207
|
+
}
|
|
208
|
+
export interface InitiateUploadInput {
|
|
209
|
+
workspaceId: string;
|
|
210
|
+
fileName: string;
|
|
211
|
+
fileSize: string;
|
|
212
|
+
mimeType: string;
|
|
213
|
+
folderId?: string;
|
|
214
|
+
uploadType?: UploadType;
|
|
215
|
+
}
|
|
216
|
+
export interface RegisterUploadedPartInput {
|
|
217
|
+
sessionId: string;
|
|
218
|
+
partNumber: number;
|
|
219
|
+
etag: string;
|
|
220
|
+
size: number;
|
|
221
|
+
}
|
|
222
|
+
export interface CompleteUploadInput {
|
|
223
|
+
sessionId: string;
|
|
224
|
+
sha256Hash?: string;
|
|
225
|
+
}
|
|
226
|
+
export interface FileLock {
|
|
227
|
+
id: string;
|
|
228
|
+
fileId: string;
|
|
229
|
+
lockType: LockType;
|
|
230
|
+
lockedById: string;
|
|
231
|
+
lockedBy: User;
|
|
232
|
+
reason: string | null;
|
|
233
|
+
isActive: boolean;
|
|
234
|
+
autoRelease: boolean;
|
|
235
|
+
expiresAt: Date | string;
|
|
236
|
+
releasedAt: Date | string | null;
|
|
237
|
+
releasedById: string | null;
|
|
238
|
+
createdAt: Date | string;
|
|
239
|
+
}
|
|
240
|
+
export interface AcquireLockInput {
|
|
241
|
+
fileId: string;
|
|
242
|
+
lockType: LockType;
|
|
243
|
+
reason?: string;
|
|
244
|
+
durationMinutes?: number;
|
|
245
|
+
}
|
|
246
|
+
export interface ExtendLockInput {
|
|
247
|
+
lockId: string;
|
|
248
|
+
additionalMinutes: number;
|
|
249
|
+
}
|
|
250
|
+
export interface FilePermission {
|
|
251
|
+
id: string;
|
|
252
|
+
fileId: string;
|
|
253
|
+
subjectType: string;
|
|
254
|
+
subjectId: string;
|
|
255
|
+
permissionType: PermissionType;
|
|
256
|
+
isInherited: boolean;
|
|
257
|
+
inheritedFrom: string | null;
|
|
258
|
+
expiresAt: Date | string | null;
|
|
259
|
+
grantedById: string;
|
|
260
|
+
grantedBy: User;
|
|
261
|
+
grantedAt: Date | string;
|
|
262
|
+
}
|
|
263
|
+
export interface GrantFilePermissionInput {
|
|
264
|
+
fileId: string;
|
|
265
|
+
subjectType: string;
|
|
266
|
+
subjectId: string;
|
|
267
|
+
permissionType: PermissionType;
|
|
268
|
+
expiresAt?: Date | string;
|
|
269
|
+
}
|
|
270
|
+
export interface BatchDownload {
|
|
271
|
+
id: string;
|
|
272
|
+
workspaceId: string;
|
|
273
|
+
fileIds: string[];
|
|
274
|
+
archiveName: string;
|
|
275
|
+
downloadUrl: string;
|
|
276
|
+
archiveSize: number;
|
|
277
|
+
fileCount: number;
|
|
278
|
+
status: string;
|
|
279
|
+
expiresAt: Date | string;
|
|
280
|
+
createdById: string;
|
|
281
|
+
createdAt: Date | string;
|
|
282
|
+
}
|
|
283
|
+
export interface CreateBatchDownloadInput {
|
|
284
|
+
workspaceId: string;
|
|
285
|
+
fileIds: string[];
|
|
286
|
+
archiveName?: string;
|
|
287
|
+
preserveFolderStructure?: boolean;
|
|
288
|
+
}
|
|
289
|
+
export interface ContentSearchResult {
|
|
290
|
+
file: File;
|
|
291
|
+
highlights: string[];
|
|
292
|
+
rank: number;
|
|
293
|
+
}
|
|
294
|
+
export interface SearchFilesInput {
|
|
295
|
+
workspaceId: string;
|
|
296
|
+
query: string;
|
|
297
|
+
filters?: Partial<FileFilterInput>;
|
|
298
|
+
pagination?: PaginationInput;
|
|
299
|
+
sort?: FileSortInput;
|
|
300
|
+
}
|
|
301
|
+
export interface StorageUsage {
|
|
302
|
+
used: string;
|
|
303
|
+
total: string;
|
|
304
|
+
percentage: number;
|
|
305
|
+
}
|
|
306
|
+
export interface UploadFileInput {
|
|
307
|
+
workspaceId: string;
|
|
308
|
+
file: File;
|
|
309
|
+
folderId?: string;
|
|
310
|
+
description?: string;
|
|
311
|
+
visibility?: FileVisibility;
|
|
312
|
+
}
|
|
313
|
+
export interface MoveFilesInput {
|
|
314
|
+
fileIds: string[];
|
|
315
|
+
targetFolderId: string | null;
|
|
316
|
+
}
|
|
317
|
+
//# sourceMappingURL=graphql-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql-types.d.ts","sourceRoot":"","sources":["../../src/files/graphql-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAED,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,QAAQ,aAA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,EAAE,IAAI,GAAG,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAGD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAGD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const useBulkDelete: () => {
|
|
2
|
+
mutateAsync: (ids: string[]) => Promise<any>;
|
|
3
|
+
isPending: boolean;
|
|
4
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
5
|
+
};
|
|
6
|
+
export declare const useBulkMove: () => {
|
|
7
|
+
mutateAsync: (input: {
|
|
8
|
+
ids: string[];
|
|
9
|
+
targetFolderId: string | null;
|
|
10
|
+
}) => Promise<any>;
|
|
11
|
+
isPending: boolean;
|
|
12
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
13
|
+
};
|
|
14
|
+
export declare const useBulkUpdateVisibility: () => {
|
|
15
|
+
mutateAsync: (input: {
|
|
16
|
+
ids: string[];
|
|
17
|
+
visibility: string;
|
|
18
|
+
}) => Promise<any>;
|
|
19
|
+
isPending: boolean;
|
|
20
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
21
|
+
};
|
|
22
|
+
export declare const useBulkPermanentlyDeleteFiles: () => {
|
|
23
|
+
mutateAsync: (ids: string[]) => Promise<any>;
|
|
24
|
+
isPending: boolean;
|
|
25
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
26
|
+
};
|
|
27
|
+
export declare const useBulkPermanentlyDeleteFolders: () => {
|
|
28
|
+
mutateAsync: (ids: string[]) => Promise<any>;
|
|
29
|
+
isPending: boolean;
|
|
30
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=useBatchOperations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBatchOperations.d.ts","sourceRoot":"","sources":["../../../src/files/hooks/useBatchOperations.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,aAAa;uBAOG,MAAM,EAAE;;;CAUpC,CAAC;AAEF,eAAO,MAAM,WAAW;yBAMO;QACzB,GAAG,EAAE,MAAM,EAAE,CAAC;QACd,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;KAC/B;;;CAaJ,CAAC;AAEF,eAAO,MAAM,uBAAuB;yBAOL;QAAE,GAAG,EAAE,MAAM,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;;;CAanE,CAAC;AAEF,eAAO,MAAM,6BAA6B;uBAOb,MAAM,EAAE;;;CAUpC,CAAC;AAEF,eAAO,MAAM,+BAA+B;uBAOf,MAAM,EAAE;;;CAUpC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useBulkDeleteFilesMutation as e } from "../../generated/wspace-operations.js";
|
|
2
|
+
//#region src/files/hooks/useBatchOperations.ts
|
|
3
|
+
var t = () => {
|
|
4
|
+
let [t, { loading: n, error: r }] = e({ refetchQueries: [
|
|
5
|
+
"GetFiles",
|
|
6
|
+
"GetFolders",
|
|
7
|
+
"GetBinFiles"
|
|
8
|
+
] });
|
|
9
|
+
return {
|
|
10
|
+
mutateAsync: async (e) => (await t({ variables: { ids: e } })).data?.bulkDeleteFiles,
|
|
11
|
+
isPending: n,
|
|
12
|
+
error: r
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { t as useBulkDelete };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=useBatchOperations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBatchOperations.js","names":[],"sources":["../../../src/files/hooks/useBatchOperations.ts"],"sourcesContent":["import {\n useBulkDeleteFilesMutation,\n useBulkMoveFilesMutation,\n useBulkPermanentlyDeleteFilesMutation,\n useBulkPermanentlyDeleteFoldersMutation,\n useBulkUpdateVisibilityMutation,\n} from \"../../generated/wspace-operations\";\n\nexport const useBulkDelete = () => {\n const [bulkDeleteFilesMutation, { loading, error }] =\n useBulkDeleteFilesMutation({\n refetchQueries: [\"GetFiles\", \"GetFolders\", \"GetBinFiles\"],\n });\n\n return {\n mutateAsync: async (ids: string[]) => {\n const result = await bulkDeleteFilesMutation({\n variables: { ids },\n });\n\n return result.data?.bulkDeleteFiles;\n },\n isPending: loading,\n error,\n };\n};\n\nexport const useBulkMove = () => {\n const [bulkMoveFilesMutation, { loading, error }] = useBulkMoveFilesMutation({\n refetchQueries: [\"GetFiles\", \"GetFolders\", \"GetRecentFiles\"],\n });\n\n return {\n mutateAsync: async (input: {\n ids: string[];\n targetFolderId: string | null;\n }) => {\n const result = await bulkMoveFilesMutation({\n variables: {\n ids: input.ids,\n targetFolderId: input.targetFolderId,\n },\n });\n\n return result.data?.bulkMoveFiles;\n },\n isPending: loading,\n error,\n };\n};\n\nexport const useBulkUpdateVisibility = () => {\n const [bulkUpdateVisibilityMutation, { loading, error }] =\n useBulkUpdateVisibilityMutation({\n refetchQueries: [\"GetFiles\", \"GetFolders\"],\n });\n\n return {\n mutateAsync: async (input: { ids: string[]; visibility: string }) => {\n const result = await bulkUpdateVisibilityMutation({\n variables: {\n ids: input.ids,\n visibility: input.visibility as never,\n },\n });\n\n return result.data?.bulkUpdateVisibility;\n },\n isPending: loading,\n error,\n };\n};\n\nexport const useBulkPermanentlyDeleteFiles = () => {\n const [bulkPermanentlyDeleteFilesMutation, { loading, error }] =\n useBulkPermanentlyDeleteFilesMutation({\n refetchQueries: [\"GetBinFiles\", \"GetFiles\"],\n });\n\n return {\n mutateAsync: async (ids: string[]) => {\n const result = await bulkPermanentlyDeleteFilesMutation({\n variables: { ids },\n });\n\n return result.data?.bulkPermanentlyDeleteFiles;\n },\n isPending: loading,\n error,\n };\n};\n\nexport const useBulkPermanentlyDeleteFolders = () => {\n const [bulkPermanentlyDeleteFoldersMutation, { loading, error }] =\n useBulkPermanentlyDeleteFoldersMutation({\n refetchQueries: [\"GetBinFolders\", \"GetFolders\"],\n });\n\n return {\n mutateAsync: async (ids: string[]) => {\n const result = await bulkPermanentlyDeleteFoldersMutation({\n variables: { ids },\n });\n\n return result.data?.bulkPermanentlyDeleteFolders;\n },\n isPending: loading,\n error,\n };\n};\n"],"mappings":";;AAQA,IAAa,UAAsB;CACjC,IAAM,CAAC,GAAyB,EAAE,YAAS,cACzC,EAA2B,EACzB,gBAAgB;EAAC;EAAY;EAAc;EAAc,EAC1D,CAAC;AAEJ,QAAO;EACL,aAAa,OAAO,OACH,MAAM,EAAwB,EAC3C,WAAW,EAAE,QAAK,EACnB,CAAC,EAEY,MAAM;EAEtB,WAAW;EACX;EACD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FileItem, FolderItem } from '../types';
|
|
2
|
+
export declare const useBinItems: (options?: {
|
|
3
|
+
skip?: boolean;
|
|
4
|
+
}) => {
|
|
5
|
+
files: FileItem[];
|
|
6
|
+
folders: FolderItem[];
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
error: Error | null;
|
|
9
|
+
refetch: () => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useBinItems.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBinItems.d.ts","sourceRoot":"","sources":["../../../src/files/hooks/useBinItems.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAErD,eAAO,MAAM,WAAW,GAAI,UAAU;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE;;;;WA+CpC,KAAK,GAAG,IAAI;;CAG/B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useGetFilesBinPageQuery as e } from "../../generated/wspace-operations.js";
|
|
2
|
+
//#region src/files/hooks/useBinItems.ts
|
|
3
|
+
var t = (t) => {
|
|
4
|
+
let n = e({
|
|
5
|
+
variables: {
|
|
6
|
+
filePagination: { limit: 100 },
|
|
7
|
+
folderPagination: { limit: 100 }
|
|
8
|
+
},
|
|
9
|
+
skip: t?.skip
|
|
10
|
+
}), r = [...n.data?.getFiles?.files || [], ...n.data?.getFolders?.folders || []];
|
|
11
|
+
return r.sort((e, t) => {
|
|
12
|
+
let n = new Date(e.updatedAt || e.updatedAt || 0).getTime();
|
|
13
|
+
return new Date(t.updatedAt || t.updatedAt || 0).getTime() - n;
|
|
14
|
+
}), {
|
|
15
|
+
files: r.filter((e) => "mimeType" in e),
|
|
16
|
+
folders: r.filter((e) => !("mimeType" in e)),
|
|
17
|
+
isLoading: n.loading,
|
|
18
|
+
error: n.error ?? null,
|
|
19
|
+
refetch: async () => {
|
|
20
|
+
await n.refetch();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { t as useBinItems };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=useBinItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBinItems.js","names":[],"sources":["../../../src/files/hooks/useBinItems.ts"],"sourcesContent":["/**\n * Bin Items Hook\n *\n * Fetches soft-deleted files and folders (status: DELETED) for the trash/bin view.\n * Uses getFiles and getFolders with status filter.\n * Items are sorted by updatedAt (most recently deleted first).\n */\n\nimport { useGetFilesBinPageQuery } from \"../../generated/wspace-operations\";\nimport type { FileItem, FolderItem } from \"../types\";\n\nexport const useBinItems = (options?: { skip?: boolean }) => {\n const query = useGetFilesBinPageQuery({\n variables: {\n filePagination: { limit: 100 },\n folderPagination: { limit: 100 },\n },\n skip: options?.skip,\n });\n\n // Combine files and folders and sort by updatedAt (most recently deleted first)\n const allItems: (FileItem | FolderItem)[] = [\n ...(query.data?.getFiles?.files || []),\n ...(query.data?.getFolders?.folders || []),\n ];\n\n // Sort by updatedAt DESC to show recently deleted items first\n allItems.sort((a, b) => {\n const dateA = new Date(\n (a as FileItem).updatedAt || (a as FolderItem).updatedAt || 0,\n ).getTime();\n const dateB = new Date(\n (b as FileItem).updatedAt || (b as FolderItem).updatedAt || 0,\n ).getTime();\n return dateB - dateA;\n });\n\n // Split back into files and folders\n const files = allItems.filter((item): item is FileItem => \"mimeType\" in item);\n const folders = allItems.filter(\n (item): item is FolderItem => !(\"mimeType\" in item),\n );\n\n // Extract files and folders from query results\n const isLoading = query.loading;\n\n // Combine errors\n const error = query.error ?? null;\n\n // Refetch function that refreshes both queries\n const refetch = async () => {\n await query.refetch();\n };\n\n return {\n files,\n folders,\n isLoading,\n error: error as Error | null,\n refetch,\n };\n};\n"],"mappings":";;AAWA,IAAa,KAAe,MAAiC;CAC3D,IAAM,IAAQ,EAAwB;EACpC,WAAW;GACT,gBAAgB,EAAE,OAAO,KAAK;GAC9B,kBAAkB,EAAE,OAAO,KAAK;GACjC;EACD,MAAM,GAAS;EAChB,CAAC,EAGI,IAAsC,CAC1C,GAAI,EAAM,MAAM,UAAU,SAAS,EAAE,EACrC,GAAI,EAAM,MAAM,YAAY,WAAW,EAAE,CAC1C;AA8BD,QA3BA,EAAS,MAAM,GAAG,MAAM;EACtB,IAAM,IAAQ,IAAI,KACf,EAAe,aAAc,EAAiB,aAAa,EAC7D,CAAC,SAAS;AAIX,SAHc,IAAI,KACf,EAAe,aAAc,EAAiB,aAAa,EAC7D,CAAC,SAAS,GACI;GACf,EAmBK;EACL,OAjBY,EAAS,QAAQ,MAA2B,cAAc,EAAK;EAkB3E,SAjBc,EAAS,QACtB,MAA6B,EAAE,cAAc,GAC/C;EAgBC,WAbgB,EAAM;EAcf,OAXK,EAAM,SAAS;EAY3B,SATc,YAAY;AAC1B,SAAM,EAAM,SAAS;;EAStB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type BrowsePageOptions = {
|
|
2
|
+
folderId?: string;
|
|
3
|
+
pageSize?: number;
|
|
4
|
+
skip?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const useBrowsePage: ({ folderId, pageSize, skip, }: BrowsePageOptions) => {
|
|
7
|
+
data: {
|
|
8
|
+
filesList: any;
|
|
9
|
+
foldersList: any;
|
|
10
|
+
folderPath: any;
|
|
11
|
+
currentFolder: any;
|
|
12
|
+
} | undefined;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
15
|
+
refetch: (variables?: any) => Promise<import("@apollo/client").ApolloClient.QueryResult<Types.GetFilesFolderBrowsePageQuery>>;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useBrowsePage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBrowsePage.d.ts","sourceRoot":"","sources":["../../../src/files/hooks/useBrowsePage.ts"],"names":[],"mappings":"AAMA,KAAK,iBAAiB,GAAG;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,+BAI3B,iBAAiB;;;;;;;;;;CA0CnB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useGetFilesFolderBrowsePageQuery as e, useGetFilesRootBrowsePageQuery as t } from "../../generated/wspace-operations.js";
|
|
2
|
+
import { useMemo as n } from "react";
|
|
3
|
+
//#region src/files/hooks/useBrowsePage.ts
|
|
4
|
+
var r = ({ folderId: r, pageSize: i = 100, skip: a = !1 }) => {
|
|
5
|
+
let o = { limit: i }, s = t({
|
|
6
|
+
variables: {
|
|
7
|
+
filePagination: o,
|
|
8
|
+
folderPagination: o
|
|
9
|
+
},
|
|
10
|
+
skip: a || !!r
|
|
11
|
+
}), c = e({
|
|
12
|
+
variables: {
|
|
13
|
+
folderId: r || "",
|
|
14
|
+
filePagination: o,
|
|
15
|
+
folderPagination: o
|
|
16
|
+
},
|
|
17
|
+
skip: a || !r
|
|
18
|
+
}), l = r ? c : s, u = l.data;
|
|
19
|
+
return {
|
|
20
|
+
data: n(() => u ? {
|
|
21
|
+
filesList: u.getFiles,
|
|
22
|
+
foldersList: u.getFolders,
|
|
23
|
+
folderPath: "getFolderPath" in u ? u.getFolderPath : void 0,
|
|
24
|
+
currentFolder: "getFolder" in u ? u.getFolder : void 0
|
|
25
|
+
} : void 0, [u]),
|
|
26
|
+
loading: l.loading,
|
|
27
|
+
error: l.error,
|
|
28
|
+
refetch: l.refetch
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { r as useBrowsePage };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=useBrowsePage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBrowsePage.js","names":[],"sources":["../../../src/files/hooks/useBrowsePage.ts"],"sourcesContent":["import {\n useGetFilesFolderBrowsePageQuery,\n useGetFilesRootBrowsePageQuery,\n} from \"../../generated/wspace-operations\";\nimport { useMemo } from \"react\";\n\ntype BrowsePageOptions = {\n folderId?: string;\n pageSize?: number;\n skip?: boolean;\n};\n\nexport const useBrowsePage = ({\n folderId,\n pageSize = 100,\n skip = false,\n}: BrowsePageOptions) => {\n const pagination = { limit: pageSize };\n\n const rootQuery = useGetFilesRootBrowsePageQuery({\n variables: {\n filePagination: pagination,\n folderPagination: pagination,\n },\n skip: skip || Boolean(folderId),\n });\n\n const folderQuery = useGetFilesFolderBrowsePageQuery({\n variables: {\n folderId: folderId || \"\",\n filePagination: pagination,\n folderPagination: pagination,\n },\n skip: skip || !folderId,\n });\n\n const activeQuery = folderId ? folderQuery : rootQuery;\n const data = activeQuery.data;\n const normalizedData = useMemo(\n () =>\n data\n ? {\n filesList: data.getFiles,\n foldersList: data.getFolders,\n folderPath:\n \"getFolderPath\" in data ? data.getFolderPath : undefined,\n currentFolder: \"getFolder\" in data ? data.getFolder : undefined,\n }\n : undefined,\n [data],\n );\n\n return {\n data: normalizedData,\n loading: activeQuery.loading,\n error: activeQuery.error,\n refetch: activeQuery.refetch,\n };\n};\n"],"mappings":";;;AAYA,IAAa,KAAiB,EAC5B,aACA,cAAW,KACX,UAAO,SACgB;CACvB,IAAM,IAAa,EAAE,OAAO,GAAU,EAEhC,IAAY,EAA+B;EAC/C,WAAW;GACT,gBAAgB;GAChB,kBAAkB;GACnB;EACD,MAAM,KAAQ,EAAQ;EACvB,CAAC,EAEI,IAAc,EAAiC;EACnD,WAAW;GACT,UAAU,KAAY;GACtB,gBAAgB;GAChB,kBAAkB;GACnB;EACD,MAAM,KAAQ,CAAC;EAChB,CAAC,EAEI,IAAc,IAAW,IAAc,GACvC,IAAO,EAAY;AAezB,QAAO;EACL,MAfqB,QAEnB,IACI;GACE,WAAW,EAAK;GAChB,aAAa,EAAK;GAClB,YACE,mBAAmB,IAAO,EAAK,gBAAgB,KAAA;GACjD,eAAe,eAAe,IAAO,EAAK,YAAY,KAAA;GACvD,GACD,KAAA,GACN,CAAC,EAAK,CACP;EAIC,SAAS,EAAY;EACrB,OAAO,EAAY;EACnB,SAAS,EAAY;EACtB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copy File Hook
|
|
3
|
+
*/
|
|
4
|
+
export interface CopyFileInput {
|
|
5
|
+
id: string;
|
|
6
|
+
targetFolderId?: string | null;
|
|
7
|
+
newName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const useCopyFile: () => {
|
|
10
|
+
mutateAsync: ({ id, targetFolderId, newName }: CopyFileInput) => Promise<any>;
|
|
11
|
+
isPending: boolean;
|
|
12
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useCopyFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCopyFile.d.ts","sourceRoot":"","sources":["../../../src/files/hooks/useCopyFile.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,WAAW;mDAMiC,aAAa;;;CAarE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useCopyFileMutation as e } from "../../generated/wspace-operations.js";
|
|
2
|
+
//#region src/files/hooks/useCopyFile.ts
|
|
3
|
+
var t = () => {
|
|
4
|
+
let [t, { loading: n, error: r }] = e({ refetchQueries: [
|
|
5
|
+
"GetFiles",
|
|
6
|
+
"GetFolders",
|
|
7
|
+
"GetRecentFiles"
|
|
8
|
+
] });
|
|
9
|
+
return {
|
|
10
|
+
mutateAsync: async ({ id: e, targetFolderId: n, newName: r }) => (await t({ variables: {
|
|
11
|
+
id: e,
|
|
12
|
+
targetFolderId: n || null,
|
|
13
|
+
newName: r
|
|
14
|
+
} })).data?.copyFile,
|
|
15
|
+
isPending: n,
|
|
16
|
+
error: r
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { t as useCopyFile };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=useCopyFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCopyFile.js","names":[],"sources":["../../../src/files/hooks/useCopyFile.ts"],"sourcesContent":["/**\n * Copy File Hook\n */\n\nimport { useCopyFileMutation } from \"../../generated/wspace-operations\";\n\nexport interface CopyFileInput {\n id: string;\n targetFolderId?: string | null;\n newName?: string;\n}\n\nexport const useCopyFile = () => {\n const [copyFileMutation, { loading, error }] = useCopyFileMutation({\n refetchQueries: [\"GetFiles\", \"GetFolders\", \"GetRecentFiles\"],\n });\n\n return {\n mutateAsync: async ({ id, targetFolderId, newName }: CopyFileInput) => {\n const result = await copyFileMutation({\n variables: {\n id,\n targetFolderId: targetFolderId || null,\n newName,\n },\n });\n return result.data?.copyFile;\n },\n isPending: loading,\n error,\n };\n};\n"],"mappings":";;AAYA,IAAa,UAAoB;CAC/B,IAAM,CAAC,GAAkB,EAAE,YAAS,cAAW,EAAoB,EACjE,gBAAgB;EAAC;EAAY;EAAc;EAAiB,EAC7D,CAAC;AAEF,QAAO;EACL,aAAa,OAAO,EAAE,OAAI,mBAAgB,kBACzB,MAAM,EAAiB,EACpC,WAAW;GACT;GACA,gBAAgB,KAAkB;GAClC;GACD,EACF,CAAC,EACY,MAAM;EAEtB,WAAW;EACX;EACD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface CreateFolderInput {
|
|
2
|
+
name: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
parentFolderId?: string;
|
|
5
|
+
visibility?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const useCreateFolder: () => {
|
|
10
|
+
mutateAsync: (input: CreateFolderInput) => Promise<any>;
|
|
11
|
+
isPending: boolean;
|
|
12
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useCreateFolder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreateFolder.d.ts","sourceRoot":"","sources":["../../../src/files/hooks/useCreateFolder.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,eAAe;yBAMG,iBAAiB;;;CAU/C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useCreateFolderMutation as e } from "../../generated/wspace-operations.js";
|
|
2
|
+
//#region src/files/hooks/useCreateFolder.ts
|
|
3
|
+
var t = () => {
|
|
4
|
+
let [t, { loading: n, error: r }] = e({ refetchQueries: ["GetFolders", "GetFiles"] });
|
|
5
|
+
return {
|
|
6
|
+
mutateAsync: async (e) => (await t({ variables: { input: e } })).data?.createFolder,
|
|
7
|
+
isPending: n,
|
|
8
|
+
error: r
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { t as useCreateFolder };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=useCreateFolder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreateFolder.js","names":[],"sources":["../../../src/files/hooks/useCreateFolder.ts"],"sourcesContent":["import { useCreateFolderMutation } from \"../../generated/wspace-operations\";\n\nexport interface CreateFolderInput {\n name: string;\n description?: string;\n parentFolderId?: string;\n visibility?: string;\n color?: string;\n icon?: string;\n}\n\nexport const useCreateFolder = () => {\n const [createFolderMutation, { loading, error }] = useCreateFolderMutation({\n refetchQueries: [\"GetFolders\", \"GetFiles\"],\n });\n\n return {\n mutateAsync: async (input: CreateFolderInput) => {\n const result = await createFolderMutation({\n variables: { input },\n });\n\n return result.data?.createFolder;\n },\n isPending: loading,\n error,\n };\n};\n"],"mappings":";;AAWA,IAAa,UAAwB;CACnC,IAAM,CAAC,GAAsB,EAAE,YAAS,cAAW,EAAwB,EACzE,gBAAgB,CAAC,cAAc,WAAW,EAC3C,CAAC;AAEF,QAAO;EACL,aAAa,OAAO,OACH,MAAM,EAAqB,EACxC,WAAW,EAAE,UAAO,EACrB,CAAC,EAEY,MAAM;EAEtB,WAAW;EACX;EACD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface CreateFolderShareInput {
|
|
2
|
+
folderId: string;
|
|
3
|
+
shareType: "PUBLIC_LINK" | "EMAIL_INVITE" | "GROUP_SHARE";
|
|
4
|
+
accessLevel: "VIEW" | "COMMENT" | "DOWNLOAD" | "EDIT";
|
|
5
|
+
expiresAt?: string;
|
|
6
|
+
password?: string;
|
|
7
|
+
maxDownloads?: number;
|
|
8
|
+
invitedEmail?: string;
|
|
9
|
+
invitedUserIds?: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare const useCreateFolderShare: () => {
|
|
12
|
+
mutateAsync: (input: CreateFolderShareInput) => Promise<any>;
|
|
13
|
+
isPending: boolean;
|
|
14
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=useCreateFolderShare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreateFolderShare.d.ts","sourceRoot":"","sources":["../../../src/files/hooks/useCreateFolderShare.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,aAAa,GAAG,cAAc,GAAG,aAAa,CAAC;IAC1D,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,eAAO,MAAM,oBAAoB;yBAKF,sBAAsB;;;CAUpD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useCreateFolderShareMutation as e } from "../../generated/wspace-operations.js";
|
|
2
|
+
//#region src/files/hooks/useCreateFolderShare.ts
|
|
3
|
+
var t = () => {
|
|
4
|
+
let [t, { loading: n, error: r }] = e();
|
|
5
|
+
return {
|
|
6
|
+
mutateAsync: async (e) => (await t({ variables: { input: e } })).data?.createFolderShare,
|
|
7
|
+
isPending: n,
|
|
8
|
+
error: r
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { t as useCreateFolderShare };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=useCreateFolderShare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreateFolderShare.js","names":[],"sources":["../../../src/files/hooks/useCreateFolderShare.ts"],"sourcesContent":["import { useCreateFolderShareMutation } from \"../../generated/wspace-operations\";\n\nexport interface CreateFolderShareInput {\n folderId: string;\n shareType: \"PUBLIC_LINK\" | \"EMAIL_INVITE\" | \"GROUP_SHARE\";\n accessLevel: \"VIEW\" | \"COMMENT\" | \"DOWNLOAD\" | \"EDIT\";\n expiresAt?: string;\n password?: string;\n maxDownloads?: number;\n invitedEmail?: string;\n invitedUserIds?: string[];\n}\n\nexport const useCreateFolderShare = () => {\n const [createFolderShareMutation, { loading, error }] =\n useCreateFolderShareMutation();\n\n return {\n mutateAsync: async (input: CreateFolderShareInput) => {\n const result = await createFolderShareMutation({\n variables: { input },\n });\n\n return result.data?.createFolderShare;\n },\n isPending: loading,\n error,\n };\n};\n"],"mappings":";;AAaA,IAAa,UAA6B;CACxC,IAAM,CAAC,GAA2B,EAAE,YAAS,cAC3C,GAA8B;AAEhC,QAAO;EACL,aAAa,OAAO,OACH,MAAM,EAA0B,EAC7C,WAAW,EAAE,UAAO,EACrB,CAAC,EAEY,MAAM;EAEtB,WAAW;EACX;EACD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface CreateShareInput {
|
|
2
|
+
fileId: string;
|
|
3
|
+
shareType: "PUBLIC_LINK" | "EMAIL_INVITE" | "GROUP_SHARE";
|
|
4
|
+
accessLevel: "VIEW" | "COMMENT" | "DOWNLOAD" | "EDIT";
|
|
5
|
+
expiresAt?: string;
|
|
6
|
+
password?: string;
|
|
7
|
+
maxDownloads?: number;
|
|
8
|
+
invitedEmail?: string;
|
|
9
|
+
invitedUserIds?: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare const useCreateShare: () => {
|
|
12
|
+
mutateAsync: (input: CreateShareInput) => Promise<any>;
|
|
13
|
+
isPending: boolean;
|
|
14
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=useCreateShare.d.ts.map
|