import { IRequestDirectoryAction, GetFileAction, GetFilePayload } from"officexapp/types"// Request Body TypetypeDirectoryActionRequestBody=IRequestDirectoryAction {"actions": [typeGetFileAction {// Required: The operation to perform"action":"GET_FILE",// Optional: Target resource - omit when querying "shared with me" resources// Server will find all shared files/folders (some unreachable directly)// "target": {// "resource_path": "DiskID::/documents/project/", // Full path to file/folder// "resource_id": "FolderID_xyz789" // Unique ID (FileID_<id> or FolderID_<id>)// },// Required: Action-specific data"payload":typeGetFilePayload {"id":"{{file_id}}",// Target file ID"share_track_hash"?:"track456"// Hash for share tracking } } ]}
import { IRequestDirectoryAction, GetFolderAction, GetFolderPayload } from "officexapp/types"
// Request Body Type
type DirectoryActionRequestBody = IRequestDirectoryAction {
"actions": [
type GetFolderAction {
// Required: The operation to perform
"action": "GET_FOLDER",
// Optional: Target resource - omit when querying "shared with me" resources
// Server will find all shared files/folders (some unreachable directly)
// "target": {
// "resource_path": "DiskID::/documents/project/", // Full path to file/folder
// "resource_id": "FolderID_xyz789" // Unique ID (FileID_<id> or FolderID_<id>)
// },
// Required: Action-specific data
"payload": type GetFolderPayload {
"id": "{{folder_id}}", // Target folder ID
"share_track_hash"?: "track456" // Hash for share tracking
}
}
]
}
import { IRequestDirectoryAction, CreateFileAction, CreateFilePayload } from "officexapp/types"
// Request Body Type
type DirectoryActionRequestBody = IRequestDirectoryAction {
"actions": [
type CreateFileAction {
// Required: The operation to perform
"action": "CREATE_FILE",
// Required: File creation data
"payload": type CreateFilePayload {
// Optional: Unique file ID (auto-generated if omitted)
// "id"?: "FileID_abc123",
"name": "Proposal", // Required: File name
"parent_folder_uuid": "{{folder_id}}", // Required: ID of the parent folder
"extension": "pdf", // Required: File extension
"labels": [], // Required: Labels to associate with the file
"file_size": 124434, // Required: Size in bytes
"disk_id": "DiskID_d2b1fec9-ebf8-4ca5-adb3-8dea93941939", // Required: ID of the disk where the file will be stored
"disk_type": "AWS_BUCKET", // Required: Type of disk storage
// Optional fields:
// "expires_at"?: 1735689600, // Timestamp when the file expires
// "file_conflict_resolution"?: "rename", // How to handle file name conflicts
// "has_sovereign_permissions"?: false, // Whether the file has sovereign permissions
// "shortcut_to"?: "FileID_xyz789", // ID of the file to create a shortcut to
// "external_id"?: "ext_12345", // External identifier for integration purposes
// "external_payload"?: {}, // Additional data for external integrations
// "raw_url"?: "https://example.com/file.pdf", // URL where the raw file content can be accessed
// "notes"?: "Project proposal document" // Additional notes about the file
}
}
]
}
import { IRequestDirectoryAction, CreateFolderAction, CreateFolderPayload } from "officexapp/types"
// Request Body Type
type DirectoryActionRequestBody = IRequestDirectoryAction {
"actions": [
type CreateFolderAction {
// Required: The operation to perform
"action": "CREATE_FOLDER",
// Required: Folder creation data
"payload": type CreateFolderPayload {
// Optional: Unique folder ID (auto-generated if omitted)
// "id"?: "FolderID_abc123",
"name": "Investigation", // Required: Name of the folder
"labels": [], // Required: Labels to associate with the folder
"disk_id": "DiskID_d2b1fec9-ebf8-4ca5-adb3-8dea93941939", // Required: ID of the disk where the folder will be stored
"disk_type": "AWS_BUCKET", // Required: Type of disk storage
"parent_folder_uuid": "{{root_folder}}", // Required: ID of the parent folder
// Optional fields:
// "expires_at"?: 1735689600, // Timestamp when the folder expires
// "file_conflict_resolution"?: "rename", // How to handle file name conflicts
// "has_sovereign_permissions"?: false, // Whether the folder has sovereign permissions
// "shortcut_to"?: "FolderID_xyz789", // ID of the folder to create a shortcut to
// "external_id"?: "ext_12345", // External identifier for integration purposes
// "external_payload"?: {}, // Additional data for external integrations
// "notes"?: "Investigation project folder" // Additional notes about the folder
}
}
]
}
import { IRequestDirectoryAction, UpdateFileAction, UpdateFilePayload } from "officexapp/types"
// Request Body Type
type DirectoryActionRequestBody = IRequestDirectoryAction {
"actions": [
type UpdateFileAction {
// Required: The operation to perform
"action": "UPDATE_FILE",
// Required: File update data
"payload": type UpdateFilePayload {
"id": "{{file_id}}", // Required: File ID to update
"name"?: "Revised Proposal", // Optional: New name for the file
// Optional fields:
// "labels"?: ["important", "draft"], // New labels for the file
// "upload_status"?: "completed", // New upload status
// "raw_url"?: "https://example.com/file.pdf", // New URL where the raw file content can be accessed
// "expires_at"?: 1735689600, // New expiration timestamp
// "external_id"?: "ext_12345", // External identifier for integration purposes
// "external_payload"?: {}, // Additional data for external integrations
// "notes"?: "Updated proposal document", // Additional notes about the file
// "shortcut_to"?: "FileID_xyz789", // ID of the file to create a shortcut to
// "request_presigned_url"?: true // Whether to request a presigned upload URL for the file (used for updating)
}
}
]
}
import { IRequestDirectoryAction, UpdateFolderAction, UpdateFolderPayload } from "officexapp/types"
// Request Body Type
type DirectoryActionRequestBody = IRequestDirectoryAction {
"actions": [
type UpdateFolderAction {
// Required: The operation to perform
"action": "UPDATE_FOLDER",
// Required: Folder update data
"payload": type UpdateFolderPayload {
"id": "{{folder_id}}", // Required: Folder ID to update
"name"?: "Revised Investigation", // Optional: New name for the folder
// Optional fields:
// "labels"?: ["important", "active"], // New labels for the folder
// "expires_at"?: 1735689600, // New expiration timestamp
// "external_id"?: "ext_12345", // External identifier for integration purposes
// "external_payload"?: {}, // Additional data for external integrations
// "notes"?: "Updated investigation folder", // Additional notes about the folder
// "shortcut_to"?: "FolderID_xyz789" // ID of the folder to create a shortcut to
}
}
]
}
import { IRequestDirectoryAction, DeleteFileAction, DeleteFilePayload } from "officexapp/types"
// Request Body Type
type DirectoryActionRequestBody = IRequestDirectoryAction {
"actions": [
type DeleteFileAction {
// Required: The operation to perform
"action": "DELETE_FILE",
// Required: File deletion data
"payload": type DeleteFilePayload {
"id": "{{file_id}}", // Required: File ID to delete
"permanent": false // Required: Whether to permanently delete the file or move it to trash
}
}
]
}
import { IResponseDirectoryAction, DirectoryActionOutcome, DeleteFileAction, DeleteFileResponse } from "officexapp/types"
// Response Body Type
type DirectoryActionResponse = IResponseDirectoryAction [
type DirectoryActionOutcome {
"success": true,
"request": type DeleteFileAction {
"action": "DELETE_FILE",
"payload": {
"id": "FileID_b2705f0d-9faa-476e-84b4-b0bacaa333aa",
"permanent": false
}
},
"response": {
"result": type DeleteFileResponse {
"file_id": "FileID_b2705f0d-9faa-476e-84b4-b0bacaa333aa",
"path_to_trash": "DiskID_d2b1fec9-ebf8-4ca5-adb3-8dea93941939::.trash/Revised Proposal"
}
}
}
]
{
"err": {
"code": 0,
"message": "string"
}
}
import { IRequestDirectoryAction, DeleteFolderAction, DeleteFolderPayload } from "officexapp/types"
// Request Body Type
type DirectoryActionRequestBody = IRequestDirectoryAction {
"actions": [
type DeleteFolderAction {
// Required: The operation to perform
"action": "DELETE_FOLDER",
// Required: Folder deletion data
"payload": type DeleteFolderPayload {
"id": "{{folder_id}}", // Required: Folder ID to delete
"permanent": false // Required: Whether to permanently delete the folder or move it to trash
}
}
]
}
import { IResponseDirectoryAction, DirectoryActionOutcome, DeleteFolderAction, DeleteFolderResponse } from "officexapp/types"
// Response Body Type
type DirectoryActionResponse = IResponseDirectoryAction [
type DirectoryActionOutcome {
"success": true,
"request": type DeleteFolderAction {
"action": "DELETE_FOLDER",
"payload": {
"id": "FolderID_b9fa11bc-2926-4a13-944e-e1189df66e5a",
"permanent": false
}
},
"response": {
"result": type DeleteFolderResponse {
"folder_id": "FolderID_b9fa11bc-2926-4a13-944e-e1189df66e5a",
"path_to_trash": "DiskID_d2b1fec9-ebf8-4ca5-adb3-8dea93941939::.trash/Revised Investigation/",
"deleted_files": [],
"deleted_folders": []
}
}
}
]
{
"err": {
"code": 0,
"message": "string"
}
}
import { IRequestDirectoryAction, CopyFileAction, CopyFilePayload } from "officexapp/types"
// Request Body Type
type DirectoryActionRequestBody = IRequestDirectoryAction {
"actions": [
type CopyFileAction {
// Required: The operation to perform
"action": "COPY_FILE",
// Required: File copy data
"payload": type CopyFilePayload {
"id": "{{file_id}}", // Required: File ID to copy
"destination_folder_id"?: "{{alt_folder_id}}", // Optional: ID of the destination folder
// Optional fields:
// "destination_folder_path"?: "/backup/files", // Path to the destination folder
// "file_conflict_resolution"?: "rename" // How to handle file name conflicts ("rename", "overwrite", "skip")
}
}
]
}
import { IRequestDirectoryAction, CopyFolderAction, CopyFolderPayload } from "officexapp/types"
// Request Body Type
type DirectoryActionRequestBody = IRequestDirectoryAction {
"actions": [
type CopyFolderAction {
// Required: The operation to perform
"action": "COPY_FOLDER",
// Required: Folder copy data
"payload": type CopyFolderPayload {
"id": "{{folder_id}}", // Required: Folder ID to copy
"destination_folder_id"?: "{{alt_folder_id}}", // Optional: ID of the destination folder
// Optional fields:
// "destination_folder_path"?: "/backup/folders", // Path to the destination folder
// "file_conflict_resolution"?: "rename" // How to handle file name conflicts ("rename", "overwrite", "skip")
}
}
]
}
import { IRequestDirectoryAction, MoveFileAction, MoveFilePayload } from "officexapp/types"
// Request Body Type
type DirectoryActionRequestBody = IRequestDirectoryAction {
"actions": [
type MoveFileAction {
// Required: The operation to perform
"action": "MOVE_FILE",
// Required: File move data
"payload": type MoveFilePayload {
"id": "{{file_id}}", // Required: File ID to move
"destination_folder_id"?: "{{alt_folder_id}}", // Optional: ID of the destination folder
// Optional fields:
// "destination_folder_path"?: "/new/location", // Path to the destination folder
// "file_conflict_resolution"?: "rename" // How to handle file name conflicts ("rename", "overwrite", "skip")
}
}
]
}
import { IRequestDirectoryAction, MoveFolderAction, MoveFolderPayload } from "officexapp/types"
// Request Body Type
type DirectoryActionRequestBody = IRequestDirectoryAction {
"actions": [
type MoveFolderAction {
// Required: The operation to perform
"action": "MOVE_FOLDER",
// Required: Folder move data
"payload": type MoveFolderPayload {
"id": "{{folder_id}}", // Required: Folder ID to move
"destination_folder_id"?: "{{alt_folder_id}}", // Optional: ID of the destination folder
// Optional fields:
// "destination_folder_path"?: "/new/location", // Path to the destination folder
// "file_conflict_resolution"?: "rename" // How to handle file name conflicts ("rename", "overwrite", "skip")
}
}
]
}
import { IRequestDirectoryAction, RestoreTrashAction, RestoreTrashPayload } from "officexapp/types"
// Request Body Type
type DirectoryActionRequestBody = IRequestDirectoryAction {
"actions": [
type RestoreTrashAction {
// Required: The operation to perform
"action": "RESTORE_TRASH",
// Required: File restore data
"payload": type RestoreTrashPayload {
"id": "{{file_id}}", // Required: File ID or Folder ID to restore from trash
// Optional fields:
// "file_conflict_resolution"?: "rename", // How to handle file conflicts during restore ("rename", "overwrite", "skip")
// "restore_to_folder_path"?: "/documents" // Custom path to restore to (if not using original path)
}
}
]
}
import { IResponseDirectoryAction, DirectoryActionOutcome, RestoreTrashAction, RestoreTrashResponse } from "officexapp/types"
// Response Body Type
type DirectoryActionResponse = IResponseDirectoryAction [
type DirectoryActionOutcome {
"success": true,
"request": type RestoreTrashAction {
"action": "RESTORE_TRASH",
"payload": {
"id": "FileID_af475a5a-6699-4f37-9305-22d96ca09111"
}
},
"response": {
"result": type RestoreTrashResponse {
"restored_folders": [],
"restored_files": [
"FileID_af475a5a-6699-4f37-9305-22d96ca09111"
]
}
}
}
]