/*! * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Alfresco Example Content Application * * This file is part of the Alfresco Example Content Application. * If the software was purchased under a paid Alfresco license, the terms of * the paid license agreement will prevail. Otherwise, the software is * provided under the following open source license terms: * * The Alfresco Example Content Application is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The Alfresco Example Content Application is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * from Hyland Software. If not, see . */ import { AppConfigService } from '@alfresco/adf-core'; import { RuleContext } from '@alfresco/adf-extensions'; export declare const supportedExtensions: { doc: string; docx: string; docm: string; dot: string; dotx: string; dotm: string; rtf: string; xls: string; xlsx: string; xlsb: string; xlsm: string; xlt: string; xltx: string; xltm: string; xlam: string; ppt: string; pptx: string; pot: string; potx: string; potm: string; pptm: string; pps: string; ppsx: string; ppam: string; ppsm: string; sldx: string; sldm: string; vsd: string; vss: string; vst: string; vsdx: string; vsdm: string; vssx: string; vssm: string; vstx: string; vstm: string; }; export declare function getFileExtension(fileName: string): string | null; export interface AcaRuleContext extends RuleContext { withCredentials: boolean; appConfig: AppConfigService; } /** * Checks if the content plugin is enabled. * JSON ref: `app.isContentServiceEnabled` */ export declare const isContentServiceEnabled: (context: AcaRuleContext) => boolean; /** * Checks if user can mark selected nodes as **Favorite**. * JSON ref: `app.selection.canAddFavorite` */ export declare function canAddFavorite(context: RuleContext): boolean; /** * Checks if user can un-mark selected nodes as **Favorite**. * JSON ref: `app.selection.canRemoveFavorite` */ export declare function canRemoveFavorite(context: RuleContext): boolean; /** * Checks if user can share selected file. * JSON ref: `app.selection.file.canShare` */ export declare const canShareFile: (context: RuleContext) => boolean; /** * Checks if user can perform "Join" or "Cancel Join Request" on a library. * JSON ref: `canToggleJoinLibrary` */ export declare const canToggleJoinLibrary: (context: RuleContext) => boolean; /** * Checks if user can edit the selected folder. * JSON ref: `canEditFolder` * * @param context Rule execution context */ export declare const canEditFolder: (context: RuleContext) => boolean; /** * Checks if the selected file is already shared. * JSON ref: `app.selection.file.isShared` */ export declare function isShared(context: RuleContext): boolean; /** * Checks if user can delete selected nodes. * JSON ref: `app.selection.canDelete` */ export declare function canDeleteSelection(context: RuleContext): boolean; /** * Checks if user selected anything. * JSON ref: `app.selection.notEmpty` */ export declare const hasSelection: (context: RuleContext) => boolean; /** * Checks if user can create a new folder with current path. * JSON ref: `app.navigation.folder.canCreate` */ export declare function canCreateFolder(context: AcaRuleContext): boolean; /** * Checks if user can download selected nodes (either files or folders). * JSON ref: `app.selection.canDownload` */ export declare function canDownloadSelection(context: RuleContext): boolean; /** * Checks if user has selected a folder. * JSON ref: `app.selection.folder` */ export declare const hasFolderSelected: (context: RuleContext) => boolean; /** * Checks if user has selected a library (site). * JSON ref: `app.selection.library` */ export declare const hasLibrarySelected: (context: RuleContext) => boolean; /** * Checks if user has selected a **private** library (site) * JSON ref: `app.selection.isPrivateLibrary` */ export declare function isPrivateLibrary(context: RuleContext): boolean; /** * Checks if the selected library has a **role** property defined. * JSON ref: `app.selection.hasLibraryRole` */ export declare function hasLibraryRole(context: RuleContext): boolean; /** * Checks if user has selected a file. * JSON ref: `app.selection.file` */ export declare const hasFileSelected: (context: RuleContext) => boolean; /** * Checks if user can update the first selected node. * JSON ref: `app.selection.first.canUpdate` */ export declare function canUpdateSelectedNode(context: RuleContext): boolean; export declare function isMultiselection(context: RuleContext): boolean; /** * Checks if user can update the first selected folder. * JSON ref: `app.selection.folder.canUpdate` */ export declare function canUpdateSelectedFolder(context: RuleContext): boolean; /** * Checks if user has selected a **locked** file node. * JSON ref: `app.selection.file.isLocked` */ export declare function hasLockedFiles(context: RuleContext): boolean; /** * Checks if the selected file has **write** or **read-only** locks specified. * JSON ref: `app.selection.file.isLocked` */ export declare const isWriteLocked: (context: RuleContext) => boolean; /** * Checks if the selected file has **write** or **read-only** locks specified, * and that current user is the owner of the lock. * JSON ref: `app.selection.file.isLockOwner` */ export declare const isUserWriteLockOwner: (context: RuleContext) => boolean; /** * Checks if user can lock selected file. * JSON ref: `app.selection.file.canLock` */ export declare const canLockFile: (context: RuleContext) => boolean; /** * Checks if user can unlock selected file. * JSON ref: `app.selection.file.canUnlock` */ export declare function canUnlockFile(context: RuleContext): boolean; /** * Checks if user can upload a new version of the file. * JSON ref: `app.selection.file.canUploadVersion` */ export declare function canUploadVersion(context: RuleContext): boolean; /** * Checks if user can print the file. * JSON ref: `canPrintFile` * * @param context Rule execution context */ export declare const canPrintFile: (context: RuleContext) => boolean; /** * Checks if user can toggle shared link mode. * JSON ref: `canToggleSharedLink` * * @param context Rule execution context */ export declare const canToggleSharedLink: (context: RuleContext) => boolean; /** * Checks if user can edit aspects for the selected node. * JSON ref: `canEditAspects` * * @param context Rule execution context */ export declare const canEditAspects: (context: RuleContext) => boolean; export declare const canToggleFileLock: (context: RuleContext) => boolean; /** * @deprecated Uses workarounds for for recent files and search api issues. * Checks if user can toggle **Favorite** state for a node. * @param context Rule execution context */ export declare const canToggleFavorite: (context: RuleContext) => boolean; /** * Checks if application should render logout option. * JSON ref: `canShowLogout` * * @param context Rule execution context */ export declare const canShowLogout: (context: AcaRuleContext) => boolean; /** * Checks if user is library manager * JSON ref: `isLibraryManager` * * @param context Rule execution context */ export declare const isLibraryManager: (context: RuleContext) => boolean; /** * Checks if the file can be opened with MS Office * JSON ref: `aos.canOpenWithOffice` * * @param context Rule execution context */ export declare function canOpenWithOffice(context: AcaRuleContext): boolean; /** * Checks if user savedSearches are supported by current ACS version. * JSON ref: `isPreferencesApiAvailable` */ export declare const isPreferencesApiAvailable: (context: RuleContext) => boolean; /** * Checks if node info modal is supported by current ACS version. * JSON ref: `isNodeInfoAvailable` */ export declare const isNodeInfoAvailable: (context: RuleContext) => boolean; /** * Checks if bulk update feature for legal holds is supported by current ACS version. * JSON ref: `isBulkActionsAvailable` */ export declare const isBulkActionsAvailable: (context: RuleContext) => boolean; /** * Partially applies minimal version of a feature against a core compatibility evaluation. * @param minimalVersion The minimal version to check against. */ export declare function createVersionRule(minimalVersion: string): (context: RuleContext) => boolean; export declare function isSmartFolder(context: RuleContext): boolean; export declare const areTagsEnabled: (context: AcaRuleContext) => boolean; export declare const areCategoriesEnabled: (context: AcaRuleContext) => boolean; export declare const canDisplayKnowledgeRetrievalButton: (context: AcaRuleContext) => boolean; export declare const isSSOEnabled: (context: AcaRuleContext) => boolean; /** * Checks if node contains checked out aspect. * JSON ref: `app.selection.isCheckedOut` * * @param context Rule execution context */ export declare const isCheckedOut: (context: RuleContext) => boolean;