Represents a user group in the system, responsible for managing group-related information and associated nodes.

The ESPRMGroup class holds details about the group such as its name, ID, associated nodes, subgroups, and additional properties like metadata and custom data.

Implements

Constructors

Properties

customData?: Record<string, any>

Custom data associated with the group.

description?: string

A description of the group.

fabricId?: string

The fabric ID associated with the group.

id: string

The unique identifier of the group.

isMatter?: boolean

Indicates whether the group is a Matter-enabled group.

isPrimaryUser?: boolean

Indicates whether the group is a primary user group.

metadata?: Record<string, any>

Additional metadata associated with the group.

mutuallyExclusive?: boolean

Indicates whether the group has mutually exclusive users.

name: string

The name of the group.

nodeDetails?: ESPRMNode[]

A list of ESPRMNode instances representing the nodes in the group.

nodes?: string[]

A list of node IDs associated with the group.

parentGroupId?: string

The ID of the parent group.

subGroups?: ESPRMGroup[]

A list of subgroups within this group.

totalNodes?: number

The total number of nodes in the group.

type?: string

The type of the group (e.g., "admin", "user").

Methods

  • Adds a list of nodes to the current group.

    Parameters

    • nodeList: string[]

      The list of node IDs to add to the group.

    Returns Promise<ESPAPIResponse>

    A promise that resolves to the API success response.

    If the nodeList is empty.

  • Retrieves the list of node IDs associated with the group.

    Returns Promise<string[]>

    A promise that resolves to an array of node IDs.

  • Removes the user from the current group.

    This method sends a DELETE request to the API to remove the user's association with the current group, effectively allowing the user to leave the group.

    Returns Promise<ESPAPIResponse>

    A promise that resolves to the API success response.

  • Removes a list of nodes from the current group.

    Parameters

    • nodeList: string[]

      The list of node IDs to remove from the group.

    Returns Promise<ESPAPIResponse>

    A promise that resolves to the API success response.

    If the nodeList is empty.

  • Removes sharing permissions for a specified user in the current group.

    Parameters

    • username: string

      The username of the user for whom sharing permissions will be removed.

    Returns Promise<ESPAPIResponse>

    A promise that resolves to the API success response.