Is it possible to listen when the vector store file has been created?

Client has a page which manipulates vector store file’s contents, once it’s done, creates a new file and deletes the existing vector store file.
Response which comes after calling a method to create a vector store file, returns object

  id: 'file-XCXCXcZQMHFRine43Q',
  object: 'vector_store.file',
  usage_bytes: 0,
  created_at: 1717412960,
  vector_store_id: 'vs_EuR4Xd7XyxkGXGXGDaJCuyg',
  status: 'in_progress',
  last_error: null

Is it possible to listen when the status from “in_progress” has changed to “processed”?

It is possible to poll the vector store file object and get the current status:

status gives the status of the vector store file, which can be either in_progress, completed, cancelled, or failed. The status completed indicates that the vector store file is ready for use.