@onlyoffice/docspace-plugin-sdk
Version:
Simple plugin system for onlyoffice docspace
192 lines (191 loc) • 6.99 kB
JavaScript
"use strict";
/**
* (c) Copyright Ascensio System SIA 2026
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @license
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.FilesSecurity = exports.FilesExst = exports.FilesType = void 0;
/**
* Defines the supported file types.
*/
var FilesType;
(function (FilesType) {
/** DocSpace room or workspace */
FilesType["room"] = "room";
/** Generic file type */
FilesType["file"] = "file";
/** Directory or folder */
FilesType["folder"] = "folder";
/** Image file (various formats) */
FilesType["image"] = "image";
/** Video file (various formats) */
FilesType["video"] = "video";
})(FilesType || (exports.FilesType = FilesType = {}));
/**
* Defines the supported file extensions.
*/
var FilesExst;
(function (FilesExst) {
// Document formats
/** Microsoft Word document */
FilesExst["doc"] = ".doc";
/** Microsoft Word document (XML-based) */
FilesExst["docx"] = ".docx";
/** Microsoft Word macro-enabled document */
FilesExst["docm"] = ".docm";
/** Microsoft Word template */
FilesExst["dotx"] = ".dotx";
/** OpenDocument text format */
FilesExst["odt"] = ".odt";
/** OpenDocument flat XML text format */
FilesExst["fodt"] = ".fodt";
/** OpenDocument text template */
FilesExst["ott"] = ".ott";
/** Rich Text Format */
FilesExst["rtf"] = ".rtf";
/** Plain text */
FilesExst["txt"] = ".txt";
/** Portable Document Format */
FilesExst["pdf"] = ".pdf";
/** Form document (DOCX-based) */
FilesExst["docxf"] = ".docxf";
/** Form document (OpenDocument-based) */
FilesExst["oform"] = ".oform";
// Spreadsheet formats
/** Microsoft Excel spreadsheet */
FilesExst["xls"] = ".xls";
/** Microsoft Excel spreadsheet (XML-based) */
FilesExst["xlsx"] = ".xlsx";
/** Microsoft Excel macro-enabled spreadsheet */
FilesExst["xlsm"] = ".xlsm";
/** OpenDocument spreadsheet */
FilesExst["ods"] = ".ods";
/** OpenDocument spreadsheet template */
FilesExst["ots"] = ".ots";
// Presentation formats
/** Microsoft PowerPoint presentation */
FilesExst["ppt"] = ".ppt";
/** Microsoft PowerPoint presentation (XML-based) */
FilesExst["pptx"] = ".pptx";
/** Microsoft PowerPoint macro-enabled presentation */
FilesExst["pptm"] = ".pptm";
/** OpenDocument presentation */
FilesExst["odp"] = ".odp";
/** OpenDocument presentation template */
FilesExst["otp"] = ".otp";
/** PowerPoint show format */
FilesExst["pps"] = ".pps";
/** PowerPoint show format (XML-based) */
FilesExst["ppsx"] = ".ppsx";
/** PowerPoint template */
FilesExst["pot"] = ".pot";
/** OpenDocument flat XML presentation */
//fodp = ".fodp", // Removed, as it was not present in the original code
// Media formats
/** Video file (AVI format) */
FilesExst["avi"] = ".avi";
/** Video file (FLV format) */
FilesExst["flv"] = ".flv";
/** Video file (MKV format) */
FilesExst["mkv"] = ".mkv";
/** Video file (MOV format) */
FilesExst["mov"] = ".mov";
/** Video file (MP4 format) */
FilesExst["mp4"] = ".mp4";
/** Video file (MPEG format) */
FilesExst["mpg"] = ".mpg";
/** Video file (WebM format) */
FilesExst["webm"] = ".webm";
/** Video file (M2TS format) */
FilesExst["m2ts"] = ".m2ts";
/** Video file (DVD format) */
FilesExst["dvd"] = ".dvd";
/** Scalable Vector Graphics */
FilesExst["svg"] = ".svg";
// Other formats
/** Comma-separated values */
FilesExst["csv"] = ".csv";
/** DjVu format */
FilesExst["djvu"] = ".djvu";
/** E-book format (EPUB) */
FilesExst["epub"] = ".epub";
/** E-book format (FB2) */
FilesExst["fb2"] = ".fb2";
/** E-book format (PB2) */
FilesExst["pb2"] = ".pb2";
/** Archive format (IAF) */
FilesExst["iaf"] = ".iaf";
/** Calendar format (ICS) */
FilesExst["ics"] = ".ics";
/** Web archive (MHT) */
FilesExst["mht"] = ".mht";
/** XML Paper Specification */
FilesExst["xps"] = ".xps";
/** Extensible Markup Language */
FilesExst["xml"] = ".xml";
})(FilesExst || (exports.FilesExst = FilesExst = {}));
/**
* Defines the supported file security parameters.
*/
var FilesSecurity;
(function (FilesSecurity) {
/** Permission to convert files to other formats */
FilesSecurity["Convert"] = "Convert";
/** Permission to copy files and folders */
FilesSecurity["Copy"] = "Copy";
/** Permission to apply custom filters */
FilesSecurity["CustomFilter"] = "CustomFilter";
/** Permission to delete items */
FilesSecurity["Delete"] = "Delete";
/** Permission to download files */
FilesSecurity["Download"] = "Download";
/** Permission to create duplicates of items */
FilesSecurity["Duplicate"] = "Duplicate";
/** Permission to edit files */
FilesSecurity["Edit"] = "Edit";
/** Permission to view and edit file history */
FilesSecurity["EditHistory"] = "EditHistory";
/** Permission to fill forms */
FilesSecurity["FillForms"] = "FillForms";
/** Permission to lock/unlock files */
FilesSecurity["Lock"] = "Lock";
/** Permission to move items */
FilesSecurity["Move"] = "Move";
/** Permission to view and read content */
FilesSecurity["Read"] = "Read";
/** Permission to read file history */
FilesSecurity["ReadHistory"] = "ReadHistory";
/** Permission to rename items */
FilesSecurity["Rename"] = "Rename";
/** Permission to review documents */
FilesSecurity["Review"] = "Review";
/** Permission to submit forms to gallery */
FilesSecurity["SubmitToFormGallery"] = "SubmitToFormGallery";
/** Permission to stop form filling process */
FilesSecurity["StopFilling"] = "StopFilling";
/** Permission to reset form filling */
FilesSecurity["ResetFilling"] = "ResetFilling";
/** Permission to edit forms */
FilesSecurity["EditForm"] = "EditForm";
/** Permission to comment on files */
FilesSecurity["Comment"] = "Comment";
/** Permission to create rooms from existing content */
FilesSecurity["CreateRoomFrom"] = "CreateRoomFrom";
/** Permission to copy links to files */
FilesSecurity["CopyLink"] = "CopyLink";
/** Permission to embed content */
FilesSecurity["Embed"] = "Embed";
})(FilesSecurity || (exports.FilesSecurity = FilesSecurity = {}));