Connect to Content File update

8. connectToUpdateContentFile(callback: (response: ContentFileDto) => void)

Description: Sets up a WebSocket listener for real-time updates to content files within the connected master file.

Parameters:

  • callback: (response: ContentFileDto) => void - Function to handle update events, receiving the updated content file data.

Returns: Promise<void>

  • Resolves when the listener is successfully established.

  • Rejects with an error if the connection fails.

Example:

await ulda.connectToUpdateContentFile((response) => { console.log('Real-time update:', response); }); console.log('Listening for updates'); // Output: Listening for updates
API