NodeMappingHelper: {
    addNodeMapping(nodeId: string, secretKey: string): Promise<string>;
    getNodeMappingStatus(requestID: string): Promise<string>;
    initiateUserNodeMapping(requestBody?: Record<string, any>): Promise<any>;
    verifyUserNodeMapping(
        requestBody?: Record<string, any>,
    ): Promise<ESPAPIResponse>;
} = ...

Helper module for managing node mapping-related operations.

Type declaration

  • addNodeMapping:function
    • Associates a node with a user by mapping the provided node ID to a secret key.

      Parameters

      • nodeId: string

        The unique identifier of the node to be mapped. This parameter is required.

      • secretKey: string

        The secret key corresponding to the node. This parameter is required.

      Returns Promise<string>

      A promise that resolves to the request_id generated for this operation.

      If the nodeId or secretKey is missing.

      If the API request fails.

  • getNodeMappingStatus:function
    • Retrieves the status of a node mapping request.

      Parameters

      • requestID: string

        The unique identifier of the node mapping request. This parameter is required.

      Returns Promise<string>

      A promise that resolves to the status of the node mapping request.

      If the API request fails.

  • initiateUserNodeMapping:function
    • Initiates a user node mapping request.

      Parameters

      • requestBody: Record<string, any> = {}

        The request body for the user node mapping.

      Returns Promise<any>

      A promise that resolves to the response from the API.

  • verifyUserNodeMapping:function