import { type NodeSkeleton, type NodeTypeSkeleton } from '../api/NodeApi'; import { State } from '../shared/State'; export type Node = { /** * Read all node types * @returns {Promise} a promise that resolves to an array of node type objects */ readNodeTypes(): Promise; /** * Read all nodes * @returns {Promise} a promise that resolves to an object containing an array of node objects */ readNodes(): Promise; /** * Read all nodes by type * @param {string} nodeType node type * @returns {Promise} a promise that resolves to an object containing an array of node objects of the requested type */ readNodesByType(nodeType: string): Promise; /** * Read node by uuid and type * @param {string} nodeId node uuid * @param {string} nodeType node type * @returns {Promise} a promise that resolves to a node object */ readNode(nodeId: string, nodeType: string): Promise; /** * Create node by type * @param {string} nodeType node type * @param {NodeSkeleton} nodeData node object * @returns {Promise} a promise that resolves to an object containing a node object */ createNode(nodeType: string, nodeData: NodeSkeleton): Promise; /** * Update or create node by uuid and type * @param {string} nodeId node uuid * @param {string} nodeType node type * @param {NodeSkeleton} nodeData node object * @returns {Promise} a promise that resolves to an object containing a node object */ updateNode(nodeId: string, nodeType: string, nodeData: NodeSkeleton): Promise; /** * Delete node by uuid and type * @param {string} nodeId node uuid * @param {string} nodeType node type * @returns {Promise} a promise that resolves to an object containing a node object */ deleteNode(nodeId: string, nodeType: string): Promise; /** * Find all node configuration objects that are no longer referenced by any tree * @returns {Promise} a promise that resolves to an array of orphaned nodes */ findOrphanedNodes(): Promise; /** * Remove orphaned nodes * @param {NodeSkeleton[]} orphanedNodes Pass in an array of orphaned node configuration objects to remove * @returns {Promise} a promise that resolves to an array nodes that encountered errors deleting */ removeOrphanedNodes(orphanedNodes: NodeSkeleton[]): Promise; /** * Analyze if a node type is premium. * @param {string} nodeType Node type * @returns {boolean} True if the node type is premium, false otherwise. */ isPremiumNode(nodeType: string): boolean; /** * Analyze if a node type is a cloud-only node. * @param {string} nodeType Node type * @returns {boolean} True if the node type is cloud-only, false otherwise. */ isCloudOnlyNode(nodeType: string): boolean; /** * Analyze if a node type is a cloud-excluded node. Cloud excluded nodes are OOTB nodes in self-hosted AM deployments but have been excluded in cloud. * @param {string} nodeType node type. * @returns {boolean} True if node type is cloud-excluded, false otherwise. */ isCloudExcludedNode(nodeType: string): boolean; /** * Analyze if a node type has been deprecated * @param {string} nodeType node type. * @returns {boolean} True if node type is deprecated, false otherwise. */ isDeprecatedNode(nodeType: string): boolean; /** * Analyze if a node is custom. * @param {string} nodeType Node type * @returns {boolean} True if the node type is custom, false otherwise. */ isCustomNode(nodeType: string): boolean; /** * Get a node's classifications, which can be one or multiple of: * - standard: can run on any instance of a ForgeRock platform * - cloud: utilize nodes, which are exclusively available in the ForgeRock Identity Cloud * - premium: utilizes nodes, which come at a premium * @param {string} nodeType Node type * @returns {NodeClassificationType[]} an array of one or multiple classifications */ getNodeClassification(nodeType: string): NodeClassificationType[]; }; declare const _default: (state: State) => Node; export default _default; export type NodeClassificationType = 'standard' | 'custom' | 'cloud' | 'excluded' | 'premium' | 'deprecated'; export declare enum NodeClassification { STANDARD = "standard", CUSTOM = "custom", CLOUD = "cloud", EXCLUDED = "excluded", PREMIUM = "premium", DEPRECATED = "deprecated" } /** * Read all node types * @returns {Promise} a promise that resolves to an array of node type objects */ export declare function readNodeTypes({ state, }: { state: State; }): Promise; /** * Get all nodes * @returns {Promise} a promise that resolves to an object containing an array of node objects */ export declare function readNodes({ state, }: { state: State; }): Promise; /** * Read all nodes by type * @param {string} nodeType node type * @returns {Promise} a promise that resolves to an object containing an array of node objects of the requested type */ export declare function readNodesByType({ nodeType, state, }: { nodeType: string; state: State; }): Promise; /** * Read node * @param {String} nodeId node uuid * @param {String} nodeType node type * @returns {Promise} a promise that resolves to a node object */ export declare function readNode({ nodeId, nodeType, state, }: { nodeId: string; nodeType: string; state: State; }): Promise; /** * Create node * @param {string} nodeId node uuid * @param {string} nodeType node type * @param {NodeSkeleton} nodeData node object * @returns {Promise} a promise that resolves to an object containing a node object */ export declare function createNode({ nodeId, nodeType, nodeData, state, }: { nodeId?: string; nodeType: string; nodeData: NodeSkeleton; state: State; }): Promise; /** * Put node by uuid and type * @param {string} nodeId node uuid * @param {string} nodeType node type * @param {object} nodeData node object * @returns {Promise} a promise that resolves to an object containing a node object */ export declare function updateNode({ nodeId, nodeType, nodeData, state, }: { nodeId: string; nodeType: string; nodeData: NodeSkeleton; state: State; }): Promise; /** * Delete node by uuid and type * @param {String} nodeId node uuid * @param {String} nodeType node type * @returns {Promise} a promise that resolves to an object containing a node object */ export declare function deleteNode({ nodeId, nodeType, state, }: { nodeId: string; nodeType: string; state: State; }): Promise; /** * Find all node configuration objects that are no longer referenced by any tree * @returns {Promise} a promise that resolves to an array of orphaned nodes */ export declare function findOrphanedNodes({ state, }: { state: State; }): Promise; /** * Remove orphaned nodes * @param {NodeSkeleton[]} orphanedNodes Pass in an array of orphaned node configuration objects to remove * @returns {Promise} a promise that resolves to an array nodes that encountered errors deleting */ export declare function removeOrphanedNodes({ orphanedNodes, state, }: { orphanedNodes: NodeSkeleton[]; state: State; }): Promise; /** * Analyze if a node is a premium node. * @param {string} nodeType Node type * @returns {boolean} True if the node type is premium, false otherwise. */ export declare function isPremiumNode(nodeType: string): boolean; /** * Analyze if a node is a cloud-only node. * @param {string} nodeType Node type * @returns {boolean} True if the node type is cloud-only, false otherwise. */ export declare function isCloudOnlyNode(nodeType: string): boolean; /** * Analyze if a node is a cloud-excluded node. Cloud excluded nodes are OOTB nodes in self-hosted AM deployments but have been excluded in cloud. * @param {{string, State}} param0 object containing node type and state. * @returns {boolean} True if node type is cloud-excluded, false otherwise. */ export declare function isCloudExcludedNode({ nodeType, state, }: { nodeType: string; state: State; }): boolean; /** * Analyze if node has been deprecated * @param {{string, State}} param0 object containing node type and state. * @returns {boolean} True if node type is deprecated, false otherwise. */ export declare function isDeprecatedNode({ nodeType, state, }: { nodeType: string; state: State; }): boolean; /** * Analyze if a node is custom. * @param {string} nodeType Node type * @returns {boolean} True if the node type is custom, false otherwise. */ export declare function isCustomNode({ nodeType, state, }: { nodeType: string; state: State; }): boolean; /** * Get a node's classifications, which can be one or multiple of: * - standard: can run on any instance of a ForgeRock platform * - cloud: utilize nodes, which are exclusively available in the ForgeRock Identity Cloud * - premium: utilizes nodes, which come at a premium * @param {string} nodeType Node type * @returns {NodeClassification[]} an array of one or multiple classifications */ export declare function getNodeClassification({ nodeType, state, }: { nodeType: string; state: State; }): NodeClassificationType[]; //# sourceMappingURL=NodeOps.d.ts.map