/** * Copyright Linkurious SAS 2012 - 2019 * * - Created on 2019-09-27. */ import { IDataSourceParams } from '../commonTypes'; /** * Available to custom groups. */ export declare enum Action { ADMIN_CONNECT = "admin.connect",// Connect the data-source and read the configuration ADMIN_INDEX = "admin.index",// Index the data-source and read the configuration ADMIN_ENTITY_RESOLUTION = "admin.entityResolution",// Manage entity resolution on the data-source ADMIN_USERS = "admin.users",// Manage the users in the data-source ADMIN_SCHEMA = "admin.schema",// Edit the schema of the data-source ADMIN_SCHEMA_READ = "admin.schema.read",// Read the graph schema of the data-source ADMIN_ALERTS = "admin.alerts",// Create and run alerts MANAGE_ALERT = "manageAlert",// Run, create, update and delete all alerts ADMIN_REPORT = "admin.report",// Generate analytics report ADMIN_STYLES = "admin.styles",// Edit styles and captions of all sandboxes of the data-source ADMIN_SPACES = "admin.spaces",// Edit, update and delete a space RUN_QUERY = "runQuery",// Execute a saved query RAW_READ_QUERY = "rawReadQuery",// Create a read query RAW_WRITE_QUERY = "rawWriteQuery",// Create a read/write query MANAGE_QUERY = "manageQuery",// Manage all non-private read/write queries RUN_CUSTOM_ACTION = "runCustomAction",// Execute a custom action WRITE_CUSTOM_ACTION = "writeCustomAction",// Create a custom action, update/delete owned custom actions MANAGE_CUSTOM_ACTION = "manageCustomAction",// WRITE_CUSTOM_ACTION, update/delete all non-private custom actions APPLY_NODE_GROUPING = "applyNodeGrouping",// Apply node grouping CREATE_NODE_GROUPING = "createNodeGrouping",// Create and apply node grouping MANAGE_NODE_GROUPING = "manageNodeGrouping",// Create, apply and delete node grouping USE_COPILOT = "useCopilot" } /** * Only for the built-in admin group. */ export declare enum AdminAction { ADMIN_APP = "admin.app",// Create API Keys ADMIN_USERS_DELETE = "admin.users.delete",// Delete users ADMIN_CONFIG = "admin.config",// Edit the configuration of Linkurious ADMIN_WEBHOOKS = "admin.webhooks" } export type AnyAction = AdminAction | Action; export declare enum ItemTypeAccessRightType { READ = "read", EDIT = "edit", WRITE = "write", NONE = "none" } export declare enum PropertyAccessRightType { READ = "read", EDIT = "edit", NONE = "none" } export declare enum ActionAccessRightType { DO = "do", NONE = "none" } export declare enum AlertAccessRightType { READ = "read", NONE = "none" } export declare enum TargetType { NODE_CATEGORY = "nodeCategory", EDGE_TYPE = "edgeType", NODE_PROPERTY_KEY = "nodePropertyKey", EDGE_PROPERTY_KEY = "edgePropertyKey", ACTION = "action", ALERT = "alert" } export interface ISetAccessRightsParams extends IDataSourceParams { id: number; accessRights: Array; } export interface IGenericAccessRight { targetType: TT; targetName: string; } export interface INodeCategoryAccessRight extends IGenericAccessRight { type: ItemTypeAccessRightType; } export interface IEdgeTypeAccessRight extends IGenericAccessRight { type: ItemTypeAccessRightType; } export interface IActionAccessRight extends IGenericAccessRight { type: ActionAccessRightType; targetName: Action; } export interface IAlertAccessRight extends IGenericAccessRight { type: AlertAccessRightType; } export interface INodePropertyAccessRight extends IGenericAccessRight { type: PropertyAccessRightType; targetItemType: string; } export interface IEdgePropertyAccessRight extends IGenericAccessRight { type: PropertyAccessRightType; targetItemType: string; } export interface IBuiltinOnlyActionAccessRight extends IGenericAccessRight { type: ActionAccessRightType; targetName: AdminAction; } export type AccessRight = INodeCategoryAccessRight | IEdgeTypeAccessRight | IActionAccessRight | IBuiltinOnlyActionAccessRight | IAlertAccessRight | INodePropertyAccessRight | IEdgePropertyAccessRight; export interface IUpdateAccessRightsSettingsParams extends IDataSourceParams { propertyKeyAccessRights: boolean; }