@espressif/rainmaker-base-cdf
    Preparing search index...

    Indexable

    • [key: string]: any
    Index

    Constructors

    Properties

    afterSetNodeListHook: (nodes: ESPRMNode[]) => void = ...
    beforeSetNodeListHook: (nodes: ESPRMNode[]) => void = ...

    Accessors

    _hasNext: any
    _hasNextIssuedSharingRequests: any
    _hasNextReceivedSharingRequests: any
    _issuedSharingRequests: any
    _nodesByID: any
    _receivedSharingRequests: any

    Methods

    • Adds a new node to the store and makes it observable.

      Parameters

      Returns ESPRMNode

      The observable node that was added.

      GPT Context: This action adds a new node to the store, making it observable for tracking changes. It also intercepts the node to handle specific actions or errors.

    • Dynamically adds an observable property to the store.

      Parameters

      • propertyName: string

        The name of the property to add.

      • initialValue: any

        The initial value of the property.

        GPT Context: This function allows adding a new observable property to the store dynamically, along with its getter and setter.

      Returns void

    • Resets all properties of the store to their initial state.

      GPT Context: This function clears all data from the store, resetting all properties to their default values.

      Returns void

    • Deletes nodes by their IDs.

      Parameters

      • ids: string[]

        The IDs of the nodes to delete.

        GPT Context: This function removes multiple nodes from the store based on their IDs, useful for batch deletions.

      Returns Promise<void>

    • Expands the details of nodes based on the provided node IDs.

      Parameters

      • nodeIds: string[]

        An array of node IDs to be expanded.

      Returns ESPRMNode[]

      The list of nodes corresponding to the provided IDs.

      GPT Context: This action method takes an array of node IDs and retrieves the corresponding node details from the nodesByID collection, returning a list of nodes. If a node ID doesn't exist, it returns an empty object in its place.

    • Fetches the next set of groups from the cloud.

      This method fetches the next set of groups from the cloud using the #fetchNextRef function, which is set when the group list is synchronized.

      Returns Promise<ESPPaginatedNodesResponse>

      A promise that resolves when the next set of groups has been fetched.

      An error is thrown if there are no more groups to fetch.

    • Fetches the next set of issued sharing requests from the cloud.

      This method fetches the next set of issued sharing requests from the cloud using the #fetchNextIssuedSharingRequestRef function, which is set when the issued sharing request list is synchronized.

      Returns Promise<
          {
              fetchNext: () => Promise<
                  { sharedRequests: { [key: string]: ESPNodeSharingRequest[] } },
              >;
              hasNext: boolean;
              sharedRequests: { [key: string]: ESPNodeSharingRequest[] };
          },
      >

      A promise that resolves when the next set of issued sharing requests has been fetched.

      An error is thrown if there are no more issued sharing requests to fetch.

    • Fetches the next set of received sharing requests from the cloud.

      This method fetches the next set of received sharing requests from the cloud using the #fetchNextReceivedSharingRequestRef function, which is set when the received sharing request list is synchronized.

      Returns Promise<
          {
              fetchNext: () => Promise<
                  { sharedRequests: { [key: string]: ESPNodeSharingRequest[] } },
              >;
              hasNext: boolean;
              sharedRequests: { [key: string]: ESPNodeSharingRequest[] };
          },
      >

      A promise that resolves when the next set of received sharing requests has been fetched.

      An error is thrown if there are no more received sharing requests to fetch.

    • Processes the issued sharing request response from the cloud.

      This function processes the issued sharing request response from the cloud, makes the requests observable, and updates the store with the latest data. It also handles pagination by setting the fetchNext reference and hasNext flag.

      Parameters

      • response: any

        The response from the cloud containing issued sharing requests.

      Returns {
          fetchNext: () => Promise<
              { sharedRequests: { [key: string]: ESPNodeSharingRequest[] } },
          >;
          hasNext: boolean;
          sharedRequests: { [key: string]: ESPNodeSharingRequest[] };
      }

      An object containing the observable issued sharing requests, fetchNext function, and hasNext flag.

    • Processes the node details response from the cloud.

      This function processes the node details response from the cloud, makes the nodes observable, and updates the store with the latest data. It also handles pagination by setting the fetchNext reference and hasNext flag.

      Parameters

      • response: any

      Returns ESPPaginatedNodesResponse

      An object containing the observable nodes, fetchNext function, and hasNext flag.

    • Processes the received sharing request response from the cloud.

      This function processes the received sharing request response from the cloud, makes the requests observable, and updates the store with the latest data. It also handles pagination by setting the fetchNext reference and hasNext flag.

      Parameters

      • response: any

        The response from the cloud containing received sharing requests.

      Returns {
          fetchNext: () => Promise<
              { sharedRequests: { [key: string]: ESPNodeSharingRequest[] } },
          >;
          hasNext: boolean;
          sharedRequests: { [key: string]: ESPNodeSharingRequest[] };
      }

      An object containing the observable received sharing requests, fetchNext function, and hasNext flag.

    • Sets the node list and makes each node observable.

      Parameters

      • nodeList: ESPRMNode[]

        The list of nodes to set.

        GPT Context: This function initializes or updates the node list in the store, making each node observable for tracking changes.

      Returns void

    • Sets the node list with pre- and post-processing hooks.

      Parameters

      • nodeList: ESPRMNode[]

        The list of nodes to set.

        GPT Context: This function allows developers to inject custom logic before and after setting the node list.

      Returns void

    • Fetches the list of nodes from the cloud and sets the node list.

      GPT Context: This function fetches the list of nodes from the cloud and updates the store with the latest data.

      Returns Promise<void>

    • Updates multiple nodes' properties.

      Parameters

      • updates: Partial<ESPRMNode>[]

        An array of partial updates for the nodes.

        GPT Context: This function allows bulk updates to multiple nodes, merging the provided updates with the existing node data.

      Returns void

    • Adds an available transport to a node.

      Parameters

      • nodeId: string

        The ID of the node.

      • transportDetails: ESPTransportConfig

        The details of the transport.

        GPT Context: This action adds an available transport to a node, allowing the node to communicate using the specified transport.

      • operation: "add" | "remove" = "add"

      Returns void